4XXreturn codes are used for malformed requests; the issue is on the sender's side.
429return code is used when breaking a request rate limit.
418return code is used when an IP has been auto-banned for continuing to send requests after receiving
5XXreturn codes are used for internal errors
504return code is used when the API successfully sent the message but not get a response within the timeout period. It is important to NOT treat this as a failure operation; the execution status is UNKNOWN and could have been a success.
Content-Typein the request header information needs to be uniformly set to:
GETmethod, the parameters must be sent in the
POSTmethod, the parameters must be sent in the
USER_DATAinterface, the signature parameter should be passed in the
X-CH-SIGNfield in the HTTP header.
HMAC SHA256algorithm. The
API-Secretcorresponding to the API-KEY is used as the
X-CH-SIGNis based on
body string(+ means string connection) as the operation object
timestampis the same as the
methodis the request method, and the letters are all uppercase:
requestPathis the request interface path For example:
bodyis the string of the request body (post only)
X-CH-TSfield in the HTTP header, and its value should be the unix timestamp of the request sending time e.g.
recvWindow, may be sent to specify the number of milliseconds after
timestampthe request is valid for. If
recvWindowis not sent, it defaults to 5000.
recvWindow, you can specify that the request must be processed within a certain number of milliseconds or be rejected by the server.It recommended to use a small recvWindow of 5000 or less!