Request parameters.
Query account information
Weight: 20
Request parameters.
Transfer BNB in and out of UM
The endpoint can only be called 10 times per 10 minutes in a rolling manner
Weight: 750
Request parameters.
Cancel All CM Open Conditional Orders
Weight: 1
Request parameters.
Cancel all active LIMIT orders on specific symbol
Weight: 1
Request parameters.
Cancel All UM Open Conditional Orders
Weight: 1
Request parameters.
Cancel all active LIMIT orders on specific symbol
Weight: 1
Request parameters.
Cancel CM Conditional Order
Either strategyId or newClientStrategyId must be sent.
Weight: 1
Request parameters.
Cancel an active LIMIT order
Either orderId or origClientOrderId must be sent.
Weight: 1
Request parameters.
Cancel Margin Account All Open Orders on a Symbol
Weight: 5
Request parameters.
Cancel Margin Account OCO Orders
Additional notes: Canceling an individual leg will cancel the entire OCO
Weight: 2
Request parameters.
Cancel Margin Account Order
Either orderId or origClientOrderId must be sent.
Weight: 2
Request parameters.
Cancel UM Conditional Order
Either strategyId or newClientStrategyId must be sent.
Weight: 1
Request parameters.
Cancel an active UM LIMIT order
Either orderId or origClientOrderId must be sent.
Weight: 1
Request parameters.
Change Auto-repay-futures Status
Weight: 750
Request parameters.
Change user's initial leverage of specific symbol in CM.
Weight: 1
Request parameters.
Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM
Weight: 1
Request parameters.
Change user's initial leverage of specific symbol in UM.
Weight: 1
Request parameters.
Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM
Weight: 1
Request parameters.
Close out a user data stream.
Weight: 1
Get trades for a specific account and CM symbol.
Either symbol or pair must be sent
symbol and pair cannot be sent together
pair and fromId cannot be sent together
OrderId can only be sent together with symbol
If a pair is sent, tickers for all symbols of the pair will be returned
The parameter fromId cannot be sent with startTime or endTime
If startTime and endTime are both not sent, then the last '24 hours' data will be returned.
The time between startTime and endTime cannot be longer than 24 hours.
Weight: 20 with symbol, 40 with pair
Request parameters.
Query CM notional and leverage brackets
Weight: 1
Request parameters.
Query CM 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.
Fund collection for Portfolio Margin
The BNB would not be collected from UM-PM account to the Portfolio Margin account. You can only use this function 500 times per hour in a rolling manner.
Weight: 750
Request parameters.
Transfers specific asset from Futures Account to Margin account
The BNB transfer is not be supported
Weight: 30
Request parameters.
Query Auto-repay-futures Status
Weight: 30
Request parameters.
Get current CM account asset and position information.
Weight: 5
Request parameters.
Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in CM
Weight: 30
Request parameters.
Get CM Income History
If incomeType is not sent, all kinds of flow will be returned
"trandId" is unique in the same "incomeType" for a user
The interval between startTime and endTime can not exceed 200 days:
If startTime and endTime are not sent, the last 200 days will be returned
Weight: 30
Request parameters.
Get download id for UM 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: 1500
Request parameters.
Get download id for UM 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: 1500
Request parameters.
Get download id for UM 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: 1500
Request parameters.
Get Margin Borrow/Loan Interest History
Response in descending order
The max interval between startTime and endTime is 30 days. It is a MUST to ensure data correctness.
If startTime and endTime not sent, return records of the last 7 days by default
If startTime is sent and endTime is not sent, the records from startTime to the present will be returned; if startTime is more than 30 days ago, the records of the past 30 days will be returned.
If startTime is not sent and endTime is sent, the records of the 7 days before endTime is returned.
Type in response has 5 enums:
PERIODIC interest charged per hour
ON_BORROW first interest charged on borrow
PERIODIC_CONVERTED interest charged per hour converted into BNB
ON_BORROW_CONVERTED first interest charged on borrow converted into BNB
PORTFOLIO Portfolio Margin negative balance daily interest
Weight: 1
Request parameters.
Get current UM account asset and position information.
Weight: 5
Request parameters.
Get current UM account asset and position information.
Weight: 5
Request parameters.
Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol in UM
Weight: 30
Request parameters.
Get user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off )
Weight: 30
Request parameters.
Get UM futures order download link by Id
Download link expiration: 24h
Weight: 10
Request parameters.
Get UM futures trade download link by Id
Download link expiration: 24h
Weight: 10
Request parameters.
Get UM futures Transaction download link by Id
Download link expiration: 24h
Weight: 10
Request parameters.
Get UM 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 User Commission Rate for CM
Weight: 20
Request parameters.
Get User Commission Rate for UM
Weight: 20
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
Apply for a margin loan.
Weight: 100
Request parameters.
Send in a new OCO for a margin account
Price Restrictions:
SELL: Limit Price > Last Price > Stop Price
BUY: Limit Price < Last Price < Stop Price
Quantity Restrictions:
Both legs must have the same quantity
ICEBERG quantities however do not have to be the same.
Order Rate Limit
OCO counts as 2 orders against the order rate limit.
Weight: 1
Request parameters.
Repay for a margin loan.
Weight: 100
Request parameters.
Repay debt for a margin loan.
The repay asset amount cannot exceed 50000 USD equivalent value for a single request.
If amount is not sent, all the asset loan will be repaid if having enough specific repay assets.
If amount is sent, only the certain amount of the asset loan will be repaid if having enough specific repay assets.
The system will use the same asset to repay the loan first (if have) no matter whether put the asset in specifyRepayAssets
Weight: 3000
Request parameters.
Margin Account Trade List
Weight: 5
Request parameters.
Query margin max borrow
Weight: 5
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
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
Weight: 1
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 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
Weight: 1
Request parameters.
New CM Conditional Order
Order with type STOP/TAKE_PROFIT, parameter timeInForce can be sent ( default GTC).
Condition orders will be triggered when:
STOP, STOP_MARKET:
BUY: "MARK_PRICE" >= stopPrice
SELL: "MARK_PRICE" <= stopPrice
TAKE_PROFIT, TAKE_PROFIT_MARKET:
BUY: "MARK_PRICE" <= stopPrice
SELL: "MARK_PRICE" >= stopPrice
TRAILING_STOP_MARKET:
BUY: the lowest mark price after order placed <= activationPrice, and the latest mark price >= the lowest mark price * (1 + callbackRate)
SELL: the highest mark price after order placed >= activationPrice, and the latest mark price <= the highest mark 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 mark price.
SELL: activationPrice should be larger than latest mark price.
Condition orders will be triggered when:
If parameterpriceProtectis 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
Weight: 1
Request parameters.
Place new CM order
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.
Weight: 1
Request parameters.
New Margin Order
Weight: 1
Request parameters.
Place new UM conditional order
Order with type STOP/TAKE_PROFIT, parameter timeInForce can be sent ( default GTC).
Condition orders will be triggered when:
STOP, STOP_MARKET:
BUY: "MARK_PRICE" >= stopPrice
SELL: "MARK_PRICE" <= stopPrice
TAKE_PROFIT, TAKE_PROFIT_MARKET:
BUY: "MARK_PRICE" <= stopPrice
SELL: "MARK_PRICE" >= stopPrice
TRAILING_STOP_MARKET:
BUY: the lowest mark price after order placed <= activationPrice, and the latest mark price >= the lowest mark price * (1 + callbackRate)
SELL: the highest mark price after order placed >= activationPrice, and the latest mark price <= the highest mark 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 mark price.
SELL: activationPrice should be larger than latest mark price.
Condition orders will be triggered when:
If parameterpriceProtectis 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
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
Request parameters.
Place new UM order
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.
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
Request parameters.
Portfolio Margin UM Trading Quantitative Rules Indicators
Weight: 1 for a single symbol 10 when the symbol parameter is omitted
Request parameters.
Query All CM Conditional Orders
These orders will not be found:
order strategyStatus is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 7 days < current time
The query time period must be less than 7 days( default as the recent 7 days).
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted
Request parameters.
Get all account CM orders; active, canceled, or filled.
Either symbol or pair must be sent.
If orderId is set, it will get orders >= that orderId. Otherwise most recent orders are returned.
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
Weight: 20 with symbol, 40 with pair
Request parameters.
Get all open conditional orders on a symbol. Careful when accessing this with no 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
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.
Get all open conditional 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.
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
Request parameters.
Query All Margin Account Orders
Weight: 100
Request parameters.
Query All UM Conditional Orders
These orders will not be found:
order strategyStatus is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 7 days < current time
The query time period must be less than 7 days( default as the recent 7 days).
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted
Request parameters.
Get all account UM 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
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.
Query CM Conditional Order History
Either strategyId or newClientStrategyId must be sent.
NEW orders will not be found.
These orders will not be found:
order status is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 7 days < current time
Weight: 1
Request parameters.
Get order modification history
Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent.
Weight: 1
Request parameters.
Check an CM order's status.
Either orderId or origClientOrderId must be sent.
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
Weight: 1
Request parameters.
Get current CM position information.
If neither marginAsset nor pair is sent, positions of all symbols with TRADING status will be returned.
for One-way Mode user, the response will only show the "BOTH" positions
for Hedge Mode user, the response will show "LONG", and "SHORT" positions.
Please use with user data stream ACCOUNT_UPDATE to meet your timeliness and accuracy needs.
Weight: 1
Request parameters.
Query Current CM Open Conditional Order
Either strategyId or newClientStrategyId must be sent.
If the queried order has been triggered, cancelled or expired, the error message "Order does not exist" will be returned.
Weight: 1
Request parameters.
Query current CM open order
Either orderId 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 Current Margin Open Order
Weight: 5
Request parameters.
Query Current UM Open Conditional Order
Either strategyId or newClientStrategyId must be sent.
If the queried order has been CANCELED, TRIGGERED或EXPIRED, the error message "Order does not exist" will be returned.
Weight: 1
Request parameters.
Query current UM open order
Either orderId 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 Margin Account Order
Weight: 10
Request parameters.
Query all OCO for a specific margin account based on provided optional parameters
Weight: 100
Request parameters.
Retrieves a specific OCO based on provided optional parameters
Weight: 5
Request parameters.
Query Margin Account's Open OCO
Weight: 5
Request parameters.
Query margin loan record
txId or startTime must be sent. txId takes precedence.
Response in descending order
The max interval between startTime and endTime is 30 days.
If startTime and endTime not sent, return records of the last 7 days by default
Set archived to true to query data from 6 months ago
Weight: 10
Request parameters.
Query Margin Max Withdraw
Weight: 5
Request parameters.
Query margin repay record.
txId or startTime must be sent. txId takes precedence.
Response in descending order
The max interval between startTime and endTime is 30 days.
If startTime and endTime not sent, return records of the last 7 days by default
Set archived to true to query data from 6 months ago
Weight: 10
Request parameters.
Query interest history of negative balance for portfolio margin.
Response in descending order
The max interval between startTime and endTime is 30 days. It is a MUST to ensure data correctness.
If startTime and endTime not sent, return records of the last 7 days by default
If startTime is sent and endTime is not sent, the records from startTime to the present will be returned; if startTime is more than 30 days ago, the records of the past 30 days will be returned.
If startTime is not sent and endTime is sent, the records of the 7 days before endTime is returned.
Weight: 50
Request parameters.
Query UM Conditional Order History
Either strategyId or newClientStrategyId must be sent.
NEW orders will not be found.
These orders will not be found:
order status is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 7 days < current time
Weight: 1
Request parameters.
Get order modification history
Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent.
Weight: 1
Request parameters.
Check an UM order's status.
These orders will not be found:
Either orderId or origClientOrderId must be sent.
order status is CANCELED or EXPIRED, AND
order has NO filled trade, AND
created time + 3 days < current time
Weight: 1
Request parameters.
Get current UM position information.
Please use with user data stream ACCOUNT_UPDATE to meet your timeliness and accuracy needs.
for One-way Mode user, the response will only show the "BOTH" positions
for Hedge Mode user, the response will show "LONG", and "SHORT" positions.
Weight: 5
Request parameters.
Query user negative balance auto exchange record
Response in descending order
The max interval between startTime and endTime is 3 months.
Weight: 100
Request parameters.
Query User Rate Limit
Weight: 1
Request parameters.
Query User's CM 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.
Query user's margin force orders
Weight: 1
Request parameters.
Query User's UM 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.
Repay futures Negative Balance
Weight: 750
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
Test connectivity to the Rest API.
Weight: 1
Change user's BNB Fee Discount for UM Futures (Fee Discount On or Fee Discount Off ) on EVERY symbol
The BNB would not be collected from UM-PM account to the Portfolio Margin account.
Weight: 1
Request parameters.
Get trades for a specific account and UM 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.
Weight: 5
Request parameters.
Query UM Futures account configuration
Weight: 5
Request parameters.
Get current UM account symbol configuration.
Weight: 5
Request parameters.
Query UM notional and leverage brackets
Weight: 1
Request parameters.
Query UM 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.
Query account balance
Weight: 20