Individual · Advisors · InstitutionsLog InOpen Account
繁中 / EN
Interactive Brokers
Contact

PLATFORMS / API ACCESS

IBKR API AccessFour gates between working code and working orders

The same API is a different access product on individual, advisor, and institutional accounts: authentication, quotas, and support change.

Three auth pathsTwo ceilingsPaper firstReviewed 2026-11

1. The API is a platform layer, not an add-on

The difference is ownership: who maintains the screen, the session, the credential, and the escalation path.

PlatformHow you connectWho keeps it upTypical user
TWS / IB GatewayLocal installYouDepth, multi-leg
Client PortalBrowser loginBrokerAccounts, reports
MobileApp loginBrokerPositions, alerts
APIYour program, plus gatewayYouAutomation

Whoever keeps the connection keeps the schedule: an upgrade and a 3 a.m. page are one event.

2. Three interfaces, three access surfaces

Access is fixed at connect time: socket, credential, breach signal, support queue. Features sit on the API comparison page.

InterfaceWhere it connectsAuthenticationDefault ceilingOps burden
TWS APILocal TWS or Gateway socketLocal login session50 req/sUptime, build drift
Client Portal Web APILocal proxy or OAuthGateway, OAuth 1.0a/2.010 req/s eachKeepalive, daily login
FIXBroker session over VPNLogon, sequence numbers250 msgs/sNetwork, resend

Desktop multi-leg: TWS API. Server accounts: Web API. Routing and drop copy: FIX.

3. Authentication: three modes, three maintenance bills

ModeEligible accountsAutomatedCredentialYou maintain
Client Portal GatewayIndividualOne login a dayBrowser SSO sessionUptime, re-login
OAuth 1.0aAdvisors, brokers, funds, developersYesKeys plus session tokenSigning, rotation
OAuth 2.0Advisors and brokersYesAuthorization codeToken refresh

Two rules decide it: OAuth 1.0a is the only path for third-party developers, and advisor account management requires OAuth 2.0.

4. Sessions and allowlists: four gates you pass again

Four items reopen daily or weekly; one failing stops the strategy.

  1. Entitlements: API and trading permissions are separate; account type decides interfaces.
  2. IP allowlist: one fixed address; a dynamic IP drops daily.
  3. Keepalive: ping the gateway; on a drop, re-authenticate or alert.
  4. Maintenance: never schedule across the weekend rollover.
Run the gateway as production

When it dies there is no error email, only an absence of fills.

5. Rate limits: two ceilings, two arithmetic styles

TWS API scales by market data lines; Web API caps a rate per username plus endpoint limits. Errors: 100 or 429.

InterfaceCeilingBreachCountermeasure
TWS API, 100 lines50 req/sError 100; session may endQueue, slow down
Web API global10 req/s429Token bucket
Web API snapshot10 req/s429Batch, cache
Web API history50/min429Backfill after close
Web API ordersOnce per 5s429Stream instead
FIX via Gateway250 msgs/sSession settingsShaping

Repeat offenders sit in a ten minute penalty box: the limit stops you.

Pacing is per connection, lines are per account, and the Web API rate is shared by username.

6. A worked budget: 100 requests a minute, 1,000 orders a day

Put both sizes in one budget.

WorkloadPer minuteCapFeasibleHow
Quotes, 30 symbols6010/sIf shapedBatch
Order polling241 per 5sAt edgeStream
Historical backfill1250/minYesAfter close
Account reads41 per 5sYesCache 30s
Total100-Yes20% margin

1.67 per second looks safe until 60 calls land in one second.

A thousand orders over 6.5 hours is 2.6 a minute; preview, place, and confirm make 3,000 calls, or 7.7 a minute. Order calls share the cap, the open clusters volume, and retries trigger 429.

On TWS API, fifty a second is 3,000 a minute, so a hundred uses three percent.

7. Latency: the path sets the floor

Latency is path length.

PathRound tripDriftChoose it when
Local TWS or GatewayTens of msLocal loadDesktop workflow
Local Gateway to Web APIHundreds of msProxy hopAccount work
FIX sessionTen ms or lessNetwork, resendsInstitutional routing

Measure the 1st, 50th, and 99th percentile; averages hide the open.

8. Paper and live: one path, two logins

Paper proves workflow and errors, not queue position or slippage.

EnvironmentEntryPortProvesCannot prove
TWS paperTWS7497Order flowQueueing
TWS paperIB Gateway4002Same, lighterDesktop UI
TWS liveTWS or Gateway7496/4001Everything-
Web API paperClient Portal GatewayPaper loginAccounts, ordersMatching
Web API liveSame gatewayLive loginEverything-

One gateway, one port, two logins: make the environment a setting, printed at startup.

Paper quotes lag; rehearse on paper trading first.

9. Support: four channels, four boundaries

Separate account issues from code issues.

ChannelGood forNot forPace
API ticketEntitlements, auth, limitsStrategy logicDays
Docs and coursesParameters, samplesYour configImmediate
Community librariesSamples, trapsGuaranteesVaries
Institutional onboardingFIX, complianceSmall accountsScheduled

Include the request ID, timestamp, interface, and error code to skip two rounds. Docs start at the support centre.

10. Seven checks before launch

  1. Environment switch: printed at startup with the account number.
  2. Credential custody: keys and cookies stay out of the repository.
  3. Allowlist: the fixed address changes through a process.
  4. Budget sheet: per-minute and daily caps assert in code.
  5. Backoff: 429 and error 100 back off, never retry unbounded.
  6. Idempotency: client order ID, de-duplication, status check after reconnect.
  7. Health checks: external monitoring alerts first, automates second.

FAQ

Is API access charged separately?

Usually free; quotes, depth, and historical data may be billed.

Must individual accounts log in daily?

Gateway: one interactive login a day; OAuth runs unattended.

How long to wait after a 429?

Back off exponentially; repeat offenders can hit a penalty box.

In depth: 429 backoff and rate limits →

Does TWS have to stay open?

Yes; IB Gateway is lighter but still needs a build and login.

Are paper quotes real time?

Often delayed; do not judge real-time sensitivity on paper.

Can several strategies run at once?

Yes, by client ID, but quota is per account and username.

Is FIX realistic for a small team?

Rarely: network, session, and compliance costs are high.

Does switching interfaces mean a rewrite?

Usually the access layer; abstract the calls and swap the adapter.

Sources and date

Sources: IBKR Web API documentation (authentication, pacing, endpoint rate table), TWS API documentation (pacing, error codes), IBKR API product pages and Campus courses, published fee and entitlement notes, port references. Reviewed: November 2026. Limits, ports, and schedules change; confirm against official documentation.