IBKR TWS Configuration
Detailed guide to configure Interactive Brokers TWS for use with OptionTrigger
This guide covers the detailed configuration of Interactive Brokers Trader Workstation (TWS) for optimal use with OptionTrigger.
Applies to: TWS and IB Gateway users
Prerequisites
- Interactive Brokers account (live or paper)
- TWS or IB Gateway installed
- OptionTrigger Desktop installed
Step 1: Download TWS
Visit IBKR Website
Go to interactivebrokers.com and navigate to Trading → TWS.
Step 2: Login to TWS
Step 3: Enable API Access
Open Global Configuration
Click File → Global Configuration or the gear icon.
Enable Socket Clients
Check Enable ActiveX and Socket Clients.
Important: OptionTrigger defaults to port 7496. IBKR TWS paper may default to 7497, so change TWS to 7496 for this guide or ensure your backend configuration matches the actual TWS/Gateway port.
Recommended Settings
| Setting | Value | Description |
|---|---|---|
| Socket port | 7496 | API connection port |
| Read-Only API | Unchecked | Allow trading |
| Download open orders | Checked | Sync orders |
| Send instrument-specific | Checked | Better data |
Troubleshooting
Connection Refused
- Verify TWS is running
- Check API is enabled
- Confirm port number matches
API Connection Drops
- Disable auto-logoff in TWS
- Check network stability
- Restart TWS if needed
Next Steps
| Guide | Description |
|---|---|
| Desktop Setup Guide | Complete setup |
| Quick Start Guide | Start trading |
- Trade Options on TradingView — brokers, tools, workflows
- Options Trading Automation Playbook — webhooks vs chart-native execution
- IBKR + TradingView for Options — permissions, TWS, troubleshooting
Tip: IB Gateway is lighter than TWS for long-running API sessions, but it still requires IBKR's normal login/authentication flow.



