Skip to main content
We limit how fast you can send requests, in two places. Our servers throttle each subaccount and each management key, and an edge filter in front of them limits each IP address.

Limits on our servers

Each throttle is a bucket of tokens. A request spends tokens from its bucket. The bucket holds up to its capacity, which is your burst, and refills at its refill rate, in tokens per second. Your account’s tier multiplies the capacity and refill rate of every throttle. Pick a tier to see its limits. The history bucket meters the record reads: fills, transactions, transfers, settled orders, and the history routes. Each such read costs a base plus tokens in proportion to the limit you request, so a larger page spends more. GET /v3/limits reports your numbers for every bucket. GET /v3/limits, GET /v3/time, and GET /v3/exchange/status spend no tokens.

Keys that share throttles

Each subaccount has one set of throttles, and every key on it spends from that set. A management key has a set of its own. A second trading::read key on a subaccount doesn’t raise its limits.

Tiers

Your account has one tier, and every subaccount you hold runs at it. Each subaccount keeps its own throttles, so each one gets the full limits of your tier. A tier sets three things, shown for each tier above: Your account earns its tier from the volume of all your subaccounts over the last calendar month, in Eastern time. Early each month, we move your account to the tier that volume reaches, so a tier can go down as well as up. We can also set your tier by hand. A tier we set overrides the earned tier until we clear it. Volume is the full payout of every contract your subaccounts traded, so 100 contracts count as $1. A wash, where your order trades against another of yours, doesn’t count, and neither does a voided trade. A new subaccount runs at your account’s tier from its first request. A management key is always at Base. GET /v3/limits reports your account’s tier as accountTier, whichever key you call it with. It reports the limits of the key you call it with, and their tier as tier. With a trading key, tier is your account’s tier. With a management key, it’s BASE. accountMaxOpenOrders and accountMaxWatchedMarkets report the caps of your account’s tier, whichever key you call it with.

Websocket subscriptions

The stream bucket meters how fast you subscribe. A second limit caps how much you hold: a connection may watch up to markets at once at Base, and more at a higher tier. An event counts as the markets it contains. A subscribe that would take you over that answers SUBSCRIPTION_LIMIT_EXCEEDED, and it subscribes to nothing. A snapshot that names more markets than the cap answers the same. If such a request costs more than the stream bucket holds, you get RATE_LIMIT_EXCEEDED until the bucket is full. GET /v3/limits reports your cap as maxWatchedMarkets. The key routes and the subaccount routes spend the account bucket, one token a request. A transfer spends from it too. The transaction and transfer listings spend history instead.

Limits at the edge

The edge is a filter in front of our servers. It checks every request on every route before the request reaches them.
The edge refuses a request with a 403 and an HTML body, with no code and no message. The request never reaches our servers.

Pace your requests

A throttle refills over time, up to its capacity: tokens(t+Δt)=min⁡(C,  tokens(t)+r Δt)\text{tokens}(t + \Delta t) = \min\bigl(C,\; \text{tokens}(t) + r\,\Delta t\bigr) Here CC is the capacity, rr is the refill rate, and Δt\Delta t is the time that has passed.
  1. Model each throttle in your client.
  2. When you send a request, subtract its cost from your model.
  3. While your model holds too few tokens, queue the request instead of sending it.

Error response

When you go over a limit, we answer 429 with a Retry-After header:
  • Wait Retry-After seconds before you retry. Retrying sooner hits the same empty throttle.
  • Don’t create keys to raise a limit. Every key on a subaccount shares its throttles.
  • Handle a 429 even if you model the throttles. Our servers share token counts with each other gradually, so your model is never exact.