Request parameters.
Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail.
Weight: 5
Request parameters.
Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail.
Weight: 5
Request parameters.
Get trades for a specific account and symbol.
If startTime
and endTime
are both not sent, then the last 7 days' data will be returned.
The time between startTime
and endTime
cannot be longer than 7 days.
The parameter fromId
cannot be sent with startTime
or endTime
.
Only support querying trade in the past 6 months
Weight: 5
Request parameters.
Get all account orders; active, canceled, or filled.
These orders will not be found:
order status is CANCELED
or EXPIRED
AND order has NO filled trade AND created time + 3 days < current time
order create time + 90 days < current time
If orderId
is set, it will get orders >= that orderId
. Otherwise most recent orders are returned.
The query time period must be less then 7 days( default as the recent 7 days).
Weight: 5
Request parameters.
Cancel all open orders of the specified symbol at the end of the specified countdown. The endpoint should be called repeatedly as heartbeats so that the existing countdown time can be canceled and replaced by a new one.
Example usage: Call this endpoint at 30s intervals with an countdownTime of 120000 (120s). If this endpoint is not called within 120 seconds, all your orders of the specified symbol will be automatically canceled. If this endpoint is called with an countdownTime of 0, the countdown timer will be stopped.
The system will check all countdowns approximately every 10 milliseconds, so please note that sufficient redundancy should be considered when using this function. We do not recommend setting the countdown time to be too precise or too small.
Weight: 10
Request parameters.
Query future basis
If startTime and endTime are not sent, the most recent data is returned. Only the data of the latest 30 days is available.
Weight: 0
Request parameters.
Cancel All Open Orders
Weight: 1
Request parameters.
Cancel Multiple Orders
Either orderIdList
or origClientOrderIdList
must be sent.
Weight: 1
Request parameters.
Cancel an active order.
Either orderId
or origClientOrderId
must be sent.
Weight: 1
Request parameters.
Change user's initial leverage of specific symbol market.
Weight: 1
Request parameters.
Change symbol level margin type
Weight: 1
Request parameters.
Change user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on Every symbol
Weight: 1
Request parameters.
Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol
Weight: 1
Request parameters.
Test connectivity to the Rest API and get the current server time.
Weight: 1
Get Classic Portfolio Margin current account information.
maxWithdrawAmount is for asset transfer out to the spot wallet.
Weight: 5
Request parameters.
Close out a user data stream.
Weight: 1
Query composite index symbol information
Only for composite index symbols
Weight: 1
Request parameters.
Get compressed, aggregate market trades. Market trades that fill in 100ms with the same price and the same taking side will have the quantity aggregated.
support querying futures trade histories that are not older than one year
If both startTime
and endTime
are sent, time between startTime
and endTime
must be less than 1 hour.
If fromId
, startTime
, and endTime
are not sent, the most recent aggregate trades will be returned.
Only market trades will be aggregated and returned, which means the insurance fund trades and ADL trades won't be aggregated.
Sending both startTime
/endTime
and fromId
might cause response timeout, please send either fromId
or startTime
/endTime
Weight: 20
Request parameters.
Kline/candlestick bars for a specific contract type. Klines are uniquely identified by their open time.
If startTime and endTime are not sent, the most recent klines are returned. Contract type: PERPETUAL CURRENT_QUARTER NEXT_QUARTER
Weight: based on parameter LIMIT
LIMIT | weight |
---|---|
[1,100) | 1 |
[100, 500) | 2 |
[500, 1000] | 5 |
> 1000 | 10 |
Request parameters.
Get all open orders on a symbol.
If the symbol is not sent, orders for all symbols will be returned in an array.
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted Careful when accessing this with no symbol.
Request parameters.
Current exchange trading rules and symbol information
Weight: 1
Query account balance info
Weight: 5
Request parameters.
Query account balance info
Weight: 5
Request parameters.
Query account configuration
Weight: 5
Request parameters.
Futures trading quantitative rules indicators, for more information on this, please refer to the Futures Trading Quantitative Rules
Weight: - 1 for a single symbol
Request parameters.
Get user's BNB Fee Discount (Fee Discount On or Fee Discount Off )
Weight: 30
Request parameters.
Get user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on Every symbol
Weight: 30
Request parameters.
Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol
Weight: 30
Request parameters.
Get Download Id For Futures Order History
Request Limitation is 10 times per month, shared by front end download page and rest api
The time between startTime
and endTime
can not be longer than 1 year
Weight: 1000
Request parameters.
Get download id for futures trade history
Request Limitation is 5 times per month, shared by front end download page and rest api
The time between startTime
and endTime
can not be longer than 1 year
Weight: 1000
Request parameters.
Get download id for futures transaction history
Request Limitation is 5 times per month, shared by front end download page and rest api
The time between startTime
and endTime
can not be longer than 1 year
Weight: 1000
Request parameters.
Get Funding Rate History
If startTime
and endTime
are not sent, the most recent limit
datas are returned.
If the number of data between startTime
and endTime
is larger than limit
, return as startTime
+ limit
.
In ascending order.
Weight: share 500/5min/IP rate limit with GET /fapi/v1/fundingInfo
Request parameters.
Query funding rate info for symbols that had FundingRateCap/ FundingRateFloor / fundingIntervalHours adjustment
Weight: 0 share 500/5min/IP rate limit with GET /fapi/v1/fundingInfo
Get futures order history download link by Id
Download link expiration: 24h
Weight: 10
Request parameters.
Get futures trade download link by Id
Download link expiration: 24h
Weight: 10
Request parameters.
Get futures transaction history download link by Id
Download link expiration: 24h
Weight: 10
Request parameters.
Query income history
If neither startTime
nor endTime
is sent, the recent 7-day data will be returned.
If incomeType
is not sent, all kinds of flow will be returned
"trandId" is unique in the same incomeType for a user
Income history only contains data for the last three months
Weight: 30
Request parameters.
Get order modification history
Either orderId
or origClientOrderId
must be sent, and the orderId
will prevail if both are sent.
Order modify history longer than 3 month is not avaliable
Weight: 1
Request parameters.
Get Position Margin Change History
Support querying future histories that are not older than 30 days
The time between startTime
and endTime
can't be more than 30 days
Weight: 1
Request parameters.
Kline/candlestick bars for the index price of a pair. Klines are uniquely identified by their open time.
If startTime and endTime are not sent, the most recent klines are returned.
Weight: based on parameter LIMIT
LIMIT | weight |
---|---|
[1,100) | 1 |
[100, 500) | 2 |
[500, 1000] | 5 |
> 1000 | 10 |
Request parameters.
Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes.
Weight: 1
Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.
If startTime and endTime are not sent, the most recent klines are returned.
Weight: based on parameter LIMIT
LIMIT | weight |
---|---|
[1,100) | 1 |
[100, 500) | 2 |
[500, 1000] | 5 |
> 1000 | 10 |
Request parameters.
Query for all convertible token pairs and the tokens’ respective upper/lower limits
User needs to supply either or both of the input parameter If not defined for both fromAsset and toAsset, only partial token pairs will be returned Asset BNFCR is only available to convert for MICA region users.
Weight: 20(IP)
Request parameters.
Query symbol Long/Short Ratio
If startTime and endTime are not sent, the most recent data is returned. Only the data of the latest 30 days is available. IP rate limit 1000 requests/5min
Weight: 0
Request parameters.
Mark Price and Funding Rate
Weight: 1
Request parameters.
Kline/candlestick bars for the mark price of a symbol. Klines are uniquely identified by their open time.
If startTime and endTime are not sent, the most recent klines are returned.
Weight: based on parameter LIMIT
LIMIT | weight |
---|---|
[1,100) | 1 |
[100, 500) | 2 |
[500, 1000] | 5 |
> 1000 | 10 |
Request parameters.
Modify Isolated Position Margin
Only for isolated symbol
Weight: 1
Request parameters.
Modify Multiple Orders (TRADE)
Parameter rules are same with Modify Order
Batch modify orders are processed concurrently, and the order of matching is not guaranteed.
The order of returned contents for batch modify orders is the same as the order of the order list.
One order can only be modfied for less than 10000 times
Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m);
Request parameters.
Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue
Either orderId
or origClientOrderId
must be sent, and the orderId
will prevail if both are sent.
Both quantity
and price
must be sent, which is different from dapi modify order endpoint.
When the new quantity
or price
doesn't satisfy PRICE_FILTER / PERCENT_FILTER / LOT_SIZE, amendment will be rejected and the order will stay as it is.
However the order will be cancelled by the amendment in the following situations:
when the order is in partially filled status and the new quantity
<= executedQty
When the order is GTX
and the new price will cause it to be executed immediately
One order can only be modfied for less than 10000 times
Weight: 1 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 1 on IP rate limit(x-mbx-used-weight-1m)
Request parameters.
asset index for Multi-Assets mode
Weight: 1 for a single symbol; 10 when the symbol parameter is omitted
Request parameters.
Send in a new order.
Order with type STOP
, parameter timeInForce
can be sent ( default GTC
).
Order with type TAKE_PROFIT
, parameter timeInForce
can be sent ( default GTC
).
Condition orders will be triggered when:
If parameterpriceProtect
is sent as true:
when price reaches the stopPrice
,the difference rate between "MARK_PRICE" and "CONTRACT_PRICE" cannot be larger than the "triggerProtect" of the symbol
"triggerProtect" of a symbol can be got from GET /fapi/v1/exchangeInfo
STOP
, STOP_MARKET
:
BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice
SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice
TAKE_PROFIT
, TAKE_PROFIT_MARKET
:
BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice
SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice
TRAILING_STOP_MARKET
:
BUY: the lowest price after order placed <=
activationPrice, and the latest price >
= the lowest price * (1 + callbackRate
)
SELL: the highest price after order placed >= activationPrice
, and the latest price <= the highest price * (1 - callbackRate
)
For TRAILING_STOP_MARKET
, if you got such error code.
{"code": -2021, "msg": "Order would immediately trigger."}
means that the parameters you send do not meet the following requirements:
BUY: activationPrice
should be smaller than latest price.
SELL: activationPrice
should be larger than latest price.
If newOrderRespType
is sent as RESULT
:
MARKET
order: the final FILLED result of the order will be return directly.
LIMIT
order with special timeInForce
: the final status result of the order(FILLED or EXPIRED) will be returned directly.
STOP_MARKET
, TAKE_PROFIT_MARKET
with closePosition
=true
:
Follow the same rules for condition orders.
If triggered,close all current long position( if SELL
) or current short position( if BUY
).
Cannot be used with quantity
paremeter
Cannot be used with reduceOnly
parameter
In Hedge Mode,cannot be used with BUY
orders in LONG
position side. and cannot be used with SELL
orders in SHORT
position side
selfTradePreventionMode
is only effective when timeInForce
set to IOC
or GTC
or GTD
.
In extreme market conditions, timeInForce GTD
order auto cancel time might be delayed comparing to goodTillDate
Weight: 1 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 0 on IP rate limit(x-mbx-used-weight-1m)
Request parameters.
Query user notional and leverage bracket on speicfic symbol
Weight: 1
Request parameters.
Get older market historical trades.
Market trades means trades filled in the order book. Only market trades will be returned, which means the insurance fund trades and ADL trades won't be returned. Only supports data from within the last three months
Weight: 20
Request parameters.
Get present open interest of a specific symbol.
Weight: 1
Request parameters.
Open Interest Statistics
If startTime and endTime are not sent, the most recent data is returned. Only the data of the latest 1 month is available. IP rate limit 1000 requests/5min
Weight: 0
Request parameters.
Query symbol orderbook
Weight: Adjusted based on the limit:
Limit | Weight |
---|---|
5, 10, 20, 50 | 2 |
100 | 5 |
500 | 10 |
1000 | 20 |
Request parameters.
Query order status by order ID.
Weight: 50(IP)
Request parameters.
Place Multiple Orders
Paremeter rules are same with New Order
Batch orders are processed concurrently, and the order of matching is not guaranteed.
The order of returned contents for batch orders is the same as the order of the order list.
Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m);
Request parameters.
Position ADL Quantile Estimation
Values update every 30s. Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from low to high. For positions of the symbol are in One-way Mode or isolated margined in Hedge Mode, "LONG", "SHORT", and "BOTH" will be returned to show the positions' adl quantiles of different position sides. If the positions of the symbol are crossed margined in Hedge Mode: "HEDGE" as a sign will be returned instead of "BOTH"; A same value caculated on unrealized pnls on long and short sides' positions will be shown for "LONG" and "SHORT" when there are positions in both of long and short sides.
Weight: 5
Request parameters.
Get current position information.
Please use with user data stream ACCOUNT_UPDATE
to meet your timeliness and accuracy needs.
Weight: 5
Request parameters.
Get current position information(only symbol that has position or open orders will be returned).
Please use with user data stream ACCOUNT_UPDATE
to meet your timeliness and accuracy needs.
Weight: 5
Request parameters.
Premium index kline bars of a symbol. Klines are uniquely identified by their open time.
If startTime and endTime are not sent, the most recent klines are returned.
Weight: based on parameter LIMIT
LIMIT | weight |
---|---|
[1,100) | 1 |
[100, 500) | 2 |
[500, 1000] | 5 |
> 1000 | 10 |
Request parameters.
Latest price for a symbol or symbols.
Weight: 0
Request parameters.
Query open order
EitherorderId
or origClientOrderId
must be sent
If the queried order has been filled or cancelled, the error message "Order does not exist" will be returned.
Weight: 1
Request parameters.
Query index price constituents
Weight: 2
Request parameters.
Query Insurance Fund Balance Snapshot
Weight: 1
Request parameters.
Check an order's status.
These orders will not be found:
order status is CANCELED
or EXPIRED
AND order has NO filled trade AND created time + 3 days < current time
order create time + 90 days < current time
Either orderId
or origClientOrderId
must be sent.
orderId
is self-increment for each specific symbol
Weight: 1
Request parameters.
Query User Rate Limit
Weight: 1
Request parameters.
Get recent market trades
Market trades means trades filled in the order book. Only market trades will be returned, which means the insurance fund trades and ADL trades won't be returned.
Weight: 5
Request parameters.
Request a quote for the requested token pairs
Either fromAmount or toAmount should be sent
quoteId
will be returned only if you have enough funds to convert
Weight: 50(IP)
Request parameters.
Generic function to send a request.
The API endpoint to call.
HTTP method to use (GET, POST, DELETE, etc.).
Query parameters for the request.
A promise resolving to the response data object.
Generic function to send a signed request.
The API endpoint to call.
HTTP method to use (GET, POST, DELETE, etc.).
Query parameters for the request.
A promise resolving to the response data object.
Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active listenKey
, that listenKey
will be returned and its validity will be extended for 60 minutes.
Weight: 1
Get current account symbol configuration.
Weight: 5
Request parameters.
Best price/qty on the order book for a symbol or symbols.
If the symbol is not sent, bookTickers for all symbols will be returned in an array.
The field X-MBX-USED-WEIGHT-1M
in response header is not accurate from this endpoint, please ignore.
Weight: 2 for a single symbol; 5 when the symbol parameter is omitted
Request parameters.
Latest price for a symbol or symbols.
If the symbol is not sent, prices for all symbols will be returned in an array.
Weight: 1 for a single symbol; 2 when the symbol parameter is omitted
Request parameters.
Latest price for a symbol or symbols.
If the symbol is not sent, prices for all symbols will be returned in an array.
The field X-MBX-USED-WEIGHT-1M
in response header is not accurate from this endpoint, please ignore.
Weight: 1 for a single symbol; 2 when the symbol parameter is omitted
Request parameters.
Taker Buy/Sell Volume
If startTime and endTime are not sent, the most recent data is returned. Only the data of the latest 30 days is available. IP rate limit 1000 requests/5min
Weight: 0
Request parameters.
Test connectivity to the Rest API.
Weight: 1
Testing order request, this order will not be submitted to matching engine
Order with type STOP
, parameter timeInForce
can be sent ( default GTC
).
Order with type TAKE_PROFIT
, parameter timeInForce
can be sent ( default GTC
).
Condition orders will be triggered when:
If parameterpriceProtect
is sent as true:
when price reaches the stopPrice
,the difference rate between "MARK_PRICE" and "CONTRACT_PRICE" cannot be larger than the "triggerProtect" of the symbol
"triggerProtect" of a symbol can be got from GET /fapi/v1/exchangeInfo
STOP
, STOP_MARKET
:
BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice
SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice
TAKE_PROFIT
, TAKE_PROFIT_MARKET
:
BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice
SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice
TRAILING_STOP_MARKET
:
BUY: the lowest price after order placed <=
activationPrice, and the latest price >
= the lowest price * (1 + callbackRate
)
SELL: the highest price after order placed >= activationPrice
, and the latest price <= the highest price * (1 - callbackRate
)
For TRAILING_STOP_MARKET
, if you got such error code.
{"code": -2021, "msg": "Order would immediately trigger."}
means that the parameters you send do not meet the following requirements:
BUY: activationPrice
should be smaller than latest price.
SELL: activationPrice
should be larger than latest price.
If newOrderRespType
is sent as RESULT
:
MARKET
order: the final FILLED result of the order will be return directly.
LIMIT
order with special timeInForce
: the final status result of the order(FILLED or EXPIRED) will be returned directly.
STOP_MARKET
, TAKE_PROFIT_MARKET
with closePosition
=true
:
Follow the same rules for condition orders.
If triggered,close all current long position( if SELL
) or current short position( if BUY
).
Cannot be used with quantity
paremeter
Cannot be used with reduceOnly
parameter
In Hedge Mode,cannot be used with BUY
orders in LONG
position side. and cannot be used with SELL
orders in SHORT
position side
selfTradePreventionMode
is only effective when timeInForce
set to IOC
or GTC
or GTD
.
In extreme market conditions, timeInForce GTD
order auto cancel time might be delayed comparing to goodTillDate
Weight: 0
Request parameters.
24 hour rolling window price change statistics. Careful* when accessing this with no symbol.
If the symbol is not sent, tickers for all symbols will be returned in an array.
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted
Request parameters.
Change user's BNB Fee Discount (Fee Discount On or Fee Discount Off ) on EVERY symbol
Weight: 1
Request parameters.
The proportion of net long and net short accounts to total accounts of the top 20% users with the highest margin balance. Each account is counted once only. Long Account % = Accounts of top traders with net long positions / Total accounts of top traders with open positions Short Account % = Accounts of top traders with net short positions / Total accounts of top traders with open positions Long/Short Ratio (Accounts) = Long Account % / Short Account %
If startTime and endTime are not sent, the most recent data is returned. Only the data of the latest 30 days is available. IP rate limit 1000 requests/5min
Weight: 0
Request parameters.
The proportion of net long and net short positions to total open positions of the top 20% users with the highest margin balance. Long Position % = Long positions of top traders / Total open positions of top traders Short Position % = Short positions of top traders / Total open positions of top traders Long/Short Ratio (Positions) = Long Position % / Short Position %
If startTime and endTime are not sent, the most recent data is returned. Only the data of the latest 30 days is available. IP rate limit 1000 requests/5min
Weight: 0
Request parameters.
Get User Commission Rate
Weight: 20
Request parameters.
Query user's Force Orders
If "autoCloseType" is not sent, orders with both of the types will be returned If "startTime" is not sent, data within 7 days before "endTime" can be queried
Weight: 20 with symbol, 50 without symbol
Request parameters.
Accept the offered quote by quote ID.
Weight: 200(IP)