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

Development / Rate limits

IBKR API 429: limits, backoff, and queues

A 429 is not "too much traffic"; it is an instantaneous rate above your allowance. The 10 requests/second cap and the 50 requests/second socket ceiling are separate sums.

  • Updated 2026-11-21
  • 8 sections
  • 4 tables
  • 5 FAQs

Five points first

  • The Web API allows 10 requests/second per username.
  • Endpoint limits: 1 per 5 seconds or 15 minutes.
  • Socket pacing is market data lines ÷ 2, 50 per second.
  • A 429 can park your IP for 10 minutes.
  • 1,000 orders a day rarely trips it; bursts do.

01What a 429 actually rejects

A 429 says the request was valid but arrived too fast; slowing down fixes it. A 401 is an expired session and a 500 a server fault, so retrying all three alike turns a recoverable error into a block. IBKR documents a 10-minute penalty box for violating IPs and permanent blocks for repeats: stop the queue, not the request, since the whole second draws on one allowance.

02Three layers: global, endpoint, connection

The global cap is 10 requests/second per authenticated username; extra sessions share an egress IP. Endpoints are tighter: orders 1 per 5 seconds, scanner 1 per second. Sockets allow market data lines ÷ 2, 50 per second; a breach returns error 100.

Table 1: Pacing layers (checked 2026-11)
LayerLimitScopeOn breach
Global (Web API)10 req/sPer username429
Single endpoint1/15 min – 10/sPer endpoint429
Socket (TWS/Gateway)lines ÷ 2Per clientError 100
IP penalty box10 minPer IPTemporary, then permanent

03Turn allowances into intervals

Milliseconds are harder to get wrong: 1 ÷ limit × 1.25. History allows 10 per second or 50 per minute, so 200 bars spend the minute budget in 5 seconds and call 51 fails; pace it at 1.2 seconds.

Table 2: Endpoint limits and intervals
EndpointLimitInterval
/iserver/marketdata/snapshot10/s125 ms
/iserver/marketdata/history10/s or 50/min1.2 s
/iserver/orders1/5 s6.25 s

04The "10 requests a second" design that fails

Ten workers, six symbols each: 60 calls averaging 10 per second over 6 seconds, yet all leave inside 0.55 seconds, about 98 per second. REST rejects call 11, the socket call 51. Retrying at once extends the penalty.

Table 3: Opening burst (60 calls, socket path)
TimeSentOKRejected
0.00–0.20 s18180
0.20–0.40 s38380
0.40–0.55 s54504

05Backoff: 1, 2, 4, 8 seconds plus jitter

Exponential backoff waits 2^(n-1) seconds, capped at 30, with equal jitter: base ÷ 2 + random(0, base ÷ 2). Keep retries convergent: one queue per session, stop after four failures. Never blind-retry an order POST; deduplicate with cOID and query first, as in rejected orders.

Table 4: Backoff schedule (base 1 s)
RetryWindowDrawTotal
10.5–1.0 s0.7 s0.7 s
21.0–2.0 s1.6 s2.3 s
32.0–4.0 s3.1 s5.4 s
44.0–8.0 s6.4 s11.8 s

06Retry-After and the 10-minute box

Honour Retry-After when present. IBKR does not promise it; treat the 10-minute box as the floor: one 429 backs off 1/2/4/8 seconds, three in a minute pause 60 seconds, two rounds from one IP stop 10 minutes.

07Queue design: one bucket, one writer

Limit before sending. A token bucket refilled at 8 per second, 80% of the cap, admits each call. Priority runs cancel, orders, reads, then backfill at 50 per minute; one writer thread sends orders, and snapshots older than 2 seconds are dropped.

08The 1,000 orders a day budget

1,000 orders a day is 0.043 per second, under 0.5% of the cap. A 40-order rebalance in 2 seconds is 20 per second; retrying all 1,000 inside 60 seconds is 16.7 per second and lands in the penalty box.

09Five common questions

How is a 429 different from a 503?

429 is a rate breach with a valid request; 503 means the service is down.

How long should I wait after a 429?

Retry-After if sent; otherwise 1, 2, 4, 8 seconds with jitter. The box is 10 minutes.

Can retrying lock my account?

IBKR documents a 10-minute IP penalty box and possible permanent blocks.

Do REST and socket pace alike?

No. The Web API caps at 10 requests/second; the socket uses lines ÷ 2, 50 by default.

Will 1,000 orders a day hit a limit?

Not by volume, at 0.043 per second; bursts do — 40 in 2 seconds.