Binance API Documentation

Change Log.
Note: The changes are being rolled out during the next few days, so these will not appear right away.
Error message changed on GET api/v3/allOrders where symbol is not provided: Fixed a typo with an error message when an account has disabled permissions (e.g. to withdraw, to trade, etc) “This action is disabled on this account.” During a market data audit, we detected some issues with the Spot aggregate trade data. Missing aggregate trades were recovered. Duplicated records were marked invalid with the following values: p = ‘0’ // price q = ‘0’ // qty f = -1 // first_trade_id l = -1 // last_trade_id.
2022-04-08.
Update WEBSOCKET for BLVT: Base url changed to wss://nbstream.binance.com/lvt-p for BLVT streams @tokenNav and @nav_Kline_ More details: Websocket BLVT Info Streams and Websocket BLVT NAV Kline/Candlestick Streams.
2022-3-29.
The following updates will take effect on March 31, 2022 08:00 AM UTC.
Update endpoint for Sub-account: GET /sapi/v1/sub-account/universalTransfer.
The query time period must be less then 30 days; If startTime and endTime not sent, return records of the last 30 days by default.
2022-03-25.
Update endpoint for Sub-Account: New endpoint GET /sapi/v1/managed-subaccount/accountSnapshot to support investor master account query asset snapshot of managed sub-account.
2022-03-08.
Update endpoint for Sub-Account: New transfer types MARGIN , ISOLATED_MARGIN and parameter symbol added in POST /sapi/v1/sub-account/universalTransfer to support transfer to sub-account cross margin account and isolated margin account.
2022-02-28.
New field allowTrailingStop has been added to GET /api/v3/exchangeInfo.
2022-02-22.
(price-minPrice) % tickSize == 0 rule in PRICE_FILTER has been changed to price % tickSize == 0 . A new filter PERCENT_PRICE_BY_SIDE has been added. Changes to GET api/v3/depth The limit value can be outside of the previous values (i.e. 5, 10, 20, 50, 100, 500, 1000,5000) and will return the correct limit. (i.e. if limit=3 then the response will be the top 3 bids and asks) The limit still cannot exceed 5000. If the limit provided is greater than 5000, then the response will be truncated to 5000. Due to the changes, these are the updated request weights based on the limit value provided: Changes to GET api/v3/aggTrades When providing startTime and endTime , the oldest items are returned.
2022-2-18.
Update endpoint for Sub-Account: New fields isManagedSubAccount and isAssetManagementSubAccount added in GET /sapi/v1/sub-account/list to support query whether the sub-account is a managed sub-account or a asset management sub-account.
2022-2-17.
The following updates will take effect on February 24, 2022 08:00 AM UTC.
Update endpoint for Wallet: GET /sapi/v1/accountSnapshot.
The time limit of this endpoint is shortened to only support querying the data of the latest month.
2022-2-09.
New endpoint for Wallet: POST /sapi/v1/asset/dust-btc to get assets that can be converted into BNB.
2022-1-25.
From January 28, 2022 4:00 AM UTC , You need to open Enable Spot & Margin Trading permission for the API key which requests these endpoints as following: POST /sapi/v1/asset/dust Dust transfer POST /sapi/v1/lending/daily/purchase Purchase Savings flexible product POST /sapi/v1/lending/daily/redeem Redeem Savings flexible product POST /sapi/v1/lending/customizedFixed/purchase Purchase Savings Fixed/Activity project POST /sapi/v1/lending/positionChanged Change Savings Fixed/Activity position to Daily position POST /sapi/v1/bswap/liquidityAdd Bswap add liquidity POST /sapi/v1/bswap/liquidityRemove Bswap remove liquidity POST /sapi/v1/bswap/swap Bswap swap POST /sapi/v1/bswap/claimRewards Bswap claim rewards.
2022-1-21.
New endpoints for Binance Code: POST /sapi/v1/giftcard/createCode to create a Binance Code. POST /sapi/v1/giftcard/redeemCode to redeem a Binance Code. GET /sapi/v1/giftcard/verify to verify a Binance Code.
2022-1-4.
New endpoint for Mining:
GET /sapi/v1/mining/payment/uid to get Mining account earning.
New endpoints for BSwap:
GET /sapi/v1/bswap/unclaimedRewards to get unclaimed rewards record. POST /sapi/v1/bswap/claimRewards to claim swap rewards or liquidity rewards. GET /sapi/v1/bswap/claimedHistory to get history of claimed rewards.
2021-12-30.
Update endpoint for Margin:
Removed out limit from GET /sapi/v1/margin/interestRateHistory ; The max interval between startTime and endTime is 30 days.
Update endpoint for Wallet:
As the Mining account is merged into Funding account, transfer types MAIN_MINING, MINING_MAIN, MINING_UMFUTURE, MARGIN_MINING, and MINING_MARGIN will be discontinued in Universal Transfer endpoint POST /sapi/v1/asset/transfer on January 05, 2022 08:00 AM UTC.
2021-12-29.
Removed out dated “Symbol Type” enum; added “Permissions” enum.
2021-12-24.
Update endpoints for Sub-Account: New parameter clientTranId added in POST /sapi/v1/sub-account/universalTransfer and GET /sapi/v1/sub-account/universalTransfer to support custom transfer id.
2021-12-03.
New endpoints for Margin:
GET /sapi/v1/margin/crossMarginData to get cross margin fee data collection GET /sapi/v1/margin/isolatedMarginData to get isolated margin fee data collection GET /sapi/v1/margin/isolatedMarginTier to get isolated margin tier data collection.
New endpoints for NFT:
GET /sapi/v1/nft/history/transactions to get NFT transaction history GET /sapi/v1/nft/history/deposit to get NFT deposit history GET /sapi/v1/nft/history/withdraw to get NFT withdraw history GET /sapi/v1/nft/user/getAsset to get NFT asset.
2021-11-30.
New endpoint for Convert:
GET /sapi/v1/convert/tradeFlow to support user query convert trade history records.
New endpoint for Rebate:
GET /sapi/v1/rebate/taxQuery to support user query spot rebate history records.
2021-11-19.
New endpoint for Pay:
GET /sapi/v1/pay/transactions to support user query Pay trade history.
Update endpoint for Wallet:
New field info added in GET /sapi/v1/capital/withdraw/history to show the reason for withdrawal failure.
2021-11-18.
The following updates will take effect on November 25, 2021 08:00 AM UTC.
Update endpoint for Wallet: GET /sapi/v1/accountSnapshot.
The query time range of both endpoints are shortened to support data query within the last 6 months only, where startTime does not support selecting a timestamp beyond 6 months. If you do not specify startTime and endTime, the data of the last 7 days will be returned by default.
2021-11-17.
The following endpoints will be discontinued on November 17, 2021 13:00 PM UTC : POST /sapi/v1/account/apiRestrictions/ipRestriction to support user enable and disable IP restriction for an API Key POST /sapi/v1/account/apiRestrictions/ipRestriction/ipList to support user add IP list for an API Key GET /sapi/v1/account/apiRestrictions/ipRestriction to support user query IP restriction for an API Key DELETE /sapi/v1/account/apiRestrictions/ipRestriction/ipList to support user delete IP list for an API Key.
2021-11-16.
New endpoints for Sub-Account: POST /sapi/v1/sub-account/subAccountApi/ipRestriction to support master account enable and disable IP restriction for a sub-account API Key POST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList to support master account add IP list for a sub-account API Key GET /sapi/v1/sub-account/subAccountApi/ipRestriction to support master account query IP restriction for a sub-account API Key DELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList to support master account delete IP list for a sub-account API Key.
2021-11-09.
New endpoints for Wallet: POST /sapi/v1/account/apiRestrictions/ipRestriction to support user enable and disable IP restriction for an API Key POST /sapi/v1/account/apiRestrictions/ipRestriction/ipList to support user add IP list for an API Key GET /sapi/v1/account/apiRestrictions/ipRestriction to support user query IP restriction for an API Key DELETE /sapi/v1/account/apiRestrictions/ipRestriction/ipList to support user delete IP list for an API Key.
2021-11-08.
New endpoint for Crypto Loans: New endpoint GET /sapi/v1/loan/income to support user query crypto loans income history.
2021-11-05.
Update endpoint for Wallet: New parameter walletType added in POST /sapi/v1/capital/withdraw/apply to support user choose wallet type spot wallet and funding wallet when withdraw crypto.
2021-11-04.
The following updates will take effect on November 11, 2021 08:00 AM UTC.
Update endpoints for Wallet and Futures: GET /sapi/v1/asset/transfer GET /sapi/v1/futures/transfer.
The query time range of both endpoints are shortened to support data query within the last 6 months only, where startTime does not support selecting a timestamp beyond 6 months. If you do not specify startTime and endTime, the data of the last 7 days will be returned by default.
2021-11-01.
GET /api/v3/rateLimit/order added The endpoint will display the user’s current order count usage for all intervals. This endpoint will have a request weight of 20.
2021-10-22.
Update endpoint for Wallet: New transfer types MAIN_FUNDING , FUNDING_MAIN , FUNDING_UMFUTURE , UMFUTURE_FUNDING , MARGIN_FUNDING , FUNDING_MARGIN , FUNDING_CMFUTURE and CMFUTURE_FUNDING added in Universal Transfer endpoint POST /sapi/v1/asset/transfer and GET /sapi/v1/asset/transfer to support transfer assets among funding account and other accounts As the C2C account, Binance Payment, Binance Card and other business account are merged into a Funding account, transfer types MAIN_C2C , C2C_MAIN , C2C_UMFUTURE , C2C_MINING , UMFUTURE_C2C , MINING_C2C , MARGIN_C2C , C2C_MARGIN , MAIN_PAY and PAY_MAIN will be discontinued in Universal Transfer endpoint POST /sapi/v1/asset/transfer and GET /sapi/v1/asset/transfer on November 04, 2021 08:00 AM UTC.
2021-10-14.
Update the time range of the response data for the following margin account endpoints, startTime and endTime time span will not exceed 30 days, without time parameter sent the system will return the last 7 days of data by default, while the archived parameter is true , the system will return the last 7 days of data 6 months ago by default: GET /sapi/v1/margin/transfer GET /sapi/v1/margin/loan GET /sapi/v1/margin/repay GET /sapi/v1/margin/isolated/transfer GET /sapi/v1/margin/interestHistory.
2021-09-18.
New endpoints for BSwap: GET /sapi/v1/bswap/poolConfigure to get pool configure GET /sapi/v1/bswap/addLiquidityPreview to get add liquidity preview GET /sapi/v1/bswap/removeLiquidityPreview to get remove liquidity preview.
2021-09-17.
Add /api/* and /sapi/* limit introduction in General Info.
2021-09-08.
Add endpoints for enabled isolated margin account limit:
DELETE /sapi/v1/margin/isolated/account to disable isolated margin account for a specific symbol POST /sapi/v1/margin/isolated/account to enable isolated margin account for a specific symbol GET /sapi/v1/margin/isolated/accountLimit to query enabled isolated margin account limit.
New field “enabled” in response of GET /sapi/v1/margin/isolated/account to check if the isolated margin account is enabled.
2021-09-03.
Update endpoint for Wallet: New fields sameAddress , depositDust and specialWithdrawTips added in GET /sapi/v1/capital/config/getall sameAddress means if the coin needs to provide memo to withdraw depositDust means minimum creditable amount specialWithdrawTips means special tips for withdraw New field confirmNo added in GET /sapi/v1/capital/withdraw/history to support query confirm times for withdraw history.
2021-08-27.
Update endpoint for Wallet: New parameter withdrawOrderId added in GET /sapi/v1/capital/withdraw/history to support user query withdraw history by withdrawOrderId New field unlockConfirm added in GET /sapi/v1/capital/deposit/hisrec to support query network confirm times for unlocking.
2021-08-23.
New endpoints for Margin Account OCO: POST /sapi/v1/margin/order/oco DELETE /sapi/v1/margin/orderList GET /sapi/v1/margin/orderList GET /sapi/v1/margin/allOrderList GET /sapi/v1/margin/openOrderList.
Same usage as spot account OCO.
2021-08-20.
Update endpoint for Wallet: New parameters fromSymbol , toSymbol and new transfer types ISOLATEDMARGIN_MARGIN , MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN added in POST /sapi/v1/asset/transfer and GET /sapi/v1/asset/transfer to support user transfer assets between Margin(cross) account and Margin(isolated) account.
2021-08-12.
GET api/v3/myTrades has a new optional field orderId.
2021-08-05.
New endpoint for C2C: GET /sapi/v1/c2c/orderMatch/listUserOrderHistory to query user C2C trade history.
2021-08-05.
Update endpoints for Savings: GET /sapi/v1/lending/union/purchaseRecord GET /sapi/v1/lending/union/redemptionRecord GET /sapi/v1/lending/union/interestHistory.
The time between startTime and endTime cannot be longer than 30 days. If startTime and endTime are both not sent, then the last 30 days’ data will be returned.
2021-07-29.
Update endpoint for Sub-Account: GET /sapi/v1/sub-account/transfer/subUserHistory if startTime and endTime are not sent, the recent 30-day data will be returned by default.
2021-07-27.
New endpoint for Fiat: GET /sapi/v1/fiat/orders to query user fiat deposit and withdraw history GET /sapi/v1/fiat/payments to query user fiat payments history.
2021-07-16.
New endpoint for Wallet: GET /sapi/v1/account/apiRestrictions to query user API Key permission.
2021-07-09.
New endpoint for Wallet: POST /sapi/v1/asset/get-funding-asset to query funding wallet, includes Binance Pay, Binance Card, Binance Gift Card, Stock Token.
2021-06-24.
Update endpoints for Wallet: GET /sapi/v1/capital/withdraw/history added default value 1000, max value 1000 for the parameter limit GET /sapi/v1/capital/deposit/hisrec added default value 1000, max value 1000 for the parameter limit.
2021-06-17.
Update endpoint for Savings: GET /sapi/v1/lending/daily/product/list to include new parameters current and size.
2021-06-15.
New endpoints for Sub-Account: POST /sapi/v1/managed-subaccount/deposit to deposit assets into the managed sub-account (only for investor master account) GET /sapi/v1/managed-subaccount/asset to query managed sub-account asset details (only for investor master account) POST /sapi/v1/managed-subaccount/withdraw to withdrawal assets from the managed sub-account (only for investor master account)
2021-06-04.
On August 01, 2021 02:00 AM UTC the WAPI endpoints will be discontinued:
GET /wapi/v3/systemStatus.html POST /wapi/v3/withdraw.html GET /wapi/v3/depositHistory.html GET /wapi/v3/withdrawHistory.html GET /wapi/v3/depositAddress.html GET /wapi/v3/accountStatus.html GET /wapi/v3/apiTradingStatus.html GET /wapi/v3/userAssetDribbletLog.html GET /wapi/v3/assetDetail.html GET /wapi/v3/tradeFee.html GET /wapi/v3/sub-account/list.html GET /wapi/v3/sub-account/transfer/history.html POST /wapi/v3/sub-account/transfer.html GET /wapi/v3/sub-account/assets.html.
The WAPI endpoints have been removed from Binance API Documentation.To ensure your trading strategies are not affected, all API users are encouraged to upgrade trading bots to SAPI endpoints as soon as possible.
2021-05-26.
Update endpoint for Wallet: New transfer types MAIN_PAY , PAY_MAIN added in Universal Transfer endpoint POST /sapi/v1/asset/transfer and GET /sapi/v1/asset/transfer to support trasnfer assets between spot account and pay account.
2021-05-12.
Added Data Source in the documentation to explain where each endpoint is retrieving its data Added field Data Source to each Spot API endpoint in the documentation GET api/v3/exchangeInfo now supports single or multi-symbol query.
2021-04-28.
On May 15, 2021 08:00 UTC the SAPI Create Margin Account endpoint will be discontinued:
POST /sapi/v1/margin/isolated/create.
Isolated Margin account creation and trade preparation can be completed directly through Isolated Margin funds transfer POST /sapi/v1/margin/isolated/transfer.
2021-04-26.
On April 28, 2021 00:00 UTC the weights to the following endpoints will be adjusted:
GET /api/v3/order weight increased to 2 GET /api/v3/openOrders weight increased to 3 GET /api/v3/allOrders weight increased to 10 GET /api/v3/orderList weight increased to 2 GET /api/v3/openOrderList weight increased to 3 GET /api/v3/account weight increased to 10 GET /api/v3/myTrades weight increased to 10 GET /api/v3/exchangeInfo weight increased to 10.
2021-04-08.
Update endpoint for Sub-Account: GET /sapi/v1/sub-account/futures/accountSummary and GET /sapi/v2/sub-account/futures/accountSummary the unit of field asset changed to USD valued summary of sub-account assets.
2021-04-02.
New endpoints for Wallet: GET /sapi/v1/system/status to query system status GET /sapi/v1/account/status to query account status GET /sapi/v1/account/apiTradingStatus to query account API trading status GET /sapi/v1/asset/dribblet to query dust log GET /sapi/v1/asset/assetDetail to query asset detail GET /sapi/v1/asset/tradeFee to query trade fee GET /sapi/v3/sub-account/assets to query sub-account assets.
2021-04-01.
Update endpoint for Sub-Account: GET /sapi/v1/sub-account/transfer/subUserHistory new fields fromAccountType and toAccountType added in response.
2021-03-31.
Update endpoint for Sub-Account: GET /wapi/v3/sub-account/transfer/history.html added new parameters fromEmail and toEmail , the original parameter email is equal to fromEmail by default.
2021-03-08.
New endpoint for Sub-Account: POST /sapi/v1/sub-account/virtualSubAccount to support create a virtual sub-account GET /sapi/v1/sub-account/list to support query sub-account list POST /sapi/v1/sub-account/blvt/enable to support enable blvt for sub-account.
2021-03-05.
New endpoints for Margin: GET /sapi/v1/margin/interestRateHistory to support margin interest rate history query.
2021-02-08.
New endpoints for Futures: GET /sapi/v2/futures/loan/wallet to support BUSD loan query GET /sapi/v2/futures/loan/configs to support BUSD loan query GET /sapi/v2/futures/loan/calcAdjustLevel to support BUSD loan GET /sapi/v2/futures/loan/calcMaxAdjustAmount to support adjustment of BUSD loan POST /sapi/v2/futures/loan/adjustCollateral to support adjustment of BUSD loan GET /sapi/v1/futures/loan/adjustCollateral/history new parameter and fields in response loanCoin for BUSD loan GET /sapi/v1/futures/loan/liquidationHistory new parameter and fields in response loanCoin for BUSD loan.
2021-02-04.
New transfer types MARGIN_MINING , MINING_MARGIN , MARGIN_C2C , C2C_MARGIN , MARGIN_CMFUTURE , CMFUTURE_MARGIN added in Universal Transfer endpoint POST /sapi/v1/asset/transfer and GET /sapi/v1/asset/transfer .
2021-01-15.
New endpoint DELETE /sapi/v1/margin/openOrders for Margin Trade This will allow a user to cancel all open orders on a single symbol for margin account. This endpoint will cancel all open orders including OCO orders for margin account.
2021-01-10.
New parameter pageSize for Mining endpoint GET /sapi/v1/mining/payment/list.
New fields in response to Mining endpoint GET /sapi/v1/mining/payment/list :
“type” for income type “hashTransfer” for resale Hashrate “transferAmount” for transferred Income.
New Mining endpoints:
GET /sapi/v1/mining/payment/other GET /sapi/v1/mining/hash-transfer/config/details GET /sapi/v1/mining/hash-transfer/config/details/list GET /sapi/v1/mining/hash-transfer/profit/details POST /sapi/v1/mining/hash-transfer/config POST /sapi/v1/mining/hash-transfer/config/cancel.
2021-01-01.
USER DATA STREAM.
outboundAccountInfo has been removed.
2020-12-30.
New endpoint for Wallet: POST /sapi/v1/asset/transfer to support user universal transfer among Spot, Margin, Futures, C2C, MINING accounts. GET /sapi/v1/asset/transfer to get user universal transfer history.
2020-12-22.
New endpoint for Sub-Account: GET /sapi/v1/sub-account/sub/transfer/history to get spot asset transfer history.
2020-12-11.
Update endpoints for Futures Cross-Collateral: GET /sapi/v1/futures/loan/wallet new fields in response interestFreeLimit for total interest free limit, interestFreeLimitUsed for interest free limit used. GET /sapi/v1/futures/loan/interestHistory new fields in response interestFreeLimitUsed for interest free limit used.
2020-12-04.
Update endpoint for BLVT:
GET /sapi/v1/blvt/tokenInfo new fields in response currentBaskets (include symbol , amount , notionalValue ), purchaseFeePct , dailyPurchaseLimit , redeemFeePct , dailyRedeemLimit .
New endpoint for BLVT:
GET /sapi/v1/blvt/userLimit to get BLVT user limit info.
2020-12-02.
New endpoints for Sub-Account: GET /sapi/v2/sub-account/futures/account to get detail on sub-account’s USDT margined futures account and COIN margined futures account. GET /sapi/v2/sub-account/futures/accountSummary to get summary of sub-account’s USDT margined futures account and COIN margined futures account. GET /sapi/v2/sub-account/futures/positionRisk to get position risk of sub-account’s USDT margined futures account and COIN margined futures account.
2020-12-01.
Update Margin Trade Endpoint: POST /sapi/v1/margin/order new parameter quoteOrderQty allow a user to specify the total quoteOrderQty spent or received in the MARKET order.
2020-11-27.
New API clusters have been added in order to improve performance.
Users can access any of the following API clusters, in addition to api.binance.com.
If there are any performance issues with accessing api.binance.com please try any of the following instead:
https://api1.binance.com/api/v3/* https://api2.binance.com/api/v3/* https://api3.binance.com/api/v3/*
2020-11-16.
Updated endpoints for Margin, new parameter archived to query data from 6 months ago: GET /sapi/v1/margin/loan GET /sapi/v1/margin/repay GET /sapi/v1/margin/interestHistory.
2020-11-13.
New endpoints for Sub-Account: POST /sapi/v1/sub-account/universalTransfer to transfer spot and futures asset between master account and sub accounts. GET /sapi/v1/sub-account/universalTransfer to search transfer records.
2020-11-10.
New endpoint to toggle BNB Burn: POST /sapi/v1/bnbBurn to toggle BNB Burn on spot trade and margin interest. GET /sapi/v1/bnbBurn to get BNB Burn status.
2020-11-09.
New field tranId is available from endpoints: GET /sapi/v1/sub-account/futures/internalTransfer GET /sapi/v1/sub-account/transfer/subUserHistory.
2020-11-03.
Update endpoints for Futures Cross-Collateral:
GET /sapi/v1/futures/loan/repay/history new fields in response repayType ( NORMAL for normal repayment, COLLATERAL for collateral repayment), price (collateral repayment rate), repayCollateral (collateral amount for collateral repayment). GET /sapi/v1/futures/loan/wallet new fields in response totalInterest (total interest for cross-collateral), principalForInterest (cross-collateral principal for interest), interest (cross-collateral interest). GET /sapi/v1/futures/loan/configs new fields in response interestRate (interest rate for cross-collateral), interestGracePeriod (interest grace period for cross-collateral).
New endpoints for Futures Cross-Collateral:
GET /sapi/v1/futures/loan/collateralRepayLimit to check the maximum and minimum limit when repay with collateral. GET /sapi/v1/futures/loan/collateralRepay to get quote for collateral repayment. POST /sapi/v1/futures/loan/collateralRepay to repay with collateral. GET /sapi/v1/futures/loan/collateralRepayResult to check collateral repayment result. GET /sapi/v1/futures/loan/interestHistory to get cross-collateral interest history.
2020-10-14.
Update endpoints for Futures Cross-Collateral: POST /sapi/v1/futures/loan/borrow and GET /sapi/v1/futures/loan/borrow/history new field borrowId in response for ID of Cross-Collateral borrow operation. POST /sapi/v1/futures/loan/repay and GET /sapi/v1/futures/loan/repay/history new field repayId in response for ID of Cross-Collateral repay operation.
2020-10-10.
New type added in the endpoint POST /sapi/v1/sub-account/futures/transfer to support transfer asset from subaccount’s spot account to its COIN-margined futures account and transfer asset from subaccount’s COIN-margined futures account to its spot account.
2020-09-30.
Update endpoints for Margin Account: GET /sapi/v1/margin/maxBorrowable new field borrowLimit in response for account borrow limit.
2020-09-28.
New endpoints for Binance Savings: POST /sapi/v1/lending/positionChanged to change fixed/activity position to daily position. GET /sapi/v1/lending/project/list POST /sapi/v1/lending/customizedFixed/purchase GET /sapi/v1/lending/project/position/list GET /sapi/v1/lending/union/purchaseRecord GET /sapi/v1/lending/union/interestHistory.
2020-09-23.
New SAPI endpoints for BSwap: GET /sapi/v1/bswap/pools to list all swap pools. GET /sapi/v1/bswap/liquidity to get liquidity information of a pool. POST /sapi/v1/bswap/liquidityAdd to add liquidity. POST /sapi/v1/bswap/liquidityRemove to remove liquidity. GET /sapi/v1/bswap/liquidityOps to get liquidity operation record. GET /sapi/v1/bswap/quote to request quotes. POST /sapi/v1/bswap/swap to swap. GET /sapi/v1/bswap/swap to get swap history.
2020-09-16.
New SAPI endpoints for BLVT:
GET /sapi/v1/blvt/tokenInfo to get BLVT info. POST /sapi/v1/blvt/subscribe (HMAC SHA256) to subscribe BLVT. GET /sapi/v1/blvt/subscribe/record (HMAC SHA256) to get subscription record。 POST /sapi/v1/blvt/redeem (HMAC SHA256) to redeem BLVT. GET /sapi/v1/blvt/redeem/record (HMAC SHA256 to get redemption record.
The BLVT NAV system is working relatively with Binance Futures, so some endpoints are based on futures system:
New endpoint to get historical BLVT Kline. New WebSocket streams for BLVT Info and BLVT NAV Kline:
2020-09-09.
USER DATA STREAM.
outboundAccountInfo has been deprecated. outboundAccountInfo will be removed in the future. (Exact date unknown) Please use outboundAccountPosition instead. outboundAccountInfo will now only show the balance of non-zero assets and assets that have been reduced to 0.
2020-09-03.
New endpoint POST /sapi/v1/sub-account/futures/internalTransfer to transfer futures asset between master account and subaccount. New endpoint GET /sapi/v1/sub-account/futures/internalTransfer to get futures transfer history of subaccount.
2020-09-01.
New parameter masterAccountTotalAsset added in the endpoint GET /sapi/v1/sub-account/spotSummary to get BTC valued asset summary of master account.
2020-08-27.
New endpoint GET /sapi/v1/sub-account/spotSummary to get BTC valued asset summary of subaccout.
2020-08-26.
New parameter symbols added in the endpoint GET /sapi/v1/margin/isolated/account .
2020-07-28.
New parameters “isIsolated” and “symbol” added for isolated margin in the following endpoints:
POST /sapi/v1/margin/loan POST /sapi/v1/margin/repay.
New parameter “isIsolated” and new response field “isIsolated” added for isolated margin in the following endpoints:
POST /sapi/v1/margin/order DELETE /sapi/v1/margin/order GET /sapi/v1/margin/order GET /sapi/v1/margin/openOrders GET /sapi/v1/margin/allOrders GET /sapi/v1/margin/myTrades.
New parameter “isolatedSymbol” and new response field “isolatedSymbol” added for isolated margin in the following endpoints:
GET /sapi/v1/margin/loan GET /sapi/v1/margin/repay GET /sapi/v1/margin/interestHistory.
New parameter “isolatedSymbol” and new response field “isIsolated” added for isolated margin in the following endpoint GET /sapi/v1/margin/forceLiquidationRec.
New parameter “isolatedSymbol” added for isolated margin in the following endpoints:
GET /sapi/v1/margin/maxBorrowable GET /sapi/v1/margin/maxTransferable.
New endpoints for isolated margin:
POST /sapi/v1/margin/isolated/create POST /sapi/v1/margin/isolated/transfer GET /sapi/v1/margin/isolated/transfer GET /sapi/v1/margin/isolated/account GET /sapi/v1/margin/isolated/pair GET /sapi/v1/margin/isolated/allPairs.
New endpoints for listenKey management of isolated margin account:
POST /sapi/v1/userDataStream/isolated PUT /sapi/v1/userDataStream/isolated DELETE /sapi/v1/userDataStream/isolated.
2020-07-20.
The max value of parameter “limit” in GET /sapi/v1/margin/allOrders has been changed as 500.
2020-07-17.
There is now a request limit specifically for the sapi/v1/margin/allOrders endpoint at 60 raw requests per minute for a single IP address.
2020-07-13.
New SAPI Endpoints for futures Cross-Collateral: POST /sapi/v1/futures/loan/borrow GET /sapi/v1/futures/loan/borrow/history POST /sapi/v1/futures/loan/repay GET /sapi/v1/futures/loan/repay/history GET /sapi/v1/futures/loan/wallet GET /sapi/v1/futures/loan/configs GET /sapi/v1/futures/loan/calcAdjustLevel GET /sapi/v1/futures/loan/calcMaxAdjustAmount POST /sapi/v1/futures/loan/adjustCollateral GET /sapi/v1/futures/loan/adjustCollateral/history GET /sapi/v1/futures/loan/liquidationHistory.
2020-06-28.
SAPI Endpoints for futures: POST /sapi/v1/futures/transfer GET /sapi/v1/futures/transfer.
2020-05-06.
New endpoints for Mining: GET /sapi/v1/mining/pub/algoList GET /sapi/v1/mining/pub/coinList GET /sapi/v1/mining/worker/detail GET /sapi/v1/mining/worker/list GET /sapi/v1/mining/payment/list GET /sapi/v1/mining/statistics/user/status GET /sapi/v1/mining/statistics/user/list.
2020-05-03.
New request limit for some margin endpoints Changes on these endpoints: POST /sapi/v1/margin/transfer POST /sapi/v1/margin/loan POST /sapi/v1/margin/repay Limit to 1 every 2 seconds。 Request beyond the limit will receive HTTP status code 429 。
2020-05-01.
From 2020-05-01 UTC 00:00, all symbols will have a limit of 200 open orders using the MAX_NUM_ORDERS filter. No existing orders will be removed or canceled. Accounts that have 200 or more open orders on a symbol will not be able to place new orders on that symbol until the open order count is below 200. OCO orders count as 2 open orders before the LIMIT order is touched or the STOP_LOSS (or STOP_LOSS_LIMIT ) order is triggered; once this happens the other order is canceled and will no longer count as an open order.
2020-04-25.
New field permissions Defines the trading permissions that are allowed on accounts and symbols. permissions is an enum array; values: SPOT MARGIN New field permissions added. New field quoteAssetPrecision added; a duplicate of the quotePrecision field. quotePrecision will be removed in future API versions (v4+). New field permissions added. This will allow a user to cancel all open orders on a single symbol. This endpoint will cancel all open orders including OCO orders.
USER DATA STREAM.
OutboundAccountInfo has new field P which shows the trading permissions of the account.
2020-04-23.
WEB SOCKET STREAM.
WebSocket connections have a limit of 5 incoming messages per second. A message is considered: A PING frame A PONG frame A JSON control message (e.g. subscribe, unsubscribe)
2020-04-16.
New fields in response to endpoint GET /sapi/v1/lending/daily/token/position :
todayPurchasedAmount for user’s purchased amount today.
New lending endpoints for customized fixed projects:
GET /sapi/v1/lending/project/list POST /sapi/v1/lending/customizedFixed/purchase GET /sapi/v1/lending/project/position/list.
2020-04-02.
New fields in response to endpoint GET /sapi/v1/capital/config/getall : minConfirm for min number for balance confirmation unLockConfirm for confirmation number for balance unlock.
2020-03-24.
MAX_POSITION filter added.
This filter defines the allowed maximum position an account can have on the base asset of a symbol. An account’s position defined as the sum of the account’s: free balance of the base asset locked balance of the base asset sum of the qty of all open BUY orders.
2020-03-13.
New parameter transactionFeeFlag is available in endpoint: POST /sapi/v1/capital/withdraw/apply and POST /wapi/v3/withdraw.html.
2020-02-05.
New sub account endpoints: POST /sapi/v1/sub-account/futures/transfer to transfer between futures and spot accout of sub-account. POST /sapi/v1/sub-account/margin/transfer to transfer between margin and spot accout of sub-account. POST /sapi/v1/sub-account/transfer/subToSub to transfer to another account by sub-account. POST /sapi/v1/sub-account/transfer/subToMaster to transfer to same master by sub-account. GET /sapi/v1/sub-account/transfer/subUserHistory to get transfer history of sub-account.
2020-01-15.
New parameter withdrawOrderId for client customized withdraw id for endpoint POST /wapi/v3/withdraw.html .
New field withdrawOrderId in response to GET /wapi/v3/withdrawHistory.html.
2019-12-25.
New endpoints for Binance Savings:
GET /sapi/v1/lending/daily/product/list GET /sapi/v1/lending/daily/userLeftQuota POST /sapi/v1/lending/daily/purchase GET /sapi/v1/lending/daily/userRedemptionQuota POST /sapi/v1/lending/daily/redeem GET /sapi/v1/lending/daily/token/position GET /sapi/v1/lending/union/account GET /sapi/v1/lending/union/purchaseRecord GET /sapi/v1/lending/union/redemptionRecord GET /sapi/v1/lending/union/interestHistory.
Added time interval limit in GET /sapi/v1/capital/withdraw/history , GET /wapi/v3/withdrawHistory.html , GET /sapi/v1/capital/deposit/hisrec and GET /wapi/v3/depositHistory.html :
The default startTime is 90 days from current time, and the default endTime is current time. Please notice the default startTime and endTime to make sure that time interval is within 0-90 days. If both startTime and endTime are sent, time between startTime and endTime must be less than 90 days.
2019-12-18.
New endpoint to get daily snapshot of account: GET /sapi/v1/accountSnapshot.
2019-11-30.
Added parameter sideEffectType in POST /sapi/v1/margin/order (HMAC SHA256) with enums:
NO_SIDE_EFFECT for normal trade order; MARGIN_BUY for margin trade order; AUTO_REPAY for making auto repayment after order filled.
New field marginBuyBorrowAmount and marginBuyBorrowAsset in FULL response to POST /sapi/v1/margin/order (HMAC SHA256)
2019-11-28.
New SAPI endpont to disable fast withdraw switch: POST /sapi/v1/account/disableFastWithdrawSwitch (HMAC SHA256) New SAPI endpont to enable fast withdraw switch: POST /sapi/v1/account/enableFastWithdrawSwitch (HMAC SHA256)
2019-11-22.
Quote Order Qty Market orders have been enabled on all symbols. Quote Order Qty MARKET orders allow a user to specify the total quoteOrderQty spent or received in the MARKET order. Quote Order Qty MARKET orders will not break LOT_SIZE filter rules; the order will execute a quantity that will have the notional value as close as possible to quoteOrderQty . Using BNBBTC as an example: On the BUY side, the order will buy as many BNB as quoteOrderQty BTC can. On the SELL side, the order will sell as much BNB as needed to receive quoteOrderQty BTC.
2019-11-19.
GET /sapi/v1/sub-account/margin/account has new field: marginTradeCoeffVo which contains forceLiquidationBar for liquidation margin ratio marginCallBar for margin call margin ratio normalBar for initial margin ratio.
2019-11-13.
api/v3/exchangeInfo has new fields: quoteOrderQtyMarketAllowed baseCommissionPrecision quoteCommissionPrecision The exact timing that quoteOrderQty MARKET orders will be enabled is TBD. There will be a separate announcement and further details at that time.
Updated error messages for -1128.
Sending an OCO with a stopLimitPrice but without a stopLimitTimeInForce will return the error:
Updated error messages for -1003 to specify the limit is referring to the request weight, not to the number of requests.
Deprecation of v1 endpoints :
By end of Q1 2020, the following endpoints will be removed from the API. The documentation has been updated to use the v3 versions of these endpoints.
GET api/v1/depth GET api/v1/historicalTrades GET api/v1/aggTrades GET api/v1/klines GET api/v1/ticker/24hr GET api/v1/ticker/price GET api/v1/exchangeInfo POST api/v1/userDataStream PUT api/v1/userDataStream GET api/v1/ping GET api/v1/time GET api/v1/ticker/bookTicker.
These endpoints however, will NOT be migrated to v3. Please use the following endpoints instead moving forward.
Old V1 Endpoints New V3 Endpoints GET api/v1/ticker/allPrices GET api/v3/ticker/price GET api/v1/ticker/allBookTickers GET api/v3/ticker/bookTicker.
USER DATA STREAM.
Changes to executionReport event.
If the C field is empty, it will now properly return null , instead of “null” . New field Q which represents the quoteOrderQty .
balanceUpdate event type added.
This event occurs when funds are deposited or withdrawn from your account.
WEB SOCKET STREAM.
WSS now supports live subscribing/unsubscribing to streams.
2019-11-08.
New sapi for subaccount management on margin and futures: GET /sapi/v1/sub-account/status (HMAC SHA256) POST /sapi/v1/sub-account/margin/enable (HMAC SHA256) GET /sapi/v1/sub-account/margin/account (HMAC SHA256) GET /sapi/v1/sub-account/margin/accountSummary (HMAC SHA256) POST /sapi/v1/sub-account/futures/enable (HMAC SHA256) GET /sapi/v1/sub-account/futures/account (HMAC SHA256) GET /sapi/v1/sub-account/futures/accountSummary (HMAC SHA256) GET /sapi/v1/sub-account/futures/positionRisk (HMAC SHA256)
2019-11-04.
New sapi endpoints for subaccount wallet. GET /sapi/v1/capital/deposit/subAddress (HMAC SHA256)) : fetch subaccount deposit address. GET /sapi/v1/capital/deposit/subHisrec (HMAC SHA256)) : fetch subaccount deposit history.
2019-10-29.
New sapi endpoints for wallet. POST /sapi/v1/capital/withdraw/apply (HMAC SHA256) : withdraw. Get /sapi/v1/capital/withdraw/history (HMAC SHA256) : fetch withdraw history with network.
2019-10-14.
New sapi endpoints for wallet. GET /sapi/v1/capital/config/getall (HMAC SHA256) : get all coins’ information for user. GET /sapi/v1/capital/deposit/hisrec (HMAC SHA256) : fetch deposit history with network. GET /sapi/v1/capital/deposit/address (HMAC SHA256) : fetch deposit address with network.
2019-10-11.
Added parameter network in POST /wapi/v3/withdraw.html so that asset can be withdrawed with specific network.
2019-09-09.
New WebSocket streams for bookTickers added: @bookTicker and !bookTicker .
2019-09-03.
Faster order book data with 100ms updates: @[email protected] and @depth#@100ms Added “Update Speed:” to Websocket Market Streams Removed deprecated v1 endpoints as per previous announcement: GET api/v1/order GET api/v1/openOrders POST api/v1/order DELETE api/v1/order GET api/v1/allOrders GET api/v1/account GET api/v1/myTrades.
2019-08-16.
GET api/v1/depth limit of 10000 has been temporarily removed.
In Q4 2017, the following endpoints were deprecated and removed from the API documentation. They have been permanently removed from the API as of this version. We apologize for the omission from the original changelog:
GET api/v1/order GET api/v1/openOrders POST api/v1/order DELETE api/v1/order GET api/v1/allOrders GET api/v1/account GET api/v1/myTrades.
Streams, endpoints, parameters, payloads, etc. described in the documents in this repository are considered official and supported . The use of any other streams, endpoints, parameters, or payloads, etc. is not supported; use them at your own risk and with no guarantees.
2019-09-15.
New order type: OCO (“One Cancels the Other”)
An OCO has 2 orders: (also known as legs in financial terms) STOP_LOSS or STOP_LOSS_LIMIT leg LIMIT_MAKER leg SELL Orders : Limit Price > Last Price > Stop Price BUY Orders : Limit Price As stated, the prices must “straddle” the last traded price on the symbol. EX: If the last price is 10: A SELL OCO must have the limit price greater than 10, and the stop price less than 10. A BUY OCO must have a limit price less than 10, and the stop price greater than 10. Both legs must have the same quantity . ICEBERG quantities however, do not have to be the same. If the LIMIT_MAKER is touched, the limit maker leg will be executed first BEFORE canceling the Stop Loss Leg. if the Market Price moves such that the STOP_LOSS or STOP_LOSS_LIMIT will trigger, the Limit Maker leg will be cancelled BEFORE executing the STOP_LOSS Leg. Cancelling either order leg will cancel the entire OCO. The entire OCO can be canceled via the orderListId or the listClientOrderId . ListStatusType RESPONSE – used when ListStatus is responding to a failed action. (either order list placement or cancellation) EXEC_STARTED – used when an order list has been placed or there is an update to a list’s status. ALL_DONE – used when an order list has finished executing and is no longer active. ListOrderStatus EXECUTING – used when an order list has been placed or there is an update to a list’s status. ALL_DONE – used when an order list has finished executing and is no longer active. REJECT – used when ListStatus is responding to a failed action. (either order list placement or cancellation) ContingencyType OCO – specifies the type of order list. POST api/v3/order/oco DELETE api/v3/orderList GET api/v3/orderList.
recvWindow cannot exceed 60000.
New intervalLetter values for headers:
SECOND => S MINUTE => M HOUR => H DAY => D.
New Headers X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter) will give your current used request weight for the (intervalNum)(intervalLetter) rate limiter. For example, if there is a one minute request rate weight limiter set, you will get a X-MBX-USED-WEIGHT-1M header in the response. The legacy header X-MBX-USED-WEIGHT will still be returned and will represent the current used weight for the one minute request rate weight limit.
New Header X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter) that is updated on any valid order placement and tracks your current order count for the interval; rejected/unsuccessful orders are not guaranteed to have X-MBX-ORDER-COUNT-** headers in the response.
Eg. X-MBX-ORDER-COUNT-1S for “orders per 1 second” and X-MBX-ORDER-COUNT-1D for orders per “one day”
GET api/v1/depth now supports limit 5000 and 10000; weights are 50 and 100 respectively.
GET api/v1/exchangeInfo has a new parameter ocoAllowed .
USER DATA STREAM.
executionReport event now contains “g” which has the orderListId ; it will be set to -1 for non-OCO orders. New Event Type listStatus ; listStatus is sent on an update to any OCO order. New Event Type outboundAccountPosition ; outboundAccountPosition is sent any time an account’s balance changes and contains the assets that could have changed by the event that generated the balance change (a deposit, withdrawal, trade, order placement, or cancelation).
-1131 BAD_RECV_WINDOW recvWindow must be less than 60000 This replaces error code -1999.
NEW -2011 ERRORS.
OCO_BAD_ORDER_PARAMS A parameter for one of the orders is incorrect. The relationship of the prices for the orders is not correct. OCO orders are not supported for this symbol.
2019-03-12.
X-MBX-USED-WEIGHT header added to Rest API responses. Retry-After header added to Rest API 418 and 429 responses. When canceling the Rest API can now return errorCode -1013 OR -2011 if the symbol’s status isn’t TRADING . api/v1/depth no longer has the ignored and empty [] . api/v3/myTrades now returns quoteQty ; the price * qty of for the trade.
@depth and @depthX streams no longer have the ignored and empty [] .
Matching Engine stability/reliability improvements. Rest API performance improvements.
2018-11-13.
Can now cancel orders through the Rest API during a trading ban. New filters: PERCENT_PRICE , MARKET_LOT_SIZE , MAX_NUM_ICEBERG_ORDERS . Added RAW_REQUESTS rate limit. Limits based on the number of requests over X minutes regardless of weight. /api/v3/ticker/price increased to weight of 2 for a no symbol query. /api/v3/ticker/bookTicker increased weight of 2 for a no symbol query. DELETE /api/v3/order will now return an execution report of the final state of the order. MIN_NOTIONAL filter has two new parameters: applyToMarket (whether or not the filter is applied to MARKET orders) and avgPriceMins (the number of minutes over which the price averaged for the notional estimation). intervalNum added to /api/v1/exchangeInfo limits. intervalNum describes the amount of the interval. For example: intervalNum 5, with interval minute, means “every 5 minutes”.
Explanation for the average price calculation:
(qty * price) of all trades / sum of qty of all trades over previous 5 minutes.
If there is no trade in the last 5 minutes, it takes the first trade that happened outside of the 5min window. For example if the last trade was 20 minutes ago, that trade’s price is the 5 min average.
If there is no trade on the symbol, there is no average price and market orders cannot be placed. On a new symbol with applyToMarket enabled on the MIN_NOTIONAL filter, market orders cannot be placed until there is at least 1 trade.
The current average price can be checked here: https://api.binance.com/api/v3/avgPrice?symbol= For example: https://api.binance.com/api/v3/avgPrice?symbol=BNBUSDT.
User data stream.
Last quote asset transacted quantity (as variable Y ) added to execution reports. Represents the lastPrice * lastQty ( L * l ).
2018-07-18.
New filter: ICEBERG_PARTS POST api/v3/order new defaults for newOrderRespType . ACK , RESULT , or FULL ; MARKET and LIMIT order types default to FULL , all other orders default to ACK . POST api/v3/order RESULT and FULL responses now have cummulativeQuoteQty GET api/v3/openOrders with no symbol weight reduced to 40. GET api/v3/ticker/24hr with no symbol weight reduced to 40. Max amount of trades from GET /api/v1/trades increased to 1000. Max amount of trades from GET /api/v1/historicalTrades increased to 1000. Max amount of aggregate trades from GET /api/v1/aggTrades increased to 1000. Max amount of aggregate trades from GET /api/v1/klines increased to 1000. Rest API Order lookups now return updateTime which represents the last time the order was updated; time is the order creation time. Order lookup endpoints will now return cummulativeQuoteQty . If cummulativeQuoteQty is REQUESTS rate limit type changed to REQUEST_WEIGHT . This limit was always logically request weight and the previous name for it caused confusion.
User data stream.
cummulativeQuoteQty field added to order responses and execution reports (as variable Z ). Represents the cummulative amount of the quote that has been spent (with a BUY order) or received (with a SELL order). Historical orders will have a value O (order creation time) added to execution reports.
2018-01-23.
GET /api/v1/historicalTrades weight decreased to 5 GET /api/v1/aggTrades weight decreased to 1 GET /api/v1/klines weight decreased to 1 GET /api/v1/ticker/24hr all symbols weight decreased to number of trading symbols / 2 GET /api/v3/allOrders weight decreased to 5 GET /api/v3/myTrades weight decreased to 5 GET /api/v3/account weight decreased to 5 GET /api/v1/depth limit=500 weight decreased to 5 GET /api/v1/depth limit=1000 weight decreased to 10 -1003 error message updated to direct users to websockets.
2018-01-20.
GET /api/v1/ticker/24hr single symbol weight decreased to 1 GET /api/v3/openOrders all symbols weight decreased to number of trading symbols / 2 GET /api/v3/allOrders weight decreased to 15 GET /api/v3/myTrades weight decreased to 15 GET /api/v3/order weight decreased to 1 myTrades will now return both sides of a self-trade/wash-trade.
2018-01-14.
GET /api/v1/aggTrades weight changed to 2 GET /api/v1/klines weight changed to 2 GET /api/v3/order weight changed to 2 GET /api/v3/allOrders weight changed to 20 GET /api/v3/account weight changed to 20 GET /api/v3/myTrades weight changed to 20 GET /api/v3/historicalTrades weight changed to 20.
Introduction.
API Key Setup.
Some endpoints will require an API Key. Please refer to this page regarding API key creation. Once API key is created, it is recommended to set IP restrictions on the key for security reasons. Never share your API key/secret key to ANYONE.
API Key Restrictions.
After creating the API key, the default restrictions is Enable Reading . To enable withdrawals via the API , the API key restriction needs to be modified through the Binance UI.
Enabling Accounts.
Spot Account.
A SPOT account is provided by default upon creation of a Binance Account.
Margin Account.
To enable a MARGIN account for Margin Trading, please refer to the Margin Trading Guide.
Spot Testnet.
Users can use the SPOT Testnet to practice SPOT trading.
Currently, this is only available via the API.
Please refer to the SPOT Testnet page for more information and how to set up the Testnet API key.
API Library.
Python connector.
This is a lightweight library that works as a connector to Binance public API, written in Python.
Node.js connector.
This is a lightweight library that works as a connector to Binance public API, written for Node.js users.
Ruby connector.
This is a lightweight library that works as a connector to Binance public API, written for Ruby users.
DotNET connector.
This is a lightweight library that works as a connector to Binance public API, written for C# users.
Java connector.
This is a lightweight library that works as a connector to Binance public API, written for Java users.
Postman Collections.
There is now a Postman collection containing the API endpoints for quick and easy use.
This is recommended for new users who want to get a quick-start into using the API.
For more information please refer to this page: Binance API Postman.
Swagger.
A YAML file with OpenAPI specification on the RESTful API is available to be used, as well as a Swagger UI page for the consulting.
Contact Us.
For any questions in sudden drop in performance with the API and/or Websockets. For any general questions about the API not covered in the documentation. For any questions on your code implementation with the API and/or Websockets. For cases such as missing funds, help with 2FA, etc.
General Info.
General API Information.
The base endpoint is: https://api.binance.com If there are performance issues with the endpoint above, these API clusters are also available: https://api1.binance.com https://api2.binance.com https://api3.binance.com.
HTTP Return Codes.
HTTP 4XX return codes are used for malformed requests; the issue is on the sender’s side. HTTP 403 return code is used when the WAF Limit (Web Application Firewall) has been violated. HTTP 429 return code is used when breaking a request rate limit. HTTP 418 return code is used when an IP has been auto-banned for continuing to send requests after receiving 429 codes. HTTP 5XX return codes are used for internal errors; the issue is on Binance’s side. It is important to NOT treat this as a failure operation; the execution status is UNKNOWN and could have been a success.
Error Codes and Messages.
If there is an error, the API will return an error with a message of the reason.
The error payload on API and SAPI is as follows:
Specific error codes and messages defined in Error Codes.
General Information on Endpoints.
For GET endpoints, parameters must be sent as a query string . For 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. Parameters may be sent in any order. If a parameter sent in both the query string and request body , the query string parameter will be used.
LIMITS.
General Info on Limits.
The following intervalLetter values for headers: SECOND => S MINUTE => M HOUR => H DAY => D.
IP Limits.
Every request will contain 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. Each route has a 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 . When a 429 is received, it’s your obligation as an API to back off and not spam the API. Repeatedly violating rate limits and/or failing to back off after receiving 429s will result in an automated IP ban (HTTP status 418). IP bans are tracked and scale in duration for repeat offenders, from 2 minutes to 3 days . A Retry-After header is sent with a 418 or 429 responses and will give the number of seconds required to wait, in the case of a 429, to prevent a ban, or, in the case of a 418, until the ban is over. The limits on the API are based on the IPs, not the API keys.
Order Rate Limits.
Every successful order response will contain a X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter) header which has the current order count for the account for all order rate limiters defined.
When the order count exceeds the limit, you will receive a 429 error without the Retry-After header. Please check the Order Rate Limit rules using GET api/v3/exchangeInfo and wait for reactivation accordingly.
Rejected/unsuccessful orders are not guaranteed to have X-MBX-ORDER-COUNT-** headers in the response.
The order rate limit is counted against each account .
To monitor order count usage, refer to GET api/v3/rateLimit/order.
Websocket Limits.
WebSocket connections have a limit of 5 incoming messages per second. A message is considered: A PING frame A PONG frame A JSON controlled message (e.g. subscribe, unsubscribe)
/api/ and /sapi/ Limit Introduction.
The /api/* and /sapi/* endpoints adopt either of two access limiting rules, IP limits or UID (account) limits.
Endpoints related to /api/* :
According to the two modes of IP and UID (account) limit, each are independent. Endpoints share the 1200 per minute limit based on IP. Responses contain the header X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter) , defining the weight used by the current IP. Successful order responses contain the header X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter) , defining the order limit used by the UID.
Endpoints related to /sapi/* :
Endpoints are marked according to IP or UID limit and their corresponding weight value. Each endpoint with IP limits has an independent 12000 per minute limit. Each endpoint with UID limits has an independent 180000 per minute limit. Responses from endpoints with IP limits contain the header X-SAPI-USED-IP-WEIGHT-1M , defining the weight used by the current IP. Responses from endpoints with UID limits contain the header X-SAPI-USED-UID-WEIGHT-1M , defining the weight used by the current UID.
Data Sources.
The API system is asynchronous, so some delay in the response is normal and expected. Each endpoint has a data source indicating where the data is being retrieved, and thus which endpoints have the most up-to-date response.
These are the three sources, ordered by which is has the most up-to-date response to the one with potential delays in updates.
Matching Engine – the data is from the matching Engine Memory – the data is from a server’s local or external memory Database – the data is taken directly from a database.
Endpoint security type.
Each endpoint has a security type that determines how you will interact with it. This is stated next to the NAME of the endpoint. If no security type is stated, assume the security type is NONE. TRADE , MARGIN and USER_DATA endpoints are SIGNED endpoints.
SIGNED (TRADE, USER_DATA, AND MARGIN) Endpoint security.
SIGNED endpoints require an additional parameter, signature , to be sent in the query string or request body . Endpoints use 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. The signature is not case sensitive . totalParams is defined as the query string concatenated with the request body .
Timing security.
A SIGNED endpoint also requires a parameter, timestamp , to be sent which should be the millisecond timestamp of when the request was created and sent. An additional parameter, 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 .
Serious trading is about timing. Networks can be unstable and unreliable, which can lead to requests taking varying amounts of time to reach the servers. With recvWindow , you can specify that the request must be processed within a certain number of milliseconds or be rejected by the server.
SIGNED Endpoint Examples for POST /api/v3/order.
Here is a step-by-step example of how to send a vaild signed payload from the Linux command line using echo , openssl , and curl .
Key Value apiKey vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A secretKey NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j Parameter Value symbol LTCBTC side BUY type LIMIT timeInForce GTC quantity 1 price 0.1 recvWindow 5000 timestamp 1499827319559.
Example 1: As a request body.
Example 1 HMAC SHA256 signature:
symbol=LTCBTC &side=BUY &type=LIMIT &timeInForce=GTC &quantity=1 &price=0.1 &recvWindow=5000 &timestamp=1499827319559.
Example 2: As a query string.
Example 2 HMAC SHA256 signature:
symbol=LTCBTC &side=BUY &type=LIMIT &timeInForce=GTC &quantity=1 &price=0.1 &recvWindow=5000 &timestamp=1499827319559.
Example 3: Mixed query string and request body.
Example 3 HMAC SHA256 signature:
Note that the signature is different in example 3. There is no & between “GTC” and “quantity=1”.
Public API Definitions.
Terminology.
These terms will be used throughout the documentation, so it is recommended especially for new users to read to help their understanding of the API.
base asset refers to the asset that is the quantity of a symbol. For the symbol BTCUSDT, BTC would be the base asset. quote asset refers to the asset that is the price of a symbol. For the symbol BTCUSDT, USDT would be the quote asset .
ENUM definitions.
Symbol status (status):
PRE_TRADING TRADING POST_TRADING END_OF_DAY HALT AUCTION_MATCH BREAK.
Account and Symbol Permissions (permissions):
Order status (status):
Status Description NEW The order has been accepted by the engine. PARTIALLY_FILLED A part of the order has been filled. FILLED The order has been completed. CANCELED The order has been canceled by the user. PENDING_CANCEL Currently unused REJECTED The order was not accepted by the engine and not processed. EXPIRED The order was canceled according to the order type’s rules (e.g. LIMIT FOK orders with no fill, LIMIT IOC or MARKET orders that partially fill) or by the exchange, (e.g. orders canceled during liquidation, orders canceled during maintenance)
OCO Status (listStatusType):
Status Description RESPONSE This is used when the ListStatus is responding to a failed action. (E.g. Orderlist placement or cancellation) EXEC_STARTED The order list has been placed or there is an update to the order list status. ALL_DONE The order list has finished executing and thus no longer active.
OCO Order Status (listOrderStatus):
Status Description EXECUTING Either an order list has been placed or there is an update to the status of the list. ALL_DONE An order list has completed execution and thus no longer active. REJECT The List Status is responding to a failed action either during order placement or order canceled.)
ContingencyType.
Order types (orderTypes, type):
LIMIT MARKET STOP_LOSS STOP_LOSS_LIMIT TAKE_PROFIT TAKE_PROFIT_LIMIT LIMIT_MAKER.
Order Response Type (newOrderRespType):
Order side (side):
Time in force (timeInForce):
This sets how long an order will be active before expiration.
Status Description GTC Good Til Canceled An order will be on the book unless the order is canceled. IOC Immediate Or Cancel An order will try to fill the order as much as it can before the order expires. FOK Fill or Kill An order will expire if the full order cannot be filled upon execution.
Kline/Candlestick chart intervals:
m -> minutes; h -> hours; d -> days; w -> weeks; M -> months.
Rate limiters (rateLimitType)
Rate limit intervals (interval)
Filters.
Filters define trading rules on a symbol or an exchange. Filters come in two forms: symbol filters and exchange filters .
Symbol Filters.
PRICE_FILTER.
The 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.
Any of the above variables can be set to 0, which disables that rule in the price filter . In order to pass the price filter , the following must be true for price / stopPrice of the enabled rules:
price >= minPrice price price % tickSize == 0.
PERCENT_PRICE.
The PERCENT_PRICE filter defines valid range for a price based on the average of the previous trades. avgPriceMins is the number of minutes the average price is calculated over. 0 means the last price is used.
In order to pass the percent price , the following must be true for price :
PERCENT_PRICE_BY_SIDE.
The PERCENT_PRICE_BY_SIDE filter defines the valid range for the price based on the lastPrice of the symbol. There is a different range depending on whether the order is placed on the BUY side or the SELL side.
Buy orders will succeed on this filter if:
Order price Order price >= bidMultiplierDown * lastPrice.
Sell orders will succeed on this filter if:
Order Price Order Price >= askMultiplierDown * lastPrice.
LOT_SIZE.
The LOT_SIZE filter defines the quantity (aka “lots” in auction terms) rules for a symbol. There are 3 parts:
minQty defines the minimum quantity / icebergQty allowed. maxQty defines the maximum quantity / icebergQty allowed. stepSize defines the intervals that a quantity / icebergQty can be increased/decreased by.
In order to pass the lot size , the following must be true for quantity / icebergQty :
quantity >= minQty quantity ( quantity – minQty ) % stepSize == 0.
MIN_NOTIONAL.
The MIN_NOTIONAL filter defines the minimum notional value allowed for an order on a symbol. An order’s notional value is the price * quantity . If the order is an Algo order (e.g. STOP_LOSS_LIMIT ), then the notional value of the stopPrice * quantity will also be evaluated. If the order is an Iceberg Order, then the notional value of the price * icebergQty will also be evaluated. applyToMarket determines whether or not the MIN_NOTIONAL filter will also be applied to MARKET orders. Since MARKET orders have no price, the average price is used over the last avgPriceMins minutes. avgPriceMins is the number of minutes the average price is calculated over. 0 means the last price is used.
ICEBERG_PARTS.
The ICEBERG_PARTS filter defines the maximum parts an iceberg order can have. The number of ICEBERG_PARTS is defined as CEIL(qty / icebergQty) .
MARKET_LOT_SIZE.
The 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.
In order to pass the market lot size , the following must be true for quantity :
quantity >= minQty quantity ( quantity – minQty ) % stepSize == 0.
MAX_NUM_ORDERS.
The MAX_NUM_ORDERS filter defines the maximum number of orders an account is allowed to have open on a symbol. Note that both “algo” orders and normal orders are counted for this filter.
MAX_NUM_ALGO_ORDERS.
The MAX_NUM_ALGO_ORDERS filter defines the maximum number of “algo” orders an account is allowed to have open on a symbol. “Algo” orders are STOP_LOSS , STOP_LOSS_LIMIT , TAKE_PROFIT , and TAKE_PROFIT_LIMIT orders.
MAX_NUM_ICEBERG_ORDERS.
The MAX_NUM_ICEBERG_ORDERS filter defines the maximum number of ICEBERG orders an account is allowed to have open on a symbol. An ICEBERG order is any order where the icebergQty is > 0.
MAX_POSITION.
The MAX_POSITION filter defines the allowed maximum position an account can have on the base asset of a symbol. An account’s position defined as the sum of the account’s:
free balance of the base asset locked balance of the base asset sum of the qty of all open BUY orders.
BUY orders will be rejected if the account’s position is greater than the maximum position allowed.
TRAILING_DELTA.
The TRAILING_DELTA filter defines the minimum and maximum value for the parameter trailingDelta .
In order for a trailing stop order to pass this filter, the following must be true:
For STOP_LOSS BUY , STOP_LOSS_LIMIT_BUY , TAKE_PROFIT SELL and TAKE_PROFIT_LIMIT SELL orders:
trailingDelta >= minTrailingAboveDelta trailingDelta.
For STOP_LOSS SELL , STOP_LOSS_LIMIT SELL , TAKE_PROFIT BUY , and TAKE_PROFIT_LIMIT BUY orders:
trailingDelta >= minTrailingBelowDelta trailingDelta.
Exchange Filters.
EXCHANGE_MAX_NUM_ORDERS.
The EXCHANGE_MAX_NUM_ORDERS filter defines the maximum number of orders an account is allowed to have open on the exchange. Note that both “algo” orders and normal orders are counted for this filter.
EXCHANGE_MAX_NUM_ALGO_ORDERS.
The EXCHANGE_MAX_NUM_ALGO_ORDERS filter defines the maximum number of “algo” orders an account is allowed to have open on the exchange. “Algo” orders are STOP_LOSS , STOP_LOSS_LIMIT , TAKE_PROFIT , and TAKE_PROFIT_LIMIT orders.
Wallet Endpoints.
System Status (System)
Fetch system status.
Weight(IP): 1.
All Coins’ Information (USER_DATA)
Get information of coins (available for deposit and withdraw) for user.
GET /sapi/v1/capital/config/getall (HMAC SHA256)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
Daily Account Snapshot (USER_DATA)
GET /sapi/v1/accountSnapshot (HMAC SHA256)
Weight(IP): 2400.
Parameters:
Disable Fast Withdraw Switch (USER_DATA)
POST /sapi/v1/account/disableFastWithdrawSwitch (HMAC SHA256)
Weight(IP): 1.
Parameters:
Caution:
This request will disable fastwithdraw switch under your account. You need to enable “trade” option for the api key which requests this endpoint.
Enable Fast Withdraw Switch (USER_DATA)
POST /sapi/v1/account/enableFastWithdrawSwitch (HMAC SHA256)
Weight(IP): 1.
Parameters:
This request will enable fastwithdraw switch under your account. You need to enable “trade” option for the api key which requests this endpoint. When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee.
Withdraw(USER_DATA)
POST /sapi/v1/capital/withdraw/apply (HMAC SHA256)
Submit a withdraw request.
Weight(IP): 1.
Parameters:
If network not send, return with default network of the coin. You can get network and isDefault in networkList of a coin in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256) .
Deposit History(supporting network) (USER_DATA)
GET /sapi/v1/capital/deposit/hisrec (HMAC SHA256)
Fetch deposit history.
Weight(IP): 1.
Parameters:
Please notice the default startTime and endTime to make sure that time interval is within 0-90 days. If both startTime and endTime are sent, time between startTime and endTime must be less than 90 days.
Withdraw History (supporting network) (USER_DATA)
GET /sapi/v1/capital/withdraw/history (HMAC SHA256)
Fetch withdraw history.
Weight(IP): 1.
Parameters:
network may not be in the response for old withdraw. Please notice the default startTime and endTime to make sure that time interval is within 0-90 days. If both startTime and endTime are sent, time between startTime and endTime must be less than 90 days. If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days. If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default.
Deposit Address (supporting network) (USER_DATA)
GET /sapi/v1/capital/deposit/address (HMAC SHA256)
Fetch deposit address with network.
Weight(IP): 10.
Parameters:
If network is not send, return with default network of the coin. You can get network and isDefault in networkList in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256) .
Account Status (USER_DATA)
Fetch account status detail.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
Account API Trading Status (USER_DATA)
GET /sapi/v1/account/apiTradingStatus (HMAC SHA256)
Fetch account api trading status detail.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
DustLog(USER_DATA)
GET /sapi/v1/asset/dribblet (HMAC SHA256)
Weight(IP): 1.
Parameters:
Get Assets That Can Be Converted Into BNB (USER_DATA)
POST /sapi/v1/asset/dust-btc (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
Dust Transfer (USER_DATA)
POST /sapi/v1/asset/dust (HMAC SHA256)
Convert dust assets to BNB.
Weight(UID): 10.
Parameters:
You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
Asset Dividend Record (USER_DATA)
GET /sapi/v1/asset/assetDividend (HMAC SHA256)
Query asset dividend record.
Weight(IP): 10.
Parameters:
Name Type Mandatory Description asset STRING NO startTime LONG NO endTime LONG NO limit INT NO Default 20, max 500 recvWindow LONG NO timestamp LONG YES.
Asset Detail (USER_DATA)
GET /sapi/v1/asset/assetDetail (HMAC SHA256)
Fetch details of assets supported on Binance.
Weight(IP): 1.
Parameters:
Trade Fee (USER_DATA)
GET /sapi/v1/asset/tradeFee (HMAC SHA256)
Fetch trade fee.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description symbol STRING NO recvWindow LONG NO timestamp LONG YES.
User Universal Transfer (USER_DATA)
POST /sapi/v1/asset/transfer (HMAC SHA256)
You need to enable Permits Universal Transfer option for the API Key which requests this endpoint.
Weight(IP): 1.
Parameters:
toSymbol must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN.
ENUM of transfer types:
MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account MAIN_CMFUTURE Spot account transfer to COIN-M Futures account MAIN_MARGIN Spot account transfer to Margin(cross)account UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account CMFUTURE_MAIN COIN-M Futures account transfer to Spot account CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account MARGIN_MAIN Margin(cross)account transfer to Spot account MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account MAIN_FUNDING Spot account transfer to Funding account FUNDING_MAIN Funding account transfer to Spot account FUNDING_UMFUTURE Funding account transfer to UMFUTURE account UMFUTURE_FUNDING UMFUTURE account transfer to Funding account MARGIN_FUNDING MARGIN account transfer to Funding account FUNDING_MARGIN Funding account transfer to Margin account FUNDING_CMFUTURE Funding account transfer to CMFUTURE account CMFUTURE_FUNDING CMFUTURE account transfer to Funding account.
Query User Universal Transfer History (USER_DATA)
GET /sapi/v1/asset/transfer (HMAC SHA256)
Weight(IP): 1.
Parameters:
fromSymbol must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN toSymbol must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN Support query within the last 6 months only If startTime and endTime not sent, return records of the last 7 days by default.
Funding Wallet (USER_DATA)
POST /sapi/v1/asset/get-funding-asset (HMAC SHA256)
Weight(IP): 1.
Parameters:
Get API Key Permission (USER_DATA)
GET /sapi/v1/account/apiRestrictions (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
Sub-Account Endpoints.
The endpoints documented in this section are for Corporate Accounts. To become a corporate account, please refer to this document: Corporate Account Application.
Create a Virtual Sub-account(For Master Account)
POST /sapi/v1/sub-account/virtualSubAccount (HMAC SHA256)
Weight(IP): 1.
Parameters:
This request will generate a virtual sub account under your master account. You need to enable “trade” option for the API Key which requests this endpoint.
Query Sub-account List (For Master Account)
GET /sapi/v1/sub-account/list (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING NO Sub-account email isFreeze STRING NO true or false page INT NO Default value: 1 limit INT NO Default value: 1, Max value: 200 recvWindow LONG NO timestamp LONG YES.
Query Sub-account Spot Asset Transfer History (For Master Account)
GET /sapi/v1/sub-account/sub/transfer/history (HMAC SHA256)
Weight(IP): 1.
Parameters:
Query Sub-account Futures Asset Transfer History (For Master Account)
GET /sapi/v1/sub-account/futures/internalTransfer (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email futuresType LONG YES 1:USDT-margined Futures,2: Coin-margined Futures startTime LONG NO Default return the history with in 100 days endTime LONG NO Default return the history with in 100 days page INT NO Default value: 1 limit INT NO Default value: 50, Max value: 500 recvWindow LONG NO timestamp LONG YES.
Sub-account Futures Asset Transfer (For Master Account)
POST /sapi/v1/sub-account/futures/internalTransfer (HMAC SHA256)
Weight(IP): 1.
Parameters:
Query Sub-account Assets (For Master Account)
GET /sapi/v3/sub-account/assets (HMAC SHA256)
Fetch sub-account assets.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES Sub account email recvWindow LONG NO timestamp LONG YES.
Query Sub-account Spot Assets Summary (For Master Account)
Get BTC valued asset summary of subaccounts.
GET /sapi/v1/sub-account/spotSummary (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING NO Sub account email page LONG NO default 1 size LONG NO default 10, max 20 recvWindow LONG NO timestamp LONG YES.
Get Sub-account Deposit Address (For Master Account)
GET /sapi/v1/capital/deposit/subAddress (HMAC SHA256)
Fetch sub-account deposit address.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES Sub account email coin STRING YES network STRING NO recvWindow LONG NO timestamp LONG YES.
Get Sub-account Deposit History (For Master Account)
GET /sapi/v1/capital/deposit/subHisrec (HMAC SHA256)
Fetch sub-account deposit history.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES Sub account email coin STRING NO status INT NO 0(0:pending,6: credited but cannot withdraw, 1:success) startTime LONG NO endTime LONG NO limit INT NO offset INT NO default:0 recvWindow LONG NO timestamp LONG YES.
Get Sub-account’s Status on Margin/Futures (For Master Account)
GET /sapi/v1/sub-account/status (HMAC SHA256)
Weight(IP): 10.
Parameters:
Enable Margin for Sub-account (For Master Account)
POST /sapi/v1/sub-account/margin/enable (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email recvWindow LONG NO timestamp LONG YES.
Get Detail on Sub-account’s Margin Account (For Master Account)
GET /sapi/v1/sub-account/margin/account (HMAC SHA256)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email recvWindow LONG NO timestamp LONG YES.
Get Summary of Sub-account’s Margin Account (For Master Account)
GET /sapi/v1/sub-account/margin/accountSummary (HMAC SHA256)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
Enable Futures for Sub-account (For Master Account)
POST /sapi/v1/sub-account/futures/enable (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email recvWindow LONG NO timestamp LONG YES.
Get Detail on Sub-account’s Futures Account (For Master Account)
GET /sapi/v1/sub-account/futures/account (HMAC SHA256)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email recvWindow LONG NO timestamp LONG YES.
Get Summary of Sub-account’s Futures Account (For Master Account)
GET /sapi/v1/sub-account/futures/accountSummary (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
Get Futures Position-Risk of Sub-account (For Master Account)
GET /sapi/v1/sub-account/futures/positionRisk (HMAC SHA256)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email recvWindow LONG NO timestamp LONG YES.
Futures Transfer for Sub-account (For Master Account)
POST /sapi/v1/sub-account/futures/transfer (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email asset STRING YES The asset being transferred, e.g., USDT amount DECIMAL YES The amount to be transferred type INT YES 1: transfer from subaccount’s spot account to its USDT-margined futures account 2: transfer from subaccount’s USDT-margined futures account to its spot account 3: transfer from subaccount’s spot account to its COIN-margined futures account 4:transfer from subaccount’s COIN-margined futures account to its spot account recvWindow LONG NO timestamp LONG YES.
Margin Transfer for Sub-account (For Master Account)
POST /sapi/v1/sub-account/margin/transfer (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email asset STRING YES The asset being transferred, e.g., BTC amount DECIMAL YES The amount to be transferred type INT YES 1: transfer from subaccount’s spot account to margin account 2: transfer from subaccount’s margin account to its spot account recvWindow LONG NO timestamp LONG YES.
Transfer to Sub-account of Same Master (For Sub-account)
POST /sapi/v1/sub-account/transfer/subToSub (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description toEmail STRING YES Sub-account email asset STRING YES amount DECIMAL YES recvWindow LONG NO timestamp LONG YES.
Transfer to Master (For Sub-account)
POST /sapi/v1/sub-account/transfer/subToMaster (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description asset STRING YES amount DECIMAL YES recvWindow LONG NO timestamp LONG YES.
Sub-account Transfer History (For Sub-account)
GET /sapi/v1/sub-account/transfer/subUserHistory (HMAC SHA256)
Weight(IP): 1.
Parameters:
Universal Transfer (For Master Account)
POST /sapi/v1/sub-account/universalTransfer (HMAC SHA256)
Weight(IP): 1.
Parameters:
You need to enable “internal transfer” option for the api key which requests this endpoint. Transfer from master account by default if fromEmail is not sent. Transfer to master account by default if toEmail is not sent. Supported transfer scenarios: Master account SPOT transfer to sub-account SPOT , USDT_FUTURE , COIN_FUTURE , MARGIN(Cross) , ISOLATED_MARGIN Sub-account SPOT , USDT_FUTURE , COIN_FUTURE , MARGIN(Cross) , ISOLATED_MARGIN transfer to master account SPOT Transfer between two sub-account SPOT accounts.
Query Universal Transfer History (For Master Account)
GET /sapi/v1/sub-account/universalTransfer (HMAC SHA256)
Weight(IP): 1.
Parameters:
Get Detail on Sub-account’s Futures Account V2 (For Master Account)
Response USDT Margined Futures:
GET /sapi/v2/sub-account/futures/account (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email futuresType INT YES 1:USDT Margined Futures, 2:COIN Margined Futures recvWindow LONG NO timestamp LONG YES.
Get Summary of Sub-account’s Futures Account V2 (For Master Account)
Response USDT Margined Futures:
GET /sapi/v2/sub-account/futures/accountSummary (HMAC SHA256)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description futuresType INT YES 1:USDT Margined Futures, 2:COIN Margined Futures page INT NO default:1 limit INT NO default:10, max:20 recvWindow LONG NO timestamp LONG YES.
Get Futures Position-Risk of Sub-account V2 (For Master Account)
Response USDT Margined Futures:
GET /sapi/v2/sub-account/futures/positionRisk (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email futuresType INT YES 1:USDT Margined Futures, 2:COIN Margined Futures recvWindow LONG NO timestamp LONG YES.
Enable Leverage Token for Sub-account (For Master Account)
POST /sapi/v1/sub-account/blvt/enable (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email enableBlvt BOOLEAN YES Only true for now recvWindow LONG NO timestamp LONG YES.
Enable or Disable IP Restriction for a Sub-account API Key (For Master Account)
POST /sapi/v1/sub-account/subAccountApi/ipRestriction (HMAC SHA256)
Weight(UID): 3000.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email subAccountApiKey STRING YES ipRestrict BOOLEAN YES true or false recvWindow LONG NO timestamp LONG YES.
Add IP List for a Sub-account API Key (For Master Account)
POST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList (HMAC SHA256)
Before the usage of this endpoint, please ensure POST /sapi/v1/sub-account/subAccountApi/ipRestriction was used to enable the IP restriction.
Weight(UID): 3000.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email subAccountApiKey STRING YES ipAddress STRING YES Can be added in batches, separated by commas. Max 30 for an API key recvWindow LONG NO timestamp LONG YES.
Get IP Restriction for a Sub-account API Key (For Master Account)
GET /sapi/v1/sub-account/subAccountApi/ipRestriction (HMAC SHA256)
Weight(UID): 3000.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email subAccountApiKey STRING YES recvWindow LONG NO timestamp LONG YES.
Delete IP List For a Sub-account API Key (For Master Account)
DELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList (HMAC SHA256)
Weight(UID): 3000.
Parameters:
Name Type Mandatory Description email STRING YES Sub-account email subAccountApiKey STRING YES ipAddress STRING YES Can be added in batches, separated by commas recvWindow LONG NO timestamp LONG YES.
Deposit Assets Into The Managed Sub-account(For Investor Master Account)
POST /sapi/v1/managed-subaccount/deposit (HMAC SHA256)
Weight(IP): 1.
Parameters:
Query Managed Sub-account Asset Details(For Investor Master Account)
GET /sapi/v1/managed-subaccount/asset (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description email STRING YES recvWindow LONG NO timestamp LONG YES.
Withdrawl Assets From The Managed Sub-account(For Investor Master Account)
POST /sapi/v1/managed-subaccount/withdraw (HMAC SHA256)
Weight(IP): 1.
Parameters:
You need to enable Enable Spot & Margin Trading option for the api key which requests this endpoint.
Query Managed Sub-account Snapshot(For Investor Master Account)
GET /sapi/v1/managed-subaccount/accountSnapshot (HMAC SHA256)
Weight(IP): 2400.
Parameters:
Market Data Endpoints.
Test Connectivity.
Test connectivity to the Rest API.
Weight(IP): 1.
Parameters:
Data Source: Memory.
Check Server Time.
Test connectivity to the Rest API and get the current server time.
Weight(IP): 1.
Parameters:
Data Source: Memory.
Exchange Information.
Current exchange trading rules and symbol information.
Weight(IP): 10.
Parameters:
There are 3 possible options:
Options Example No parameter curl -X GET “https://api.binance.com/api/v3/exchangeInfo” symbol curl -X GET “https://api.binance.com/api/v3/exchangeInfo?symbol=BNBBTC” symbols curl -X GET “https://api.binance.com/api/v3/exchangeInfo?symbols=%5B%22BNBBTC%22,%22BTCUSDT%22%5D” or curl -g GET ‘https://api.binance.com/api/v3/exchangeInfo?symbols=[“BTCUSDT”,”BNBBTC”]’
If any symbol provided in either symbol or symbols do not exist, the endpoint will throw an error.
Data Source: Memory.
Order Book.
Weight(IP):
Adjusted based on the limit:
Limit Weight 1-100 1 101-500 5 501-1000 10 1001-5000 50.
Parameters:
Name Type Mandatory Description symbol STRING YES limit INT NO Default 100; max 5000. If limit > 5000, then the response will truncate to 5000.
Data Source: Memory.
Recent Trades List.
Get recent trades.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description symbol STRING YES limit INT NO Default 500; max 1000.
Data Source: Memory.
Old Trade Lookup (MARKET_DATA)
Get older market trades.
Weight(IP): 5.
Parameters:
Name Type Mandatory Description symbol STRING YES limit INT NO Default 500; max 1000. fromId LONG NO Trade id to fetch from. Default gets most recent trades.
Data Source: Database.
Compressed/Aggregate Trades List.
Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated.
Weight(IP): 1.
Parameters:
If 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. Note that if a trade has the following values, this was a duplicate aggregate trade and marked as invalid: p = ‘0’ // price q = ‘0’ // qty f = -1 // first_trade_id l = -1 // last_trade_id.
Data Source: Database.
Kline/Candlestick Data.
Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.
Weight(IP): 1.
Parameters:
Data Source: Database.
Current Average Price.
Current average price for a symbol.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description symbol STRING YES.
Data Source: Memory.
24hr Ticker Price Change Statistics.
24 hour rolling window price change statistics. Careful when accessing this with no symbol.
Weight(IP):
1 for a single symbol; 40 when the symbol parameter is omitted;
Parameters:
Data Source: Memory.
Symbol Price Ticker.
Latest price for a symbol or symbols.
Weight(IP):
1 for a single symbol; 2 when the symbol parameter is omitted;
Parameters:
Data Source: Memory.
Symbol Order Book Ticker.
Best price/qty on the order book for a symbol or symbols.
Weight(IP):
1 for a single symbol; 2 when the symbol parameter is omitted;
Parameters:
Data Source: Memory.
Websocket Market Streams.
The base endpoint is: wss://stream.binance.com:9443 Streams can be accessed either in a single raw stream or in a combined stream Raw streams are accessed at /ws/ Combined streams are accessed at /stream?streams=// Combined stream events are wrapped as follows: “,”data”:> All symbols for streams are lowercase A single connection to stream.binance.com is only valid for 24 hours; expect to be disconnected at the 24 hour mark The websocket server will send a ping frame every 3 minutes. If the websocket server does not receive a pong frame back from the connection within a 10 minute period, the connection will be disconnected. Unsolicited pong frames are allowed.
Live Subscribing/Unsubscribing to streams.
The following data can be sent through the websocket instance in order to subscribe/unsubscribe from streams. Examples can be seen below. The id used in the JSON payloads is an unsigned INT used as an identifier to uniquely identify the messages going back and forth. In the response, if the result received is null this means the request sent was a success.
Subscribe to a stream.
Request.
Unsubscribe to a stream.
Listing Subscriptions.
“method”: “LIST_SUBSCRIPTIONS”, “id”: 3 >
Setting Properties.
Currently, the only property can be set is to set whether combined stream payloads are enabled or not. The combined property is set to false when connecting using /ws/ (“raw streams”) and true when connecting using /stream/ .
Retrieving Properties.
Error Messages.
Error Message Description Parameter used in the SET_PROPERTY or GET_PROPERTY was invalid Value should only be true or false Property name provided was invalid Parameter id had to be provided or the value provided in the id parameter is an unsupported type Possible typo in the provided method or provided method was neither of the expected values Unnecessary parameters provided in the data Property name was not provided method was not provided in the data JSON data sent has incorrect syntax.
Aggregate Trade Streams.
The Aggregate Trade Streams push trade information that is aggregated for a single taker order.
Stream Name: @aggTrade.
Update Speed: Real-time.
Trade Streams.
The Trade Streams push raw trade information; each trade has a unique buyer and seller.
Stream Name: @trade.
Update Speed: Real-time.
Kline/Candlestick Streams.
The Kline/Candlestick Stream push updates to the current klines/candlestick every second.
Stream Name: @kline_.
Update Speed: 2000ms.
Kline/Candlestick chart intervals:
m -> minutes; h -> hours; d -> days; w -> weeks; M -> months.
Individual Symbol Mini Ticker Stream.
24hr rolling window mini-ticker statistics. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs.
Stream Name: @miniTicker.
Update Speed: 1000ms.
All Market Mini Tickers Stream.
24hr rolling window mini-ticker statistics for all symbols that changed in an array. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. Note that only tickers that have changed will be present in the array.
Stream Name: [email protected]
Update Speed: 1000ms.
Individual Symbol Ticker Streams.
24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs.
Stream Name: @ticker.
Update Speed: 1000ms.
All Market Tickers Stream.
24hr rolling window ticker statistics for all symbols that changed in an array. These are NOT the statistics of the UTC day, but a 24hr rolling window for the previous 24hrs. Note that only tickers that have changed will be present in the array.
Stream Name: [email protected]
Update Speed: 1000ms.
Individual Symbol Book Ticker Streams.
Pushes any update to the best bid or ask’s price or quantity in real-time for a specified symbol.
Stream Name: @bookTicker.
Update Speed: Real-time.
All Book Tickers Stream.
Pushes any update to the best bid or ask’s price or quantity in real-time for all symbols.
Stream Name: !bookTicker.
Update Speed: Real-time.
Partial Book Depth Streams.
Top bids and asks, Valid are 5, 10, or 20.
Stream Names: @depth OR @[email protected] .
Update Speed: 1000ms or 100ms.
Diff. Depth Stream.
Stream Name: @depth OR @[email protected]
Update Speed: 1000ms or 100ms.
Order book price and quantity depth updates used to locally manage an order book.
How to manage a local order book correctly.
Open a stream to wss://stream.binance.com:9443/ws/[email protected] . Buffer the events you receive from the stream. Get a depth snapshot from https://api.binance.com/api/v3/depth?symbol=BNBBTC&limit=1000 . Drop any event where u is The first processed event should have U AND u >= lastUpdateId +1. While listening to the stream, each new event’s U should be equal to the previous event’s u +1. The data in each event is the absolute quantity for a price level. If the quantity is 0, remove the price level. Receiving an event that removes a price level that is not in your local order book can happen and is normal.
Note: Due to depth snapshots having a limit on the number of price levels, a price level outside of the initial snapshot that doesn’t have a quantity change won’t have an update in the Diff. Depth Stream. Consequently, those price levels will not be visible in the local order book even when applying all updates from the Diff. Depth Stream correctly and cause the local order book to have some slight differences with the real order book. However, for most use cases the depth limit of 5000 is enough to understand the market and trade effectively.
Spot Account/Trade.
Test New Order (TRADE)
POST /api/v3/order/test (HMAC SHA256)
Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine.
Weight: 1.
Parameters:
Same as POST /api/v3/order.
Data Source: Memory.
New Order (TRADE)
POST /api/v3/order (HMAC SHA256)
Send in a new order.
Weight(UID): 1 Weight(IP): 1.
Parameters:
Name Type Mandatory Description symbol STRING YES side ENUM YES type ENUM YES timeInForce ENUM NO quantity DECIMAL NO quoteOrderQty DECIMAL NO price DECIMAL NO newClientOrderId STRING NO A unique id among open orders. Automatically generated if not sent. stopPrice DECIMAL NO Used with STOP_LOSS , STOP_LOSS_LIMIT , TAKE_PROFIT , and TAKE_PROFIT_LIMIT orders. trailingDelta LONG NO Used with STOP_LOSS , STOP_LOSS_LIMIT , TAKE_PROFIT , and TAKE_PROFIT_LIMIT orders. icebergQty DECIMAL NO Used with LIMIT , STOP_LOSS_LIMIT , and TAKE_PROFIT_LIMIT to create an iceberg order. newOrderRespType ENUM NO Set the response JSON. ACK , RESULT , or FULL ; MARKET and LIMIT order types default to FULL , all other orders default to ACK . recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Additional mandatory parameters based on type :
Type Additional mandatory parameters LIMIT timeInForce , quantity , price MARKET quantity or quoteOrderQty STOP_LOSS quantity , stopPrice or trailingDelta STOP_LOSS_LIMIT timeInForce , quantity , price , stopPrice or trailingDelta TAKE_PROFIT quantity , stopPrice or trailingDelta TAKE_PROFIT_LIMIT timeInForce , quantity , price , stopPrice or trailingDelta LIMIT_MAKER quantity , price.
LIMIT_MAKER are LIMIT orders that will be rejected if they would immediately match and trade as a taker. STOP_LOSS and TAKE_PROFIT will execute a MARKET order when the stopPrice is reached. Any LIMIT or LIMIT_MAKER type order can be made an iceberg order by sending an icebergQty . Any order with an icebergQty MUST have timeInForce set to GTC . MARKET orders using the quantity field specifies the amount of the base asset the user wants to buy or sell at the market price. For example, sending a MARKET order on BTCUSDT will specify how much BTC the user is buying or selling. Using BTCUSDT as an example: On the BUY side, the order will buy as many BTC as quoteOrderQty USDT can. On the SELL side, the order will sell as much BTC needed to receive quoteOrderQty USDT.
Trigger order price rules against market price for both MARKET and LIMIT versions:
Price above market price: STOP_LOSS BUY , TAKE_PROFIT SELL Price below market price: STOP_LOSS SELL , TAKE_PROFIT BUY.
Data Source: Matching Engine.
Cancel Order (TRADE)
DELETE /api/v3/order (HMAC SHA256)
Cancel an active order.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description symbol STRING YES orderId LONG NO origClientOrderId STRING NO newClientOrderId STRING NO Used to uniquely identify this cancel. Automatically generated by default. recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Either orderId or origClientOrderId must be sent.
Data Source: Matching Engine.
Cancel all Open Orders on a Symbol (TRADE)
Cancels all active orders on a symbol. This includes OCO orders.
Weight(IP): 1.
Parameters.
Name Type Mandatory Description symbol STRING YES recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Data Source: Matching Engine.
Query Order (USER_DATA)
GET /api/v3/order (HMAC SHA256)
Check an order’s status.
Weight(IP): 2.
Parameters:
Name Type Mandatory Description symbol STRING YES orderId LONG NO origClientOrderId STRING NO recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Either orderId or origClientOrderId must be sent. For some historical orders cummulativeQuoteQty will be.
Data Source: Database.
Current Open Orders (USER_DATA)
GET /api/v3/openOrders (HMAC SHA256)
Get all open orders on a symbol. Careful when accessing this with no symbol.
Weight(IP): 3 for a single symbol; 40 when the symbol parameter is omitted;
Parameters:
Data Source: Database.
All Orders (USER_DATA)
GET /api/v3/allOrders (HMAC SHA256)
Get all account orders; active, canceled, or filled.
Weight(IP): 10 with symbol.
Parameters:
Name Type Mandatory Description symbol STRING YES orderId LONG NO startTime LONG NO endTime LONG NO limit INT NO Default 500; max 1000. recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Notes:
If orderId is set, it will get orders >= that orderId . Otherwise most recent orders are returned. For some historical orders cummulativeQuoteQty will be If startTime and/or endTime provided, orderId is not required.
Data Source: Database.
New OCO (TRADE)
POST /api/v3/order/oco (HMAC SHA256)
Send in a new OCO.
Weight(UID) : 2 Weight(IP) : 1.
Parameters :
Name Type Mandatory Description symbol STRING YES listClientOrderId STRING NO A unique Id for the entire orderList side ENUM YES quantity DECIMAL YES limitClientOrderId STRING NO A unique Id for the limit order price DECIMAL YES limitIcebergQty DECIMAL NO trailingDelta LONG NO stopClientOrderId STRING NO A unique Id for the stop loss/stop loss limit leg stopPrice DECIMAL YES stopLimitPrice DECIMAL NO If provided, stopLimitTimeInForce is required. stopIcebergQty DECIMAL NO stopLimitTimeInForce ENUM NO Valid values are GTC / FOK / IOC newOrderRespType ENUM NO Set the response JSON. recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Price Restrictions: SELL : Limit Price > Last Price > Stop Price BUY : Limit Price Both legs must have the same quantity ICEBERG quantities however do not have to be the same. OCO counts as 2 orders against the order rate limit.
Data Source: Matching Engine.
Cancel OCO (TRADE)
DELETE /api/v3/orderList (HMAC SHA256) Cancel an entire Order List.
Weight(IP) : 1.
Parameters:
Name Type Mandatory Description symbol STRING YES orderListId LONG NO Either orderListId or listClientOrderId must be provided listClientOrderId STRING NO Either orderListId or listClientOrderId must be provided newClientOrderId STRING NO Used to uniquely identify this cancel. Automatically generated by default recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Canceling an individual leg will cancel the entire OCO.
Data Source: Matching Engine.
Query OCO (USER_DATA)
GET /api/v3/orderList (HMAC SHA256)
Retrieves a specific OCO based on provided optional parameters.
Weight(IP) : 2.
Parameters :
Name Type Mandatory Description orderListId LONG NO Either orderListId or origClientOrderId must be provided origClientOrderId STRING NO Either orderListId or origClientOrderId must be provided recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Data Source: Database.
Query all OCO (USER_DATA)
GET /api/v3/allOrderList (HMAC SHA256)
Retrieves all OCO based on provided optional parameters.
Weight(IP) : 10.
Parameters.
Name Type Mandatory Description fromId LONG NO If supplied, neither startTime or endTime can be provided startTime LONG NO endTime LONG NO limit INT NO Default Value: 500; Max Value: 1000 recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Data Source: Database.
Query Open OCO (USER_DATA)
GET /api/v3/openOrderList (HMAC SHA256)
Weight(IP) : 3.
Parameters.
Name Type Mandatory Description recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Data Source: Database.
Account Information (USER_DATA)
GET /api/v3/account (HMAC SHA256)
Get current account information.
Weight(IP): 10.
Parameters:
Name Type Mandatory Description recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Data Source: Memory => Database.
Account Trade List (USER_DATA)
GET /api/v3/myTrades (HMAC SHA256)
Get trades for a specific account and symbol.
Weight(IP): 10.
Parameters:
Name Type Mandatory Description symbol STRING YES orderId LONG NO This can only be used in combination with symbol . startTime LONG NO endTime LONG NO fromId LONG NO TradeId to fetch from. Default gets most recent trades. limit INT NO Default 500; max 1000. recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Notes:
If fromId is set, it will get id >= that fromId . Otherwise most recent trades are returned.
Data Source: Database.
Query Current Order Count Usage (TRADE)
Displays the user’s current order count usage for all intervals.
Weight(IP): 20.
Parameters:
Name Type Mandatory Description recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Data Source: Memory.
Margin Account/Trade.
Cross Margin Account Transfer (MARGIN)
POST /sapi/v1/margin/transfer (HMAC SHA256)
Execute transfer between spot account and cross margin account.
Weight(IP): 600.
Parameters:
Name Type Mandatory Description asset STRING YES The asset being transferred, e.g., BTC amount DECIMAL YES The amount to be transferred type INT YES 1: transfer from main account to cross margin account 2: transfer from cross margin account to main account recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Margin Account Borrow (MARGIN)
POST /sapi/v1/margin/loan (HMAC SHA256)
Apply for a loan.
Weight(UID): 3000.
Parameters:
Margin Account Repay (MARGIN)
POST /sapi/v1/margin/repay (HMAC SHA256)
Repay loan for margin account.
Weight(UID): 3000.
Parameters:
Query Margin Asset (MARKET_DATA)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description asset STRING YES.
Query Cross Margin Pair (MARKET_DATA)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description symbol STRING YES.
Get All Margin Assets (MARKET_DATA)
Weight(IP): 1.
Parameters:
Get All Cross Margin Pairs (MARKET_DATA)
Weight(IP): 1.
Parameters:
Query Margin PriceIndex (MARKET_DATA)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description symbol STRING YES.
Margin Account New Order (TRADE)
POST /sapi/v1/margin/order (HMAC SHA256)
Post a new order for margin account.
Weight(UID): 6.
Parameters:
Name Type Mandatory Description symbol STRING YES isIsolated STRING NO for isolated margin or not, “TRUE”, “FALSE”,default “FALSE” side ENUM YES BUY SELL type ENUM YES quantity DECIMAL NO quoteOrderQty DECIMAL NO price DECIMAL NO stopPrice DECIMAL NO Used with STOP_LOSS , STOP_LOSS_LIMIT , TAKE_PROFIT , and TAKE_PROFIT_LIMIT orders. newClientOrderId STRING NO A unique id among open orders. Automatically generated if not sent. icebergQty DECIMAL NO Used with LIMIT , STOP_LOSS_LIMIT , and TAKE_PROFIT_LIMIT to create an iceberg order. newOrderRespType ENUM NO Set the response JSON. ACK, RESULT, or FULL; MARKET and LIMIT order types default to FULL, all other orders default to ACK. sideEffectType ENUM NO NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; default NO_SIDE_EFFECT. timeInForce ENUM NO GTC,IOC,FOK recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Margin Account Cancel Order (TRADE)
DELETE /sapi/v1/margin/order (HMAC SHA256)
Cancel an active order for margin account.
Weight(IP): 10.
Parameters:
Margin Account Cancel all Open Orders on a Symbol (TRADE)
DELETE /sapi/v1/margin/openOrders (HMAC SHA256)
Cancels all active orders on a symbol for margin account. This includes OCO orders.
Weight(IP): 1.
Parameters.
Name Type Mandatory Description symbol STRING YES isIsolated STRING NO for isolated margin or not, “TRUE”, “FALSE”,default “FALSE” recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Get Cross Margin Transfer History (USER_DATA)
GET /sapi/v1/margin/transfer (HMAC SHA256)
Weight(IP): 1.
Parameters:
Query Loan Record (USER_DATA)
GET /sapi/v1/margin/loan (HMAC SHA256)
Weight(IP): 10.
Parameters:
txId or startTime must be sent. txId takes precedence. Response in descending order If isolatedSymbol is not sent, crossed margin data will be returned 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.
Query Repay Record (USER_DATA)
GET /sapi/v1/margin/repay (HMAC SHA256)
Weight(IP): 10.
Parameters:
txId or startTime must be sent. txId takes precedence. Response in descending order If isolatedSymbol is not sent, crossed margin data will be returned 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.
Get Interest History (USER_DATA)
GET /sapi/v1/margin/interestHistory (HMAC SHA256)
Weight(IP): 1.
Parameters:
Response in descending order If isolatedSymbol is not sent, crossed margin data will be returned 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 type in response has 4 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.
Get Force Liquidation Record (USER_DATA)
GET /sapi/v1/margin/forceLiquidationRec (HMAC SHA256)
Weight(IP): 1.
Parameters:
Query Cross Margin Account Details (USER_DATA)
GET /sapi/v1/margin/account (HMAC SHA256)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Query Margin Account’s Order (USER_DATA)
GET /sapi/v1/margin/order (HMAC SHA256)
Weight(IP): 10.
Parameters:
Query Margin Account’s Open Orders (USER_DATA)
GET /sapi/v1/margin/openOrders (HMAC SHA256)
Weight(IP): 10.
Parameters:
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.
Query Margin Account’s All Orders (USER_DATA)
GET /sapi/v1/margin/allOrders (HMAC SHA256)
Weight(IP): 200.
Request Limit 60times/min per IP.
Parameters:
Margin Account New OCO (TRADE)
POST /sapi/v1/margin/order/oco (HMAC SHA256)
Send in a new OCO for a margin account.
Weight(UID) : 6.
Parameters :
Name Type Mandatory Description symbol STRING YES isIsolated STRING NO for isolated margin or not, “TRUE”, “FALSE”,default “FALSE” listClientOrderId STRING NO A unique Id for the entire orderList side ENUM YES quantity DECIMAL YES limitClientOrderId STRING NO A unique Id for the limit order price DECIMAL YES limitIcebergQty DECIMAL NO stopClientOrderId STRING NO A unique Id for the stop loss/stop loss limit leg stopPrice DECIMAL YES stopLimitPrice DECIMAL NO If provided, stopLimitTimeInForce is required. stopIcebergQty DECIMAL NO stopLimitTimeInForce ENUM NO Valid values are GTC / FOK / IOC newOrderRespType ENUM NO Set the response JSON. sideEffectType ENUM NO NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY; default NO_SIDE_EFFECT. recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Price Restrictions: SELL : Limit Price > Last Price > Stop Price BUY : Limit Price Both legs must have the same quantity ICEBERG quantities however do not have to be the same. OCO counts as 2 orders against the order rate limit.
Margin Account Cancel OCO (TRADE)
DELETE /sapi/v1/margin/orderList (HMAC SHA256)
Cancel an entire Order List for a margin account.
Weight(UID) : 1.
Parameters:
Name Type Mandatory Description symbol STRING YES isIsolated STRING NO for isolated margin or not, “TRUE”, “FALSE”,default “FALSE” orderListId LONG NO Either orderListId or listClientOrderId must be provided listClientOrderId STRING NO Either orderListId or listClientOrderId must be provided newClientOrderId STRING NO Used to uniquely identify this cancel. Automatically generated by default recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Canceling an individual leg will cancel the entire OCO.
Query Margin Account’s OCO (USER_DATA)
GET /sapi/v1/margin/orderList (HMAC SHA256)
Retrieves a specific OCO based on provided optional parameters.
Weight(IP) : 10.
Parameters :
Name Type Mandatory Description isIsolated STRING NO for isolated margin or not, “TRUE”, “FALSE”,default “FALSE” symbol STRING NO mandatory for isolated margin, not supported for cross margin orderListId LONG NO Either orderListId or origClientOrderId must be provided origClientOrderId STRING NO Either orderListId or origClientOrderId must be provided recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Query Margin Account’s all OCO (USER_DATA)
GET /sapi/v1/margin/allOrderList (HMAC SHA256)
Retrieves all OCO for a specific margin account based on provided optional parameters.
Weight(IP) : 200.
Parameters.
Name Type Mandatory Description isIsolated STRING NO for isolated margin or not, “TRUE”, “FALSE”,default “FALSE” symbol STRING NO mandatory for isolated margin, not supported for cross margin fromId LONG NO If supplied, neither startTime or endTime can be provided startTime LONG NO endTime LONG NO limit INT NO Default Value: 500; Max Value: 1000 recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Query Margin Account’s Open OCO (USER_DATA)
GET /sapi/v1/margin/openOrderList (HMAC SHA256)
Weight(IP) : 10.
Parameters.
Name Type Mandatory Description isIsolated STRING NO for isolated margin or not, “TRUE”, “FALSE”,default “FALSE” symbol STRING NO mandatory for isolated margin, not supported for cross margin recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Query Margin Account’s Trade List (USER_DATA)
GET /sapi/v1/margin/myTrades (HMAC SHA256)
Weight(IP): 10.
Parameters:
Query Max Borrow (USER_DATA)
GET /sapi/v1/margin/maxBorrowable (HMAC SHA256)
Weight(IP): 50.
Parameters:
If isolatedSymbol is not sent, crossed margin data will be sent. borrowLimit is also available from https://www.binance.com/en/margin-fee.
Query Max Transfer-Out Amount (USER_DATA)
GET /sapi/v1/margin/maxTransferable (HMAC SHA256)
Weight(IP): 50.
Parameters:
Isolated Margin Account Transfer (MARGIN)
POST /sapi/v1/margin/isolated/transfer (HMAC SHA256)
Weight(UID): 600.
Parameters:
Name Type Mandatory Description asset STRING YES asset,such as BTC symbol STRING YES transFrom STRING YES “SPOT”, “ISOLATED_MARGIN” transTo STRING YES “SPOT”, “ISOLATED_MARGIN” amount DECIMAL YES recvWindow LONG NO No more than 60000 timestamp LONG YES.
Get Isolated Margin Transfer History (USER_DATA)
GET /sapi/v1/margin/isolated/transfer (HMAC SHA256)
Weight(IP): 1.
Parameters:
Query Isolated Margin Account Info (USER_DATA)
Response: If “symbols” is not sent.
GET /sapi/v1/margin/isolated/account (HMAC SHA256)
Weight(IP): 10.
Parameters:
If “symbols” is not sent, all isolated assets will be returned. If “symbols” is sent, only the isolated assets of the sent symbols will be returned.
Disable Isolated Margin Account (TRADE)
DELETE /sapi/v1/margin/isolated/account (HMAC SHA256)
Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours.
Weight(UID): 300.
Parameters:
Name Type Mandatory Description symbol STRING YES recvWindow LONG NO No more than 60000 timestamp LONG YES.
Enable Isolated Margin Account (TRADE)
POST /sapi/v1/margin/isolated/account (HMAC SHA256)
Enable isolated margin account for a specific symbol(Only supports activation of previously disabled accounts).
Weight(UID): 300.
Parameters:
Name Type Mandatory Description symbol STRING YES recvWindow LONG NO No more than 60000 timestamp LONG YES.
Query Enabled Isolated Margin Account Limit (USER_DATA)
GET /sapi/v1/margin/isolated/accountLimit (HMAC SHA256)
Query enabled isolated margin account limit.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description recvWindow LONG NO No more than 60000 timestamp LONG YES.
Query Isolated Margin Symbol (USER_DATA)
GET /sapi/v1/margin/isolated/pair (HMAC SHA256)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description symbol STRING YES recvWindow LONG NO No more than 60000 timestamp LONG YES.
Get All Isolated Margin Symbol(USER_DATA)
GET /sapi/v1/margin/isolated/allPairs (HMAC SHA256)
Weight(IP): 10.
Parameters:
Name Type Mandatory Description recvWindow LONG NO No more than 60000 timestamp LONG YES.
Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA)
POST /sapi/v1/bnbBurn (HMAC SHA256)
Weight(IP): 1.
Parameters:
“spotBNBBurn” and “interestBNBBurn” should be sent at least one.
Get BNB Burn Status (USER_DATA)
GET /sapi/v1/bnbBurn (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description recvWindow LONG NO No more than 60000 timestamp LONG YES.
Query Margin Interest Rate History (USER_DATA)
GET /sapi/v1/margin/interestRateHistory (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description asset STRING YES vipLevel INT NO Default: user’s vip level startTime LONG NO Default: 7 days ago endTime LONG NO Default: present. Maximum range: 1 months. recvWindow LONG NO No more than 60000 timestamp LONG YES.
Query Cross Margin Fee Data (USER_DATA)
GET /sapi/v1/margin/crossMarginData (HMAC SHA256)
Get cross margin fee data collection with any vip level or user’s current specific data as https://www.binance.com/en/margin-fee.
Weight(IP): 1 when coin is specified; 5 when the coin parameter is omitted.
Parameters:
Name Type Mandatory Description vipLevel INT NO User’s current specific margin data will be returned if vipLevel is omitted coin STRING NO recvWindow LONG NO No more than 60000 timestamp LONG YES.
Query Isolated Margin Fee Data (USER_DATA)
GET /sapi/v1/margin/isolatedMarginData (HMAC SHA256)
Get isolated margin fee data collection with any vip level or user’s current specific data as https://www.binance.com/en/margin-fee.
Weight(IP): 1 when a single is specified; 10 when the symbol parameter is omitted.
Parameters:
Name Type Mandatory Description vipLevel INT NO User’s current specific margin data will be returned if vipLevel is omitted symbol STRING NO recvWindow LONG NO No more than 60000 timestamp LONG YES.
Query Isolated Margin Tier Data (USER_DATA)
GET /sapi/v1/margin/isolatedMarginTier (HMAC SHA256)
Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description symbol STRING YES tier STRING NO All margin tier data will be returned if tier is omitted recvWindow LONG NO No more than 60000 timestamp LONG YES.
Query Current Margin Order Count Usage (TRADE)
Displays the user’s current margin order count usage for all intervals.
Weight(IP): 20.
Parameters:
Name Type Mandatory Description isIsolated STRING NO for isolated margin or not, “TRUE”, “FALSE”,default “FALSE” symbol STRING NO isolated symbol, mandatory for isolated margin recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
User Data Streams.
The base API endpoint is: https://api.binance.com A User Data Stream listenKey is valid for 60 minutes after creation. Doing a PUT on a listenKey will extend its validity for 60 minutes. Doing a DELETE on a listenKey will close the stream and invalidate the listenKey . Doing a POST on an account with an active listenKey will return the currently active listenKey and extend its validity for 60 minutes. The base websocket endpoint is: wss://stream.binance.com:9443 User Data Streams are accessed at /ws/ or /stream?streams= A single connection to stream.binance.com is only valid for 24 hours; expect to be disconnected at the 24 hour mark.
LISTEN KEY (SPOT)
Create a ListenKey (USER_STREAM)
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.
Parameters:
Data Source: Memory.
Ping/Keep-alive a ListenKey (USER_STREAM)
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 30 minutes.
Weight: 1.
Parameters:
Name Type Mandatory Description listenKey STRING YES.
Data Source: Memory.
Close a ListenKey (USER_STREAM)
Close out a user data stream.
Weight: 1.
Parameters:
Name Type Mandatory Description listenKey STRING YES.
Data Source: Memory.
LISTEN KEY (MARGIN)
Create a ListenKey (USER_STREAM)
Weight: 1.
Parameters:
Ping/Keep-alive a ListenKey (USER_STREAM)
Weight: 1.
Parameters:
Name Type Mandatory Description listenKey STRING YES.
Close a ListenKey (USER_STREAM)
Weight: 1.
Parameters:
Name Type Mandatory Description listenKey STRING YES.
LISTEN KEY (ISOLATED MARGIN)
Generate a Listen Key (USER_STREAM)
Weight: 1.
Parameters:
Name Type Mandatory Description symbol STRING YES.
Ping/Keep-alive a Listen Key (USER_STREAM)
Weight: 1.
Parameters:
Name Type Mandatory Description symbol STRING YES listenKey STRING YES.
Close a ListenKey (USER_STREAM)
Weight: 1.
Parameters:
Name Type Mandatory Description symbol STRING YES listenKey STRING YES.
Payload: Account Update.
outboundAccountPosition is sent any time an account balance has changed and contains the assets that were possibly changed by the event that generated the balance change.
Payload: Balance Update.
Balance Update occurs during the following:
Deposits or withdrawals from the account Transfer of funds between accounts (e.g. Spot to Margin)
Payload: Order Update.
Orders are updated with the executionReport event.
Check the Public API Definitions and below for relevant enum definitions.
Average price can be found by doing Z divided by z .
Execution types:
NEW – The order has been accepted into the engine. CANCELED – The order has been canceled by the user. REPLACED (currently unused) REJECTED – The order has been rejected and was not processed. (This is never pushed into the User Data Stream) TRADE – Part of the order or all of the order’s quantity has filled. EXPIRED – The order was canceled according to the order type’s rules (e.g. LIMIT FOK orders with no fill, LIMIT IOC or MARKET orders that partially fill) or by the exchange, (e.g. orders canceled during liquidation, orders canceled during maintenance)
If the order is an OCO, an event will be displayed named ListStatus in addition to the executionReport event.
Savings Endpoints.
The endpoints below allow you to interact with Binance Savings, previously known as Binance Lending. For more information on this, please refer to the Binance Savings page.
Get Flexible Product List (USER_DATA)
GET /sapi/v1/lending/daily/product/list (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description status ENUM NO “ALL”, “SUBSCRIBABLE”, “UNSUBSCRIBABLE”; Default: “ALL” featured STRING NO “ALL”, “TRUE”; Default: “ALL” current LONG NO Current query page. Default: 1, Min: 1 size LONG NO Default: 50, Max: 100 recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Get Left Daily Purchase Quota of Flexible Product (USER_DATA)
GET /sapi/v1/lending/daily/userLeftQuota (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description productId STRING YES recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Purchase Flexible Product (USER_DATA)
POST /sapi/v1/lending/daily/purchase (HMAC SHA256)
Weight(IP): 1.
Parameters:
Get Left Daily Redemption Quota of Flexible Product (USER_DATA)
GET /sapi/v1/lending/daily/userRedemptionQuota (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description productId STRING YES type ENUM YES “FAST”, “NORMAL” recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Redeem Flexible Product (USER_DATA)
POST /sapi/v1/lending/daily/redeem (HMAC SHA256)
Weight(IP): 1.
Parameters:
Get Flexible Product Position (USER_DATA)
GET /sapi/v1/lending/daily/token/position (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description asset STRING NO recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Get Fixed and Activity Project List(USER_DATA)
GET /sapi/v1/lending/project/list (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description asset STRING NO type ENUM YES “ACTIVITY”, “CUSTOMIZED_FIXED” status ENUM NO “ALL”, “SUBSCRIBABLE”, “UNSUBSCRIBABLE”; default “ALL” isSortAsc BOOLEAN NO default “true” sortBy ENUM NO “START_TIME”, “LOT_SIZE”, “INTEREST_RATE”, “DURATION”; default “START_TIME” current LONG NO Currently querying page. Start from 1. Default:1 size LONG NO Default:10, Max:100 recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Purchase Fixed/Activity Project (USER_DATA)
POST /sapi/v1/lending/customizedFixed/purchase (HMAC SHA256)
Weight(IP): 1.
Parameters:
Get Fixed/Activity Project Position (USER_DATA)
GET /sapi/v1/lending/project/position/list (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description asset STRING NO projectId STRING NO status ENUM NO “HOLDING”, “REDEEMED” recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Lending Account (USER_DATA)
GET /sapi/v1/lending/union/account (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description recvWindow LONG NO The value cannot be greater than 60000 timestamp LONG YES.
Get Purchase Record (USER_DATA)
Response: Flexible Products.
GET /sapi/v1/lending/union/purchaseRecord (HMAC SHA256)
Weight(IP): 1.
Parameters:
The time between startTime and endTime cannot be longer than 30 days. If startTime and endTime are both not sent, then the last 30 days’ data will be returned.
Get Redemption Record (USER_DATA)
Response: Flexible Products.
GET /sapi/v1/lending/union/redemptionRecord (HMAC SHA256)
Weight(IP): 1.
Parameters:
The time between startTime and endTime cannot be longer than 30 days. If startTime and endTime are both not sent, then the last 30 days’ data will be returned.
Get Interest History (USER_DATA)
GET /sapi/v1/lending/union/interestHistory (HMAC SHA256)
Weight(IP): 1.
Parameters:
The time between startTime and endTime cannot be longer than 30 days. If startTime and endTime are both not sent, then the last 30 days’ data will be returned.
Change Fixed/Activity Position to Daily Position(USER_DATA)
POST /sapi/v1/lending/positionChanged (HMAC SHA256)
Weight(IP): 1.
Parameters:
Staking Endpoints.
The endpoints below allow you to interact with Staking. For more information on this, please refer to the Staking page.
Get Staking Product List(USER_DATA)
GET /sapi/v1/staking/productList (HMAC SHA256)
Get available Staking product list.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description product ENUM YES “STAKING” for Locked Staking, “F_DEFI” for flexible DeFi Staking, “L_DEFI” for locked DeFi Staking asset STRING NO current LONG NO Currently querying page. Start from 1. Default:1 size LONG NO Default:10, Max:100 recvWindow LONG NO timestamp LONG YES.
Purchase Staking Product(USER_DATA)
POST /sapi/v1/staking/purchase (HMAC SHA256)
Weight(IP): 1.
Parameters:
You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
Redeem Staking Product(USER_DATA)
POST /sapi/v1/staking/redeem (HMAC SHA256)
Redeem Staking product. Locked staking and Locked DeFI staking belong to early redemption, redeeming in advance will result in loss of interest that you have earned.
Weight(IP): 1.
Parameters:
You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
Get Staking Product Position(USER_DATA)
GET /sapi/v1/staking/position (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description product ENUM YES “STAKING” for Locked Staking, “F_DEFI” for flexible DeFi Staking, “L_DEFI” for locked DeFi Staking productId STRING NO asset STRING NO current LONG NO Currently querying the page. Start from 1. Default:1 size LONG NO Default:10, Max:100 recvWindow LONG NO timestamp LONG YES.
Get Staking History(USER_DATA)
GET /sapi/v1/staking/stakingRecord (HMAC SHA256)
Weight(IP): 1.
Parameters:
The time between startTime and endTime cannot be longer than 3 months. If startTime and endTime are both not sent, then the last 30 days’ data will be returned.
Set Auto Staking(USER_DATA)
POST /sapi/v1/staking/setAutoStaking (HMAC SHA256)
Set auto staking on Locked Staking or Locked DeFi Staking.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description product ENUM YES “STAKING” for Locked Staking, “L_DEFI” for locked DeFi Staking positionId STRING YES renewable STRING YES true or false recvWindow LONG NO timestamp LONG YES.
Get Personal Left Quota of Staking Product(USER_DATA)
GET /sapi/v1/staking/personalLeftQuota(HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description product ENUM YES “STAKING” for Locked Staking, “F_DEFI” for flexible DeFi Staking, “L_DEFI” for locked DeFi Staking productId STRING YES recvWindow LONG NO timestamp LONG YES.
Mining Endpoints.
The endpoints below allow to interact with Binance Pool. For more information on this, please refer to the Binance Pool page.
Acquiring Algorithm (MARKET_DATA)
GET /sapi/v1/mining/pub/algoList (HMAC SHA256)
Weight(IP): 1.
Parameter:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
Acquiring CoinName (MARKET_DATA)
GET /sapi/v1/mining/pub/coinList (HMAC SHA256)
Weight(IP): 1.
Parameter:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
Request for Detail Miner List (USER_DATA)
GET /sapi/v1/mining/worker/detail (HMAC SHA256)
Weight(IP): 5.
Parameter:
Name Type Mandatory Description For Example algo STRING YES Algorithm(sha256) sha256 userName STRING YES Mining account test workerName STRING YES Miner’s name(required) bhdc1.16A10404B recvWindow LONG NO timestamp LONG YES.
Request for Miner List (USER_DATA)
GET /sapi/v1/mining/worker/list (HMAC SHA256)
Weight(IP): 5.
Parameter:
Name Type Mandatory Description For Example algo STRING YES Algorithm(sha256) sha256 userName STRING YES Mining account test pageIndex INTEGER NO Page number,default is first page,start form 1 sort INTEGER NO sort sequence(default=0)0 positive sequence,1 negative sequence sortColumn INTEGER NO Sort by( default 1): 1: miner name, 2: real-time computing power, 3: daily average computing power, 4: real-time rejection rate, 5: last submission time workerStatus INTEGER NO miners status(default=0)0 all,1 valid,2 invalid,3failure recvWindow LONG NO timestamp LONG YES.
Earnings List(USER_DATA)
GET /sapi/v1/mining/payment/list (HMAC SHA256)
Weight(IP): 5.
Parameter:
Name Type Mandatory Description Example algo STRING YES Transfer algorithm(sha256) sha256 userName STRING YES Mining account test coin STRING NO Coin name startDate Long NO Search date, millisecond timestamp, while empty query all endDate Long NO Search date, millisecond timestamp, while empty query all pageIndex INTEGER NO Page number, empty default first page, starting from 1 pageSize INTEGER NO Number of pages, minimum 10, maximum 200 recvWindow LONG NO timestamp LONG YES.
Extra Bonus List (USER_DATA)
GET /sapi/v1/mining/payment/other (HMAC SHA256)
Weight(IP): 5.
Parameter:
Name Type Mandatory Description Example algo STRING YES Transfer algorithm(sha256) sha256 userName STRING YES Mining Account test coin STRING NO Coin Name startDate Long NO Search date, millisecond timestamp, while empty query all endDate Long NO Search date, millisecond timestamp, while empty query all pageIndex INTEGER NO Page number, empty default first page, starting from 1 pageSize INTEGER NO Number of pages, minimum 10, maximum 200 recvWindow LONG NO timestamp LONG YES.
Hashrate Resale List (USER_DATA)
GET /sapi/v1/mining/hash-transfer/config/details/list (HMAC SHA256)
Weight(IP): 5.
Parameter:
Name Type Mandatory Description Example pageIndex INTEGER NO Page number, empty default first page, starting from 1 pageSize INTEGER NO Number of pages, minimum 10, maximum 200 recvWindow LONG NO timestamp LONG YES.
Hashrate Resale Detail (USER_DATA)
GET /sapi/v1/mining/hash-transfer/profit/details (HMAC SHA256)
Weight(IP): 5.
Parameter:
Name Type Mandatory Description Example configId INTEGER YES Mining ID 168 userName STRING YES Mining Account test pageIndex INTEGER NO Page number, empty default first page, starting from 1 pageSize INTEGER NO Number of pages, minimum 10, maximum 200 recvWindow LONG NO timestamp LONG YES.
Hashrate Resale Request (USER_DATA)
POST /sapi/v1/mining/hash-transfer/config (HMAC SHA256)
Weight(IP): 5.
Parameter:
Name Type Mandatory Description Example userName STRING YES Mining Account test algo STRING YES Transfer algorithm(sha256) sha256 endDate Long YES Resale End Time (Millisecond timestamp) 1617659086000 startDate Long YES Resale Start Time(Millisecond timestamp) 1607659086000 toPoolUser STRING YES Mining Account S19pro hashRate Long YES Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000) 100000000 recvWindow LONG NO timestamp LONG YES.
Cancel hashrate resale configuration(USER_DATA)
POST /sapi/v1/mining/hash-transfer/config/cancel (HMAC SHA256)
Weight(IP): 5.
Parameter:
Name Type Mandatory Description Example configId INTEGER YES Mining ID 168 userName STRING YES Mining Account test recvWindow LONG NO timestamp LONG YES.
Statistic List (USER_DATA)
GET /sapi/v1/mining/statistics/user/status (HMAC SHA256)
Weight(IP): 5.
Parameter:
Name Type Mandatory Description For Example algo STRING YES Algorithm(sha256) sha256 userName STRING YES Mining account test recvWindow LONG NO timestamp LONG YES.
Account List (USER_DATA)
GET /sapi/v1/mining/statistics/user/list (HMAC SHA256)
Weight(IP): 5.
Parameter:
Name Type Mandatory Description For Example algo STRING YES Algorithm(sha256) sha256 userName STRING YES Mining account test recvWindow LONG NO timestamp LONG YES.
Mining Account Earning (USER_DATA)
GET /sapi/v1/mining/payment/uid (HMAC SHA256)
Weight(IP): 5.
Parameter:
Name Type Mandatory Description For Example algo STRING YES Algorithm(sha256) sha256 startDate Long NO Millisecond timestamp endDate Long NO Millisecond timestamp pageIndex INTEGER NO Default 1 pageSize INTEGER NO Min 10,Max 200 recvWindow LONG NO timestamp LONG YES.
Futures.
New Future Account Transfer (USER_DATA)
POST /sapi/v1/futures/transfer (HMAC SHA256)
Execute transfer between spot account and futures account.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description asset STRING YES The asset being transferred, e.g., USDT amount DECIMAL YES The amount to be transferred type INT YES 1: transfer from spot account to USDT-Ⓜ futures account. 2: transfer from USDT-Ⓜ futures account to spot account. 3: transfer from spot account to COIN-Ⓜ futures account. 4: transfer from COIN-Ⓜ futures account to spot account. recvWindow LONG NO timestamp LONG YES.
Get Future Account Transaction History List (USER_DATA)
GET /sapi/v1/futures/transfer (HMAC SHA256)
Weight(IP): 10.
Parameters:
Borrow For Cross-Collateral (TRADE)
POST /sapi/v1/futures/loan/borrow (HMAC SHA256)
Parameters:
Name Type Mandatory Description coin STRING YES amount DECIMAL YES when collateralAmount is empty collateralCoin STRING YES collateralAmount DECIMAL YES when amount is empty recvWindow LONG NO timestamp LONG YES.
Weight(UID): 3000.
Rate Limit: 1/1s per account.
Cross-Collateral Borrow History (USER_DATA)
GET /sapi/v1/futures/loan/borrow/history (HMAC SHA256)
Parameters:
Name Type Mandatory Description coin STRING NO startTime LONG NO endTime LONG NO limit LONG NO default 500, max 1000 recvWindow LONG NO timestamp LONG YES.
Weight(IP): 10.
Repay For Cross-Collateral (TRADE)
POST /sapi/v1/futures/loan/repay (HMAC SHA256)
Parameters:
Name Type Mandatory Description coin STRING YES collateralCoin STRING YES amount DECIMAL YES recvWindow LONG NO timestamp LONG YES.
Weight(UID): 3000.
Rate Limit:
1/1s per account.
Cross-Collateral Repayment History (USER_DATA)
GET /sapi/v1/futures/loan/repay/history HMAC SHA256)
Parameters:
Name Type Mandatory Description coin STRING NO startTime LONG NO endTime LONG NO limit LONG NO default 500, max 1000 recvWindow LONG NO timestamp LONG YES.
Weight(IP): 10.
Cross-Collateral Wallet (USER_DATA)
GET /sapi/v1/futures/loan/wallet (HMAC SHA256)
Parameters:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
Weight(IP): 10.
Cross-Collateral Wallet V2 (USER_DATA)
GET /sapi/v2/futures/loan/wallet (HMAC SHA256)
Parameters:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
Weight(IP): 1.
Cross-Collateral Information (USER_DATA)
GET /sapi/v1/futures/loan/configs (HMAC SHA256)
Parameters:
Weight(IP): 10.
Cross-Collateral Information V2 (USER_DATA)
GET /sapi/v2/futures/loan/configs (HMAC SHA256)
Parameters:
Weight(IP): 1.
Calculate Rate After Adjust Cross-Collateral LTV (USER_DATA)
GET /sapi/v1/futures/loan/calcAdjustLevel (HMAC SHA256)
Parameters:
Name Type Mandatory Description collateralCoin STRING YES amount DECIMAL YES direction ENUM YES “ADDITIONAL”, “REDUCED” recvWindow LONG NO timestamp LONG YES.
Weight(IP): 50.
Calculate Rate After Adjust Cross-Collateral LTV V2 (USER_DATA)
GET /sapi/v2/futures/loan/calcAdjustLevel (HMAC SHA256)
Parameters:
Name Type Mandatory Description loanCoin STRING YES collateralCoin STRING YES amount DECIMAL YES direction ENUM YES “ADDITIONAL”, “REDUCED” recvWindow LONG NO timestamp LONG YES.
Weight(IP): 1.
Get Max Amount for Adjust Cross-Collateral LTV (USER_DATA)
GET /sapi/v1/futures/loan/calcMaxAdjustAmount (HMAC SHA256)
Parameters:
Name Type Mandatory Description collateralCoin STRING YES recvWindow LONG NO timestamp LONG YES.
Weight(IP): 50.
Get Max Amount for Adjust Cross-Collateral LTV V2 (USER_DATA)
GET /sapi/v2/futures/loan/calcMaxAdjustAmount (HMAC SHA256)
Parameters:
Name Type Mandatory Description loanCoin STRING YES collateralCoin STRING YES recvWindow LONG NO timestamp LONG YES.
Weight(IP): 1.
Adjust Cross-Collateral LTV (TRADE)
POST /sapi/v1/futures/loan/adjustCollateral (HMAC SHA256)
Parameters:
Name Type Mandatory Description collateralCoin STRING YES amount DECIMAL YES direction ENUM YES “ADDITIONAL”, “REDUCED” recvWindow LONG NO timestamp LONG YES.
Weight(UID): 3000.
RateLimit: 1/1s per account.
Adjust Cross-Collateral LTV V2 (TRADE)
POST /sapi/v2/futures/loan/adjustCollateral (HMAC SHA256)
Parameters:
Name Type Mandatory Description loanCoin STRING YES collateralCoin STRING YES amount DECIMAL YES direction ENUM YES “ADDITIONAL”, “REDUCED” recvWindow LONG NO timestamp LONG YES.
RateLimit: 1/1s per account.
Adjust Cross-Collateral LTV History (USER_DATA)
GET /sapi/v1/futures/loan/adjustCollateral/history (HMAC SHA256)
Parameters:
Weight(IP): 10.
Cross-Collateral Liquidation History (USER_DATA)
GET /sapi/v1/futures/loan/liquidationHistory (HMAC SHA256)
Parameters:
Weight(IP): 10.
Check Collateral Repay Limit (USER_DATA)
Check the maximum and minimum limit when repay with collateral.
GET /sapi/v1/futures/loan/collateralRepayLimit (HMAC SHA256)
Parameters:
Name Type Mandatory Description coin STRING YES collateralCoin STRING YES recvWindow LONG NO timestamp LONG YES.
Weight(IP): 1.
Get Collateral Repay Quote (USER_DATA)
Get quote before repay with collateral is mandatory, the quote will be valid within 25 seconds.
GET /sapi/v1/futures/loan/collateralRepay (HMAC SHA256)
Parameters:
Name Type Mandatory Description coin STRING YES collateralCoin STRING YES amount DECIMAL YES repay amount recvWindow LONG NO timestamp LONG YES.
Weight(IP): 1.
Repay with Collateral (USER_DATA)
Repay with collateral. Get quote before repay with collateral is mandatory, the quote will be valid within 25 seconds.
POST /sapi/v1/futures/loan/collateralRepay (HMAC SHA256)
Parameters:
Name Type Mandatory Description quoteId STRING YES recvWindow LONG NO timestamp LONG YES.
Weight(IP): 1.
Collateral Repayment Result (USER_DATA)
Check collateral repayment result.
GET /sapi/v1/futures/loan/collateralRepayResult (HMAC SHA256)
Parameters:
Name Type Mandatory Description quoteId STRING YES recvWindow LONG NO timestamp LONG YES.
Weight(IP): 1.
Cross-Collateral Interest History (USER_DATA)
GET /sapi/v1/futures/loan/interestHistory (HMAC SHA256)
Parameters:
Name Type Mandatory Description collateralCoin STRING NO startTime LONG NO endTime LONG NO current LONG NO Currently querying page. Start from 1. Default:1 limit LONG NO Default:500 Max:1000 recvWindow LONG NO timestamp LONG YES.
Weight(IP): 1.
Futures Algo Endpoints.
Binance Futures Execution Algorithm API solution aims to provide users ability to programmatically leverage Binance in-house algorithmic trading capability to automate order execution strategy, improve execution transparency and give users smart access to the available market liquidity.
Volume Participation(VP) New Order (TRADE)
POST /sapi/v1/algo/futures/newOrderVp (HMAC SHA256)
Send in a VP new order. Only support on USDⓈ-M Contracts.
Weight(UID): 3000.
Noted:
You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com.
Parameters:
Name Type Mandatory Description symbol STRING YES Trading symbol eg. BTCUSDT side ENUM YES Trading side ( BUY or SELL ) positionSide ENUM NO Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. quantity DECIMAL YES Quantity of base asset; The notional ( quantity * mark price(base asset) ) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT urgency ENUM YES Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH clientAlgoId STRING NO A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value reduceOnly BOOLEAN NO “true” or “false”. Default “false”; Cannot be sent in Hedge Mode; Cannot be sent when you open a position limitPrice DECIMAL NO Limit price of the order; If it is not sent, will place order by market price by default recvWindow LONG NO timestamp LONG YES.
Total Algo open orders max allowed: 10 orders. Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. Receiving “success”: true does not mean that your order will be executed. Please use the query order endpoints( GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders ) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive “success”: true , but the order status will be expired after we check it.
Time-Weighted Average Price(Twap) New Order (TRADE)
POST /sapi/v1/algo/futures/newOrderTwap (HMAC SHA256)
Send in a Twap new order. Only support on USDⓈ-M Contracts.
Weight(UID): 3000.
Noted:
You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com.
Parameters:
Name Type Mandatory Description symbol STRING YES Trading symbol eg. BTCUSDT side ENUM YES Trading side ( BUY or SELL ) positionSide ENUM NO Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. quantity DECIMAL YES Quantity of base asset; The notional ( quantity * mark price(base asset) ) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT duration LONG YES Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h clientAlgoId STRING NO A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value reduceOnly BOOLEAN NO “true” or “false”. Default “false”; Cannot be sent in Hedge Mode; Cannot be sent when you open a position limitPrice DECIMAL NO Limit price of the order; If it is not sent, will place order by market price by default recvWindow LONG NO timestamp LONG YES.
Total Algo open orders max allowed: 10 orders. Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. Receiving “success”: true does not mean that your order will be executed. Please use the query order endpoints( GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders ) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive “success”: true , but the order status will be expired after we check it. quantity * 60 / duration should be larger 10,000 USDT duration cannot be less than 5 mins or more than 24 hours. For delivery contracts, TWAP end time should be one hour earlier than the delivery time of the symbol.
Cancel Algo Order (TRADE)
DELETE /sapi/v1/algo/futures/order (HMAC SHA256)
Cancel an active order.
Weight(IP): 1.
Noted:
You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com.
Parameters:
Name Type Mandatory Description algoId LONG YES eg. 14511 recvWindow LONG NO timestamp LONG YES.
Query Current Algo Open Orders (USER_DATA)
GET /sapi/v1/algo/futures/openOrders (HMAC SHA256)
Weight(IP): 1.
Noted:
You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com.
Parameters:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
Query Historical Algo Orders (USER_DATA)
GET /sapi/v1/algo/futures/historicalOrders (HMAC SHA256)
Weight(IP): 1.
Noted:
You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com.
Parameters:
Name Type Mandatory Description symbol STRING NO Trading symbol eg. BTCUSDT side ENUM NO BUY or SELL startTime LONG NO in milliseconds eg.1641522717552 endTime LONG NO in milliseconds eg.1641522526562 page INT NO Default is 1 pageSize INT NO MIN 1, MAX 100; Default 100 recvWindow LONG NO timestamp LONG YES.
Query Sub Orders (USER_DATA)
GET /sapi/v1/algo/futures/subOrders (HMAC SHA256)
Get respective sub orders for a specified algoId.
Weight(IP): 1.
Noted:
You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com.
Parameters:
Name Type Mandatory Description algoId LONG YES page INT NO Default is 1 pageSize INT NO MIN 1, MAX 100; Default 100 recvWindow LONG NO timestamp LONG YES.
Portfolio Margin Endpoints.
The Binance Portfolio Margin Program is a cross-asset margin program supporting consolidated margin balance across trading products with over 200+ effective crypto collaterals. It is designed for professional traders, market makers, and institutional users looking to actively trade & hedge cross-asset and optimize risk-management in a consolidated setup.
Only Portfolio Margin Account is accessible to these endpoints. To enroll, kindly refer to: How to Enroll into the Binance Portfolio Margin Program.
Get Portfolio Margin Account Info (USER_DATA)
GET /sapi/v1/portfolio/account (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES.
BLVT Endpoints.
Get BLVT Info (MARKET_DATA)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description tokenName STRING NO BTCDOWN, BTCUP.
Historical BLVT NAV Kline/Candlestick.
The BLVT NAV system is based on Binance Futures, so the endpoint is based on fapi.
Please go to here to check the endpoint and operate in accordance with the fapi usage specifications.
Subscribe BLVT (USER_DATA)
POST /sapi/v1/blvt/subscribe (HMAC SHA256)
Weight(IP): 1.
Parameters:
Query Subscription Record (USER_DATA)
GET /sapi/v1/blvt/subscribe/record (HMAC SHA256)
Weight(IP): 1.
Parameters:
Redeem BLVT (USER_DATA)
POST /sapi/v1/blvt/redeem (HMAC SHA256)
Weight(IP): 1.
Parameters:
Query Redemption Record (USER_DATA)
GET /sapi/v1/blvt/redeem/record (HMAC SHA256)
Weight(IP): 1.
Parameters:
Get BLVT User Limit Info (USER_DATA)
GET /sapi/v1/blvt/userLimit (HMAC SHA256)
Weight(IP): 1.
Parameters:
Name Type Mandatory Description tokenName STRING NO BTCDOWN, BTCUP recvWindow LONG NO timestamp LONG YES.
Websocket BLVT Info Streams.
Stream Name: @tokenNav.
Note: You should use the base url: wss://nbstream.binance.com/lvt-p for this stream Note: tokenName must be uppercase , e.g. “[email protected]
Update Speed: 3s.
Websocket BLVT NAV Kline/Candlestick Streams.
Stream Name: @nav_kline_.
Note: You should use the base url: wss://nbstream.binance.com/lvt-p for this stream Note: tokenName must be uppercase , e.g. “[email protected]_kline_1d”
Update Speed: 300ms.
Kline/Candlestick chart intervals:
m -> minutes; h -> hours; d -> days; w -> weeks; M -> months.
BSwap Endpoints.
The endpoints below allow you to interact with BSwap. For more information on this, please refer to the BSwap page.
List All Swap Pools (MARKET_DATA)
Get metadata about all swap pools.
Weight(IP): 1.
Parameters:
Get liquidity information of a pool (USER_DATA)
GET /sapi/v1/bswap/liquidity (HMAC SHA256)
Get liquidity information and user share of a pool.
Weight(IP):
1 for one pool.
10 when the poolId parameter is omitted.
Parameter:
Name Type Mandatory Description poolId LONG NO recvWindow LONG NO timestamp LONG YES.
Add Liquidity (TRADE)
POST /sapi/v1/bswap/liquidityAdd (HMAC SHA256)
Add liquidity to a pool.
Weight(UID): 1000 (Additional: 1 request every three seconds)
Parameter:
Remove Liquidity (TRADE)
POST /sapi/v1/bswap/liquidityRemove (HMAC SHA256)
Remove liquidity from a pool, type include SINGLE and COMBINATION , asset is mandatory for single asset removal.
Weight(UID): 1000 (Additional: 1 request every three seconds)
Parameters:
Get Liquidity Operation Record (USER_DATA)
GET /sapi/v1/bswap/liquidityOps (HMAC SHA256)
Get liquidity operation (add/remove) records.
Weight(UID): 3000.
Parameters:
Name Type Mandatory Description operationId LONG NO poolId LONG NO operation ENUM NO ADD or REMOVE startTime LONG NO endTime LONG NO limit LONG NO default 3, max 100 recvWindow LONG NO timestamp LONG YES.
Request Quote (USER_DATA)
GET /sapi/v1/bswap/quote (HMAC SHA256)
Request a quote for swap quote asset (selling asset) for base asset (buying asset), essentially price/exchange rates.
quoteQty is quantity of quote asset (to sell).
Please be noted the quote is for reference only, the actual price will change as the liquidity changes, it’s recommended to swap immediate after request a quote for slippage prevention.
Weight(UID): 150.
Parameters:
Name Type Mandatory Description quoteAsset STRING YES baseAsset STRING YES quoteQty DECIMAL YES recvWindow LONG NO timestamp LONG YES.
Swap (TRADE)
POST /sapi/v1/bswap/swap (HMAC SHA256)
Swap quoteAsset for baseAsset .
Weight(UID): 1000 (Additional: 1 request every two seconds)
Parameters:
Get Swap History (USER_DATA)
GET /sapi/v1/bswap/swap (HMAC SHA256)
Get swap history.
Weight(UID): 3000.
Parameters:
Name Type Mandatory Description swapId LONG NO startTime LONG NO endTime LONG NO status INT NO 0: pending for swap, 1: success, 2: failed quoteAsset STRING NO baseAsset STRING NO limit LONG NO default 3, max 100 recvWindow LONG NO timestamp LONG YES.
Get Pool Configure (USER_DATA)
GET /sapi/v1/bswap/poolConfigure (HMAC SHA256)
Weight(IP): 150.
Parameters:
Name Type Mandatory Description poolId LONG NO recvWindow LONG NO timestamp LONG YES.
Add Liquidity Preview (USER_DATA)
GET /sapi/v1/bswap/addLiquidityPreview (HMAC SHA256)
Calculate expected share amount for adding liquidity in single or dual token.
Weight(IP): 150.
Parameters:
Name Type Mandatory Description poolId LONG YES type STRING YES “SINGLE” for adding a single token;”COMBINATION” for adding dual tokens quoteAsset STRING YES quoteQty DECIMAL YES recvWindow LONG NO timestamp LONG YES.
Remove Liquidity Preview (USER_DATA)
GET /sapi/v1/bswap/removeLiquidityPreview (HMAC SHA256)
Calculate the expected asset amount of single token redemption or dual token redemption.
Weight(IP): 150.
Parameters:
Name Type Mandatory Description poolId LONG YES type STRING YES Type is “SINGLE”, remove and obtain a single token;Type is “COMBINATION”, remove and obtain dual token. quoteAsset STRING YES shareAmount DECIMAL YES recvWindow LONG NO timestamp LONG YES.
Get Unclaimed Rewards Record (USER_DATA)
GET /sapi/v1/bswap/unclaimedRewards (HMAC SHA256)
Get unclaimed rewards record.
Weight(UID): 1000.
Parameters:
Name Type Mandatory Description type INT NO 0: Swap rewards,1:Liquidity rewards, default to 0 recvWindow LONG NO timestamp LONG YES.
Claim Rewards (TRADE)
POST /sapi/v1/bswap/claimRewards (HMAC SHA256)
Claim swap rewards or liquidity rewards.
Weight(UID): 1000.
Parameters:
You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
Get Claimed History (USER_DATA)
GET /sapi/v1/bswap/claimedHistory (HMAC SHA256)
Get history of claimed rewards.
Weight(UID): 1000.
Parameters:
Name Type Mandatory Description poolId LONG NO assetRewards STRING NO type INT NO 0: Swap rewards,1:Liquidity rewards, default to 0 startTime LONG NO endTime LONG NO limit LONG NO Default 3, max 100 recvWindow LONG NO timestamp LONG YES.
Fiat Endpoints.
Get Fiat Deposit/Withdraw History (USER_DATA)
GET /sapi/v1/fiat/orders (HMAC SHA256)
Weight(IP): 1.
Parameters:
Get Fiat Payments History (USER_DATA)
GET /sapi/v1/fiat/payments (HMAC SHA256)
Weight(IP): 1.
Parameters:
C2C Endpoints.
Get C2C Trade History (USER_DATA)
GET /sapi/v1/c2c/orderMatch/listUserOrderHistory (HMAC SHA256)
Weight(IP): 1.
Parameters:
Crypto Loans Endpoints.
Get Crypto Loans Income History (USER_DATA)
GET /sapi/v1/loan/income (HMAC SHA256)
Weight(UID): 6000.
Parameters:
If startTime and endTime are not sent, the recent 7-day data will be returned. The max interval between startTime and endTime is 30 days.
Pay Endpoints.
Get Pay Trade History (USER_DATA)
GET /sapi/v1/pay/transactions (HMAC SHA256)
Weight(UID): 3000.
Parameters:
If startTimestamp and endTimestamp are not sent, the recent 90 days’ data will be returned. The max interval between startTimestamp and endTimestamp is 90 days. Support for querying orders within the last 18 months.
Convert Endpoints.
Get Convert Trade History (USER_DATA)
GET /sapi/v1/convert/tradeFlow (HMAC SHA256)
Weight(UID): 3000.
Parameters:
Rebate Endpoints.
Get Spot Rebate History Records (USER_DATA)
GET /sapi/v1/rebate/taxQuery (HMAC SHA256)
Weight(UID): 3000.
Parameters:
NFT Endpoints.
Get NFT Transaction History (USER_DATA)
GET /sapi/v1/nft/history/transactions (HMAC SHA256)
Weight(UID): 3000.
Parameters:
Get NFT Deposit History(USER_DATA)
GET /sapi/v1/nft/history/deposit (HMAC SHA256)
Weight(UID): 3000.
Parameters:
Get NFT Withdraw History (USER_DATA)
GET /sapi/v1/nft/history/withdraw (HMAC SHA256)
Weight(UID): 3000.
Parameters:
Get NFT Asset (USER_DATA)
GET /sapi/v1/nft/user/getAsset (HMAC SHA256)
Weight(UID): 3000.
Parameters:
Name Type Mandatory Description limit INT NO Default 50, Max 50 page INT NO Default 1 recvWindow LONG NO timestamp LONG YES.
Binance Code Endpoints.
Binance Code (or Binance Gift Card Code) allows simple crypto transfer and exchange through secured and prepaid codes that give access to crypto assets. Binance Code API solution is to facilitate instant creation, redemption and value-checking for Binance Code. Binance Code product feature consists of two parts: “Reference Number” and “Binance Code”. The Reference Number can be circulated in public, and it is used to verify the validity of the Binance Code; Binance Code should be kept carefully, because as long as someone knows the “Binance Code”, he can redeem it anytime.
Note:The following endpoints do not currently support sub-account requests.
Create a Binance Code (USER_DATA)
POST /sapi/v1/giftcard/createCode (HMAC SHA256)
This API is for creating a Binance Code. To get started with, please make sure:
You have a Binance account You have passed kyc You have a sufficient balance in your Binance funding wallet You need Enable Withdrawals for the API Key which requests this endpoint.
Weight(IP): 1.
Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H.
Parameters:
Name Type Mandatory Description token STRING YES The coin type contained in the Binance Code amount DOUBLE YES The amount of the coin recvWindow LONG NO timestamp LONG YES.
Redeem a Binance Code (USER_DATA)
POST /sapi/v1/giftcard/redeemCode (HMAC SHA256)
This API is for redeeming the Binance Code. Once redeemed, the coins will be deposited in your funding wallet.
Please note that if you enter the wrong code 5 times within 24 hours, you will no longer be able to redeem any Binance Code that day.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description code STRING YES Binance code recvWindow LONG NO timestamp LONG YES.
Verify a Binance Code (USER_DATA)
GET /sapi/v1/giftcard/verify (HMAC SHA256)
This API is for verifying whether the Binance Code is valid or not by entering Reference Number.
Please note that if you enter the wrong Binance code 5 times within an hour, you will no longer be able to verify any Binance code for that hour.
Weight(IP): 1.
Parameters:
Name Type Mandatory Description referenceNo STRING YES Reference Number recvWindow LONG NO timestamp LONG YES.
Error Codes.
Errors consist of two parts: an error code and a message. Codes are universal, but messages can vary.
10xx – General Server or Network issues.
-1000 UNKNOWN.
An unknown error occurred while processing the request. An unknown error occurred while processing the request.[%s]
-1001 DISCONNECTED.
Internal error; unable to process your request. Please try again.
-1002 UNAUTHORIZED.
You are not authorized to execute this request.
-1003 TOO_MANY_REQUESTS.
Too many requests queued. Too much request weight used; please use the websocket for live updates to avoid polling the API. Too much request weight used; current limit is %s request weight per %s %s. Please use the websocket for live updates to avoid polling the API. Way too much request weight used; IP banned until %s. Please use the websocket for live updates to avoid bans.
-1004 SERVER_BUSY.
Server is busy, please wait and try again.
-1006 UNEXPECTED_RESP.
An unexpected response was received from the message bus. Execution status unknown.
-1007 TIMEOUT.
Timeout waiting for response from backend server. Send status unknown; execution status unknown.
-1014 UNKNOWN_ORDER_COMPOSITION.
Unsupported order combination.
-1015 TOO_MANY_ORDERS.
Too many new orders. Too many new orders; current limit is %s orders per %s.
-1016 SERVICE_SHUTTING_DOWN.
This service is no longer available.
-1020 UNSUPPORTED_OPERATION.
This operation is not supported.
-1021 INVALID_TIMESTAMP.
Timestamp for this request is outside of the recvWindow. Timestamp for this request was 1000ms ahead of the server’s time.
-1022 INVALID_SIGNATURE.
Signature for this request is not valid.
-1099 Not found, authenticated, or authorized.
This replaces error code -1999.
11xx – 2xxx Request issues.
-1100 ILLEGAL_CHARS.
Illegal characters found in a parameter. Illegal characters found in a parameter. %s Illegal characters found in parameter %s ; legal range is %s .
-1101 TOO_MANY_PARAMETERS.
Too many parameters sent for this endpoint. Too many parameters; expected %s and received %s . Duplicate values for a parameter detected.
-1102 MANDATORY_PARAM_EMPTY_OR_MALFORMED.
A mandatory parameter was not sent, was empty/null, or malformed. Mandatory parameter %s was not sent, was empty/null, or malformed. Param %s or %s must be sent, but both were empty/null!
-1103 UNKNOWN_PARAM.
An unknown parameter was sent.
-1104 UNREAD_PARAMETERS.
Not all sent parameters were read. Not all sent parameters were read; read %s parameter(s) but was sent %s .
-1105 PARAM_EMPTY.
A parameter was empty. Parameter %s was empty.
-1106 PARAM_NOT_REQUIRED.
A parameter was sent when not required. Parameter %s sent when not required.
-1111 BAD_PRECISION.
Precision is over the maximum defined for this asset.
-1112 NO_DEPTH.
No orders on book for symbol.
-1114 TIF_NOT_REQUIRED.
TimeInForce parameter sent when not required.
-1115 INVALID_TIF.
Invalid timeInForce.
-1116 INVALID_ORDER_TYPE.
Invalid orderType.
-1117 INVALID_SIDE.
Invalid side.
-1118 EMPTY_NEW_CL_ORD_ID.
New client order ID was empty.
-1119 EMPTY_ORG_CL_ORD_ID.
Original client order ID was empty.
-1120 BAD_INTERVAL.
Invalid interval.
-1121 BAD_SYMBOL.
Invalid symbol.
-1125 INVALID_LISTEN_KEY.
This listenKey does not exist.
-1127 MORE_THAN_XX_HOURS.
Lookup interval is too big. More than %s hours between startTime and endTime.
-1128 OPTIONAL_PARAMS_BAD_COMBO.
Combination of optional parameters invalid.
-1130 INVALID_PARAMETER.
Invalid data sent for a parameter. Data sent for parameter %s is not valid.
-1131 BAD_RECV_WINDOW.
recvWindow must be less than 60000.
-2010 NEW_ORDER_REJECTED.
NEW_ORDER_REJECTED.
-2011 CANCEL_REJECTED.
CANCEL_REJECTED.
-2013 NO_SUCH_ORDER.
Order does not exist.
-2014 BAD_API_KEY_FMT.
API-key format invalid.
-2015 REJECTED_MBX_KEY.
Invalid API-key, IP, or permissions for action.
-2016 NO_TRADING_WINDOW.
No trading window could be found for the symbol. Try ticker/24hrs instead.
3xxx-5xxx SAPI-specific issues.
-3000 INNER_FAILURE.
Internal server error.
-3001 NEED_ENABLE_2FA.
Please enable 2FA first.
-3002 ASSET_DEFICIENCY.
We don’t have this asset.
-3003 NO_OPENED_MARGIN_ACCOUNT.
Margin account does not exist.
-3004 TRADE_NOT_ALLOWED.
Trade not allowed.
-3005 TRANSFER_OUT_NOT_ALLOWED.
Transferring out not allowed.
-3006 EXCEED_MAX_BORROWABLE.
Your borrow amount has exceed maximum borrow amount.
-3007 HAS_PENDING_TRANSACTION.
You have pending transaction, please try again later.
-3008 BORROW_NOT_ALLOWED.
Borrow not allowed.
-3009 ASSET_NOT_MORTGAGEABLE.
This asset are not allowed to transfer into margin account currently.
-3010 REPAY_NOT_ALLOWED.
Repay not allowed.
-3011 BAD_DATE_RANGE.
Your input date is invalid.
-3012 ASSET_ADMIN_BAN_BORROW.
Borrow is banned for this asset.
-3013 LT_MIN_BORROWABLE.
Borrow amount less than minimum borrow amount.
-3014 ACCOUNT_BAN_BORROW.
Borrow is banned for this account.
-3015 REPAY_EXCEED_LIABILITY.
Repay amount exceeds borrow amount.
-3016 LT_MIN_REPAY.
Repay amount less than minimum repay amount.
-3017 ASSET_ADMIN_BAN_MORTGAGE.
This asset are not allowed to transfer into margin account currently.
-3018 ACCOUNT_BAN_MORTGAGE.
Transferring in has been banned for this account.
-3019 ACCOUNT_BAN_ROLLOUT.
Transferring out has been banned for this account.
-3020 EXCEED_MAX_ROLLOUT.
Transfer out amount exceeds max amount.
-3021 PAIR_ADMIN_BAN_TRADE.
Margin account are not allowed to trade this trading pair.
-3022 ACCOUNT_BAN_TRADE.
You account’s trading is banned.
-3023 WARNING_MARGIN_LEVEL.
You can’t transfer out/place order under current margin level.
-3024 FEW_LIABILITY_LEFT.
The unpaid debt is too small after this repayment.
-3025 INVALID_EFFECTIVE_TIME.
Your input date is invalid.
-3026 VALIDATION_FAILED.
Your input param is invalid.
-3027 NOT_VALID_MARGIN_ASSET.
Not a valid margin asset.
-3028 NOT_VALID_MARGIN_PAIR.
Not a valid margin pair.
-3029 TRANSFER_FAILED.
Transfer failed.
-3036 ACCOUNT_BAN_REPAY.
This account is not allowed to repay.
-3037 PNL_CLEARING.
PNL is clearing. Wait a second.
-3038 LISTEN_KEY_NOT_FOUND.
Listen key not found.
-3041 BALANCE_NOT_CLEARED.
Balance is not enough.
-3042 PRICE_INDEX_NOT_FOUND.
PriceIndex not available for this margin pair.
-3043 TRANSFER_IN_NOT_ALLOWED.
Transferring in not allowed.
-3044 SYSTEM_BUSY.
System busy.
-3045 SYSTEM.
The system doesn’t have enough asset now.
-3999 NOT_WHITELIST_USER.
This function is only available for invited users.
-4001 CAPITAL_INVALID.
Invalid operation.
-4002 CAPITAL_IG.
Invalid get.
-4003 CAPITAL_IEV.
Your input email is invalid.
-4004 CAPITAL_UA.
You don’t login or auth.
-4005 CAPAITAL_TOO_MANY_REQUEST.
Too many new requests.
-4006 CAPITAL_ONLY_SUPPORT_PRIMARY_ACCOUNT.
Support main account only.
-4007 CAPITAL_ADDRESS_VERIFICATION_NOT_PASS.
Address validation is not passed.
-4008 CAPITAL_ADDRESS_TAG_VERIFICATION_NOT_PASS.
Address tag validation is not passed.
-4010 CAPITAL_WHITELIST_EMAIL_CONFIRM.
White list mail has been confirmed.
-4011 CAPITAL_WHITELIST_EMAIL_EXPIRED.
White list mail is invalid.
-4012 CAPITAL_WHITELIST_CLOSE.
White list is not opened.
-4013 CAPITAL_WITHDRAW_2FA_VERIFY.
2FA is not opened.
-4014 CAPITAL_WITHDRAW_LOGIN_DELAY.
Withdraw is not allowed within 2 min login.
-4015 CAPITAL_WITHDRAW_RESTRICTED_MINUTE.
Withdraw is limited.
-4016 CAPITAL_WITHDRAW_RESTRICTED_PASSWORD.
Within 24 hours after password modification, withdrawal is prohibited.
-4017 CAPITAL_WITHDRAW_RESTRICTED_UNBIND_2FA.
Within 24 hours after the release of 2FA, withdrawal is prohibited.
-4018 CAPITAL_WITHDRAW_ASSET_NOT_EXIST.
We don’t have this asset.
-4019 CAPITAL_WITHDRAW_ASSET_PROHIBIT.
Current asset is not open for withdrawal.
-4021 CAPITAL_WITHDRAW_AMOUNT_MULTIPLE.
Asset withdrawal must be an %s multiple of %s.
-4022 CAPITAL_WITHDRAW_MIN_AMOUNT.
Not less than the minimum pick-up quantity %s.
-4023 CAPITAL_WITHDRAW_MAX_AMOUNT.
Within 24 hours, the withdrawal exceeds the maximum amount.
-4024 CAPITAL_WITHDRAW_USER_NO_ASSET.
You don’t have this asset.
-4025 CAPITAL_WITHDRAW_USER_ASSET_LESS_THAN_ZERO.
The number of hold asset is less than zero.
-4026 CAPITAL_WITHDRAW_USER_ASSET_NOT_ENOUGH.
You have insufficient balance.
-4027 CAPITAL_WITHDRAW_GET_TRAN_ID_FAILURE.
Failed to obtain tranId.
-4028 CAPITAL_WITHDRAW_MORE_THAN_FEE.
The amount of withdrawal must be greater than the Commission.
-4029 CAPITAL_WITHDRAW_NOT_EXIST.
The withdrawal record does not exist.
-4030 CAPITAL_WITHDRAW_CONFIRM_SUCCESS.
Confirmation of successful asset withdrawal.
-4031 CAPITAL_WITHDRAW_CANCEL_FAILURE.
Cancellation failed.
-4032 CAPITAL_WITHDRAW_CHECKSUM_VERIFY_FAILURE.
Withdraw verification exception.
-4033 CAPITAL_WITHDRAW_ILLEGAL_ADDRESS.
Illegal address.
-4034 CAPITAL_WITHDRAW_ADDRESS_CHEAT.
The address is suspected of fake.
-4035 CAPITAL_WITHDRAW_NOT_WHITE_ADDRESS.
This address is not on the whitelist. Please join and try again.
-4036 CAPITAL_WITHDRAW_NEW_ADDRESS.
The new address needs to be withdrawn in hours.
-4037 CAPITAL_WITHDRAW_RESEND_EMAIL_FAIL.
Re-sending Mail failed.
-4038 CAPITAL_WITHDRAW_RESEND_EMAIL_TIME_OUT.
Please try again in 5 minutes.
-4039 CAPITAL_USER_EMPTY.
The user does not exist.
-4040 CAPITAL_NO_CHARGE.
This address not charged.
-4041 CAPITAL_MINUTE_TOO_SMALL.
Please try again in one minute.
-4042 CAPITAL_CHARGE_NOT_RESET.
This asset cannot get deposit address again.
-4043 CAPITAL_ADDRESS_TOO_MUCH.
More than 100 recharge addresses were used in 24 hours.
-4044 CAPITAL_BLACKLIST_COUNTRY_GET_ADDRESS.
This is a blacklist country.
-4045 CAPITAL_GET_ASSET_ERROR.
Failure to acquire assets.
-4046 CAPITAL_AGREEMENT_NOT_CONFIRMED.
Agreement not confirmed.
-4047 CAPITAL_DATE_INTERVAL_LIMIT.
Time interval must be within 0-90 days.
-5001 ASSET_DRIBBLET_CONVERT_SWITCH_OFF.
Don’t allow transfer to micro assets.
-5002 ASSET_ASSET_NOT_ENOUGH.
You have insufficient balance.
-5003 ASSET_USER_HAVE_NO_ASSET.
You don’t have this asset.
-5004 USER_OUT_OF_TRANSFER_FLOAT.
The residual balances have exceeded 0.001BTC, Please re-choose. The residual balances of %s have exceeded 0.001BTC, Please re-choose.
-5005 USER_ASSET_AMOUNT_IS_TOO_LOW.
The residual balances of the BTC is too low The residual balances of %s is too low, Please re-choose.
-5006 USER_CAN_NOT_REQUEST_IN_24_HOURS.
Only transfer once in 24 hours.
-5007 AMOUNT_OVER_ZERO.
Quantity must be greater than zero.
-5008 ASSET_WITHDRAW_WITHDRAWING_NOT_ENOUGH.
Insufficient amount of returnable assets.
-5009 PRODUCT_NOT_EXIST.
Product does not exist.
-5010 TRANSFER_FAIL.
Asset transfer fail.
-5011 FUTURE_ACCT_NOT_EXIST.
future account not exists.
-5012 TRANSFER_PENDING.
Asset transfer is in pending.
-5021 PARENT_SUB_HAVE_NO_RELATION.
This parent sub have no relation.
-5012 FUTURE_ACCT_OR_SUBRELATION_NOT_EXIST.
future account or sub relation not exists.
6XXX – Savings Issues.
-6001 DAILY_PRODUCT_NOT_EXIST.
Daily product not exists.
-6003 DAILY_PRODUCT_NOT_ACCESSIBLE.
Product not exist or you don’t have permission.
-6004 DAILY_PRODUCT_NOT_PURCHASABLE.
Product not in purchase status.
-6005 DAILY_LOWER_THAN_MIN_PURCHASE_LIMIT.
Smaller than min purchase limit.
-6006 DAILY_REDEEM_AMOUNT_ERROR.
Redeem amount error.
-6007 DAILY_REDEEM_TIME_ERROR.
Not in redeem time.
-6008 DAILY_PRODUCT_NOT_REDEEMABLE.
Product not in redeem status.
-6009 REQUEST_FREQUENCY_TOO_HIGH.
Request frequency too high.
-6011 EXCEEDED_USER_PURCHASE_LIMIT.
Exceeding the maximum num allowed to purchase per user.
-6012 BALANCE_NOT_ENOUGH.
Balance not enough.
-6013 PURCHASING_FAILED.
Purchasing failed.
-6014 UPDATE_FAILED.
Exceed up-limit allowed to purchased.
-6015 EMPTY_REQUEST_BODY.
Empty request body.
-6016 PARAMS_ERR.
Parameter err.
-6017 NOT_IN_WHITELIST.
Not in whitelist.
-6018 ASSET_NOT_ENOUGH.
Asset not enough.
-6019 PENDING.
Need confirm.
-6020 PROJECT_NOT_EXISTS.
Project not exists.
70xx – Futures.
-7001 FUTURES_BAD_DATE_RANGE.
Date range is not supported.
-7002 FUTURES_BAD_TYPE.
Data request type is not supported.
20xxx – Futures Algo.
-20121.
Invalid symbol.
-20124.
Invalid algo id or it has been completed.
-20130.
Invalid data sent for a parameter.
-20132.
The client algo id is duplicated.
-20194.
Duration is too short to execute all required quantity.
-20195.
The total size is too small.
-20196.
The total size is too large.
-20198.
Reach the max open orders allowed.
-9xxx Filter failures.
Error message Description “Filter failure: PRICE_FILTER” price is too high, too low, and/or not following the tick size rule for the symbol. “Filter failure: PERCENT_PRICE” price is X% too high or X% too low from the average weighted price over the last Y minutes. “Filter failure: PERCENT_PRICE_BY_SIDE” price is X% too high or Y% too low from the lastPrice on that side (i.e. BUY/SELL) “Filter failure: LOT_SIZE” quantity is too high, too low, and/or not following the step size rule for the symbol. “Filter failure: MIN_NOTIONAL” price * quantity is too low to be a valid order for the symbol. “Filter failure: ICEBERG_PARTS” ICEBERG order would break into too many parts; icebergQty is too small. “Filter failure: MARKET_LOT_SIZE” MARKET order’s quantity is too high, too low, and/or not following the step size rule for the symbol. “Filter failure: MAX_POSITION” The account’s position has reached the maximum defined limit. This is composed of the sum of the balance of the base asset, and the sum of the quantity of all open BUY orders. “Filter failure: MAX_NUM_ORDERS” Account has too many open orders on the symbol. “Filter failure: MAX_NUM_ALGO_ORDERS” Account has too many open stop loss and/or take profit orders on the symbol. “Filter failure: MAX_NUM_ICEBERG_ORDERS” Account has too many open iceberg orders on the symbol. “Filter failure: TRAILING_DELTA” trailingDelta is not within the defined range of the filter for that order type. “Filter failure: EXCHANGE_MAX_NUM_ORDERS” Account has too many open orders on the exchange. “Filter failure: EXCHANGE_MAX_NUM_ALGO_ORDERS” Account has too many open stop loss and/or take profit orders on the exchange.
10xxx – Futures Cross Collateral.
-10017 REPAY_CHECK_BEYOND_LIABILITY.
Repay amount should not be larger than liability.
13xxx – BLVT.
-13000 BLVT_FORBID_REDEEM.
Redeption of the token is forbiden now.
-13001 BLVT_EXCEED_DAILY_LIMIT.
Exceeds individual 24h redemption limit of the token.
-13002 BLVT_EXCEED_TOKEN_DAILY_LIMIT.
Exceeds total 24h redemption limit of the token.
-13003 BLVT_FORBID_PURCHASE.
Subscription of the token is forbiden now.
-13004 BLVT_EXCEED_DAILY_PURCHASE_LIMIT.
Exceeds individual 24h subscription limit of the token.
-13005 BLVT_EXCEED_TOKEN_DAILY_PURCHASE_LIMIT.
Exceeds total 24h subscription limit of the token.
-13006 BLVT_PURCHASE_LESS_MIN_AMOUNT.
Subscription amount is too small.
-13007 BLVT_PURCHASE_AGREEMENT_NOT_SIGN.
The Agreement is not signed.
12xxx – Liquid Swap.
-12014 TOO MANY REQUESTS.
More than 1 request in 3 seconds.
18xxx – Binance Code.
-18002.
The total amount of codes you created has exceeded the 24-hour limit, please try again after UTC 0.
-18003.
Too many codes created in 24 hours, please try again after UTC 0.
-18004.
Too many invalid redeem attempts in 24 hours, please try again after UTC 0.
-18005.
Too many invalid verify attempts, please try later.
-18006.
The amount is too small, please re-enter.
-18007.
This token is not currently supported, please re-enter.
Order Rejection Issues.
Error messages like these are indicated when the error is coming specifically from the matching engine:
-1010 ERROR_MSG_RECEIVED -2010 NEW_ORDER_REJECTED -2011 CANCEL_REJECTED.
The following messages which will indicate the specific error:
Error message Description “Unknown order sent.” The order (by either orderId , clientOrderId , origClientOrderId ) could not be found. “Duplicate order sent.” The clientOrderId is already in use. “Market is closed.” The symbol is not trading. “Account has insufficient balance for requested action.” Not enough funds to complete the action. “Market orders are not supported for this symbol.” MARKET is not enabled on the symbol. “Iceberg orders are not supported for this symbol.” icebergQty is not enabled on the symbol “Stop loss orders are not supported for this symbol.” STOP_LOSS is not enabled on the symbol “Stop loss limit orders are not supported for this symbol.” STOP_LOSS_LIMIT is not enabled on the symbol “Take profit orders are not supported for this symbol.” TAKE_PROFIT is not enabled on the symbol “Take profit limit orders are not supported for this symbol.” TAKE_PROFIT_LIMIT is not enabled on the symbol “Price * QTY is zero or less.” price * quantity is too low “IcebergQty exceeds QTY.” icebergQty must be less than the order quantity “This action is disabled on this account.” Contact customer support; some actions have been disabled on the account. “Unsupported order combination” The orderType , timeInForce , stopPrice , and/or icebergQty combination isn’t allowed. “Order would trigger immediately.” The order’s stop price is not valid when compared to the last traded price. “Cancel order is invalid. Check origClientOrderId and orderId.” No origClientOrderId or orderId was sent in. “Order would immediately match and take.” LIMIT_MAKER order type would immediately match and trade, and not be a pure maker order. “The relationship of the prices for the orders is not correct.” The prices set in the OCO is breaking the Price rules. The rules are: SELL Orders : Limit Price > Last Price > Stop Price BUY Orders : Limit Price “OCO orders are not supported for this symbol” OCO is not enabled on the symbol. “Quote order qty market orders are not support for this symbol.” MARKET orders using the parameter quoteOrderQty are not enabled on this symbol.
Notes.
Request Parameters.
Email Address.
Email address should be encoded. e.g. [email protected] should be encoded into alice%40test.com.

Related Posts

Leave a Reply

Your email address will not be published.