4XX
return codes are used for for malformed requests; the issue is on the sender's side.403
return code is used when the WAF Limit (Web Application Firewall) has been violated.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 errors; the issue is on ApolloX's side.503
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.The error payload is as follows:
GET
endpoints, parameters must be sent as a query string
.POST
, PUT
, and DELETE
endpoints, the parameters may be sent as a query string
or in the request body
with content type application/x-www-form-urlencoded
. You may mix parameters between both the query string
and request body
if you wish to do so.query string
and request body
, the query string
parameter will be used./fapi/v1/exchangeInfo
rateLimits
array contains objects related to the exchange's RAW_REQUEST
, REQUEST_WEIGHT
, and ORDER
rate limits. These are further defined in the ENUM definitions
section under Rate limiters (rateLimitType)
.429
will be returned when either rate limit is violated.X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)
in the response headers which has the current used weight for the IP for all request rate limiters defined.weight
which determines for the number of requests each endpoint counts for. Heavier endpoints and endpoints that do operations on multiple symbols will have a heavier weight
.X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)
header which has the current order count for the account for all order rate limiters defined.X-MBX-ORDER-COUNT-**
headers in the response.X-MBX-APIKEY
header.TRADE
and USER_DATA
endpoints are SIGNED
endpoints.SIGNED
endpoints require an additional parameter, signature
, to be sent in the query string
or request body
.HMAC SHA256
signatures. The HMAC SHA256 signature
is a keyed HMAC SHA256
operation. Use your secretKey
as the key and totalParams
as the value for the HMAC operation.signature
is not case sensitive.signature
is the end part of your query string
or request body
.totalParams
is defined as the query string
concatenated with the request body
.SIGNED
endpoint also requires a parameter, timestamp
, to be sent which should be the millisecond timestamp of when the request was created and sent.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.The logic is as follows:
recvWindow
, you can specify that the request must be processed within a certain number of milliseconds or be rejected by the server.echo
, openssl
, and curl
.Example 1
HMAC SHA256 signature:
curl command:
Example 2
HMAC SHA256 signature:
curl command:
Example 3
HMAC SHA256 signature:
curl command:
base asset
refers to the asset that is the quantity
of a symbol.quote asset
refers to the asset that is the price
of a symbol.REQUEST_WEIGHT
ORDERS
/exchangeInfo format:
PRICE_FILTER
defines the price
rules for a symbol. There are 3 parts:minPrice
defines the minimum price
/stopPrice
allowed; disabled on minPrice
== 0.maxPrice
defines the maximum price
/stopPrice
allowed; disabled on maxPrice
== 0.tickSize
defines the intervals that a price
/stopPrice
can be increased/decreased by; disabled on tickSize
== 0.price filter
. In order to pass the price filter
, the following must be true for price
/stopPrice
of the enabled rules:price
>= minPrice
price
<= maxPrice
price
-minPrice
) % tickSize
== 0/exchangeInfo format:
LOT_SIZE
filter defines the quantity
(aka "lots" in auction terms) rules for a symbol. There are 3 parts:minQty
defines the minimum quantity
allowed.maxQty
defines the maximum quantity
allowed.stepSize
defines the intervals that a quantity
can be increased/decreased by.lot size
, the following must be true for quantity
:quantity
>= minQty
quantity
<= maxQty
quantity
-minQty
) % stepSize
== 0/exchangeInfo format:
MARKET_LOT_SIZE
filter defines the quantity
(aka "lots" in auction terms) rules for MARKET
orders on a symbol. There are 3 parts:minQty
defines the minimum quantity
allowed.maxQty
defines the maximum quantity
allowed.stepSize
defines the intervals that a quantity
can be increased/decreased by.market lot size
, the following must be true for quantity
:quantity
>= minQty
quantity
<= maxQty
quantity
-minQty
) % stepSize
== 0/exchangeInfo format:
MAX_NUM_ORDERS
filter defines the maximum number of orders an account is allowed to have open on a symbol./exchangeInfo format:
MAX_NUM_ALGO_ORDERS
filter defines the maximum number of all kinds of algo orders an account is allowed to have open on a symbol.STOP
, STOP_MARKET
, TAKE_PROFIT
, TAKE_PROFIT_MARKET
, and TRAILING_STOP_MARKET
orders./exchangeInfo format:
PERCENT_PRICE
filter defines valid range for a price based on the mark price.percent price
, the following must be true for price
:price
<= markPrice
* multiplierUp
price
>= markPrice
* multiplierDown
/exchangeInfo format:
MIN_NOTIONAL
filter defines the minimum notional value allowed for an order on a symbol. An order's notional value is the price
* quantity
. Since MARKET
orders have no price, the mark price is used.Response:
GET /fapi/v1/ping
Response:
GET /fapi/v1/time
Response:
GET /fapi/v1/exchangeInfo
Response:
GET /fapi/v1/depth
Response:
GET /fapi/v1/trades
Response:
GET /fapi/v1/historicalTrades
Response:
GET /fapi/v1/aggTrades
Response:
GET /fapi/v1/klines
LIMIT
1000 | 10
Response:
GET /fapi/v1/indexPriceKlines
LIMIT
1000 | 10
Response:
GET /fapi/v1/markPriceKlines
LIMIT
1000 | 10
Response: