IBKR Client Portal Web API endpoints
23 documented Interactive Brokers API endpoints, grouped by what they do. Each has its method, path, parameters and the source it was read from.
Independent and unofficialNewest check
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
Accounts
- GET/iserver/account/pnl/partitionedUpdated profit and loss for the selected account, keyed by account and segment. The first request returns an empty upnl object.
- GET/iserver/accountsThe accounts you can trade, their aliases and the currently selected account. IBKR says to call it before the market data snapshot.
- GET/portfolio/{accountId}/ledgerCash balance, net liquidation and profit and loss for each currency the account holds, plus a BASE total.
- GET/portfolio/{accountId}/positions/{pageId}All positions in an account, one page at a time, with size, market price, market value and unrealised profit and loss.
- GET/portfolio/{accountId}/summaryAccount values such as net liquidation, available funds, buying power and margin, by segment where it applies.
- GET/portfolio/accountsYour accounts with ID, title, base currency and type, for the portfolio endpoints.
Contracts
- GET/iserver/contract/{conid}/infoFull contract details for a conid: symbol, instrument type, currency, exchange, trading class and whether it can be smart routed.
- GET/iserver/secdef/infoAttributes of an instrument, mainly for derivatives: ticker, exchanges, currency, maturity, right and strike.
- GET/iserver/secdef/searchFinds contracts for a symbol and returns their contract IDs (conid), which every market data and order call needs.
Market data
Orders
- DELETE/iserver/account/{accountId}/order/{orderId}Cancels an existing order that has not filled.
- POST/iserver/account/{accountId}/order/{orderId}Changes an existing order that has not filled. Send the whole ticket with the new values.
- POST/iserver/account/{accountId}/ordersSubmits an order ticket, a bracket or an OCA group. The reply is either the order ID or a question you must confirm with POST /iserver/reply/{replyId}.
- POST/iserver/account/{accountId}/orders/whatifProjects the effect of an order before you send it: cost, change to equity, initial and maintenance margin, and position.
- GET/iserver/account/order/status/{orderId}Status of one order from the current brokerage session: side, type, size, filled amount and account.
- GET/iserver/account/ordersOpen orders, plus orders filled or cancelled during the current brokerage session.
- POST/iserver/reply/{replyId}Answers a warning that came back from an order submission and continues with the order. The answer can bring another question.
Session
- POST/iserver/auth/ssodh/initStarts the brokerage session. IBKR documents it for OAuth users after the access token and live session token steps.
- POST/iserver/auth/statusWhether your brokerage session is authenticated, fully established and free of a competing session. Call it after you log in through the gateway.
- POST/logoutLogs you out of the gateway session. Any further call needs a new login, and IBKR says to discard client side cookies.
- POST/ticklePings the server so the session does not time out. IBKR expects a call about every 60 seconds.