https://openapi.lyotrade.com
4XX
return codes are used for malformed requests; the issue is on the sender's side.429
return code is used when breaking a request rate limit.418
return code is used when an IP has been auto-banned for continuing to send requests after receiving 429
codes.5XX
return codes are used for internal errors504
return 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-Type
in the request header information needs to be uniformly set to:'application/json'
GET
method, the parameters must be sent in the query string
POST
method, the parameters must be sent in the request body
X-CH-APIKEY
header.TRADE
or USER_DATA
interface, the signature parameter should be passed in the X-CH-SIGN
field in the HTTP header.HMAC SHA256
algorithm. The API-Secret
corresponding to the API-KEY is used as the HMAC SHA256
key.X-CH-SIGN
is based on timestamp
+ method
+ requestPath
+ body string
(+ means string connection) as the operation objecttimestamp
is the same as the X-CH-TS
request header, method
is the request method, and the letters are all uppercase: GET/POST
requestPath
is the request interface path For example: /sapi/v1/order
body
is the string of the request body (post only)X-CH-TS
field in the HTTP header, and its value should be the unix timestamp of the request sending time e.g. 1528394129373
recvWindow
, may be sent to specify the number of milliseconds after timestamp
the request is valid for. If recvWindow
is 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!echo
, openssl
, and curl
.KeyValueapiKeyvmPUZE6mv9SD5V5e14y7Ju91duEh8AsecretKey902ae3cb34ecee2779aa4d3e1d226686ParametervaluesymbolBTCUSDTsideBUYtypeLIMITvolume1price9300