Skip to main content
The Order Management System (OMS) and Market Data Service (MDS) have separate request budgets. The tables give the allowances, costs and connection caps production is configured with. They are settings, not protocol rules, and can change.

Request budgets

All tokens and sub-accounts for one user share that user’s allowance. OMS REST and the control WebSocket draw from it together. A priced user request spends its cost first from the user budget, then from shared authenticated capacity. A user refusal spends no shared units. A shared refusal leaves the user units spent. Priced public reads use the public budget even with a token. Units replenish continuously. A full budget can admit a burst of up to one second’s allowance, provided every applicable budget has enough units. Your OMS inventory (GET /inventory/user/{user_id}) reports DMM status in is_mm.

Read your remaining budget

Priced user REST replies expose X-RateLimit-Cost (attempted request units) and X-RateLimit-Remaining (whole user units left when the reply is prepared, including refill). Both successful replies and errors after the user check carry them when limiting is enabled. A user-bucket refusal spends nothing; a global-bucket refusal leaves the user charge spent. Remaining capacity belongs to the policy and tier that checked the request, and never reports shared capacity. Public, operator-signed and unpriced routes, requests refused before the user check, and requests with limiting disabled carry neither header. OMS, MDS and the gateway expose both to browsers. Control WebSocket replies are unchanged. See API conventions for the complete header contract.

Nonce and login requests

Generating a new nonce and logging in uses two attempts. POST /auth and POST /auth/with-signer share that counter. Returning a cached nonce uses no attempt, and a failed login can still count. Each service starts a separate window on the first counted attempt from a connecting IP. Workers behind the same proxy can share it. OMS also counts a correctly formed nonce request for an unknown user. When the IP window is exhausted, counted attempts return 429 RATE_LIMITED with error.details.retry_after_ms and Retry-After. Reuse a valid session or honor the retry hint. These IP refusals carry no user-budget usage headers. On a protected MDS read, failed bearer authentication spends the ordinary public price. See Authentication.

Request costs

The control WebSocket charges the same prices for order actions. Through the gateway, REST user trade history goes to MDS and user order lists go to OMS.

Reverted matches

When the clearing engine reverts a match because your order failed one of its checks on the order or on your account, for example the margin check, the trade reports Rollbacked with the reason for your order, and OMS refuses your priced requests with 429 RATE_LIMITED for a while. The block spends no units, yours or shared. Each refusal carries the time left in the block, in error.details.retry_after_ms and Retry-After on REST, and in the control socket’s retry delay. The first such revert blocks you for the first duration. A revert while you are blocked does not lengthen the block. A revert after a block has ended starts a longer one: 10, 20, 30 seconds and so on for a user, up to the longest. After 600 seconds without such a revert, counting the ones while you were blocked, the next block is the first duration again. These reasons block you: You are not blocked for any other reason: when the counterparty’s order was at fault, when the oracle price was missing, stale or out of bounds (PricingIssue), when a cap shared by the whole venue was reached (BreachTotalOiCap, BreachSpotMarginOiCap, BreachCollateralCap), when the clearing engine refused the match as a whole because it reached clearing too late (InvalidRelativeTime) or its orders could not trade with each other (InvalidOrderConditions), or when the clearing engine could not process the match (ProcessingError). You are not blocked either for a liquidation or auto-deleveraging order placed on your account.

Budget a quoting loop

Suppose one OMS user refreshes nine resting quotes with PATCH /orders/batch-replace and separately cancels one order each cycle. The batch costs 14 units (9 × 1.5 rounded up). The single cancel brings the cycle to 15. At 30 cycles per second, plan for 450 units/s from both the user and shared authenticated budgets. That leaves 50 units/s of ordinary user capacity or 2,050 for a DMM. Those 30 cycles can fit in a single burst only if both budgets have 450 units available. Space out refreshes to leave room for urgent cancels. Other users can consume the shared capacity even while your own budget has room.

Connections and streams

WebSocket upgrades take a slot independently of the request budget. Closing the stream frees it. Lowering the OMS cap affects new connections. Pings and incoming feed updates cost no request units. Through the gateway, a stream-cap refusal preserves the final HTTP status (429 for OMS or 503 for MDS) but replaces the service body with {"error":"upstream websocket handshake failed"}. A gateway 503 alone cannot identify a full MDS stream pool. Back off before reconnecting. Neither stream-cap refusal gives a retry time. For a connection that closes with 1013 and resync_required, follow Lag and resync.

Request and batch sizes

Shrink a body rejected by the service with HTTP 400 INVALID_REQUEST for excess size or by the gateway with HTTP 413. Split a batch that reaches the item check and gets 400 BATCH_TOO_LARGE on REST or BATCH_TOO_LARGE on control v1. Control v0 returns a raw request error, for example {"request":{"status":"error","error":"Maximum 50 amends per batch"}}. REST checks body size before pricing. On both transports the unit check precedes the item-count check. If a batch costs more than a full user or shared budget, split it before retrying. For example, 334 cancel IDs cost 501 units, more than the ordinary user’s 500-unit budget. See Managing orders. A position-basis read can also be too large. MDS allows 100,000 history rows per calculation. If it returns 422 BASIS_REPLAY_LIMIT_EXCEEDED, compare error.details.minimum_rows with error.details.max_rows and narrow the query by asset or sub-account.

When to retry

A v1 control refusal for a request tagged req_123 can look like this.
See WebSocket protocols for version selection and API errors for the REST envelope.