General Info
Access Guide
ApiKey
After registering an account, users can view their API Key and Signature in the API management section. Keep these two values safe, as they will be needed for subsequent public parameter verification.
Header Keys
All interfaces requiring signature verification (spot account and trading part interfaces) must include the following HTTP header keys:
JAYX-ACCESS-KEY: The API Key from the API Key application
JAYX-ACCESS-SIGN: The signature of the request parameters
JAYX-ACCESS-TIMESTAMP: UTC millisecond timestamp
Signature (JAYX-ACCESS-SIGN)
The JAYX-ACCESS-SIGN request header is the HMAC SHA256 encryption of the string composed of timestamp + method + requestPath + body (+ indicates string concatenation), along with the signature, encoded in Base-64.
Example:
timestamp has the same value as the JAYX-ACCESS-TIMESTAMP request header, which is the UTC millisecond timestamp.
method is the request method, in uppercase letters: GET/POST.
requestPath is the request interface path, e.g., /api/v1/trader/order.
body refers to the string of the request body. If there is no body in the request (usually for GET requests), the body can be omitted, e.g., {"market":"BTCUSDT","type":"1","lots":"2","side":"BUY"}.
signature is the signature obtained from the API Key application.
Generating Signature with JavaScript Example:
Common Structure for Response
Limits
If usage exists rate limit, users receives 429 . Repeating violation of 429 will result in an automatic ban with error code 418 with a Retry-After header giving the duration that the IP or user is banned in seconds. Detail info of rate limits can be found by querying the exchange info /api/v1/public/exchangeInfo
Headers
API Responses will carry the following header to give clients information on number of orders, requests and weights used so they can make sure they do not exceed the limits.
X-ORDER-COUNT-(intervalNum)(intervalLetter) - order count in this interval
X-USED-WEIGHT-(intervalNum)(intervalLetter) - weights used in this interval
X-REQUEST-COUNT-(intervalNum)(intervalLetter) - request counts in this interval
Rate Limiters
There are three types of rate limits:
RAW_REQUEST - the total number of requests made within the time frame defined
REQUEST_WEIGHT - the total weight of the requests made within the time frame defined
ORDER - the number of order related requests within the time frame defined
Public Endpoints
IP limits are applied to all public endpoints in addition to the API Gateway level limits per endpoint
Endpoint weights are as follow:
/v1/ping - 1
/v1/exchangeInfo - 1
/v1/contracts - 2
/v1/markets - 2
/v1/pub/ticker - 5 *
/v1/pub/depth - 5 *
/v1/pub/fulldepth - 5 *
/v1/pub/trades - 5
/v1/pub/candlestick - 5
* In the future these endpoints will have adjusted increases based on limit. First 100 requests, weight = 5. Then up to 500, weight = 25. Up to 1000, weight increases to 50 and finally above 1000 to the 5000 raw request limit cap, the weight becomes 250.
Authenticated Endpoints
User account limits are applied to all authenticated endpoints
Endpoint weights are as follow:
/v1/trader/info - 2
/v1/trader/balances - 2
/v1/order/new - 500
/v1/order/status - 20
/v1/order/cancel - 200
/v1/order/cancel/all - 400
Last updated