FAQ
This guide covers common issues, best practices, and tips for integrating with our API in a smooth and secure manner.
⏱ Timestamp & recvWindow
Q: What is the maximum allowed time difference between the request timestamp and the server's time?
The default allowed time difference is 5000 milliseconds (5 seconds).
Requests with timestamps older than this will be rejected as invalid.
You can customize this window using the optional
recvWindow
parameter.
🚫 X-CH-TS Header Missing
Q: What should I do if the request header X-CH-TS
is empty or missing?
The
X-CH-TS
(timestamp) header is mandatory.Before each request, verify that
X-CH-TS
is correctly set.If issues persist, print/log
X-CH-TS
for debugging and ensuring your code initializes this field properly.
❌ Invalid Signature Issues
Q: Why do I get an “Invalid Signature” error?
Check Your Headers Compare your request headers with the example:
Verify Your API Key Make sure your API key is correctly configured in your environment.
Ensure Proper String for Signing Construct your pre-sign string correctly. The timestamp, method, endpoint, and body must be in the correct order.
Examples:
GET
POST
⚠ ILLEGAL_CONTENT_TYPE (-1017)
Q: Why do I get the error code -1017 “ILLEGAL_CONTENT_TYPE”?
Always include the header:
📊 API Rate Limits
Q: How often can I call the API?
Rate limits vary by endpoint.
Personal data endpoints are rate-limited per API key.
Public data endpoints are rate-limited per IP address.
If valid API information is passed in public data requests, API key limits will be applied.
Q: What does HTTP 429 mean?
You’ve hit the rate limit. Reduce the request frequency.
Q: Will my IP get banned if I exceed the limit?
Normally, no. The server will throttle your requests. Just slow down your call rate.
🔌 WebSocket Connection Issues
Q: Why does my WebSocket disconnect unexpectedly?
WebSocket requires a heartbeat (ping/pong) to maintain a connection.
If the server doesn’t receive your pong, it may close the connection.
Implement a reconnection mechanism to ensure stability in the event of disconnections.
⏳ Timeout Errors
Q: What causes a timeout when calling the API?
Usually due to network issues or inability to reach the server.
Check your network connectivity and server availability.
🔄 Batch Order Limits
Q: How many orders can I submit or cancel in a batch?
The batch interface supports up to 10 orders per request.
🆔 Custom Order ID
Q: What is newClientOrderId
and how is it used?
It's your custom order identifier.
Use it to track and manage orders.
Ensure uniqueness. Duplicate IDs may cause unexpected behavior in querying or canceling.
💱 Currency Pairs & Market Data
Q: How can I get all trading pairs?
Use the endpoint:
Q: How do I get the latest trade price?
Use the ticker endpoint, where
last
represents the latest trade price.
Q: Can the 24-hour trading volume be negative?
Yes, because the data uses a rolling 24-hour window, which can decrease over time depending on market activity.
Last updated