Skip to content

Rate Limits

The XBTFX Trading API uses a weight-based rate limiting system to ensure fair usage and platform stability. Each API key has a shared budget of 600 weight per minute.

Every endpoint has an assigned weight. Each request consumes that weight from your per-minute budget. When the budget is exhausted, further requests receive a 429 Too Many Requests response until the window resets.

EndpointMethodWeight
/v1/auth/statusGET1
/v1/accountGET1
/v1/symbolsGET2
/v1/symbols/:symbolGET1
/v1/tradePOST1
/v1/closePOST1
/v1/modifyPOST1
/v1/positionsGET1
/v1/ordersGET1
/v1/historyGET1
/v1/close-allPOST10
/v1/close-symbolPOST10
/v1/close-byPOST1
/v1/reversePOST1

Every response includes rate limit headers so you can track your usage:

HeaderDescription
X-RateLimit-BudgetTotal weight budget per minute (600)
X-RateLimit-UsedWeight consumed in the current window
X-RateLimit-RemainingWeight remaining in the current window
X-RateLimit-WeightWeight consumed by this specific request

When you exceed the budget, the API returns HTTP 429:

{
"error": "rate_limit_exceeded",
"message": "Rate limit exceeded",
"retry_after_sec": 12
}

The retry_after_sec field tells you how many seconds to wait before retrying.

  • Monitor headers. Check X-RateLimit-Remaining in responses to avoid hitting the limit.
  • Use WebSocket for quotes. Streaming prices over WebSocket does not consume REST rate limit budget.
  • Cache symbol data. Symbol specifications change infrequently. Cache the response from /v1/symbols instead of fetching on every trade.
  • Batch closes. Use /v1/close-all or /v1/close-symbol instead of closing positions individually when you need to exit multiple positions.
  • Back off on 429. Wait for the retry_after_sec duration before retrying. Do not retry in a tight loop.