How does OptionTrigger connect to Interactive Brokers?

Through the API of TWS or IB Gateway running on the same computer. Orders go from your machine to IBKR; they do not pass through the OptionTrigger website. IBKR’s default socket ports are 7497 for a TWS paper session and 7496 for live, and 4002 and 4001 for IB Gateway; use the port your own installation shows.

OptionTrigger connects to Interactive Brokers through TWS or IB Gateway on the same computer. Keep the broker application logged in and its API connection available. Configure the loopback address, socket port and a client ID in OptionTrigger Desktop.

Follow the API configuration shown in your installed TWS or Gateway version. Do not expose its API port to the public internet.

Before the first order, open the API settings in TWS or IB Gateway and uncheck Read-Only API. A new installation of TWS or IB Gateway has it checked. While it is checked, the connection works and prices arrive, but IBKR refuses every order the application sends.

TWS Global Configuration, API Settings page, with the Read-Only API checkbox at the top of the General section checked and outlined in red
TWS Global Configuration, API Settings page, with the Read-Only API checkbox at the top of the General section checked and outlined in red
The API settings page in TWS. Read-Only API, outlined in red, is still checked here and has to be unchecked before a tool can place orders.

How do I know whether I am on Paper or Live?

Desktop reads the accounts from the broker session and asks you to confirm the account type before it activates. The account label is then shown in Desktop and on the chart.

Use an IBKR Paper account first. The application discovers broker accounts and asks you to confirm the inferred account type before activation. Verify the account label in Desktop and on the chart.

Broker & accounts in Desktop settings: broker mode set to IBKR Paper and the discovered paper account marked In use
Broker & accounts in Desktop settings: broker mode set to IBKR Paper and the discovered paper account marked In use
Broker & accounts in Desktop settings: the broker mode, and the account Desktop found and is using.

Paper and live are properties of the selected account, not separate execution modes. Free accounts can use Paper; a live account needs the Live plan or Pro.

Why is the broker connected but no option quote shows?

Because a socket connection and a market-data entitlement are separate things. Option bid and ask come from IBKR under your data subscriptions; without a fresh quote, entries are blocked.

The underlying price feed and option quotes are different inputs. TradingView supplies chart data; broker entitlements govern the available option bid/ask feed. A connected socket alone does not mean a tradable fresh quote exists.

Review connection and branch health before submitting an entry. Delayed, frozen, missing or stale quotes may block order execution.

Desktop Connections & diagnostics page: TradingView connected through the Chrome extension and TradingView Desktop, the local service connected with its recovery check done, and TWS / IB Gateway connected to a paper account
Desktop Connections & diagnostics page: TradingView connected through the Chrome extension and TradingView Desktop, the local service connected with its recovery check done, and TWS / IB Gateway connected to a paper account
Connections & diagnostics follows the path a trade takes: the chart, the local service and the broker.

What happens after a disconnect or restart?

The backend first compares its records with the broker’s orders, executions and positions. Until that check finishes, a recovery barrier holds new execution.

The backend reconciles broker orders, executions and positions before releasing its recovery barrier. Some startup catch-up orders require your explicit confirmation. Resolve that prompt in Desktop and inspect any warning instead of assuming every exit is active.

Official references

The products on the other side of the connection are documented by their vendors:

Frequently asked questions

Can I use IB Gateway instead of TWS?

Yes. OptionTrigger connects to either one on the same computer. Keep whichever you use logged in.

Why are orders refused when TWS is connected?

Check whether Read-Only API is still checked in the API settings of TWS or IB Gateway. While it is checked, the API accepts no orders. Uncheck it and click Apply.

Which port does OptionTrigger use for IBKR?

The socket port set in your TWS or IB Gateway API settings. IBKR’s defaults are 7497 (TWS paper), 7496 (TWS live), 4002 (Gateway paper) and 4001 (Gateway live), and they can be changed.

Can I use a live IBKR account on the Free plan?

No. Practice and IBKR Paper accounts are on the Free plan. A live account needs the Live plan, at $24.99 per month or $249 per year, or Pro, at $29.99 per month or $299 per year.

Should I open the TWS API port to the internet?

No. The connection is local. Keep the API port reachable only from your own computer.

These guides describe software behavior. Product features depend on the matching app version, market data and broker connectivity. Screens show the current app with sample data; no real account or order is shown. Check the Downloads page for supported versions and installation requirements.
Explore the complete workflow