Basic Information of the Interface
Base URLs
- USDT-M:
https://fapi.xt.com(for USDT-margined futures) - Coin-M:
https://dapi.xt.com(for Coin-margined futures)
Network Recommendation
It is not recommended to access XT APIs via proxy due to high latency and poor stability.
Request Methods
- GET requests: Parameters should be passed in the QueryString.
- POST requests: Parameters can be passed in the RequestBody or QueryString.
When parameters are in the QueryString
Include the following header:
Content-Type: application/x-www-form-urlencoded
When parameters are in the RequestBody
Include the following header:
Content-Type: application/json
API Categories
XT API endpoints are divided into Public Interfaces and User Interfaces.
🟢 Public Interfaces
- No authentication required.
- Parameters are placed in the QueryString.
- Usually use the GET method.
Example:
curl -G "https://fapi.xt.com/future/market/v1/public/symbol/detail?symbol=btc_usdt"
or:
curl -G "https://fapi.xt.com/future/market/v1/public/symbol/detail" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "symbol=btc_usdt"
🔒 User Interfaces
- Require authentication via HTTP headers.
- Along with QueryString or RequestBody parameters, the following four headers are required:
| Header | Description |
|---|---|
validate-appkey | User API key |
validate-timestamp | Current timestamp (in milliseconds) |
validate-signature | Request signature |
Content-Type | Request content type (application/json or application/x-www-form-urlencoded) |
GET Example:
curl -G "https://fapi.xt.com/future/user/v1/compat/balance/list" \
-H "validate-appkey: $APPKEY" \
-H "validate-timestamp: $TIMESTAMP" \
-H "validate-signature: $SIGNATURE" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "queryAccountId=1234567890"
POST Example:
curl -X POST "https://fapi.xt.com/future/user/v1/user/collection/add" \
-H "validate-appkey: $APPKEY" \
-H "validate-timestamp: $TIMESTAMP" \
-H "validate-signature: $SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"symbol":"btc_usdt"}'
Endpoints that do not require signature authentication will be explicitly indicated.
Authentication References
- How to obtain an
APPKEY: Access Guide → Apply for API Key - How to generate a signature: Access Guide → Generate Signature
Rate Limits
Rate limits apply to both USDT-M (fapi.xt.com) and Coin-M (dapi.xt.com).
- Private endpoints (signature required) are limited per API key.
- Public endpoints (no signature) are limited per client IP.
- Some endpoints share one quota. When endpoints are listed as a group, the limit applies to the total number of requests sent to all endpoints in that group.
- Each limit has a sustained rate and a burst capacity. You can send up to the burst capacity at once; after that, quota is restored at the sustained rate.
Private endpoints (per API key)
| Group | Endpoints | Sustained rate | Burst |
|---|---|---|---|
| Batch cancel / close all | /future/trade/v1/order/cancel-all/future/trade/v1/entrust/cancel-all-plan/future/trade/v1/entrust/cancel-all-track/future/trade/v1/order-entrust/cancel-all/future/user/v1/position/close-all | 3 requests/s | 20 |
| Cancel all TP/SL | /future/trade/v1/entrust/cancel-all-profit-stop | 1 request/s | 2 |
| Adjust leverage | /future/user/v1/position/adjust-leverage | 5 requests/s | 20 |
| Open orders and entrusts | /future/trade/v1/order/list/future/trade/v1/entrust/plan-list/future/trade/v1/entrust/track-list/future/trade/v1/entrust/reverse-plan-list/future/trade/v1/order-entrust/list | 20 requests/s | 50 |
| Open order list (POST) | /future/trade/v1/order/list-open-order | 20 requests/s | 50 |
| TP/SL and entrust history | /future/trade/v1/entrust/profit-list/future/trade/v1/entrust/profit-list-history/future/trade/v1/entrust/plan-list-history/future/trade/v1/entrust/track-list-history/future/trade/v1/entrust/reverse-plan-list-history | 5 requests/s | 15 |
| Order and trade history | /future/trade/v1/order/list-history/future/trade/v1/order/trade-list/future/trade/v1/order/trade-list-all/future/trade/v1/order/trade-history/future/trade/v1/order/quant/list-history/future/trade/v1/order/quant/trade-list/future/trade/v2/order/partial-canceled-orders | 5 requests/s | 15 |
| Position history | /future/user/v1/position/break-list/future/user/v1/position/list-history | 3 requests/s | 6 |
| Account history | /future/user/v1/balance/bills/future/user/v1/balance/funding-rate-list/future/user/v1/auto-deleverage/history/future/user/v1/taker-over/list | 5 requests/s | 15 |
| All other trading and position endpoints | Other /future/trade/** and /future/user/v1/position/** endpoints. GET and POST endpoints are counted separately | 200 requests/s | 200 |
| All other account endpoints | Other /future/user/** endpoints. GET and POST endpoints are counted separately | 200 requests/s | 200 |
Position endpoints can also be called with the /future/trade/v1/position/ prefix; the same limits apply.
Public endpoints (per IP)
| Endpoint | Sustained rate | Burst |
|---|---|---|
/future/market/v1/public/q/depth | 10 requests/s | 10 |
/future/market/v1/public/q/funding-rate | 50 requests/s | 400 |
/future/market/v1/public/contract/open-interest | 50 requests/s | 400 |
All other /future/market/** endpoints (shared) | 100 requests/s | 200 |
When a limit is exceeded
- The request is rejected with HTTP status
429 Too Many Requests. - Every response from a rate-limited endpoint carries these headers:
X-RateLimit-Remaining: requests you can still send immediatelyX-RateLimit-Replenish-Rate: sustained rate per secondX-RateLimit-Burst-Capacity: burst capacityX-RateLimit-Requested-Tokens: quota consumed by one request
- On 429, back off before retrying (for example, wait 1 s and double the wait on each consecutive 429). Do not retry immediately in a loop.
- For bulk queries across many symbols, prefer endpoints that return all symbols in one call, or use WebSocket subscriptions instead of polling.