What is the maximum difference between the timestamp parameter of the request interface and the arrival time of the server?
When the server receives the request, it will judge the timestamp in the request. If it is sent before 5000 milliseconds, the request will be considered invalid. This time window value can be customized by sending the optional parameterrecvWindow.
The request header “X-CH-TS” cannot be empty. How to solve it?
First, it is recommended that the user print out theX-CH-TS, and check whether the X-CH-TS is empty when there is an exception. It is recommended that the user code is optimized, and judge whether the X-CH-TS is empty before each request.
Why does authentication always return invalid signatures?
You can print out the request header information and the string before signature, with the following points:- Compare your request header with the following request header example one by one:
- Check whether the API key is configured correctly in the program.
- Check whether the string before signing conforms to the standard format — the order of all elements must be consistent. You can copy the following example to compare with your string before signing:
The calling interface prompts ILLEGAL_CONTENT_TYPE (-1017). What is the reason?
We recommend attachingContent-Type to all request headers and setting it to application/json.
Is there a limit to the frequency of API calls per second?
Yes, there are restrictions. For details, see the access frequency restrictions for each interface in the document.What is the limit on API access frequency?
Personal data is restricted according to API key, and public data is restricted according to IP. Note that if the user requests public data and passes in valid personal information, it is restricted according to API key.What is the cause of HTTP status code 429?
The request interface exceeds the access frequency limit. It is recommended to reduce the access frequency.Will the IP be blocked if the API call interface reports that the access frequency is exceeded? How long is it sealed?
Normally not — just reduce the frequency of access.Why is WebSocket disconnected?
- Without adding a heartbeat, the WebSocket connection requires the client to return a
pongto ensure the stability of the connection. - The
pongmessage sent by the client may not be received by the server due to network reasons, or other network issues may also cause automatic disconnection. - It is recommended that users implement a good WebSocket disconnect and reconnect mechanism to ensure that the program can automatically reconnect when the heartbeat (ping/pong) connection is accidentally disconnected.
The user request interface reports an error “Time Out”?
The network cannot connect to the server. It is recommended that you check whether the network connection is working properly.How to get all the currency pairs on the platform?
The/sapi/v1/symbols interface can be used to obtain all currency pairs.
Is there a limit on the number of batch orders/cancellations?
Yes, the batch interface limits to 10 orders per request.What is newClientOrderId and what does it do?
newClientOrderIdis your customized order number, which can be used to identify your order. After the order is placed, you can usenewClientOrderIdto call the “Order Information” interface to view the order status.- The user needs to ensure that this ID is not repeated. There is no duplicate prompt — if there is a repetition, you can only cancel or query the latest piece of data when canceling and querying the order.
How to get the latest transaction price?
You can get ticker information —last is the latest transaction price.