Skip to main content

Rate Limits

Per-wallet rate limiting for order operations and API requests.

Overview​

Rate limiting is enforced per wallet using a fixed-window algorithm. Limits are applied to:

  • Order placements (POST /order)
  • Order cancellations (DELETE /order)
  • API requests (general endpoint usage)
  • Public risk simulations (POST /risk/simulate/portfolio and POST /risk/simulate/orders) use separate source and process-global limits

Limits reset every 60 seconds.

Default Limits​

TierOrders/minCancels/minAPI Requests/minMax Open OrdersMax Positions
Default6012060010050
Tier 130603005020
Tier 21203001,200500200
Market Maker6001,2006,0002,000Unlimited

New wallets receive default limits. Contact support for tier upgrades.

Rate Limit Response​

When a rate limit is exceeded, the API returns 429 Too Many Requests:

{
"error": "rate_limit_exceeded",
"message": "Rate limit exceeded for OrderPlacement: 60 per minute, retry after 45 seconds",
"retry_after_secs": 45,
"limit": 60
}

Response Headers​

All rate-limited endpoints include these headers on both success and error responses:

HeaderDescriptionExample
X-RateLimit-LimitMaximum requests allowed per window60
X-RateLimit-RemainingRequests remaining in current window42
X-RateLimit-ResetUnix timestamp when the window resets1737312060
Retry-AfterSeconds until retry (only on 429)45

Example Response Headers​

Successful request:

HTTP/1.1 200 OK
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 42
X-RateLimit-Reset: 1737312060

Rate limited request:

HTTP/1.1 429 Too Many Requests
Retry-After: 45
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1737312060

Rate Limit Categories​

Rate limits are tracked separately for each action type:

Order Placement​

Applies to:

  • POST /order (options orders)
  • POST /bulk_order (bulk orders, each order in batch counts)
  • PUT /bulk_order (bulk replacements, each replacement counts)

Order Cancellation​

Applies to:

  • DELETE /order
  • DELETE /bulk_order (bulk cancels, each cancel counts)
  • DELETE /bulk_order_cloid (bulk cancels by client order ID, each cancel counts)

API Requests​

Applies to general API usage across all authenticated endpoints.

Risk Simulation​

Public portfolio and order simulations have separate limits of 60 requests per network source and 600 requests process-wide per minute. At most four simulations run concurrently in one API process. A request that exceeds a quota or finds the simulation workers saturated returns 429 Too Many Requests.

Position and Order Limits​

In addition to rate limits, wallets have maximum open order and position limits:

Limit TypeDescriptionRejection
Max Open OrdersMaximum concurrent open ordersOrder rejected before reaching engine
Max PositionsMaximum unique positions (-1 = unlimited)Order rejected if would create new position

When limits are exceeded:

{
"error": "limit_exceeded",
"message": "Maximum open orders limit exceeded (100)"
}

Best Practices​

Handling Rate Limits​

  1. Monitor headers: Track X-RateLimit-Remaining proactively
  2. Respect Retry-After: Wait the specified duration before retrying
  3. Implement backoff: Use exponential backoff on repeated 429s
import time

def place_order_with_retry(order, max_retries=3):
for attempt in range(max_retries):
response = api.place_order(order)

if response.status_code == 429:
retry_after = int(response.headers.get('Retry-After', 60))
time.sleep(retry_after)
continue

return response

raise RateLimitError("Max retries exceeded")

Optimizing Request Usage​

  1. Use bulk endpoints: POST /bulk_order for multiple orders in one request
  2. Batch cancels: DELETE /bulk_order or DELETE /bulk_order_cloid instead of multiple DELETE /order requests
  3. WebSocket for updates: Subscribe to order updates instead of polling GET /orders

Monitoring​

Track these client-side metrics:

  • Request rate per action type
  • X-RateLimit-Remaining trends
  • 429 response frequency
  • Average Retry-After durations

Error Reference​

HTTP StatusError CodeDescription
429rate_limit_exceededRate limit exceeded, retry after specified time

See Errors for the full error reference.