Welcome to Odyssey Exchange API documentation
HTTPS
protocol, and the Content-Type
should be application/json
GET
method, the parameters must be sent in the query string
POST
method, the parameters must be sent in the request body
4XX
return codes are used for malformed requests; the issue is on the sender’s side.
HTTP 418
return code is used when an IP has been auto-banned for continuing to send requests after receiving 429
codes.
HTTP 429
return code is used when breaking a request rate limit.
HTTP 5XX
return codes are used for internal errors
HTTP 504
return code is used when the API successfully sent the message but did 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.
All endpoints can possibly return an ERROR, the error payload is as follows:
X-CH-APIKEY
header.
API keys and secret keys are case sensitive.
X-CH-TS
field in the HTTP header, and its value should be the unix timestamp of the request sending time e.g. 1528394129373
An additional parameter, 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.
In addition, if the server calculates that the client’s timestamp is more than one second ‘in the future’ of the server’s time, it will also reject the request.
The logic is as follows:
recvWindow
of 5000 or less!
Trade
and USER_DATA
level must be signed. The signature is not case-sensitive and generated as follows:
{timestamp}{method}{path}{data}
GET
or POST
query string
if method is GET else body data