API margin endpoints
- Source
Methods
cancelAllOpenMarginOrder(symbol, optionsopt)
Margin Account Cancel all Open Orders on a Symbol (TRADE)
DELETE /sapi/v1/margin/openOrders
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||||||
options | object | <optional> | Properties
|
- Source
cancelMarginOCOOrder(symbol, optionsopt)
Margin Account Cancel OCO (TRADE)
DELETE /sapi/v1/margin/orderList
- Either orderListId or listClientOrderId must be provided
- Canceling an individual leg will cancel the entire OCO
https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-oco-trade
Name | Type | Attributes | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||||||||||||||||||
options | object | <optional> | Properties
|
- Source
cancelMarginOrder(symbol, optionsopt)
Margin Account Cancel Order (TRADE)
DELETE /sapi/v1/margin/order
https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-order-trade
Name | Type | Attributes | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||||||||||||||||||
options | object | <optional> | Properties
|
- Source
disableIsolatedMarginAccount(symbol, optionsopt)
Disable Isolated Margin Account (TRADE)
DELETE /sapi/v1/margin/isolated/account
https://binance-docs.github.io/apidocs/spot/en/#disable-isolated-margin-account-trade
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||
options | object | <optional> | Properties
|
- Source
enableIsolatedMarginAccount(symbol, optionsopt)
Enable Isolated Margin Account (TRADE)
POST /sapi/v1/margin/isolated/account
https://binance-docs.github.io/apidocs/spot/en/#enable-isolated-margin-account-trade
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||
options | object | <optional> | Properties
|
- Source
getMarginOCOOrder(optionsopt)
Query Margin Account's OCO (USER_DATA)
GET /sapi/v1/margin/orderList
Either orderListId or origClientOrderId must be provided
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-oco-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
getMarginOCOOrders(optionsopt)
Query Marign Account's all OCO (USER_DATA)
GET /sapi/v1/margin/allOrderList
Retrieves all OCO for a specific margin account based on provided optional parameters.
https://binance-docs.github.io/apidocs/spot/en/#query-marign-account-39-s-all-oco-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
getMarginOpenOCOOrders(optionsopt)
Query Margin Account's Open OCO (USER_DATA)
GET /sapi/v1/margin/openOrderList
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-oco-user_data
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
isolatedMarginAccountInfo(optionsopt)
Query Isolated Margin Account Info (USER_DATA)
GET /sapi/v1/margin/isolated/account
https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-account-info-user_data
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
isolatedMarginAccountLimit(optionsopt)
Query Enabled Isolated Margin Account Limit (USER_DATA)
GET /sapi/v1/margin/isolated/accountLimit
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
isolatedMarginAllSymbols(optionsopt)
Get All Isolated Margin Symbol(USER_DATA)
GET /sapi/v1/margin/isolated/allPairs
https://binance-docs.github.io/apidocs/spot/en/#get-all-isolated-margin-symbol-user_data
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
isolatedMarginFee(optionsopt)
Query Isolated Margin Fee Data (USER_DATA)
GET /sapi/v1/margin/isolatedMarginData
Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-fee-data-user_data
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
isolatedMarginSymbol(symbol, optionsopt)
Query Isolated Margin Symbol (USER_DATA)
GET /sapi/v1/margin/isolated/pair
https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-symbol-user_data
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||
options | object | <optional> | Properties
|
- Source
isolatedMarginTier(symbol, optionsopt)
Query Isolated Margin Tier Data (USER_DATA)
GET /sapi/v1/margin/isolatedMarginTier
Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data
https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-fee-data-user_data
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||||||
options | object | <optional> | Properties
|
- Source
isolatedMarginTransfer(asset, symbol, transFrom, transTo, amount, optionsopt)
Isolated Margin Account Transfer (MARGIN)
POST /sapi/v1/margin/isolated/transfer
https://binance-docs.github.io/apidocs/spot/en/#isolated-margin-account-transfer-margin
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
asset | string | asset, such as BTC | |||||||||
symbol | string | ||||||||||
transFrom | string | "SPOT", "ISOLATED_MARGIN" | |||||||||
transTo | string | "SPOT", "ISOLATED_MARGIN" | |||||||||
amount | number | ||||||||||
options | object | <optional> | Properties
|
- Source
isolatedMarginTransferHistory(symbol, optionsopt)
Get Isolated Margin Transfer History (USER_DATA)
GET /sapi/v1/margin/isolated/transfer
https://binance-docs.github.io/apidocs/spot/en/#get-isolated-margin-transfer-history-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||||||||||||||||||||||||||||||
options | object | <optional> | Properties
|
- Source
marginAccount(optionsopt)
Query Cross Margin Account Details (USER_DATA)
GET /sapi/v1/margin/account
https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-account-details-user_data
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
marginAllAssets()
Get All Margin Assets (MARKET_DATA)
GET /sapi/v1/margin/allAssets
https://binance-docs.github.io/apidocs/spot/en/#get-all-margin-assets-market_data
- Source
marginAllOrders(symbol, optionsopt)
Query Margin Account's All Order (USER_DATA)
GET /sapi/v1/margin/allOrders
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-all-orders-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||||||||||||||||||||||
options | object | <optional> | Properties
|
- Source
marginAllPairs()
Get All Cross Margin Pairs (MARKET_DATA)
GET /sapi/v1/margin/allPairs
https://binance-docs.github.io/apidocs/spot/en/#get-all-cross-margin-pairs-market_data
- Source
marginAsset(asset)
Query Margin Asset (MARKET_DATA)
GET /sapi/v1/margin/asset
https://binance-docs.github.io/apidocs/spot/en/#query-margin-asset-market_data
Name | Type | Description |
---|---|---|
asset | string |
- Source
marginBorrow(asset, amount, optionsopt)
Margin Account Borrow (MARGIN)
POST /sapi/v1/margin/load
Apply for a loan.
https://binance-docs.github.io/apidocs/spot/en/#margin-account-borrow-margin
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
asset | string | ||||||||||||||||||
amount | number | ||||||||||||||||||
options | object | <optional> | Properties
|
- Source
marginDustLog(optionsopt)
Margin Dustlog (USER_DATA)
GET /sapi/v1/margin/dribblet
Query the historical information of user's margin account small-value asset conversion BNB.
https://binance-docs.github.io/apidocs/spot/en/#margin-dustlog-user_data
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
marginFee(optionsopt)
Query Cross Margin Fee Data (USER_DATA)
GET /sapi/v1/margin/crossMarginData
Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee
https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-fee-data-user_data
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
marginForceLiquidationRecord(optionsopt)
Get Force Liquidation Record (USER_DATA)
GET /sapi/v1/margin/forceLiquidationRec
https://binance-docs.github.io/apidocs/spot/en/#get-force-liquidation-record-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
marginInterestHistory(optionsopt)
Get Interest History (USER_DATA)
GET /sapi/v1/margin/interestHistory
https://binance-docs.github.io/apidocs/spot/en/#get-interest-history-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
marginInterestRateHistory(asset, optionsopt)
Query Margin Interest Rate History (USER_DATA)
GET /sapi/v1/margin/interestRateHistory
https://binance-docs.github.io/apidocs/spot/en/#query-margin-interest-rate-history-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
asset | string | ||||||||||||||||||||||
options | object | <optional> | Properties
|
- Source
marginLoanRecord(asset, optionsopt)
Query Loan Record (USER_DATA)
GET /sapi/v1/margin/loan
https://binance-docs.github.io/apidocs/spot/en/#query-loan-record-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
asset | string | ||||||||||||||||||||||||||||||||||||||
options | object | <optional> | Properties
|
- Source
marginMaxBorrowable(asset, optionsopt)
Query Max Borrow (USER_DATA)
GET /sapi/v1/margin/maxBorrowable
https://binance-docs.github.io/apidocs/spot/en/#query-max-borrow-user_data
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
asset | string | ||||||||||||||
options | object | <optional> | Properties
|
- Source
marginMaxTransferable(asset, optionsopt)
Query Max Transfer-Out Amount (USER_DATA)
GET /sapi/v1/margin/maxTransferable
https://binance-docs.github.io/apidocs/spot/en/#query-max-transfer-out-amount-user_data
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
asset | string | ||||||||||||||
options | object | <optional> | Properties
|
- Source
marginMyTrades(symbol, optionsopt)
Query Margin Account's Trade List (USER_DATA)
GET /sapi/v1/margin/myTrades
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-trade-list-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||||||||||||||||||||||
options | object | <optional> | Properties
|
- Source
marginOCOOrder(symbol, side, quantity, price, stopPrice, optionsopt)
Marign Account New OCO (TRADE)
POST /sapi/v1/margin/order/oco
- 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.
https://binance-docs.github.io/apidocs/spot/en/#marign-account-new-oco-trade
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||||||||||||||||||||||||||||||||||||||||||
side | string | ||||||||||||||||||||||||||||||||||||||||||||||||||
quantity | number | ||||||||||||||||||||||||||||||||||||||||||||||||||
price | number | ||||||||||||||||||||||||||||||||||||||||||||||||||
stopPrice | number | ||||||||||||||||||||||||||||||||||||||||||||||||||
options | object | <optional> | Properties
|
- Source
marginOpenOrders(optionsopt)
Query Margin Account's Open Order (USER_DATA)
GET /sapi/v1/margin/openOrders
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-orders-user_data
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
marginOrder(symbol, optionsopt)
Query Margin Account's Order (USER_DATA)
GET /sapi/v1/margin/order
https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-order-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||||||||||||||
options | object | <optional> | Properties
|
- Source
marginOrderCount(optionsopt)
Query Current Margin Order Count Usage (TRADE)
GET /sapi/v1/margin/rateLimit/order
Displays the user's current margin order count usage for all intervals.
https://binance-docs.github.io/apidocs/spot/en/#query-current-margin-order-count-usage-trade
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
marginPair(symbol)
Query Cross Margin Pair (MARKET_DATA)
GET /sapi/v1/margin/pair
https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-pair-market_data
Name | Type | Description |
---|---|---|
symbol | string |
- Source
marginPairIndex(symbol)
Query Margin PriceIndex (MARKET_DATA)
GET /sapi/v1/margin/priceIndex
https://binance-docs.github.io/apidocs/spot/en/#query-margin-priceindex-market_data
Name | Type | Description |
---|---|---|
symbol | string |
- Source
marginRepay(asset, amount, optionsopt)
Margin Account Repay(MARGIN)
POST /sapi/v1/margin/repay
Repay loan for margin account.
https://binance-docs.github.io/apidocs/spot/en/#margin-account-repay-margin
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
asset | string | ||||||||||||||||||
amount | string | ||||||||||||||||||
options | object | <optional> | Properties
|
- Source
marginRepayRecord(asset, optionsopt)
Query Repay Record (USER_DATA)
GET /sapi/v1/margin/repay
https://binance-docs.github.io/apidocs/spot/en/#query-repay-record-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
asset | string | ||||||||||||||||||||||||||||||||||||||
options | object | <optional> | Properties
|
- Source
marginTransfer(asset, amount, type, optionsopt)
Cross Margin Account Transfer (MARGIN)
POST /sapi/v1/margin/transfer
https://binance-docs.github.io/apidocs/spot/en/#cross-margin-account-transfer-margin
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
asset | string | ||||||||||
amount | number | ||||||||||
type | number | 1: transfer from main account to margin account | |||||||||
options | object | <optional> | Properties
|
- Source
marginTransferHistory(optionsopt)
Get Cross Margin Transfer History (USER_DATA)
GET /sapi/v1/margin/transfer
https://binance-docs.github.io/apidocs/spot/en/#get-cross-margin-transfer-history-user_data
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Properties
|
- Source
newMarginOrder(symbol, side, type, optionsopt)
Margin Account New Order (TRADE)
POST /sapi/v1/margin/order
https://binance-docs.github.io/apidocs/spot/en/#margin-account-new-order-trade
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
symbol | string | ||||||||||||||||||||||||||||||||||||||||||||||||||
side | string | BUY or SELL | |||||||||||||||||||||||||||||||||||||||||||||||||
type | string | ||||||||||||||||||||||||||||||||||||||||||||||||||
options | object | <optional> | Properties
|
- Source