Connect Interactive Brokers through Client Portal
Authenticate the gateway and use only AMM-supported contracts, orders and history.
Reviewed 2026-10-24 · Windows & macOS
On this page
Prepare the gateway#
AMM integrates with the Interactive Brokers Client Portal Web API. The gateway must be reachable from the AMM server, and the intended account must be authenticated there. This is separate from merely entering an account code into AMM. Start in Data › Brokers & feeds › Interactive Brokers and inspect the gateway base URL, account code and authentication steps.
Use the gateway's browser login, finish any required approval or two-factor step, then use AMM's gateway controls to check authentication and capture the working session. A saved session is scoped to environment, account and gateway URL. Changing any of those can require another login; do not reuse an unrelated account's cookie. The drawer distinguishes Login required, Authenticated, Saved session active and Gateway error.
HTTPS is required for remote gateway origins. The development exception for a self-signed certificate is limited to loopback. Do not place credentials in a URL. Keep a gateway session's lifetime and provider-side restrictions in mind when diagnosing a later disconnect.
Select supported markets#
The general IB venue ID is interactivebrokers. AMM supports its implemented equity, FX, CFD and index contracts through exact contract resolution. Futures and options execution are rejected until the adapter has the required exact contract multiplier. A broad IB account entitlement or a Futures/Options label in a connection list does not override this boundary.
IB spot crypto uses the separate venue ID interactivebrokers-crypto, sharing the same gateway/account authentication. It supports USD pairs through the available Paxos or Zero Hash route, cash-only holdings and long-only execution. This separation gives crypto its own units, 24/7 calendar and historical storage instead of reinterpreting an equity contract as crypto.
Before launching, inspect the resolved conid, currency, quantity unit and price increment. A symbol spelling is a lookup request; the resolved contract is the execution identity. Use the exact instrument offered by the account and market-data subscription.
Start with a Paper workflow#
- Authenticate the intended Paper gateway account.
- Select Interactive Brokers as execution and choose a supported contract, such as a US equity available on your account.
- Select the live and historical providers independently. If you choose another provider, review its price timing and contract equivalence.
- Check preflight and account environment, then open a chart.
- Review the order type, quantity grid and execution estimate. Use only operations enabled for that route.
- Confirm the accepted broker order and subsequent fill through Positions & orders and history.
The broker account is netted per contract. AMM maintains virtual allocations for separate strategy sessions, so a session's position and P&L come from its own fills. The raw account position can include several sessions or external activity. Do not interpret account-level tax-lot P&L as an individual session's average-cost P&L.
Order and protection boundaries#
For the general IB adapter, atomic broker-side OCA protection is not implemented. Market entries with attached SL/TP fail; do not expect position protection to be accepted because another broker supports it. Extended-hours order routing is also disabled until validated. Historical requests can include outside-regular-hours bars; that does not imply extended-hours order execution support.
IB Crypto accepts market and limit orders only. Market orders are IOC; market buys are sent as IOC limits at the current ask because the upstream API sizes ordinary market buys in cash. Limit orders support GTC, IOC and DAY. No stop orders, margin or short sales are supported. Sells cannot exceed the long holding after working sell orders are accounted for. Always inspect accepted working orders before submitting a replacement.
History and retained results#
AMM's IB history service backfills local minute/daily data for live-session warmup. IB Crypto stores minute/daily trade bars. Historical ticks and second bars are not supplied by this backfill path. The non-crypto minute writer supports equity trade bars; FX/CFD minute requests are rejected where the available response cannot satisfy the required quote-bar contract. Do not infer historical support from the fact that a live quote is available.
Provider retention may be shorter than your requested warmup. AMM rechecks coverage after backfill and refuses startup if the required range is still missing. Resolve the date range, another explicit history provider or required warmup instead of treating partial data as complete. IB's trade-history window available to this integration is limited, so retain exported results and AMM audit history for your own workflow.
Account figures and diagnostics#
The account display commonly shows equity from net liquidation. Today uses the broker's daily P&L when valid; longer periods can use daily NAV or available fills. Deposits and withdrawals are not fully normalized through IB's cash-flow interface here. Session P&L and account change can therefore differ legitimately. Netted-session realized P&L currently excludes normalized commissions/fees; inspect authoritative execution costs separately.
For a failure, first distinguish gateway authentication, contract lookup, market-data permissions, unsupported order shape and incomplete history. Reauthenticate only the matching gateway/account. Use the exact broker error and current order readback to decide whether a failed request needs correction; never assume a timeout means an accepted order vanished.