Extended Hours (Pre-Market / After-Hours)
Regular trading hours only
Connect to IBKR TWS/Gateway to submit orders
Checking IBKR Bridge…
The IBKR Client Portal Gateway must be running locally for order execution.
Download IB Gateway or TWS
Install the IBKR Client Portal Gateway (lightweight) or Trader Workstation.
Enable API Connections
In TWS: Edit → Global Configuration → API → Settings
Start Client Portal Gateway
Run the gateway and log in. Then open https://localhost:5000 and authenticate.
# Navigate to IB Gateway folder and run:
bin/run.sh root/conf.yaml
# Or on Windows:
bin\run.bat root\conf.yaml
Verify Connection
Click the button below. The status badge above will turn green when connected.
Checking..."Cannot connect to IBKR Gateway" — Ensure the gateway is running on port 5000. Check that your firewall isn't blocking local connections.
"Not authenticated" — Open https://localhost:5000 in your browser and log in. Accept the self-signed certificate warning.
"No account ID found" — Make sure you selected an account after logging in. Set IBKR_ACCOUNT_ID in your .env if using a specific account.
Paper trading — Use port 5000 (Gateway) or 7497 (TWS) for paper. Port 7496 is for live TWS. Use a separate paper account for testing.
Self-signed certificate errors — This is normal. The gateway uses a self-signed cert. The server is configured to accept it.