**Binance Margin offers low-latency trading through a special key, available exclusively to users with VIP level 4 or higher. **
If you are VIP level 3 or below, please contact your VIP manager for eligibility criterias.*
We support several types of API keys:
Ed25519 (recommended) HMAC RSA
We recommend to use Ed25519 API keys as it should provide the best performance and security out of all supported key types. We accept PKCS#8 (BEGIN PUBLIC KEY). For how to generate an RSA key pair to send API requests on Binance. Please refer to the document below FAQ .
Read REST API or WebSocket API documentation to learn how to use different API keys
You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint.
Weight: 1(UID)
Request parameters.
This only applies to Special Key for Low Latency Trading.
If apiKey is given, apiName will be ignored. If apiName is given with no apiKey, all apikeys with given apiName will be deleted.
You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint.
Weight: 1(UID)
Optional
requestParameters: DeleteSpecialKeyRequestRequest parameters.
Edit ip restriction. This only applies to Special Key for Low Latency Trading.
You need to enable Permits “Enable Spot & Margin Trading” option for the API Key which requests this endpoint.
Weight: 1(UID)
Request parameters.
Get Force Liquidation Record
Response in descending order
Weight: 1(IP)
Optional
requestParameters: GetForceLiquidationRecordRequestRequest parameters.
Query the coins which can be small liability exchange
Weight: 100
Optional
requestParameters: GetSmallLiabilityExchangeCoinListRequestRequest parameters.
Get Small liability Exchange History
Weight: 100(UID)
Request parameters.
Cancels all active orders on a symbol for margin account.
This includes OCO orders.
Weight: 1
Request parameters.
Cancel an entire Order List for a margin account.
Canceling an individual leg will cancel the entire OCO
Weight: 1(UID)
Request parameters.
Cancel an active order for margin account.
Either orderId or origClientOrderId must be sent.
Weight: 10(IP)
Request parameters.
Send in a new OCO for a margin account
autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
Weight: 6(UID)
Request parameters.
Post a new order for margin account.
autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
Weight: 6(UID)
Request parameters.
Post a new OTO order for margin account:
LIMIT
or LIMIT_MAKER
. Initially, only the working order goes on the order book.MARKET
orders using parameter quoteOrderQty
. The pending order is only placed on the order book when the working order gets fully filled.FILLED
but the pending order will still appear as PENDING_NEW
. You need to query the status of the pending order again to see its updated status.EXCHANGE_MAX_NUM_ORDERS
filter and MAX_NUM_ORDERS
filter.autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
Depending on the pendingType
or workingType
, some optional parameters will become mandatory:
Weight: 6(UID)
Request parameters.
Post a new OTOCO order for margin account:
LIMIT
or LIMIT_MAKER
. Initially, only the working order goes on the order book.EXCHANGE_MAX_NUM_ORDERS
filter, and MAX_NUM_ORDERS
filter.autoRepayAtCancel is suggested to set as “FALSE” to keep liability unrepaid under high frequent new order/cancel order execution
Depending on the pendingAboveType
/pendingBelowType
or workingType
, some optional parameters will become mandatory:
Weight: 6(UID)
Request parameters.
Margin Manual Liquidation
This endpoint can support Cross Margin Classic Mode and Pro Mode. And only support Isolated Margin for restricted region.
Weight: 3000
Request parameters.
Displays the user's current margin order count usage for all intervals.
Weight: 20(IP)
Optional
requestParameters: QueryCurrentMarginOrderCountUsageRequestRequest parameters.
Retrieves all OCO for a specific margin account based on provided optional parameters
Weight: 200(IP)
Optional
requestParameters: MarginTradingRestAPI.QueryMarginAccountsAllOcoRequestRequest parameters.
Query Margin Account's All Orders
If orderId is set, it will get orders >= that orderId. Otherwise the orders within 24 hours are returned. For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time. Less than 24 hours between startTime and endTime.
Weight: 200(IP)
Request parameters.
Retrieves a specific OCO based on provided optional parameters
Weight: 10(IP)
Optional
requestParameters: MarginTradingRestAPI.QueryMarginAccountsOcoRequestRequest parameters.
Query Margin Account's Open OCO
Weight: 10(IP)
Optional
requestParameters: MarginTradingRestAPI.QueryMarginAccountsOpenOcoRequestRequest parameters.
Query Margin Account's Open Orders
If the symbol is not sent, orders for all symbols will be returned in an array. When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange. If isIsolated ="TRUE", symbol must be sent.
Weight: 10(IP)
Optional
requestParameters: QueryMarginAccountsOpenOrdersRequestRequest parameters.
Query Margin Account's Order
Either orderId or origClientOrderId must be sent. For some historical orders cummulativeQuoteQty will be < 0, meaning the data is not available at this time.
Weight: 10(IP)
Request parameters.
Query Margin Account's Trade List
If fromId is set, it will get trades >= that fromId. Otherwise the trades within 24 hours are returned. Less than 24 hours between startTime and endTime.
Weight: 10(IP)
Request parameters.
Query Special Key Information.
This only applies to Special Key for Low Latency Trading.
Weight: 1(UID)
Optional
requestParameters: QuerySpecialKeyRequestRequest parameters.
This only applies to Special Key for Low Latency Trading.
Weight: 1(UID)
Optional
requestParameters: QuerySpecialKeyListRequestRequest parameters.
Small Liability Exchange
Only convert once within 6 hours Only liability valuation less than 10 USDT are supported The maximum number of coin is 10
Weight: 3000(UID)
Request parameters.
TradeApi - interface TradeApi