Change Log – Binance API Documentation - GitHub Pages

文章推薦指數: 80 %
投票人數:10人

This means the request GET /api/v3/exchangeInfo without any parameters will show all symbols that can be used for SPOT , MARGIN and/or LEVERAGED trading. ChangeLog Introduction APIKeySetup APIKeyRestrictions EnablingAccounts APILibrary ContactUs GeneralInfo GeneralAPIInformation LIMITS DataSources Endpointsecuritytype SIGNED(TRADE,USER_DATA,ANDMARGIN)Endpointsecurity PublicAPIDefinitions Filters WalletEndpoints SystemStatus(System) AllCoins'Information(USER_DATA) DailyAccountSnapshot(USER_DATA) DisableFastWithdrawSwitch(USER_DATA) EnableFastWithdrawSwitch(USER_DATA) Withdraw(USER_DATA) DepositHistory(supportingnetwork)(USER_DATA) WithdrawHistory(supportingnetwork)(USER_DATA) DepositAddress(supportingnetwork)(USER_DATA) AccountStatus(USER_DATA) AccountAPITradingStatus(USER_DATA) DustLog(USER_DATA) GetAssetsThatCanBeConvertedIntoBNB(USER_DATA) DustTransfer(USER_DATA) AssetDividendRecord(USER_DATA) AssetDetail(USER_DATA) TradeFee(USER_DATA) UserUniversalTransfer(USER_DATA) QueryUserUniversalTransferHistory(USER_DATA) FundingWallet(USER_DATA) UserAsset(USER_DATA) ConvertTransfer(TRADE) QueryConvertTransfer(USER_DATA) GetAPIKeyPermission(USER_DATA) Sub-AccountEndpoints CreateaVirtualSub-account(ForMasterAccount) QuerySub-accountList(ForMasterAccount) QuerySub-accountSpotAssetTransferHistory(ForMasterAccount) QuerySub-accountFuturesAssetTransferHistory(ForMasterAccount) Sub-accountFuturesAssetTransfer(ForMasterAccount) QuerySub-accountAssets(ForMasterAccount) QuerySub-accountSpotAssetsSummary(ForMasterAccount) GetSub-accountDepositAddress(ForMasterAccount) GetSub-accountDepositHistory(ForMasterAccount) GetSub-account'sStatusonMargin/Futures(ForMasterAccount) EnableMarginforSub-account(ForMasterAccount) GetDetailonSub-account'sMarginAccount(ForMasterAccount) GetSummaryofSub-account'sMarginAccount(ForMasterAccount) EnableFuturesforSub-account(ForMasterAccount) GetDetailonSub-account'sFuturesAccount(ForMasterAccount) GetSummaryofSub-account'sFuturesAccount(ForMasterAccount) GetFuturesPosition-RiskofSub-account(ForMasterAccount) FuturesTransferforSub-account(ForMasterAccount) MarginTransferforSub-account(ForMasterAccount) TransfertoSub-accountofSameMaster(ForSub-account) TransfertoMaster(ForSub-account) Sub-accountTransferHistory(ForSub-account) UniversalTransfer(ForMasterAccount) QueryUniversalTransferHistory(ForMasterAccount) GetDetailonSub-account'sFuturesAccountV2(ForMasterAccount) GetSummaryofSub-account'sFuturesAccountV2(ForMasterAccount) GetFuturesPosition-RiskofSub-accountV2(ForMasterAccount) EnableLeverageTokenforSub-account(ForMasterAccount) EnableorDisableIPRestrictionforaSub-accountAPIKey(ForMasterAccount) AddIPListforaSub-accountAPIKey(ForMasterAccount) GetIPRestrictionforaSub-accountAPIKey(ForMasterAccount) DeleteIPListForaSub-accountAPIKey(ForMasterAccount) DepositAssetsIntoTheManagedSub-account(ForInvestorMasterAccount) QueryManagedSub-accountAssetDetails(ForInvestorMasterAccount) WithdrawlAssetsFromTheManagedSub-account(ForInvestorMasterAccount) QueryManagedSub-accountSnapshot(ForInvestorMasterAccount) MarketDataEndpoints TestConnectivity CheckServerTime ExchangeInformation OrderBook RecentTradesList OldTradeLookup(MARKET_DATA) Compressed/AggregateTradesList Kline/CandlestickData UIKlines CurrentAveragePrice 24hrTickerPriceChangeStatistics SymbolPriceTicker SymbolOrderBookTicker Rollingwindowpricechangestatistics WebsocketMarketStreams LiveSubscribing/Unsubscribingtostreams AggregateTradeStreams TradeStreams Kline/CandlestickStreams IndividualSymbolMiniTickerStream AllMarketMiniTickersStream IndividualSymbolTickerStreams AllMarketTickersStream IndividualSymbolRollingWindowStatisticsStreams AllMarketRollingWindowStatisticsStreams IndividualSymbolBookTickerStreams AllBookTickersStream PartialBookDepthStreams Diff.DepthStream Howtomanagealocalorderbookcorrectly SpotAccount/Trade TestNewOrder(TRADE) NewOrder(TRADE) CancelOrder(TRADE) CancelallOpenOrdersonaSymbol(TRADE) QueryOrder(USER_DATA) CancelanExistingOrderandSendaNewOrder(TRADE) CurrentOpenOrders(USER_DATA) AllOrders(USER_DATA) NewOCO(TRADE) CancelOCO(TRADE) QueryOCO(USER_DATA) QueryallOCO(USER_DATA) QueryOpenOCO(USER_DATA) AccountInformation(USER_DATA) AccountTradeList(USER_DATA) QueryCurrentOrderCountUsage(TRADE) MarginAccount/Trade CrossMarginAccountTransfer(MARGIN) MarginAccountBorrow(MARGIN) MarginAccountRepay(MARGIN) QueryMarginAsset(MARKET_DATA) QueryCrossMarginPair(MARKET_DATA) GetAllMarginAssets(MARKET_DATA) GetAllCrossMarginPairs(MARKET_DATA) QueryMarginPriceIndex(MARKET_DATA) MarginAccountNewOrder(TRADE) MarginAccountCancelOrder(TRADE) MarginAccountCancelallOpenOrdersonaSymbol(TRADE) GetCrossMarginTransferHistory(USER_DATA) QueryLoanRecord(USER_DATA) QueryRepayRecord(USER_DATA) GetInterestHistory(USER_DATA) GetForceLiquidationRecord(USER_DATA) QueryCrossMarginAccountDetails(USER_DATA) QueryMarginAccount'sOrder(USER_DATA) QueryMarginAccount'sOpenOrders(USER_DATA) QueryMarginAccount'sAllOrders(USER_DATA) MarginAccountNewOCO(TRADE) MarginAccountCancelOCO(TRADE) QueryMarginAccount'sOCO(USER_DATA) QueryMarginAccount'sallOCO(USER_DATA) QueryMarginAccount'sOpenOCO(USER_DATA) QueryMarginAccount'sTradeList(USER_DATA) QueryMaxBorrow(USER_DATA) QueryMaxTransfer-OutAmount(USER_DATA) GetSummaryofMarginaccount(USER_DATA) IsolatedMarginAccountTransfer(MARGIN) GetIsolatedMarginTransferHistory(USER_DATA) QueryIsolatedMarginAccountInfo(USER_DATA) DisableIsolatedMarginAccount(TRADE) EnableIsolatedMarginAccount(TRADE) QueryEnabledIsolatedMarginAccountLimit(USER_DATA) QueryIsolatedMarginSymbol(USER_DATA) GetAllIsolatedMarginSymbol(USER_DATA) ToggleBNBBurnOnSpotTradeAndMarginInterest(USER_DATA) GetBNBBurnStatus(USER_DATA) QueryMarginInterestRateHistory(USER_DATA) QueryCrossMarginFeeData(USER_DATA) QueryIsolatedMarginFeeData(USER_DATA) QueryIsolatedMarginTierData(USER_DATA) QueryCurrentMarginOrderCountUsage(TRADE) MarginDustlog(USER_DATA) UserDataStreams LISTENKEY(SPOT) LISTENKEY(MARGIN) LISTENKEY(ISOLATEDMARGIN) Payload:AccountUpdate Payload:BalanceUpdate Payload:OrderUpdate SavingsEndpoints GetFlexibleProductList(USER_DATA) GetLeftDailyPurchaseQuotaofFlexibleProduct(USER_DATA) PurchaseFlexibleProduct(USER_DATA) GetLeftDailyRedemptionQuotaofFlexibleProduct(USER_DATA) RedeemFlexibleProduct(USER_DATA) GetFlexibleProductPosition(USER_DATA) GetFixedandActivityProjectList(USER_DATA) PurchaseFixed/ActivityProject(USER_DATA) GetFixed/ActivityProjectPosition(USER_DATA) LendingAccount(USER_DATA) GetPurchaseRecord(USER_DATA) GetRedemptionRecord(USER_DATA) GetInterestHistory(USER_DATA) ChangeFixed/ActivityPositiontoDailyPosition(USER_DATA) StakingEndpoints GetStakingProductList(USER_DATA) PurchaseStakingProduct(USER_DATA) RedeemStakingProduct(USER_DATA) GetStakingProductPosition(USER_DATA) GetStakingHistory(USER_DATA) SetAutoStaking(USER_DATA) GetPersonalLeftQuotaofStakingProduct(USER_DATA) MiningEndpoints AcquiringAlgorithm(MARKET_DATA) AcquiringCoinName(MARKET_DATA) RequestforDetailMinerList(USER_DATA) RequestforMinerList(USER_DATA) EarningsList(USER_DATA) ExtraBonusList(USER_DATA) HashrateResaleList(USER_DATA) HashrateResaleDetail(USER_DATA) HashrateResaleRequest(USER_DATA) Cancelhashrateresaleconfiguration(USER_DATA) StatisticList(USER_DATA) AccountList(USER_DATA) MiningAccountEarning(USER_DATA) Futures NewFutureAccountTransfer(USER_DATA) GetFutureAccountTransactionHistoryList(USER_DATA) Cross-CollateralBorrowHistory(USER_DATA) Cross-CollateralRepaymentHistory(USER_DATA) Cross-CollateralWalletV2(USER_DATA) AdjustCross-CollateralLTVHistory(USER_DATA) Cross-CollateralLiquidationHistory(USER_DATA) Cross-CollateralInterestHistory(USER_DATA) FuturesAlgoEndpoints VolumeParticipation(VP)NewOrder(TRADE) Time-WeightedAveragePrice(Twap)NewOrder(TRADE) CancelAlgoOrder(TRADE) QueryCurrentAlgoOpenOrders(USER_DATA) QueryHistoricalAlgoOrders(USER_DATA) QuerySubOrders(USER_DATA) PortfolioMarginEndpoints GetPortfolioMarginAccountInfo(USER_DATA) PortfolioMarginCollateralRate(MARKET_DATA) QueryPortfolioMarginBankruptcyLoanAmount(USER_DATA) PortfolioMarginBankruptcyLoanRepay BLVTEndpoints GetBLVTInfo(MARKET_DATA) HistoricalBLVTNAVKline/Candlestick SubscribeBLVT(USER_DATA) QuerySubscriptionRecord(USER_DATA) RedeemBLVT(USER_DATA) QueryRedemptionRecord(USER_DATA) GetBLVTUserLimitInfo(USER_DATA) WebsocketBLVTInfoStreams WebsocketBLVTNAVKline/CandlestickStreams BSwapEndpoints ListAllSwapPools(MARKET_DATA) Getliquidityinformationofapool(USER_DATA) AddLiquidity(TRADE) RemoveLiquidity(TRADE) GetLiquidityOperationRecord(USER_DATA) RequestQuote(USER_DATA) Swap(TRADE) GetSwapHistory(USER_DATA) GetPoolConfigure(USER_DATA) AddLiquidityPreview(USER_DATA) RemoveLiquidityPreview(USER_DATA) GetUnclaimedRewardsRecord(USER_DATA) ClaimRewards(TRADE) GetClaimedHistory(USER_DATA) FiatEndpoints GetFiatDeposit/WithdrawHistory(USER_DATA) GetFiatPaymentsHistory(USER_DATA) C2CEndpoints GetC2CTradeHistory(USER_DATA) CryptoLoansEndpoints GetCryptoLoansIncomeHistory(USER_DATA) Borrow-CryptoLoanBorrow(TRADE) Borrow-GetLoanBorrowHistory(USER_DATA) Borrow-GetLoanOngoingOrders(USER_DATA) Repay-CryptoLoanRepay(TRADE) Repay-GetLoanRepaymentHistory(USER_DATA) AdjustLTV-CryptoLoanAdjustLTV(TRADE) AdjustLTV-GetLoanLTVAdjustmentHistory(USER_DATA) PayEndpoints GetPayTradeHistory(USER_DATA) ConvertEndpoints GetConvertTradeHistory(USER_DATA) RebateEndpoints GetSpotRebateHistoryRecords(USER_DATA) NFTEndpoints GetNFTTransactionHistory(USER_DATA) GetNFTDepositHistory(USER_DATA) GetNFTWithdrawHistory(USER_DATA) GetNFTAsset(USER_DATA) BinanceCodeEndpoints CreateaBinanceCode(USER_DATA) RedeemaBinanceCode(USER_DATA) VerifyaBinanceCode(USER_DATA) FetchRSAPublicKey(USER_DATA) BuyaBinanceCode(TRADE) FetchTokenLimit(USER_DATA) ErrorCodes 10xx-GeneralServerorNetworkissues 11xx-2xxxRequestissues 3xxx-5xxxSAPI-specificissues 6XXX-SavingsIssues 70xx-Futures 20xxx-FuturesAlgo -9xxxFilterfailures 10xxx-CryptoLoans 13xxx-BLVT 12xxx-LiquidSwap 18xxx-BinanceCode 21xxx-PortfolioMarginAccount OrderRejectionIssues ErrorsregardingPOST/api/v3/order/cancelReplace Notes RequestParameters BinanceExchange ChangeLog 2022-10-15 NewendpointsforBinanceCode: POST/sapi/v1/giftcard/buyCode:Forbuyingafixed-valueBinanceCode. GET/sapi/v1/giftcard/buyCode/token-limit:Toverifywhichtokensareavailableforyoutopurchasefixed-valuegiftcardsasmentionedinsection2andits’limitation. 2022-09-30 DeleteendpointsforFuturesCrossCollateral: POST/sapi/v1/futures/loan/borrow POST/sapi/v1/futures/loan/repay GET/sapi/v1/futures/loan/configs GET/sapi/v2/futures/loan/configs GET/sapi/v1/futures/loan/calcAdjustLevel GET/sapi/v2/futures/loan/calcAdjustLevel GET/sapi/v1/futures/loan/calcMaxAdjustAmount GET/sapi/v2/futures/loan/calcMaxAdjustAmount POST/sapi/v1/futures/loan/adjustCollateral POST/sapi/v2/futures/loan/adjustCollateral GET/sapi/v1/futures/loan/collateralRepayLimit GET/sapi/v1/futures/loan/collateralRepay POST/sapi/v1/futures/loan/collateralRepay GET/sapi/v1/futures/loan/collateralRepayResult 2022-09-30 Scheduledchangestotheremovalof!bookTickeraroundNovember2022. TheAllBookTickersstream(!bookTicker)issettoberemovedinNovember2022 Moredetailsoftheactualremovaldatewillbeannouncedatalatertime. PleaseusetheIndividualBookTickerStreamsinstead.(@bookTicker). Multiple@bookTickerstreamscanbesubscribedtooveroneconnection. Example:wss://stream.binance.com:9443/stream?streams=btcusdt@bookTicker/bnbbtc@bookTicker 2022-09-29 NewendpointsforWallet: POST/sapi/v1/asset/convert-transfer:Converttransfer,convertbetweenBUSDandstablecoins. POST/sapi/v1/asset/convert-transfer/queryByPage:Queryconverttransfer 2022-09-22 UpdateendpointforSub-Account: POST/sapi/v1/sub-account/subAccountApi/ipRestriction:AddnewparamthirdParty POST/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList:AddnewparamthirdPartyName DELETE/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList:AddnewparamthirdPartyName AddRateLimitforfollowingendpoints: GET/sapi/v1/bswap/liquidity:3/1speraccountandperpool GET/sapi/v1/bswap/quote:3/1speraccountandperpool POST/sapi/v1/lending/daily/purchase:1/3speraccount POST/sapi/v1/lending/customizedFixed/purchase:1/3speraccount POST/sapi/v1/staking/purchase:1/3speraccount 2022-09-16 NewendpointforMargin: GET/sapi/v1/margin/tradeCoeff:Getpersonalmarginlevelinformation 2022-09-15 NewendpointsforCryptoLoan POST/sapi/v1/loan/borrow:Borrow-CryptoLoanBorrow GET/sapi/v1/loan/borrow/history:Borrow-GetLoanBorrowHistory GET/sapi/v1/loan/ongoing/orders:Borrow-GetLoanOngoingOrders POST/sapi/v1/loan/repay:Repay-CryptoLoanRepay GET/sapi/v1/loan/repay/history:Repay-GetLoanRepaymentHistory POST/sapi/v1/loan/adjust/ltv:AdjustLTV-CryptoLoanAdjustLTV GET/sapi/v1/loan/ltv/adjustment/history:AdjustLTV-GetLoanLTVAdjustmentHistory 2022-09-15 Notethatthesearerollingchanges,soitmaytakeafewdaysforittorollouttoallourservers. ChangestoGET/api/v3/exchangeInfo Newoptionalparameterpermissionsaddedtodisplayallsymbolswiththepermissionsmatchingtheparameterprovided.(eg.SPOT,MARGIN,LEVERAGED) Ifnotprovided,thedefaultvaluewillbe["SPOT","MARGIN","LEVERAGED"]. ThismeanstherequestGET/api/v3/exchangeInfowithoutanyparameterswillshowallsymbolsthatcanbeusedforSPOT,MARGINand/orLEVERAGEDtrading. Tosearchforsymbolsthatcanbetradedonotherpermissions(e.g.TRD_GRP_004,etc),thenthisneedstobesearchedforexplicitly.(e.g.permissions=TRD_GRP_004) Cannotbecombinedwithsymbolorsymbols 2022-09-12 UpdateendpointforSub-account: GET/sapi/v1/sub-account/subAccountApi/ipRestriction: TosupportmasteraccountqueryThirdpartyIPlistnameforasubaccountAPIkey 2022-09-05 DeleteendpointforFutures: GET/sapi/v1/futures/loan/wallet 2022-08-23 SPOTAPI Notethatthesearerollingchanges,soitmaytakeafewdaysforittorollouttoallourservers. ChangestoGET/api/v3/tickerandGET/api/v3/ticker/24hr Newoptionalparametertypeadded SupportedvaluesforparametertypeareFULLandMINI FULListhedefaultvalueandtheresponsethatiscurrentlybeingreturnedfromtheendpoint MINIomitsthefollowingfieldsfromtheresponse:priceChangePercent,weightedAvgPrice,bidPrice,bidQty,askPrice,askQty,andlastQty Newerrorcode-1008 Thisissentwhenevertheserversareoverloadedwithrequests. ThiserrorcodeonlyappearsfortheSPOTAPI. NewfieldbrokeredhasbeenaddedtoGET/api/v3/account Newendpoint:GET/api/v3/uiKlines Newklineinterval:1s 2022-08-18 UpdateendpointforConvert: GET/sapi/v1/convert/tradeFlow:UpdateweightfromWeight(IP)3000toWeight(UID)3000. 2022-08-08 SPOTAPI ChangestoPOST/api/v3/orderandPOST/api/v3/order/cancelReplace NewoptionalfieldstrategyIdisaparameterusedtoidentifyanorderaspartofastrategy. NewoptionalfieldstrategyTypeisaparameterusedtoidentifywhatstrategywasrunning.(E.g.Ifalltheordersarepartofspotgridstrategy,itcanbesettostrategyType=1000000) Note:strategyTypecannotbelessthan1000000. ChangestoPOST/api/v3/order/oco NewoptionalfieldslimitStrategyId,limitStrategyType.stopStrategyId,stopStrategyType ThesearethestrategymetadataparametersforbothlegsoftheOCOorders. limitStrategyTypeandstopStrategyTypebothcannotbelessthan1000000. ChangestoGET/api/v3/order,GET/api/v3/openOrders,andGET/api/v3/allOrders NewfieldsstrategyIdandstrategyTypewillappearintheresponseJSONforordersthathadthesefieldspopulateduponorderplacement. ChangestoDELETE/api/v3/orderandDELETE/api/v3/openOrders NewfieldsstrategyIdandstrategyTypewillappearintheresponseJSONforcancelledordersthathadthesefieldspopulateduponorderplacement. USERDATASTREAM NewfieldstoeventTypeexecutionReport jforstrategyId JforstrategyType Notethatthesefieldsonlyappearifthesewerepopulateduponorderplacement. 2022-08-05 UpdateendpointforConvert: GET/sapi/v1/convert/tradeFlow:UpdateweightfromWeight(IP)100toWeight(IP)3000. 2022-07-21 NewendpointforPortfolioMargin: GET/sapi/v1/portfolio/pmLoanQueryPortfolioMarginBankruptcyLoanRecord POST/sapi/v1/portfolio/repayPortfolioMarginBankruptcyLoanRepay 2022-07-18 NewendpointforPortfolioMargin: GET/sapi/v1/portfolio/collateralRatetogetPortfolioMarginCollateralRate. 2022-07-01 NewendpointforWallet: POST/sapi/v3/asset/getUserAssettogetuserassets. NewendpointforMargin: GET/sapi/v1/margin/dribblettoquerythehistoricalinformationofuser'smarginaccountsmall-valueassetconversionBNB. UpdateendpointforConvert: GET/sapi/v1/convert/tradeFlow:Updateweightfrom3000to100. UpdateendpointforMargin: GET/sapi/v1/margin/repay:AddresponsefieldrawAsset. 2022-06-20 SPOTAPI:ChangestoGET/api/v3/ticker Weighthasbeenreducedfrom5to2persymbol,regardlessofwindowSize. Themaxnumberofsymbolsthatcanbeprocessedinarequestis100. Ifthenumberofsymbolssentismorethan100,theerrorwillbeasfollows: { "code":-1101, "msg":"Toomanyvaluessentforparameter'symbols',maximumallowedupto100." } ThemaxWeight(IP)forthisendpointwillcapat100. I.e.Iftherequesthasmorethan50symbols,theWeightwillstillbe100,regardlessofwindowSize. 2022-06-15 Note:Theupdateisbeingrolledoutoverthenextfewdays,sothesechangesmaynotbevisiblerightaway. GET/api/v3/tickeradded RollingwindowpricechangestatisticsbasedonwindowSizeprovided. ContrarytoGET/api/v3/ticker/24hrthelistofsymbolscannotbeomitted. IfwindowSizenotspecified,thevaluewilldefaultto1d. ResponseissimilartoGET/api/v3/ticker/24hr,minusthefollowingfields:prevClosePrice,lastQty,bidPrice,bidQty,askPrice,askQty POST/api/v3/order/cancelReplaceadded Cancelsanexistingorderandplacesaneworderonthesamesymbol. Thefiltersareevaluatedbeforethecancelorderisplaced. e.g.IftheMAX_NUM_ORDERSfilteris10,andthetotalnumberofopenordersontheaccountisalso10,whenusingPOST/api/v3/order/cancelReplaceboththecancelorderplacementandneworderwillfailbecauseofthefilter. Thechangeisbeingrolledoutinthenextfewdays,thusthisfeaturewillbeenabledoncetheupgradeiscompleted. GET/api/v3/exchangeInforeturnsnewfieldcancelReplaceAllowedinsymbolslist. NewfilterNOTIONALhasbeenadded. Definestheallowednotionalvalue(price*quantity)basedonaconfiguredminNotionalandmaxNotional NewexchangefilterEXCHANGE_MAX_NUM_ICEBERG_ORDERShasbeenadded. Definesthelimitofopenicebergordersonanaccount WEBSOCKETS Newsymboltickerstreamswith1hand4hwindows: Individualsymboltickerstreams @ticker_ Allmarkettickerstreams !ticker_@arr 2022-06-02 UpdateendpointforSubaccount: GET/sapi/v1/sub-account/sub/transfer/history:fromEmailandtoEmailcanbemasteremail. 2022-05-31 UpdateendpointforFiat: GET/sapi/v1/fiat/orders:WeightchangesfromUID(3000)toUID(90000) UpdateendpointforPay: GET/sapi/v1/pay/transactions:Paramnameschanged:startTimestamp->startTime;endTimestamp->endTime. 2022-05-26 UpdateendpointforFiat: GET/sapi/v1/fiat/orders:WeightchangesfromIP(1)toUID(3000) Updateinfoforthefollowingmarginaccountendpoints:ThemaxintervalbetweenstartTimeandendTimeis30days.: 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 2022-05-23 ChangestoOrderBookDepthLevels QuantitiesintheDepthlevelswerereturningnegativevaluesinsituationswheretheywereexceedingthemaxvalue,resultinginanoverflow. Goingforwarddepthlevelswillnotoverflow,butwillbecappedatthemaxvaluebasedontheprecisionofthebaseasset.Thismeansthatthedepthlevelisatmaxvalueormore. E.g.Iftheprecisionis8,thenthemaxvalueforquantitywillbeat92,233,720,368.54775807. Whenthefixhasbeenapplied,achangeintheorderbookattheaffectedpricelevelisrequiredforthechangestobevisible. Whatdoesthisaffect? SPOTAPI GET/api/v3/depth WebsocketStreams @depth @depth@100ms @depth @depth@100ms UpdatestoMAX_POSITION Ifanorder'squantitycancausethepositiontooverflow,thiswillnowfailtheMAX_POSITIONfilter. 2022-05-19 UpdateendpointforMining: GET/sapi/v1/mining/pub/algoListandGET/sapi/v1/mining/pub/coinList:Neednoparamter. Adderrorcodes(21xxx)forPortfolioMarginAccount:-21001,-21002,-21003 2022-05-17 SPOTAPI ChangestoGETapi/v3/aggTrades WhenprovidingstartTimeandendTime,theoldestitemsarereturned. ChangederrormessagingonGET/api/v3/myTradeswhereparametersymbolisnotprovided: { "code":-1102, "msg":"Mandatoryparameter'symbol'wasnotsent,wasempty/null,ormalformed." } Thefollowingendpointsnowsupportmulti-symbolqueryingusingtheparametersymbols. GET/api/v3/ticker/24hr GET/api/v3/ticker/price GET/api/v3/ticker/bookTicker Intheabove,therequestweightwilldependonthenumberofsymbolsprovidedinsymbols.Pleaserefertothetablebelow: Endpoint NumberofSymbols Weight GET/api/v3/ticker/price Any 2 GET/api/v3/ticker/bookTicker Any 2 GET/api/v3/ticker/24hr 1-20 1 GET/api/v3/ticker/24hr 21-100 20 GET/api/v3/ticker/24hr 101ormore 40 2022-05-05 NewendpointforBinanceCode: GET/sapi/v1/giftcard/cryptography/rsa-public-keytofetchRSApublickey. UpdateendpointforBinanceCode: POST/sapi/v1/giftcard/redeemCode:newoptionalparameterexternalUid.EachexternaluniqueIDrepresentsauniqueuseronthepartnerplatform.Thefunctionhelpsyoutoidentifytheredemptionbehaviorofdifferentusers. 2022-04-28 NewendpointsforStaking: GET/sapi/v1/staking/productListtogetStakingproductlist POST/sapi/v1/staking/purchasetostakeproduct POST/sapi/v1/staking/redeemtoredeemproduct GET/sapi/v1/staking/positiontogetStakingproductholdingposition GET/sapi/v1/staking/stakingRecordtoinquiryStakinghistoryrecords POST/sapi/v1/staking/setAutoStakingtosetAutoStakingfunction GET/sapi/v1/staking/personalLeftQuotatoinquiryStakingleftquota 2022-04-27 NewendpointforFuturesAlgo: POST/sapi/v1/algo/futures/newOrderTwaptosupportTwapneworder FAQ:Time-WeightedAveragePrice(Twap)Introduction 2022-04-26 GET/sapi/v1/margin/rateLimit/orderadded Theendpointwilldisplaytheuser'scurrentmarginordercountusageforallintervals. 2022-04-20 NewendpointforPortfolioMargin: GET/sapi/v1/portfolio/accounttosupportqueryportfoliomarginaccountinfo FAQ:PortfolioMarginProgram OnlyPortfolioMarginAccountisaccessibletothisendpoint.Toenroll,kindlyreferto:HowtoEnrollintotheBinancePortfolioMarginProgram 2022-04-13 NewendpointsforFuturesAlgo: POST/sapi/v1/algo/futures/newOrderVptosupportVPneworder DELETE/sapi/v1/algo/futures/ordertosupportcancelAlgoorder GET/sapi/v1/algo/futures/openOrderstosupportqueryAlgoopenorders GET/sapi/v1/algo/futures/historicalOrderstosupportqueryAlgohistoricalorders GET/sapi/v1/algo/futures/subOrderstosupportqueryAlgosubordersforaspecifiedalgoId FAQ:VolumeParticipation(VP)Introduction 2022-04-13 InformationonTrailingStops SPOTAPI TrailingStopshavebeenenabled. ThisisatypeofalgoorderwheretheactivationisbasedonapercentageofapricechangeinthemarketusingthenewparametertrailingDelta. Thiscanonlyusedwithanyofthefollowingordertypes:STOP_LOSS,STOP_LOSS_LIMIT,TAKE_PROFIT,TAKE_PROFIT_LIMIT. ThetrailingDeltaparameterwillbedoneinBasisPointsorBIPS. Forexample:aSTOP_LOSSSELLorderwithatrailingDeltaof100willtriggerafterapricedecreaseof1%.(100/10,000=>0.01=>1%) WhenusedincombinationwithOCOOrders,thetrailingDeltawilldeterminewhenthecontingentlegoftheOCOwilltrigger. WhentrailingDeltaisusedincombinationwithstopPrice,oncethestopPriceconditionismet,thetrailingstopstartstrackingthepricechangefromthestopPricebasedonthetrailingDeltaprovided. WhennostopPriceissent,thetrailingstopstartstrackingthepricechangesfromthelastpricebasedonthetrailingDeltaprovided. ChangestoPOST/api/v3/order NewoptionalfieldtrailingDelta ChangestoPOST/api/v3/order/test NewoptionalfieldtrailingDelta ChangestoPOST/api/v3/order/oco NewoptionalfieldtrailingDelta AnewfilterTRAILING_DELTAhasbeenadded. ThisfilterisdefinedbytheminimumandmaximumvaluesforthetrailingDeltavalue. USERDATASTREAM NewfieldinexecutionReport "d"fortrailingDelta 2022-04-12 Note:Thechangesarebeingrolledoutduringthenextfewdays,sothesewillnotappearrightaway. ErrormessagechangedonGETapi/v3/allOrderswheresymbolisnotprovided: { "code":-1102, "msg":"Mandatoryparameter'symbol'wasnotsent,wasempty/null,ormalformed." } Fixedatypowithanerrormessagewhenanaccounthasdisabledpermissions(e.g.towithdraw,totrade,etc) "Thisactionisdisabledonthisaccount." Duringamarketdataaudit,wedetectedsomeissueswiththeSpotaggregatetradedata. Missingaggregatetradeswererecovered. Duplicatedrecordsweremarkedinvalidwiththefollowingvalues: p='0'//price q='0'//qty f=-1//first_trade_id l=-1//last_trade_id 2022-04-08 UpdateWEBSOCKETforBLVT: Baseurlchangedtowss://nbstream.binance.com/lvt-pforBLVTstreams@tokenNavand@nav_Kline_ Moredetails:WebsocketBLVTInfoStreamsandWebsocketBLVTNAVKline/CandlestickStreams 2022-3-29 ThefollowingupdateswilltakeeffectonMarch31,202208:00AMUTC UpdateendpointforSub-account: GET/sapi/v1/sub-account/universalTransfer Thequerytimeperiodmustbelessthen30days;IfstartTimeandendTimenotsent,returnrecordsofthelast30daysbydefault 2022-03-25 UpdateendpointforSub-Account: NewendpointGET/sapi/v1/managed-subaccount/accountSnapshottosupportinvestormasteraccountqueryassetsnapshotofmanagedsub-account 2022-03-08 UpdateendpointforSub-Account: NewtransfertypesMARGIN,ISOLATED_MARGINandparametersymboladdedinPOST/sapi/v1/sub-account/universalTransfertosupporttransfertosub-accountcrossmarginaccountandisolatedmarginaccount 2022-02-28 NewfieldallowTrailingStophasbeenaddedtoGET/api/v3/exchangeInfo 2022-02-22 SPOTAPI (price-minPrice)%tickSize==0ruleinPRICE_FILTERhasbeenchangedtoprice%tickSize==0. AnewfilterPERCENT_PRICE_BY_SIDEhasbeenadded. ChangestoGETapi/v3/depth Thelimitvaluecanbeoutsideofthepreviousvalues(i.e.5,10,20,50,100,500,1000,5000)andwillreturnthecorrectlimit.(i.e.iflimit=3thentheresponsewillbethetop3bidsandasks) Thelimitstillcannotexceed5000.Ifthelimitprovidedisgreaterthan5000,thentheresponsewillbetruncatedto5000. Duetothechanges,thesearetheupdatedrequestweightsbasedonthelimitvalueprovided: Limit RequestWeight 1-100 1 101-500 5 501-1000 10 1001-5000 50 ChangestoGETapi/v3/aggTrades WhenprovidingstartTimeandendTime,theoldestitemsarereturned. 2022-2-18 UpdateendpointforSub-Account: NewfieldsisManagedSubAccountandisAssetManagementSubAccountaddedinGET/sapi/v1/sub-account/listtosupportquerywhetherthesub-accountisamanagedsub-accountoraassetmanagementsub-account 2022-2-17 ThefollowingupdateswilltakeeffectonFebruary24,202208:00AMUTC UpdateendpointforWallet: GET/sapi/v1/accountSnapshot Thetimelimitofthisendpointisshortenedtoonlysupportqueryingthedataofthelatestmonth 2022-2-09 NewendpointforWallet: POST/sapi/v1/asset/dust-btctogetassetsthatcanbeconvertedintoBNB 2022-1-25 FromJanuary28,20224:00AMUTC,YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIkeywhichrequeststheseendpointsasfollowing: POST/sapi/v1/asset/dustDusttransfer POST/sapi/v1/lending/daily/purchasePurchaseSavingsflexibleproduct POST/sapi/v1/lending/daily/redeemRedeemSavingsflexibleproduct POST/sapi/v1/lending/customizedFixed/purchasePurchaseSavingsFixed/Activityproject POST/sapi/v1/lending/positionChangedChangeSavingsFixed/ActivitypositiontoDailyposition POST/sapi/v1/bswap/liquidityAddBswapaddliquidity POST/sapi/v1/bswap/liquidityRemoveBswapremoveliquidity POST/sapi/v1/bswap/swapBswapswap POST/sapi/v1/bswap/claimRewardsBswapclaimrewards 2022-1-21 NewendpointsforBinanceCode: POST/sapi/v1/giftcard/createCodetocreateaBinanceCode. POST/sapi/v1/giftcard/redeemCodetoredeemaBinanceCode. GET/sapi/v1/giftcard/verifytoverifyaBinanceCode. 2022-1-4 NewendpointforMining: GET/sapi/v1/mining/payment/uidtogetMiningaccountearning. NewendpointsforBSwap: GET/sapi/v1/bswap/unclaimedRewardstogetunclaimedrewardsrecord. POST/sapi/v1/bswap/claimRewardstoclaimswaprewardsorliquidityrewards. GET/sapi/v1/bswap/claimedHistorytogethistoryofclaimedrewards. 2021-12-30 UpdateendpointforMargin: RemovedoutlimitfromGET/sapi/v1/margin/interestRateHistory;ThemaxintervalbetweenstartTimeandendTimeis30days. UpdateendpointforWallet: AstheMiningaccountismergedintoFundingaccount,transfertypesMAIN_MINING,MINING_MAIN,MINING_UMFUTURE,MARGIN_MINING,andMINING_MARGINwillbediscontinuedinUniversalTransferendpointPOST/sapi/v1/asset/transferonJanuary05,202208:00AMUTC 2021-12-29 Removedoutdated"SymbolType"enum;added"Permissions"enum. 2021-12-24 UpdateendpointsforSub-Account: NewparameterclientTranIdaddedinPOST/sapi/v1/sub-account/universalTransferandGET/sapi/v1/sub-account/universalTransfertosupportcustomtransferid 2021-12-03 NewendpointsforMargin: GET/sapi/v1/margin/crossMarginDatatogetcrossmarginfeedatacollection GET/sapi/v1/margin/isolatedMarginDatatogetisolatedmarginfeedatacollection GET/sapi/v1/margin/isolatedMarginTiertogetisolatedmargintierdatacollection NewendpointsforNFT: GET/sapi/v1/nft/history/transactionstogetNFTtransactionhistory GET/sapi/v1/nft/history/deposittogetNFTdeposithistory GET/sapi/v1/nft/history/withdrawtogetNFTwithdrawhistory GET/sapi/v1/nft/user/getAssettogetNFTasset 2021-11-30 NewendpointforConvert: GET/sapi/v1/convert/tradeFlowtosupportuserqueryconverttradehistoryrecords NewendpointforRebate: GET/sapi/v1/rebate/taxQuerytosupportuserqueryspotrebatehistoryrecords 2021-11-19 NewendpointforPay: GET/sapi/v1/pay/transactionstosupportuserqueryPaytradehistory UpdateendpointforWallet: NewfieldinfoaddedinGET/sapi/v1/capital/withdraw/historytoshowthereasonforwithdrawalfailure 2021-11-18 ThefollowingupdateswilltakeeffectonNovember25,202108:00AMUTC UpdateendpointforWallet: GET/sapi/v1/accountSnapshot Thequerytimerangeofbothendpointsareshortenedtosupportdataquerywithinthelast6monthsonly,wherestartTimedoesnotsupportselectingatimestampbeyond6months. IfyoudonotspecifystartTimeandendTime,thedataofthelast7dayswillbereturnedbydefault. 2021-11-17 ThefollowingendpointswillbediscontinuedonNovember17,202113:00PMUTC: POST/sapi/v1/account/apiRestrictions/ipRestrictiontosupportuserenableanddisableIPrestrictionforanAPIKey POST/sapi/v1/account/apiRestrictions/ipRestriction/ipListtosupportuseraddIPlistforanAPIKey GET/sapi/v1/account/apiRestrictions/ipRestrictiontosupportuserqueryIPrestrictionforanAPIKey DELETE/sapi/v1/account/apiRestrictions/ipRestriction/ipListtosupportuserdeleteIPlistforanAPIKey 2021-11-16 NewendpointsforSub-Account: POST/sapi/v1/sub-account/subAccountApi/ipRestrictiontosupportmasteraccountenableanddisableIPrestrictionforasub-accountAPIKey POST/sapi/v1/sub-account/subAccountApi/ipRestriction/ipListtosupportmasteraccountaddIPlistforasub-accountAPIKey GET/sapi/v1/sub-account/subAccountApi/ipRestrictiontosupportmasteraccountqueryIPrestrictionforasub-accountAPIKey DELETE/sapi/v1/sub-account/subAccountApi/ipRestriction/ipListtosupportmasteraccountdeleteIPlistforasub-accountAPIKey 2021-11-09 NewendpointsforWallet: POST/sapi/v1/account/apiRestrictions/ipRestrictiontosupportuserenableanddisableIPrestrictionforanAPIKey POST/sapi/v1/account/apiRestrictions/ipRestriction/ipListtosupportuseraddIPlistforanAPIKey GET/sapi/v1/account/apiRestrictions/ipRestrictiontosupportuserqueryIPrestrictionforanAPIKey DELETE/sapi/v1/account/apiRestrictions/ipRestriction/ipListtosupportuserdeleteIPlistforanAPIKey 2021-11-08 NewendpointforCryptoLoans: NewendpointGET/sapi/v1/loan/incometosupportuserquerycryptoloansincomehistory 2021-11-05 UpdateendpointforWallet: NewparameterwalletTypeaddedinPOST/sapi/v1/capital/withdraw/applytosupportuserchoosewallettypespotwalletandfundingwalletwhenwithdrawcrypto. 2021-11-04 ThefollowingupdateswilltakeeffectonNovember11,202108:00AMUTC UpdateendpointsforWalletandFutures: GET/sapi/v1/asset/transfer GET/sapi/v1/futures/transfer Thequerytimerangeofbothendpointsareshortenedtosupportdataquerywithinthelast6monthsonly,wherestartTimedoesnotsupportselectingatimestampbeyond6months. IfyoudonotspecifystartTimeandendTime,thedataofthelast7dayswillbereturnedbydefault. 2021-11-01 GET/api/v3/rateLimit/orderadded Theendpointwilldisplaytheuser'scurrentordercountusageforallintervals. Thisendpointwillhavearequestweightof20. 2021-10-22 UpdateendpointforWallet: NewtransfertypesMAIN_FUNDING,FUNDING_MAIN,FUNDING_UMFUTURE,UMFUTURE_FUNDING,MARGIN_FUNDING,FUNDING_MARGIN,FUNDING_CMFUTUREandCMFUTURE_FUNDINGaddedinUniversalTransferendpointPOST/sapi/v1/asset/transferandGET/sapi/v1/asset/transfertosupporttransferassetsamongfundingaccountandotheraccounts AstheC2Caccount,BinancePayment,BinanceCardandotherbusinessaccountaremergedintoaFundingaccount,transfertypesMAIN_C2C,C2C_MAIN,C2C_UMFUTURE,C2C_MINING,UMFUTURE_C2C,MINING_C2C,MARGIN_C2C,C2C_MARGIN,MAIN_PAYandPAY_MAINwillbediscontinuedinUniversalTransferendpointPOST/sapi/v1/asset/transferandGET/sapi/v1/asset/transferonNovember04,202108:00AMUTC 2021-10-14 Updatethetimerangeoftheresponsedataforthefollowingmarginaccountendpoints,startTimeandendTimetimespanwillnotexceed30days,withouttimeparametersentthesystemwillreturnthelast7daysofdatabydefault,whilethearchivedparameteristrue,thesystemwillreturnthelast7daysofdata6monthsagobydefault: 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 NewendpointsforBSwap: GET/sapi/v1/bswap/poolConfiguretogetpoolconfigure GET/sapi/v1/bswap/addLiquidityPreviewtogetaddliquiditypreview GET/sapi/v1/bswap/removeLiquidityPreviewtogetremoveliquiditypreview 2021-09-17 Add/api/*and/sapi/*limitintroductioninGeneralInfo 2021-09-08 Addendpointsforenabledisolatedmarginaccountlimit: DELETE/sapi/v1/margin/isolated/accounttodisableisolatedmarginaccountforaspecificsymbol POST/sapi/v1/margin/isolated/accounttoenableisolatedmarginaccountforaspecificsymbol GET/sapi/v1/margin/isolated/accountLimittoqueryenabledisolatedmarginaccountlimit Newfield"enabled"inresponseofGET/sapi/v1/margin/isolated/accounttocheckiftheisolatedmarginaccountisenabled 2021-09-03 UpdateendpointforWallet: NewfieldssameAddress,depositDustandspecialWithdrawTipsaddedinGET/sapi/v1/capital/config/getall sameAddressmeansifthecoinneedstoprovidememotowithdraw depositDustmeansminimumcreditableamount specialWithdrawTipsmeansspecialtipsforwithdraw NewfieldconfirmNoaddedinGET/sapi/v1/capital/withdraw/historytosupportqueryconfirmtimesforwithdrawhistory 2021-08-27 UpdateendpointforWallet: NewparameterwithdrawOrderIdaddedinGET/sapi/v1/capital/withdraw/historytosupportuserquerywithdrawhistorybywithdrawOrderId NewfieldunlockConfirmaddedinGET/sapi/v1/capital/deposit/hisrectosupportquerynetworkconfirmtimesforunlocking 2021-08-23 NewendpointsforMarginAccountOCO: 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 SameusageasspotaccountOCO 2021-08-20 UpdateendpointforWallet: NewparametersfromSymbol,toSymbolandnewtransfertypesISOLATEDMARGIN_MARGIN,MARGIN_ISOLATEDMARGINandISOLATEDMARGIN_ISOLATEDMARGINaddedinPOST/sapi/v1/asset/transferandGET/sapi/v1/asset/transfertosupportusertransferassetsbetweenMargin(cross)accountandMargin(isolated)account 2021-08-12 GETapi/v3/myTradeshasanewoptionalfieldorderId 2021-08-05 NewendpointforC2C: GET/sapi/v1/c2c/orderMatch/listUserOrderHistorytoqueryuserC2Ctradehistory 2021-08-05 UpdateendpointsforSavings: GET/sapi/v1/lending/union/purchaseRecord GET/sapi/v1/lending/union/redemptionRecord GET/sapi/v1/lending/union/interestHistory Thetimebetween startTime and endTime cannotbelongerthan30days.If startTime and endTime arebothnotsent,thenthelast30days'datawillbereturned 2021-07-29 UpdateendpointforSub-Account: GET/sapi/v1/sub-account/transfer/subUserHistoryifstartTimeandendTimearenotsent,therecent30-daydatawillbereturnedbydefault 2021-07-27 NewendpointforFiat: GET/sapi/v1/fiat/orderstoqueryuserfiatdepositandwithdrawhistory GET/sapi/v1/fiat/paymentstoqueryuserfiatpaymentshistory 2021-07-16 NewendpointforWallet: GET/sapi/v1/account/apiRestrictionstoqueryuserAPIKeypermission 2021-07-09 NewendpointforWallet: POST/sapi/v1/asset/get-funding-assettoqueryfundingwallet,includesBinancePay,BinanceCard,BinanceGiftCard,StockToken 2021-06-24 UpdateendpointsforWallet: GET/sapi/v1/capital/withdraw/historyaddeddefaultvalue1000,maxvalue1000fortheparameterlimit GET/sapi/v1/capital/deposit/hisrecaddeddefaultvalue1000,maxvalue1000fortheparameterlimit 2021-06-17 UpdateendpointforSavings: GET/sapi/v1/lending/daily/product/listtoincludenewparameterscurrentandsize 2021-06-15 NewendpointsforSub-Account: POST/sapi/v1/managed-subaccount/deposittodepositassetsintothemanagedsub-account(onlyforinvestormasteraccount) GET/sapi/v1/managed-subaccount/assettoquerymanagedsub-accountassetdetails(onlyforinvestormasteraccount) POST/sapi/v1/managed-subaccount/withdrawtowithdrawalassetsfromthemanagedsub-account(onlyforinvestormasteraccount) 2021-06-04 OnAugust01,202102:00AMUTCtheWAPIendpointswillbediscontinued: 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 TheWAPIendpointshavebeenremovedfromBinanceAPIDocumentation.Toensureyourtradingstrategiesarenotaffected,allAPIusersareencouragedtoupgradetradingbotstoSAPIendpointsassoonaspossible. 2021-05-26 UpdateendpointforWallet: NewtransfertypesMAIN_PAY,PAY_MAINaddedinUniversalTransferendpointPOST/sapi/v1/asset/transferandGET/sapi/v1/asset/transfertosupporttrasnferassetsbetweenspotaccountandpayaccount 2021-05-12 AddedDataSourceinthedocumentationtoexplainwhereeachendpointisretrievingitsdata AddedfieldDataSourcetoeachSpotAPIendpointinthedocumentation GETapi/v3/exchangeInfonowsupportssingleormulti-symbolquery 2021-04-28 OnMay15,202108:00UTCtheSAPICreateMarginAccountendpointwillbediscontinued: POST/sapi/v1/margin/isolated/create IsolatedMarginaccountcreationandtradepreparationcanbecompleteddirectlythroughIsolatedMarginfundstransferPOST/sapi/v1/margin/isolated/transfer 2021-04-26 OnApril28,202100:00UTCtheweightstothefollowingendpointswillbeadjusted: GET/api/v3/orderweightincreasedto2 GET/api/v3/openOrdersweightincreasedto3 GET/api/v3/allOrdersweightincreasedto10 GET/api/v3/orderListweightincreasedto2 GET/api/v3/openOrderListweightincreasedto3 GET/api/v3/accountweightincreasedto10 GET/api/v3/myTradesweightincreasedto10 GET/api/v3/exchangeInfoweightincreasedto10 2021-04-08 UpdateendpointforSub-Account: GET/sapi/v1/sub-account/futures/accountSummaryandGET/sapi/v2/sub-account/futures/accountSummarytheunitoffieldassetchangedtoUSD valuedsummaryofsub-accountassets 2021-04-02 NewendpointsforWallet: GET/sapi/v1/system/statustoquerysystemstatus GET/sapi/v1/account/statustoqueryaccountstatus GET/sapi/v1/account/apiTradingStatustoqueryaccountAPItradingstatus GET/sapi/v1/asset/dribblettoquerydustlog GET/sapi/v1/asset/assetDetailtoqueryassetdetail GET/sapi/v1/asset/tradeFeetoquerytradefee NewendpointforSub-Account: GET/sapi/v3/sub-account/assetstoquerysub-accountassets 2021-04-01 UpdateendpointforSub-Account: GET/sapi/v1/sub-account/transfer/subUserHistorynewfieldsfromAccountTypeandtoAccountTypeaddedinresponse 2021-03-31 UpdateendpointforSub-Account: GET/wapi/v3/sub-account/transfer/history.htmladdednewparametersfromEmailandtoEmail,theoriginalparameteremailisequaltofromEmailbydefault 2021-03-08 NewendpointforSub-Account: POST/sapi/v1/sub-account/virtualSubAccounttosupportcreateavirtualsub-account GET/sapi/v1/sub-account/listtosupportquerysub-accountlist POST/sapi/v1/sub-account/blvt/enabletosupportenableblvtforsub-account 2021-03-05 NewendpointsforMargin: GET/sapi/v1/margin/interestRateHistorytosupportmargininterestratehistoryquery 2021-02-08 NewendpointsforFutures: GET/sapi/v2/futures/loan/wallettosupportBUSDloanquery GET/sapi/v2/futures/loan/configstosupportBUSDloanquery GET/sapi/v2/futures/loan/calcAdjustLeveltosupportBUSDloan GET/sapi/v2/futures/loan/calcMaxAdjustAmounttosupportadjustmentofBUSDloan POST/sapi/v2/futures/loan/adjustCollateraltosupportadjustmentofBUSDloan UpdateendpointsforFutures GET/sapi/v1/futures/loan/adjustCollateral/historynewparameterandfieldsinresponseloanCoinforBUSDloan GET/sapi/v1/futures/loan/liquidationHistorynewparameterandfieldsinresponseloanCoinforBUSDloan 2021-02-04 NewtransfertypesMARGIN_MINING,MINING_MARGIN,MARGIN_C2C,C2C_MARGIN,MARGIN_CMFUTURE,CMFUTURE_MARGINaddedinUniversalTransferendpointPOST/sapi/v1/asset/transferandGET/sapi/v1/asset/transfer. 2021-01-15 NewendpointDELETE/sapi/v1/margin/openOrdersforMarginTrade Thiswillallowausertocancelallopenordersonasinglesymbolformarginaccount. ThisendpointwillcancelallopenordersincludingOCOordersformarginaccount. 2021-01-10 NewparameterpageSizeforMiningendpointGET/sapi/v1/mining/payment/list NewfieldsinresponsetoMiningendpointGET/sapi/v1/mining/payment/list: "type"forincometype "hashTransfer"forresaleHashrate "transferAmount"fortransferredIncome NewMiningendpoints: 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 USERDATASTREAM outboundAccountInfohasbeenremoved. 2020-12-30 NewendpointforWallet: POST/sapi/v1/asset/transfertosupportuseruniversaltransferamongSpot,Margin,Futures,C2C,MININGaccounts. GET/sapi/v1/asset/transfertogetuseruniversaltransferhistory. 2020-12-22 NewendpointforSub-Account: GET/sapi/v1/sub-account/sub/transfer/historytogetspotassettransferhistory. 2020-12-11 UpdateendpointsforFuturesCross-Collateral: GET/sapi/v1/futures/loan/walletnewfieldsinresponseinterestFreeLimitfortotalinterestfreelimit,interestFreeLimitUsedforinterestfreelimitused. GET/sapi/v1/futures/loan/interestHistorynewfieldsinresponseinterestFreeLimitUsedforinterestfreelimitused. 2020-12-04 UpdateendpointforBLVT: GET/sapi/v1/blvt/tokenInfonewfieldsinresponsecurrentBaskets(includesymbol,amount,notionalValue),purchaseFeePct,dailyPurchaseLimit,redeemFeePct,dailyRedeemLimit. NewendpointforBLVT: GET/sapi/v1/blvt/userLimittogetBLVTuserlimitinfo. 2020-12-02 NewendpointsforSub-Account: GET/sapi/v2/sub-account/futures/accounttogetdetailonsub-account'sUSDTmarginedfuturesaccountandCOINmarginedfuturesaccount. GET/sapi/v2/sub-account/futures/accountSummarytogetsummaryofsub-account'sUSDTmarginedfuturesaccountandCOINmarginedfuturesaccount. GET/sapi/v2/sub-account/futures/positionRisktogetpositionriskofsub-account'sUSDTmarginedfuturesaccountandCOINmarginedfuturesaccount. 2020-12-01 UpdateMarginTradeEndpoint: POST/sapi/v1/margin/ordernewparameterquoteOrderQtyallowausertospecifythetotalquoteOrderQtyspentorreceivedintheMARKETorder. 2020-11-27 NewAPIclustershavebeenaddedinordertoimproveperformance. UserscanaccessanyofthefollowingAPIclusters,inadditiontoapi.binance.com Ifthereareanyperformanceissueswithaccessingapi.binance.compleasetryanyofthefollowinginstead: https://api1.binance.com/api/v3/* https://api2.binance.com/api/v3/* https://api3.binance.com/api/v3/* 2020-11-16 UpdatedendpointsforMargin,newparameterarchivedtoquerydatafrom6monthsago: GET/sapi/v1/margin/loan GET/sapi/v1/margin/repay GET/sapi/v1/margin/interestHistory 2020-11-13 NewendpointsforSub-Account: POST/sapi/v1/sub-account/universalTransfertotransferspotandfuturesassetbetweenmasteraccountandsubaccounts. GET/sapi/v1/sub-account/universalTransfertosearchtransferrecords. 2020-11-10 NewendpointtotoggleBNBBurn: POST/sapi/v1/bnbBurntotoggleBNBBurnonspottradeandmargininterest. GET/sapi/v1/bnbBurntogetBNBBurnstatus. 2020-11-09 NewfieldtranIdisavailablefromendpoints: GET/sapi/v1/sub-account/futures/internalTransfer GET/sapi/v1/sub-account/transfer/subUserHistory 2020-11-03 UpdateendpointsforFuturesCross-Collateral: GET/sapi/v1/futures/loan/repay/historynewfieldsinresponserepayType(NORMALfornormalrepayment,COLLATERALforcollateralrepayment),price(collateralrepaymentrate),repayCollateral(collateralamountforcollateralrepayment). GET/sapi/v1/futures/loan/walletnewfieldsinresponsetotalInterest(totalinterestforcross-collateral),principalForInterest(cross-collateralprincipalforinterest),interest(cross-collateralinterest). GET/sapi/v1/futures/loan/configsnewfieldsinresponseinterestRate(interestrateforcross-collateral),interestGracePeriod(interestgraceperiodforcross-collateral). NewendpointsforFuturesCross-Collateral: GET/sapi/v1/futures/loan/collateralRepayLimittocheckthemaximumandminimumlimitwhenrepaywithcollateral. GET/sapi/v1/futures/loan/collateralRepaytogetquoteforcollateralrepayment. POST/sapi/v1/futures/loan/collateralRepaytorepaywithcollateral. GET/sapi/v1/futures/loan/collateralRepayResulttocheckcollateralrepaymentresult. GET/sapi/v1/futures/loan/interestHistorytogetcross-collateralinteresthistory. 2020-10-14 UpdateendpointsforFuturesCross-Collateral: POST/sapi/v1/futures/loan/borrowandGET/sapi/v1/futures/loan/borrow/historynewfieldborrowIdinresponseforIDofCross-Collateralborrowoperation. POST/sapi/v1/futures/loan/repayandGET/sapi/v1/futures/loan/repay/historynewfieldrepayIdinresponseforIDofCross-Collateralrepayoperation. 2020-10-10 NewtypeaddedintheendpointPOST/sapi/v1/sub-account/futures/transfertosupporttransferassetfromsubaccount'sspotaccounttoitsCOIN-marginedfuturesaccountandtransferassetfromsubaccount'sCOIN-marginedfuturesaccounttoitsspotaccount. 2020-09-30 UpdateendpointsforMarginAccount: GET/sapi/v1/margin/maxBorrowablenewfieldborrowLimitinresponseforaccountborrowlimit. 2020-09-28 NewendpointsforBinanceSavings: POST/sapi/v1/lending/positionChangedtochangefixed/activitypositiontodailyposition. NewparameterACTIVITYreplaceREGULARinthefollowingBinanceSavingsendpoints: 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 NewSAPIendpointsforBSwap: GET/sapi/v1/bswap/poolstolistallswappools. GET/sapi/v1/bswap/liquiditytogetliquidityinformationofapool. POST/sapi/v1/bswap/liquidityAddtoaddliquidity. POST/sapi/v1/bswap/liquidityRemovetoremoveliquidity. GET/sapi/v1/bswap/liquidityOpstogetliquidityoperationrecord. GET/sapi/v1/bswap/quotetorequestquotes. POST/sapi/v1/bswap/swaptoswap. GET/sapi/v1/bswap/swaptogetswaphistory. 2020-09-16 NewSAPIendpointsforBLVT: GET/sapi/v1/blvt/tokenInfotogetBLVTinfo. POST/sapi/v1/blvt/subscribe(HMACSHA256)tosubscribeBLVT. GET/sapi/v1/blvt/subscribe/record(HMACSHA256)togetsubscriptionrecord。

POST/sapi/v1/blvt/redeem(HMACSHA256)toredeemBLVT. GET/sapi/v1/blvt/redeem/record(HMACSHA256togetredemptionrecord. TheBLVTNAVsystemisworkingrelativelywithBinanceFutures,sosomeendpointsarebasedonfuturessystem: NewendpointtogethistoricalBLVTKline. NewWebSocketstreamsforBLVTInfoandBLVTNAVKline: 2020-09-09 USERDATASTREAM outboundAccountInfohasbeendeprecated. outboundAccountInfowillberemovedinthefuture.(Exactdateunknown)PleaseuseoutboundAccountPositioninstead. outboundAccountInfowillnowonlyshowthebalanceofnon-zeroassetsandassetsthathavebeenreducedto0. 2020-09-03 NewendpointPOST/sapi/v1/sub-account/futures/internalTransfertotransferfuturesassetbetweenmasteraccountandsubaccount. NewendpointGET/sapi/v1/sub-account/futures/internalTransfertogetfuturestransferhistoryofsubaccount. 2020-09-01 NewparametermasterAccountTotalAssetaddedintheendpointGET/sapi/v1/sub-account/spotSummarytogetBTCvaluedassetsummaryofmasteraccount. 2020-08-27 NewendpointGET/sapi/v1/sub-account/spotSummarytogetBTCvaluedassetsummaryofsubaccout. 2020-08-26 NewparametersymbolsaddedintheendpointGET/sapi/v1/margin/isolated/account. 2020-07-28 ISOLATEDMARGIN Newparameters"isIsolated"and"symbol"addedforisolatedmargininthefollowingendpoints: POST/sapi/v1/margin/loan POST/sapi/v1/margin/repay Newparameter"isIsolated"andnewresponsefield"isIsolated"addedforisolatedmargininthefollowingendpoints: 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 Newparameter"isolatedSymbol"andnewresponsefield"isolatedSymbol"addedforisolatedmargininthefollowingendpoints: GET/sapi/v1/margin/loan GET/sapi/v1/margin/repay GET/sapi/v1/margin/interestHistory Newparameter"isolatedSymbol"andnewresponsefield"isIsolated"addedforisolatedmargininthefollowingendpointGET/sapi/v1/margin/forceLiquidationRec Newparameter"isolatedSymbol"addedforisolatedmargininthefollowingendpoints: GET/sapi/v1/margin/maxBorrowable GET/sapi/v1/margin/maxTransferable Newendpointsforisolatedmargin: 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 NewendpointsforlistenKeymanagementofisolatedmarginaccount: POST/sapi/v1/userDataStream/isolated PUT/sapi/v1/userDataStream/isolated DELETE/sapi/v1/userDataStream/isolated 2020-07-20 Themaxvalueofparameter"limit"inGET/sapi/v1/margin/allOrdershasbeenchangedas500. 2020-07-17 Thereisnowarequestlimitspecificallyforthesapi/v1/margin/allOrdersendpointat60rawrequestsperminuteforasingleIPaddress. 2020-07-13 NewSAPIEndpointsforfuturesCross-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 SAPIEndpointsforfutures: POST/sapi/v1/futures/transfer GET/sapi/v1/futures/transfer 2020-05-06 NewendpointsforMining: 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-01 From2020-05-01UTC00:00,allsymbolswillhavealimitof200openordersusingtheMAX_NUM_ORDERSfilter. Noexistingorderswillberemovedorcanceled. Accountsthathave200ormoreopenordersonasymbolwillnotbeabletoplacenewordersonthatsymboluntiltheopenordercountisbelow200. OCOorderscountas2openordersbeforetheLIMITorderistouchedortheSTOP_LOSS(orSTOP_LOSS_LIMIT)orderistriggered;oncethishappenstheotherorderiscanceledandwillnolongercountasanopenorder. 2020-04-25 SPOTAPI Newfieldpermissions Definesthetradingpermissionsthatareallowedonaccountsandsymbols. permissionsisanenumarray;values: SPOT MARGIN permissionswillreplaceisSpotTradingAllowedandisMarginTradingAllowedonGETapi/v3/exchangeInfoinfutureAPIversions(v4+). Foranaccounttotradeonasymbol,theaccountandsymbolmustshareatleast1permissionincommon. UpdatestoGETapi/v3/exchangeInfo Newfieldpermissionsadded. NewfieldquoteAssetPrecisionadded;aduplicateofthequotePrecisionfield.quotePrecisionwillberemovedinfutureAPIversions(v4+). UpdatestoGETapi/v3/account Newfieldpermissionsadded. NewendpointDELETEapi/v3/openOrders Thiswillallowausertocancelallopenordersonasinglesymbol. ThisendpointwillcancelallopenordersincludingOCOorders. OrderscanbecanceledviatheAPIonsymbolsintheBREAKorHALTstatus. USERDATASTREAM OutboundAccountInfohasnewfieldPwhichshowsthetradingpermissionsoftheaccount. 2020-04-23 WEBSOCKETSTREAM WebSocketconnectionshavealimitof5incomingmessagespersecond.Amessageisconsidered: APINGframe APONGframe AJSONcontrolmessage(e.g.subscribe,unsubscribe) Aconnectionthatgoesbeyondthelimitwillbedisconnected;IPsthatarerepeatedlydisconnectedmaybebanned. Asingleconnectioncanlistentoamaximumof1024streams. 2020-04-16 NewfieldsinresponsetoendpointGET/sapi/v1/lending/daily/token/position: todayPurchasedAmountforuser'spurchasedamounttoday Newlendingendpointsforcustomizedfixedprojects: GET/sapi/v1/lending/project/list POST/sapi/v1/lending/customizedFixed/purchase GET/sapi/v1/lending/project/position/list 2020-04-02 NewfieldsinresponsetoendpointGET/sapi/v1/capital/config/getall: minConfirmforminnumberforbalanceconfirmation unLockConfirmforconfirmationnumberforbalanceunlock 2020-03-24 MAX_POSITIONfilteradded. Thisfilterdefinestheallowedmaximumpositionanaccountcanhaveonthebaseassetofasymbol.Anaccount'spositiondefinedasthesumoftheaccount's: freebalanceofthebaseasset lockedbalanceofthebaseasset sumoftheqtyofallopenBUYorders BUYorderswillberejectediftheaccount'spositionisgreaterthanthemaximumpositionallowed. 2020-03-13 NewparametertransactionFeeFlagisavailableinendpoint: POST/sapi/v1/capital/withdraw/applyand POST/wapi/v3/withdraw.html 2020-02-05 Newsubaccountendpoints: POST/sapi/v1/sub-account/futures/transfertotransferbetweenfuturesandspotaccoutofsub-account. POST/sapi/v1/sub-account/margin/transfertotransferbetweenmarginandspotaccoutofsub-account. POST/sapi/v1/sub-account/transfer/subToSubtotransfertoanotheraccountbysub-account. POST/sapi/v1/sub-account/transfer/subToMastertotransfertosamemasterbysub-account. GET/sapi/v1/sub-account/transfer/subUserHistorytogettransferhistoryofsub-account. 2020-01-15 NewparameterwithdrawOrderIdforclientcustomizedwithdrawidforendpointPOST/wapi/v3/withdraw.html. NewfieldwithdrawOrderIdinresponsetoGET/wapi/v3/withdrawHistory.html 2019-12-25 NewendpointsforBinanceSavings: 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 Addedtimeintervallimitin GET/sapi/v1/capital/withdraw/history, GET/wapi/v3/withdrawHistory.html, GET/sapi/v1/capital/deposit/hisrecand GET/wapi/v3/depositHistory.html: ThedefaultstartTimeis90daysfromcurrenttime,andthedefaultendTimeiscurrenttime. PleasenoticethedefaultstartTimeandendTimetomakesurethattimeintervaliswithin0-90days. IfbothstartTimeandendTimearesent,timebetweenstartTimeandendTimemustbelessthan90days. 2019-12-18 Newendpointtogetdailysnapshotofaccount: GET/sapi/v1/accountSnapshot 2019-11-30 AddedparametersideEffectTypeinPOST/sapi/v1/margin/order(HMACSHA256)withenums: NO_SIDE_EFFECTfornormaltradeorder; MARGIN_BUYformargintradeorder; AUTO_REPAYformakingautorepaymentafterorderfilled. NewfieldmarginBuyBorrowAmountandmarginBuyBorrowAssetinFULLresponsetoPOST/sapi/v1/margin/order(HMACSHA256) 2019-11-28 NewSAPIendponttodisablefastwithdrawswitch: POST/sapi/v1/account/disableFastWithdrawSwitch(HMACSHA256) NewSAPIendponttoenablefastwithdrawswitch: POST/sapi/v1/account/enableFastWithdrawSwitch(HMACSHA256) 2019-11-22 QuoteOrderQtyMarketordershavebeenenabledonallsymbols. QuoteOrderQtyMARKETordersallowausertospecifythetotalquoteOrderQtyspentorreceivedintheMARKETorder. QuoteOrderQtyMARKETorderswillnotbreakLOT_SIZEfilterrules;theorderwillexecuteaquantitythatwillhavethenotionalvalueascloseaspossibletoquoteOrderQty. UsingBNBBTCasanexample: OntheBUYside,theorderwillbuyasmanyBNBasquoteOrderQtyBTCcan. OntheSELLside,theorderwillsellasmuchBNBasneededtoreceivequoteOrderQtyBTC. 2019-11-19 GET/sapi/v1/sub-account/margin/accounthasnewfield: marginTradeCoeffVowhichcontains forceLiquidationBarforliquidationmarginratio marginCallBarformargincallmarginratio normalBarforinitialmarginratio 2019-11-13 RestAPI api/v3/exchangeInfohasnewfields: quoteOrderQtyMarketAllowed baseCommissionPrecision quoteCommissionPrecision MARKETordershaveanewoptionalfield:quoteOrderQtyusedtospecifythequotequantitytoBUYorSELL.Thiscannotbeusedincombinationwithquantity. TheexacttimingthatquoteOrderQtyMARKETorderswillbeenabledisTBD.Therewillbeaseparateannouncementandfurtherdetailsatthattime. AllorderqueryendpointswillreturnanewfieldorigQuoteOrderQtyintheJSONpayload.(e.g.GETapi/v3/allOrders) { "code":-1128, "msg":"Combinationofoptionalparametersinvalid.Recommendation:'stopLimitTimeInForce'shouldalsobesent." } Updatederrormessagesfor-1128 SendinganOCOwithastopLimitPricebutwithoutastopLimitTimeInForcewillreturntheerror: Updatederrormessagesfor-1003tospecifythelimitisreferringtotherequestweight,nottothenumberofrequests. Deprecationofv1endpoints: ByendofQ12020,thefollowingendpointswillberemovedfromtheAPI.Thedocumentationhasbeenupdatedtousethev3versionsoftheseendpoints. GETapi/v1/depth GETapi/v1/historicalTrades GETapi/v1/aggTrades GETapi/v1/klines GETapi/v1/ticker/24hr GETapi/v1/ticker/price GETapi/v1/exchangeInfo POSTapi/v1/userDataStream PUTapi/v1/userDataStream GETapi/v1/ping GETapi/v1/time GETapi/v1/ticker/bookTicker Theseendpointshowever,willNOTbemigratedtov3.Pleaseusethefollowingendpointsinsteadmovingforward. OldV1Endpoints NewV3Endpoints GETapi/v1/ticker/allPrices GETapi/v3/ticker/price GETapi/v1/ticker/allBookTickers GETapi/v3/ticker/bookTicker USERDATASTREAM ChangestoexecutionReportevent IftheCfieldisempty,itwillnowproperlyreturnnull,insteadof"null". NewfieldQwhichrepresentsthequoteOrderQty. balanceUpdateeventtypeadded Thiseventoccurswhenfundsaredepositedorwithdrawnfromyouraccount. WEBSOCKETSTREAM WSSnowsupportslivesubscribing/unsubscribingtostreams. 2019-11-08 Newsapiforsubaccountmanagementonmarginandfutures: GET/sapi/v1/sub-account/status(HMACSHA256) POST/sapi/v1/sub-account/margin/enable(HMACSHA256) GET/sapi/v1/sub-account/margin/account(HMACSHA256) GET/sapi/v1/sub-account/margin/accountSummary(HMACSHA256) POST/sapi/v1/sub-account/futures/enable(HMACSHA256) GET/sapi/v1/sub-account/futures/account(HMACSHA256) GET/sapi/v1/sub-account/futures/accountSummary(HMACSHA256) GET/sapi/v1/sub-account/futures/positionRisk(HMACSHA256) 2019-11-04 Newsapiendpointsforsubaccountwallet. GET/sapi/v1/capital/deposit/subAddress(HMACSHA256)):fetchsubaccountdepositaddress. GET/sapi/v1/capital/deposit/subHisrec(HMACSHA256)):fetchsubaccountdeposithistory. 2019-10-29 Newsapiendpointsforwallet. POST/sapi/v1/capital/withdraw/apply(HMACSHA256):withdraw. Get/sapi/v1/capital/withdraw/history(HMACSHA256):fetchwithdrawhistorywithnetwork. 2019-10-14 Newsapiendpointsforwallet. GET/sapi/v1/capital/config/getall(HMACSHA256):getallcoins'informationforuser. GET/sapi/v1/capital/deposit/hisrec(HMACSHA256):fetchdeposithistorywithnetwork. GET/sapi/v1/capital/deposit/address(HMACSHA256):fetchdepositaddresswithnetwork. 2019-10-11 AddedparameternetworkinPOST/wapi/v3/withdraw.htmlsothatassetcanbewithdrawedwithspecificnetwork. 2019-09-09 NewWebSocketstreamsforbookTickersadded:@bookTickerand!bookTicker. 2019-09-03 Fasterorderbookdatawith100msupdates:@depth@100msand@depth#@100ms Added"UpdateSpeed:"toWebsocketMarketStreams Removeddeprecatedv1endpointsasperpreviousannouncement: GETapi/v1/order GETapi/v1/openOrders POSTapi/v1/order DELETEapi/v1/order GETapi/v1/allOrders GETapi/v1/account GETapi/v1/myTrades 2019-08-16 GETapi/v1/depthlimitof10000hasbeentemporarilyremoved InQ42017,thefollowingendpointsweredeprecatedandremovedfromtheAPIdocumentation.TheyhavebeenpermanentlyremovedfromtheAPIasofthisversion.Weapologizefortheomissionfromtheoriginalchangelog: GETapi/v1/order GETapi/v1/openOrders POSTapi/v1/order DELETEapi/v1/order GETapi/v1/allOrders GETapi/v1/account GETapi/v1/myTrades Streams,endpoints,parameters,payloads,etc.describedinthedocumentsinthisrepositoryareconsideredofficialandsupported.Theuseofanyotherstreams,endpoints,parameters,orpayloads,etc.isnotsupported;usethematyourownriskandwithnoguarantees. 2019-09-15 RestAPI Newordertype:OCO("OneCancelstheOther") AnOCOhas2orders:(alsoknownaslegsinfinancialterms) STOP_LOSSorSTOP_LOSS_LIMITleg LIMIT_MAKERleg PriceRestrictions: SELLOrders:LimitPrice>LastPrice>StopPrice BUYOrders:LimitPriceS MINUTE=>M HOUR=>H DAY=>D NewHeadersX-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)willgiveyourcurrentusedrequestweightforthe(intervalNum)(intervalLetter)ratelimiter.Forexample,ifthereisaoneminuterequestrateweightlimiterset,youwillgetaX-MBX-USED-WEIGHT-1Mheaderintheresponse.ThelegacyheaderX-MBX-USED-WEIGHTwillstillbereturnedandwillrepresentthecurrentusedweightfortheoneminuterequestrateweightlimit. NewHeaderX-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)thatisupdatedonanyvalidorderplacementandtracksyourcurrentordercountfortheinterval;rejected/unsuccessfulordersarenotguaranteedtohaveX-MBX-ORDER-COUNT-**headersintheresponse. Eg.X-MBX-ORDER-COUNT-1Sfor"ordersper1second"andX-MBX-ORDER-COUNT-1Dforordersper"oneday" GETapi/v1/depthnowsupportslimit5000and10000;weightsare50and100respectively. GETapi/v1/exchangeInfohasanewparameterocoAllowed. USERDATASTREAM executionReporteventnowcontains"g"whichhastheorderListId;itwillbesetto-1fornon-OCOorders. NewEventTypelistStatus;listStatusissentonanupdatetoanyOCOorder. NewEventTypeoutboundAccountPosition;outboundAccountPositionissentanytimeanaccount'sbalancechangesandcontainstheassetsthatcouldhavechangedbytheeventthatgeneratedthebalancechange(adeposit,withdrawal,trade,orderplacement,orcancelation). NEWERRORS -1131BAD_RECV_WINDOW recvWindowmustbelessthan60000 -1099Notfound,authenticated,orauthorized Thisreplaceserrorcode-1999 NEW-2011ERRORS OCO_BAD_ORDER_PARAMS Aparameterforoneoftheordersisincorrect. OCO_BAD_PRICES Therelationshipofthepricesfortheordersisnotcorrect. UNSUPPORTED_ORD_OCO OCOordersarenotsupportedforthissymbol. 2019-03-12 RestAPI X-MBX-USED-WEIGHTheaderaddedtoRestAPIresponses. Retry-AfterheaderaddedtoRestAPI418and429responses. WhencancelingtheRestAPIcannowreturnerrorCode-1013OR-2011ifthesymbol'sstatusisn'tTRADING. api/v1/depthnolongerhastheignoredandempty[]. api/v3/myTradesnowreturnsquoteQty;theprice*qtyofforthetrade. Websocketstreams @depthand@depthXstreamsnolongerhavetheignoredandempty[]. Systemimprovements MatchingEnginestability/reliabilityimprovements. RestAPIperformanceimprovements. 2018-11-13 RestAPI CannowcancelordersthroughtheRestAPIduringatradingban. Newfilters:PERCENT_PRICE,MARKET_LOT_SIZE,MAX_NUM_ICEBERG_ORDERS. AddedRAW_REQUESTSratelimit.LimitsbasedonthenumberofrequestsoverXminutesregardlessofweight. /api/v3/ticker/priceincreasedtoweightof2foranosymbolquery. /api/v3/ticker/bookTickerincreasedweightof2foranosymbolquery. DELETE/api/v3/orderwillnowreturnanexecutionreportofthefinalstateoftheorder. MIN_NOTIONALfilterhastwonewparameters:applyToMarket(whetherornotthefilterisappliedtoMARKETorders)andavgPriceMins(thenumberofminutesoverwhichthepriceaveragedforthenotionalestimation). intervalNumaddedto/api/v1/exchangeInfolimits.intervalNumdescribestheamountoftheinterval.Forexample:intervalNum5,withintervalminute,means"every5minutes". Explanationfortheaveragepricecalculation: (qty*price)ofalltrades/sumofqtyofalltradesoverprevious5minutes. Ifthereisnotradeinthelast5minutes,ittakesthefirsttradethathappenedoutsideofthe5minwindow. Forexampleifthelasttradewas20minutesago,thattrade'spriceisthe5minaverage. Ifthereisnotradeonthesymbol,thereisnoaveragepriceandmarketorderscannotbeplaced. OnanewsymbolwithapplyToMarketenabledontheMIN_NOTIONALfilter,marketorderscannotbeplaceduntilthereisatleast1trade. Thecurrentaveragepricecanbecheckedhere:https://api.binance.com/api/v3/avgPrice?symbol= Forexample: https://api.binance.com/api/v3/avgPrice?symbol=BNBUSDT Userdatastream Lastquoteassettransactedquantity(asvariableY)addedtoexecutionreports.RepresentsthelastPrice*lastQty(L*l). 2018-07-18 RestAPI Newfilter:ICEBERG_PARTS POSTapi/v3/ordernewdefaultsfornewOrderRespType.ACK,RESULT,orFULL;MARKETandLIMITordertypesdefaulttoFULL,allotherordersdefaulttoACK. POSTapi/v3/orderRESULTandFULLresponsesnowhavecummulativeQuoteQty GETapi/v3/openOrderswithnosymbolweightreducedto40. GETapi/v3/ticker/24hrwithnosymbolweightreducedto40. MaxamountoftradesfromGET/api/v1/tradesincreasedto1000. MaxamountoftradesfromGET/api/v1/historicalTradesincreasedto1000. MaxamountofaggregatetradesfromGET/api/v1/aggTradesincreasedto1000. MaxamountofaggregatetradesfromGET/api/v1/klinesincreasedto1000. RestAPIOrderlookupsnowreturnupdateTimewhichrepresentsthelasttimetheorderwasupdated;timeistheordercreationtime. OrderlookupendpointswillnowreturncummulativeQuoteQty.IfcummulativeQuoteQtyis<0,itmeansthedataisn'tavailableforthisorderatthistime. REQUESTSratelimittypechangedtoREQUEST_WEIGHT.Thislimitwasalwayslogicallyrequestweightandthepreviousnameforitcausedconfusion. Userdatastream cummulativeQuoteQtyfieldaddedtoorderresponsesandexecutionreports(asvariableZ).Representsthecummulativeamountofthequotethathasbeenspent(withaBUYorder)orreceived(withaSELLorder).Historicalorderswillhaveavalue<0inthisfieldindicatingthedataisnotavailableatthistime.cummulativeQuoteQtydividedbycummulativeQtywillgivetheaveragepriceforanorder. O(ordercreationtime)addedtoexecutionreports 2018-01-23 GET/api/v1/historicalTradesweightdecreasedto5 GET/api/v1/aggTradesweightdecreasedto1 GET/api/v1/klinesweightdecreasedto1 GET/api/v1/ticker/24hrallsymbolsweightdecreasedtonumberoftradingsymbols/2 GET/api/v3/allOrdersweightdecreasedto5 GET/api/v3/myTradesweightdecreasedto5 GET/api/v3/accountweightdecreasedto5 GET/api/v1/depthlimit=500weightdecreasedto5 GET/api/v1/depthlimit=1000weightdecreasedto10 -1003errormessageupdatedtodirectuserstowebsockets 2018-01-20 GET/api/v1/ticker/24hrsinglesymbolweightdecreasedto1 GET/api/v3/openOrdersallsymbolsweightdecreasedtonumberoftradingsymbols/2 GET/api/v3/allOrdersweightdecreasedto15 GET/api/v3/myTradesweightdecreasedto15 GET/api/v3/orderweightdecreasedto1 myTradeswillnowreturnbothsidesofaself-trade/wash-trade 2018-01-14 GET/api/v1/aggTradesweightchangedto2 GET/api/v1/klinesweightchangedto2 GET/api/v3/orderweightchangedto2 GET/api/v3/allOrdersweightchangedto20 GET/api/v3/accountweightchangedto20 GET/api/v3/myTradesweightchangedto20 GET/api/v3/historicalTradesweightchangedto20 IntroductionAPIKeySetup SomeendpointswillrequireanAPIKey.PleaserefertothispageregardingAPIkeycreation. OnceAPIkeyiscreated,itisrecommendedtosetIPrestrictionsonthekeyforsecurityreasons. NevershareyourAPIkey/secretkeytoANYONE. IftheAPIkeyswereaccidentallyshared,pleasedeletethemimmediatelyandcreateanewkey. APIKeyRestrictions AftercreatingtheAPIkey,thedefaultrestrictionsisEnableReading. ToenablewithdrawalsviatheAPI,theAPIkeyrestrictionneedstobemodifiedthroughtheBinanceUI. EnablingAccountsSpotAccount ASPOTaccountisprovidedbydefaultuponcreationofaBinanceAccount. MarginAccount ToenableaMARGINaccountforMarginTrading,pleaserefertotheMarginTradingGuide SpotTestnet UserscanusetheSPOTTestnettopracticeSPOTtrading. Currently,thisisonlyavailableviatheAPI. PleaserefertotheSPOTTestnetpageformoreinformationandhowtosetuptheTestnetAPIkey. APILibraryPythonconnector ThisisalightweightlibrarythatworksasaconnectortoBinancepublicAPI,writteninPython. https://github.com/binance/binance-connector-python Node.jsconnector ThisisalightweightlibrarythatworksasaconnectortoBinancepublicAPI,writtenforNode.jsusers. https://github.com/binance/binance-connector-node Rubyconnector ThisisalightweightlibrarythatworksasaconnectortoBinancepublicAPI,writtenforRubyusers. https://github.com/binance/binance-connector-ruby DotNETconnector ThisisalightweightlibrarythatworksasaconnectortoBinancepublicAPI,writtenforC#users. https://github.com/binance/binance-connector-dotnet Javaconnector ThisisalightweightlibrarythatworksasaconnectortoBinancepublicAPI,writtenforJavausers. https://github.com/binance/binance-connector-java PostmanCollections ThereisnowaPostmancollectioncontainingtheAPIendpointsforquickandeasyuse. Thisisrecommendedfornewuserswhowanttogetaquick-startintousingtheAPI. Formoreinformationpleaserefertothispage:BinanceAPIPostman Swagger AYAMLfilewithOpenAPIspecificationontheRESTfulAPIisavailabletobeused,aswellasaSwaggerUIpagefortheconsulting. https://github.com/binance/binance-api-swagger ContactUs BinanceAPITelegramGroup ForanyquestionsinsuddendropinperformancewiththeAPIand/orWebsockets. ForanygeneralquestionsabouttheAPInotcoveredinthedocumentation. BinanceDevelopers ForanyquestionsonyourcodeimplementationwiththeAPIand/orWebsockets. BinanceCustomerSupport Forcasessuchasmissingfunds,helpwith2FA,etc. GeneralInfoGeneralAPIInformation Thebaseendpointis:https://api.binance.com Ifthereareperformanceissueswiththeendpointabove,theseAPIclustersarealsoavailable: https://api1.binance.com https://api2.binance.com https://api3.binance.com AllendpointsreturneitheraJSONobjectorarray. Dataisreturnedinascendingorder.Oldestfirst,newestlast. Alltimeandtimestamprelatedfieldsareinmilliseconds. HTTPReturnCodes HTTP4XXreturncodesareusedformalformedrequests; theissueisonthesender'sside. HTTP403returncodeisusedwhentheWAFLimit(WebApplicationFirewall)hasbeenviolated. HTTP409returncodeisusedwhenacancelReplaceorderpartiallysucceeds.(e.g.ifthecancellationoftheorderfailsbuttheneworderplacementsucceeds.) HTTP429returncodeisusedwhenbreakingarequestratelimit. HTTP418returncodeisusedwhenanIPhasbeenauto-bannedforcontinuingtosendrequestsafterreceiving429codes. HTTP5XXreturncodesareusedforinternalerrors;theissueison Binance'sside. ItisimportanttoNOTtreatthisasafailureoperation;theexecutionstatusis UNKNOWNandcouldhavebeenasuccess. ErrorCodesandMessages Ifthereisanerror,theAPIwillreturnanerrorwithamessageofthereason. TheerrorpayloadonAPIandSAPIisasfollows: { "code":-1121, "msg":"Invalidsymbol." } SpecificerrorcodesandmessagesdefinedinErrorCodes. GeneralInformationonEndpoints ForGETendpoints,parametersmustbesentasaquerystring. ForPOST,PUT,andDELETEendpoints,theparametersmaybesentasa querystringorintherequestbodywithcontenttype application/x-www-form-urlencoded.Youmaymixparametersbetweenboththe querystringandrequestbodyifyouwishtodoso. Parametersmaybesentinanyorder. Ifaparametersentinboththequerystringandrequestbody,the querystringparameterwillbeused. LIMITSGeneralInfoonLimits ThefollowingintervalLettervaluesforheaders: SECOND=>S MINUTE=>M HOUR=>H DAY=>D intervalNumdescribestheamountoftheinterval.Forexample,intervalNum5withintervalLetterMmeans"Every5minutes". The/api/v3/exchangeInforateLimitsarraycontainsobjectsrelatedtotheexchange'sRAW_REQUESTS,REQUEST_WEIGHT,andORDERSratelimits.ThesearefurtherdefinedintheENUMdefinitionssectionunderRatelimiters(rateLimitType). A429willbereturnedwheneitherratelimitisviolated. IPLimits EveryrequestwillcontainX-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)intheresponseheaderswhichhasthecurrentusedweightfortheIPforallrequestratelimitersdefined. Eachroutehasaweightwhichdeterminesforthenumberofrequestseachendpointcountsfor.Heavierendpointsandendpointsthatdooperationsonmultiplesymbolswillhaveaheavierweight. Whena429isreceived,it'syourobligationasanAPItobackoffandnotspamtheAPI. Repeatedlyviolatingratelimitsand/orfailingtobackoffafterreceiving429swillresultinanautomatedIPban(HTTPstatus418). IPbansaretrackedandscaleindurationforrepeatoffenders,from2minutesto3days. ARetry-Afterheaderissentwitha418or429responsesandwillgivethenumberofsecondsrequiredtowait,inthecaseofa429,topreventaban,or,inthecaseofa418,untilthebanisover. ThelimitsontheAPIarebasedontheIPs,nottheAPIkeys. Werecommendusingthewebsocketforgettingdataasmuchaspossible,asthiswillnotcounttotherequestratelimit. OrderRateLimits EverysuccessfulorderresponsewillcontainaX-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)headerwhichhasthecurrentordercountfortheaccountforallorderratelimitersdefined. Whentheordercountexceedsthelimit,youwillreceivea429errorwithouttheRetry-Afterheader.PleasechecktheOrderRateLimitrulesusingGETapi/v3/exchangeInfoandwaitforreactivationaccordingly. Rejected/unsuccessfulordersarenotguaranteedtohaveX-MBX-ORDER-COUNT-**headersintheresponse. Theorderratelimitiscountedagainsteachaccount. Tomonitorordercountusage,refertoGETapi/v3/rateLimit/order WebsocketLimits WebSocketconnectionshavealimitof5incomingmessagespersecond.Amessageisconsidered: APINGframe APONGframe AJSONcontrolledmessage(e.g.subscribe,unsubscribe) Aconnectionthatgoesbeyondthelimitwillbedisconnected;IPsthatarerepeatedlydisconnectedmaybebanned. Asingleconnectioncanlistentoamaximumof1024streams. /api/and/sapi/LimitIntroduction The/api/*and/sapi/*endpointsadopteitheroftwoaccesslimitingrules,IPlimitsorUID(account)limits. Endpointsrelatedto/api/*: AccordingtothetwomodesofIPandUID(account)limit,eachareindependent. Endpointssharethe1200perminutelimitbasedonIP. ResponsescontaintheheaderX-MBX-USED-WEIGHT-(intervalNum)(intervalLetter),definingtheweightusedbythecurrentIP. SuccessfulorderresponsescontaintheheaderX-MBX-ORDER-COUNT-(intervalNum)(intervalLetter),definingtheorderlimitusedbytheUID. Endpointsrelatedto/sapi/*: EndpointsaremarkedaccordingtoIPorUIDlimitandtheircorrespondingweightvalue. EachendpointwithIPlimitshasanindependent12000perminutelimit. EachendpointwithUIDlimitshasanindependent180000perminutelimit. ResponsesfromendpointswithIPlimitscontaintheheaderX-SAPI-USED-IP-WEIGHT-1M,definingtheweightusedbythecurrentIP. ResponsesfromendpointswithUIDlimitscontaintheheaderX-SAPI-USED-UID-WEIGHT-1M,definingtheweightusedbythecurrentUID. DataSources TheAPIsystemisasynchronous,sosomedelayintheresponseisnormalandexpected. Eachendpointhasadatasourceindicatingwherethedataisbeingretrieved,andthuswhichendpointshavethemostup-to-dateresponse. Thesearethethreesources,orderedbywhichishasthemostup-to-dateresponsetotheonewithpotentialdelaysinupdates. MatchingEngine-thedataisfromthematchingEngine Memory-thedataisfromaserver'slocalorexternalmemory Database-thedataistakendirectlyfromadatabase Someendpointscanhavemorethan1datasource.(e.g.Memory=>Database) ThismeansthattheendpointwillcheckthefirstDataSource,andifitcannotfindthevalueit'slookingforitwillcheckthenextone. Endpointsecuritytype Eachendpointhasasecuritytypethatdetermineshowyouwill interactwithit.ThisisstatednexttotheNAMEoftheendpoint. Ifnosecuritytypeisstated,assumethesecuritytypeisNONE. API-keysarepassedintotheRestAPIviatheX-MBX-APIKEY header. API-keysandsecret-keysarecasesensitive. API-keyscanbeconfiguredtoonlyaccesscertaintypesofsecureendpoints. Forexample,oneAPI-keycouldbeusedforTRADEonly,whileanotherAPI-key canaccesseverythingexceptforTRADEroutes. Bydefault,API-keyscanaccessallsecureroutes. SecurityType Description NONE Endpointcanbeaccessedfreely. TRADE EndpointrequiressendingavalidAPI-Keyandsignature. MARGIN EndpointrequiressendingavalidAPI-Keyandsignature. USER_DATA EndpointrequiressendingavalidAPI-Keyandsignature. USER_STREAM EndpointrequiressendingavalidAPI-Key. MARKET_DATA EndpointrequiressendingavalidAPI-Key. TRADE,MARGINandUSER_DATAendpointsareSIGNEDendpoints. SIGNED(TRADE,USER_DATA,ANDMARGIN)Endpointsecurity SIGNEDendpointsrequireanadditionalparameter,signature,tobe sentinthequerystringorrequestbody. EndpointsuseHMACSHA256signatures.TheHMACSHA256signatureisakeyedHMACSHA256operation. UseyoursecretKeyasthekeyandtotalParamsasthevaluefortheHMACoperation. Thesignatureisnotcasesensitive. totalParamsisdefinedasthequerystringconcatenatedwiththe requestbody. Timingsecurity ASIGNEDendpointalsorequiresaparameter,timestamp,tobesentwhich shouldbethemillisecondtimestampofwhentherequestwascreatedandsent. Anadditionalparameter,recvWindow,maybesenttospecifythenumberof millisecondsaftertimestamptherequestisvalidfor.IfrecvWindow isnotsent,itdefaultsto5000. Thelogicisasfollows: if(timestampseconds;m->minutes;h->hours;d->days;w->weeks;M->months 1s 1m 3m 5m 15m 30m 1h 2h 4h 6h 8h 12h 1d 3d 1w 1M Ratelimiters(rateLimitType) REQUEST_WEIGHT { "rateLimitType":"REQUEST_WEIGHT", "interval":"MINUTE", "intervalNum":1, "limit":1200 } ORDERS { "rateLimitType":"ORDERS", "interval":"SECOND", "intervalNum":10, "limit":100 }, { "rateLimitType":"ORDERS", "interval":"DAY", "intervalNum":1, "limit":200000 } RAW_REQUESTS { "rateLimitType":"RAW_REQUESTS", "interval":"MINUTE", "intervalNum":5, "limit":5000 } REQUEST_WEIGHT ORDERS RAW_REQUESTS Ratelimitintervals(interval) SECOND MINUTE DAY Filters Filtersdefinetradingrulesonasymboloranexchange. Filterscomeintwoforms:symbolfiltersandexchangefilters. SymbolFiltersPRICE_FILTER ExchangeInfoformat: { "filterType":"PRICE_FILTER", "minPrice":"0.00000100", "maxPrice":"100000.00000000", "tickSize":"0.00000100" } ThePRICE_FILTERdefinesthepricerulesforasymbol.Thereare3parts: minPricedefinestheminimumprice/stopPriceallowed;disabledonminPrice==0. maxPricedefinesthemaximumprice/stopPriceallowed;disabledonmaxPrice==0. tickSizedefinestheintervalsthataprice/stopPricecanbeincreased/decreasedby;disabledontickSize==0. Anyoftheabovevariablescanbesetto0,whichdisablesthatruleinthepricefilter.Inordertopassthepricefilter,thefollowingmustbetrueforprice/stopPriceoftheenabledrules: price>=minPrice price<=maxPrice price%tickSize==0 PERCENT_PRICE ExchangeInfoformat: { "filterType":"PERCENT_PRICE", "multiplierUp":"1.3000", "multiplierDown":"0.7000", "avgPriceMins":5 } ThePERCENT_PRICEfilterdefinesthevalidrangeforthepricebasedontheaverageoftheprevioustrades. avgPriceMinsisthenumberofminutestheaveragepriceiscalculatedover.0meansthelastpriceisused. Inordertopassthepercentprice,thefollowingmustbetrueforprice: price<=weightedAveragePrice*multiplierUp price>=weightedAveragePrice*multiplierDown PERCENT_PRICE_BY_SIDE ExchangeInfoformat: { "filterType":"PERCENT_PRICE_BY_SIDE", "bidMultiplierUp":"1.2", "bidMultiplierDown":"0.2", "askMultiplierUp":"5", "askMultiplierDown":"0.8", "avgPriceMins":1 } ThePERCENT_PRICE_BY_SIDEfilterdefinesthevalidrangeforthepricebasedontheaverageoftheprevioustrades. avgPriceMinsisthenumberofminutestheaveragepriceiscalculatedover.0meansthelastpriceisused. ThereisadifferentrangedependingonwhethertheorderisplacedontheBUYsideortheSELLside. Buyorderswillsucceedonthisfilterif: Orderprice<=weightedAveragePrice*bidMultiplierUp Orderprice>=weightedAveragePrice*bidMultiplierDown Sellorderswillsucceedonthisfilterif: OrderPrice<=weightedAveragePrice*askMultiplierUp OrderPrice>=weightedAveragePrice*askMultiplierDown LOT_SIZE ExchangeInfoformat: { "filterType":"LOT_SIZE", "minQty":"0.00100000", "maxQty":"100000.00000000", "stepSize":"0.00100000" } TheLOT_SIZEfilterdefinesthequantity(aka"lots"inauctionterms)rulesforasymbol.Thereare3parts: minQtydefinestheminimumquantity/icebergQtyallowed. maxQtydefinesthemaximumquantity/icebergQtyallowed. stepSizedefinestheintervalsthataquantity/icebergQtycanbeincreased/decreasedby. Inordertopassthelotsize,thefollowingmustbetrueforquantity/icebergQty: quantity>=minQty quantity<=maxQty (quantity-minQty)%stepSize==0 MIN_NOTIONAL ExchangeInfoformat: { "filterType":"MIN_NOTIONAL", "minNotional":"0.00100000", "applyToMarket":true, "avgPriceMins":5 } TheMIN_NOTIONALfilterdefinestheminimumnotionalvalueallowedforanorderonasymbol. Anorder'snotionalvalueistheprice*quantity. IftheorderisanAlgoorder(e.g.STOP_LOSS_LIMIT),thenthenotionalvalueofthestopPrice*quantitywillalsobeevaluated. IftheorderisanIcebergOrder,thenthenotionalvalueoftheprice*icebergQtywillalsobeevaluated. applyToMarketdetermineswhetherornottheMIN_NOTIONALfilterwillalsobeappliedtoMARKETorders. SinceMARKETordershavenoprice,theaveragepriceisusedoverthelastavgPriceMinsminutes. avgPriceMinsisthenumberofminutestheaveragepriceiscalculatedover.0meansthelastpriceisused. NOTIONAL ExchangeInfoformat: { "filterType":"NOTIONAL", "minNotional":"10.00000000", "applyMinToMarket":false, "maxNotional":"10000.00000000", "applyMaxToMarket":false, "avgPriceMins":5 } TheNOTIONALfilterdefinestheacceptablenotionalrangeallowedforanorderonasymbol. applyMinToMarketdetermineswhethertheminNotionalwillbeappliedtoMARKETorders. applyMaxToMarketdetermineswhetherthemaxNotionalwillbeappliedtoMARKETorders. Inordertopassthisfilter,thenotional(price*quantity)hastopassthefollowingconditions: price*quantity<=maxNotional price*quantity>=minNotional ForMARKETorders,theaveragepriceusedoverthelastavgPriceMinsminuteswillbeusedforcalculation. IftheavgPriceMinsis0,thenthelastpricewillbeused. ICEBERG_PARTS ExchangeInfoformat: { "filterType":"ICEBERG_PARTS", "limit":10 } TheICEBERG_PARTSfilterdefinesthemaximumpartsanicebergordercanhave.ThenumberofICEBERG_PARTSisdefinedasCEIL(qty/icebergQty). MARKET_LOT_SIZE ExchangeInfoformat: { "filterType":"MARKET_LOT_SIZE", "minQty":"0.00100000", "maxQty":"100000.00000000", "stepSize":"0.00100000" } TheMARKET_LOT_SIZEfilterdefinesthequantity(aka"lots"inauctionterms)rulesforMARKETordersonasymbol.Thereare3parts: minQtydefinestheminimumquantityallowed. maxQtydefinesthemaximumquantityallowed. stepSizedefinestheintervalsthataquantitycanbeincreased/decreasedby. Inordertopassthemarketlotsize,thefollowingmustbetrueforquantity: quantity>=minQty quantity<=maxQty (quantity-minQty)%stepSize==0 MAX_NUM_ORDERS ExchangeInfoformat: { "filterType":"MAX_NUM_ORDERS", "maxNumOrders":25 } TheMAX_NUM_ORDERSfilterdefinesthemaximumnumberofordersanaccountisallowedtohaveopenonasymbol. Notethatboth"algo"ordersandnormalordersarecountedforthisfilter. MAX_NUM_ALGO_ORDERS ExchangeInfoformat: { "filterType":"MAX_NUM_ALGO_ORDERS", "maxNumAlgoOrders":5 } TheMAX_NUM_ALGO_ORDERSfilterdefinesthemaximumnumberof"algo"ordersanaccountisallowedtohaveopenonasymbol. "Algo"ordersareSTOP_LOSS,STOP_LOSS_LIMIT,TAKE_PROFIT,andTAKE_PROFIT_LIMITorders. MAX_NUM_ICEBERG_ORDERS TheMAX_NUM_ICEBERG_ORDERSfilterdefinesthemaximumnumberofICEBERGordersanaccountisallowedtohaveopenonasymbol. AnICEBERGorderisanyorderwheretheicebergQtyis>0. ExchangeInfoformat: { "filterType":"MAX_NUM_ICEBERG_ORDERS", "maxNumIcebergOrders":5 } MAX_POSITION TheMAX_POSITIONfilterdefinestheallowedmaximumpositionanaccountcanhaveonthebaseassetofasymbol. Anaccount'spositiondefinedasthesumoftheaccount's: freebalanceofthebaseasset lockedbalanceofthebaseasset sumoftheqtyofallopenBUYorders BUYorderswillberejectediftheaccount'spositionisgreaterthanthemaximumpositionallowed. Ifanorder'squantitycancausethepositiontooverflow,thiswillalsofailtheMAX_POSITIONfilter. ExchangeInfoformat: { "filterType":"MAX_POSITION", "maxPosition":"10.00000000" } TRAILING_DELTA ExchangeInfoformat: { "filterType":"TRAILING_DELTA", "minTrailingAboveDelta":10, "maxTrailingAboveDelta":2000, "minTrailingBelowDelta":10, "maxTrailingBelowDelta":2000 } TheTRAILING_DELTAfilterdefinestheminimumandmaximumvaluefortheparametertrailingDelta. Inorderforatrailingstopordertopassthisfilter,thefollowingmustbetrue: ForSTOP_LOSSBUY,STOP_LOSS_LIMIT_BUY,TAKE_PROFITSELLandTAKE_PROFIT_LIMITSELLorders: trailingDelta>=minTrailingAboveDelta trailingDelta<=maxTrailingAboveDelta ForSTOP_LOSSSELL,STOP_LOSS_LIMITSELL,TAKE_PROFITBUY,andTAKE_PROFIT_LIMITBUYorders: trailingDelta>=minTrailingBelowDelta trailingDelta<=maxTrailingBelowDelta ExchangeFiltersEXCHANGE_MAX_NUM_ORDERS ExchangeInfoformat: { "filterType":"EXCHANGE_MAX_NUM_ORDERS", "maxNumOrders":1000 } TheEXCHANGE_MAX_NUM_ORDERSfilterdefinesthemaximumnumberofordersanaccountisallowedtohaveopenontheexchange. Notethatboth"algo"ordersandnormalordersarecountedforthisfilter. EXCHANGE_MAX_NUM_ALGO_ORDERS ExchangeInfoformat: { "filterType":"EXCHANGE_MAX_NUM_ALGO_ORDERS", "maxNumAlgoOrders":200 } TheEXCHANGE_MAX_NUM_ALGO_ORDERSfilterdefinesthemaximumnumberof"algo"ordersanaccountisallowedtohaveopenontheexchange. "Algo"ordersareSTOP_LOSS,STOP_LOSS_LIMIT,TAKE_PROFIT,andTAKE_PROFIT_LIMITorders. EXCHANGE_MAX_NUM_ICEBERG_ORDERS TheEXCHANGE_MAX_NUM_ICEBERG_ORDERSfilterdefinesthemaximumnumberoficebergordersanaccountisallowedtohaveopenontheexchange. ExchangeInfoformat: { "filterType":"EXCHANGE_MAX_NUM_ICEBERG_ORDERS", "maxNumIcebergOrders":10000 } WalletEndpointsSystemStatus(System) Response { "status":0,//0:normal,1:systemmaintenance "msg":"normal"//"normal","system_maintenance" } GET/sapi/v1/system/status Fetchsystemstatus. Weight(IP): 1 AllCoins'Information(USER_DATA) Getinformationofcoins(availablefordepositandwithdraw)foruser. Response: [ { "coin":"BTC", "depositAllEnable":true, "free":"0.08074558", "freeze":"0.00000000", "ipoable":"0.00000000", "ipoing":"0.00000000", "isLegalMoney":false, "locked":"0.00000000", "name":"Bitcoin", "networkList":[ { "addressRegex":"^(bnb1)[0-9a-z]{38}$", "coin":"BTC", "depositDesc":"WalletMaintenance,DepositSuspended",//shownonlywhen"depositEnable"isfalse. "depositEnable":false, "isDefault":false, "memoRegex":"^[0-9A-Za-z\\-_]{1,120}$", "minConfirm":1,//minnumberforbalanceconfirmation "name":"BEP2", "network":"BNB", "resetAddressStatus":false, "specialTips":"BothaMEMOandanAddressarerequiredtosuccessfullydeposityourBEP2-BTCBtokenstoBinance.", "unLockConfirm":0,//confirmationnumberforbalanceunlock "withdrawDesc":"WalletMaintenance,WithdrawalSuspended",//shownonlywhen"withdrawEnable"isfalse. "withdrawEnable":false, "withdrawFee":"0.00000220", "withdrawIntegerMultiple":"0.00000001", "withdrawMax":"9999999999.99999999", "withdrawMin":"0.00000440", "sameAddress":true,//Ifthecoinneedstoprovidememotowithdraw "estimatedArrivalTime":25, "busy":false }, { "addressRegex":"^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$|^(bc1)[0-9A-Za-z]{39,59}$", "coin":"BTC", "depositEnable":true, "isDefault":true, "memoRegex":"", "minConfirm":1, "name":"BTC", "network":"BTC", "resetAddressStatus":false, "specialTips":"", "unLockConfirm":2, "withdrawEnable":true, "withdrawFee":"0.00050000", "withdrawIntegerMultiple":"0.00000001", "withdrawMax":"750", "withdrawMin":"0.00100000", "sameAddress":false, "estimatedArrivalTime":25, "busy":false } ], "storage":"0.00000000", "trading":true, "withdrawAllEnable":true, "withdrawing":"0.00000000" } ] GET/sapi/v1/capital/config/getall(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES DailyAccountSnapshot(USER_DATA) Response: { "code":200,//200forsuccess;othersareerrorcodes "msg":"",//errormessage "snapshotVos":[ { "data":{ "balances":[ { "asset":"BTC", "free":"0.09905021", "locked":"0.00000000" }, { "asset":"USDT", "free":"1.89109409", "locked":"0.00000000" } ], "totalAssetOfBtc":"0.09942700" }, "type":"spot", "updateTime":1576281599000 } ] } OR { "code":200,//200forsuccess;othersareerrorcodes "msg":"",//errormessage "snapshotVos":[ { "data":{ "marginLevel":"2748.02909813", "totalAssetOfBtc":"0.00274803", "totalLiabilityOfBtc":"0.00000100", "totalNetAssetOfBtc":"0.00274750", "userAssets":[ { "asset":"XRP", "borrowed":"0.00000000", "free":"1.00000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"1.00000000" } ] }, "type":"margin", "updateTime":1576281599000 } ] } OR { "code":200,//200forsuccess;othersareerrorcodes "msg":"",//errormessage "snapshotVos":[ { "data":{ "assets":[ { "asset":"USDT", "marginBalance":"118.99782335", "walletBalance":"120.23811389" } ], "position":[ { "entryPrice":"7130.41000000", "markPrice":"7257.66239673", "positionAmt":"0.01000000", "symbol":"BTCUSDT", "unRealizedProfit":"1.24029054"//Onlyshowthevalueatthetimeofopeningtheposition } ] }, "type":"futures", "updateTime":1576281599000 } ] } GET/sapi/v1/accountSnapshot(HMACSHA256) Weight(IP): 2400 Parameters: Name Type Mandatory Description type STRING YES "SPOT","MARGIN","FUTURES" startTime LONG NO endTime LONG NO limit INT NO min7,max30,default7 recvWindow LONG NO timestamp LONG YES Thequerytimeperiodmustbelessthen30days Supportquerywithinthelastonemonthonly IfstartTimeandendTimenotsent,returnrecordsofthelast7daysbydefault DisableFastWithdrawSwitch(USER_DATA) Response: {} POST/sapi/v1/account/disableFastWithdrawSwitch(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES Caution: Thisrequestwilldisablefastwithdrawswitchunderyouraccount. Youneedtoenable"trade"optionfortheapikeywhichrequeststhisendpoint. EnableFastWithdrawSwitch(USER_DATA) Response: {} POST/sapi/v1/account/enableFastWithdrawSwitch(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES Thisrequestwillenablefastwithdrawswitchunderyouraccount. Youneedtoenable"trade"optionfortheapikeywhichrequeststhisendpoint. WhenFastWithdrawSwitchison,transferringfundstoaBinanceaccountwillbedoneinstantly.Thereisnoon-chaintransaction,notransactionIDandnowithdrawalfee. Withdraw(USER_DATA) Response: { "id":"7213fea8e94b4a5593d507237e5a555b" } POST/sapi/v1/capital/withdraw/apply(HMACSHA256) Submitawithdrawrequest. Weight(IP): 1 Parameters: Name Type Mandatory Description coin STRING YES withdrawOrderId STRING NO clientidforwithdraw network STRING NO address STRING YES addressTag STRING NO SecondaryaddressidentifierforcoinslikeXRP,XMRetc. amount DECIMAL YES transactionFeeFlag BOOLEAN NO Whenmakinginternaltransfer,trueforreturningthefeetothedestinationaccount;falseforreturningthefeebacktothedepartureaccount.Defaultfalse. name STRING NO Descriptionoftheaddress.Spaceinnameshouldbeencodedinto%20. walletType INTEGER NO Thewallettypeforwithdraw,0-spotwallet,1-fundingwallet.Defaultspotwallet recvWindow LONG NO timestamp LONG YES Ifnetworknotsend,returnwithdefaultnetworkofthecoin. YoucangetnetworkandisDefaultinnetworkListofacoinintheresponseofGet/sapi/v1/capital/config/getall(HMACSHA256). DepositHistory(supportingnetwork)(USER_DATA) Response: [ { "id":"769800519366885376", "amount":"0.001", "coin":"BNB", "network":"BNB", "status":0, "address":"bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23", "addressTag":"101764890", "txId":"98A3EA560C6B3336D348B6C83F0F95ECE4F1F5919E94BD006E5BF3BF264FACFC", "insertTime":1661493146000, "transferType":0, "confirmTimes":"1/1", "unlockConfirm":0, "walletType":0 }, { "id":"769754833590042625", "amount":"0.50000000", "coin":"IOTA", "network":"IOTA", "status":1, "address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW", "addressTag":"", "txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999", "insertTime":1599620082000, "transferType":0, "confirmTimes":"1/1", "unlockConfirm":0, "walletType":0 } ] GET/sapi/v1/capital/deposit/hisrec(HMACSHA256) Fetchdeposithistory. Weight(IP): 1 Parameters: Name Type Mandatory Description coin STRING NO status INT NO 0(0:pending,6:creditedbutcannotwithdraw,1:success) startTime LONG NO Default:90daysfromcurrenttimestamp endTime LONG NO Default:presenttimestamp offset INT NO Default:0 limit INT NO Default:1000,Max:1000 recvWindow LONG NO timestamp LONG YES txId STRING NO PleasenoticethedefaultstartTimeandendTimetomakesurethattimeintervaliswithin0-90days. IfbothstartTimeandendTimearesent,timebetweenstartTimeandendTimemustbelessthan90days. WithdrawHistory(supportingnetwork)(USER_DATA) Response: [ { "address":"0x94df8b352de7f46f64b01d3666bf6e936e44ce60", "amount":"8.91000000", "applyTime":"2019-10-1211:12:02", "coin":"USDT", "id":"b6ae22b3aa844210a7041aee7589627c", "withdrawOrderId":"WITHDRAWtest123",//willnotbereturnedifthere'snowithdrawOrderIdforthiswithdraw. "network":"ETH", "transferType":0,//1forinternaltransfer,0forexternaltransfer "status":6, "transactionFee":"0.004", "confirmNo":3,//confirmtimesforwithdraw "info":"Theaddressisnotvalid.Pleaseconfirmwiththerecipient",//reasonforwithdrawalfailure "txId":"0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268" }, { "address":"1FZdVHtiBqMrWdjPyRPULCUceZPJ2WLCsB", "amount":"0.00150000", "applyTime":"2019-09-2412:43:45", "coin":"BTC", "id":"156ec387f49b41df8724fa744fa82719", "network":"BTC", "status":6, "transactionFee":"0.004", "transferType":0,//1forinternaltransfer,0forexternaltransfer "confirmNo":2, "info":"", "txId":"60fd9007ebfddc753455f95fafa808c4302c836e4d1eebc5a132c36c1d8ac354" } ] GET/sapi/v1/capital/withdraw/history(HMACSHA256) Fetchwithdrawhistory. Weight(IP): 1 Parameters: Name Type Mandatory Description coin STRING NO withdrawOrderId STRING NO status INT NO 0(0:EmailSent,1:Cancelled2:AwaitingApproval3:Rejected4:Processing5:Failure6:Completed) offset INT NO limit INT NO Default:1000,Max:1000 startTime LONG NO Default:90daysfromcurrenttimestamp endTime LONG NO Default:presenttimestamp recvWindow LONG NO timestamp LONG YES networkmaynotbeintheresponseforoldwithdraw. PleasenoticethedefaultstartTimeandendTimetomakesurethattimeintervaliswithin0-90days. IfbothstartTimeandendTimearesent,timebetweenstartTimeandendTimemustbelessthan90days. IfwithdrawOrderIdissent,timebetweenstartTimeandendTimemustbelessthan7days. IfwithdrawOrderIdissent,startTimeandendTimearenotsent,willreturnlast7daysrecordsbydefault. DepositAddress(supportingnetwork)(USER_DATA) Response: { "address":"1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv", "coin":"BTC", "tag":"", "url":"https://btc.com/1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv" } GET/sapi/v1/capital/deposit/address(HMACSHA256) Fetchdepositaddresswithnetwork. Weight(IP): 10 Parameters: Name Type Mandatory Description coin STRING YES network STRING NO recvWindow LONG NO timestamp LONG YES Ifnetworkisnotsend,returnwithdefaultnetworkofthecoin. YoucangetnetworkandisDefaultinnetworkListintheresponseofGet/sapi/v1/capital/config/getall(HMACSHA256). AccountStatus(USER_DATA) Response: { "data":"Normal" } GET/sapi/v1/account/status Fetchaccountstatusdetail. Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES AccountAPITradingStatus(USER_DATA) Response: { "data":{//APItradingstatusdetail "isLocked":false,//APItradingfunctionislockedornot "plannedRecoverTime":0,//IfAPItradingfunctionislocked,thisistheplannedrecovertime "triggerCondition":{ "GCR":150,//NumberofGTCorders "IFER":150,//NumberofFOK/IOCorders "UFR":300//Numberoforders }, "updateTime":1547630471725 } } GET/sapi/v1/account/apiTradingStatus(HMACSHA256) Fetchaccountapitradingstatusdetail. Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES DustLog(USER_DATA) Response { "total":8,//Totalcountsofexchange "userAssetDribblets":[ { "operateTime":1615985535000, "totalTransferedAmount":"0.00132256",//TotaltransferedBNBamountforthisexchange. "totalServiceChargeAmount":"0.00002699",//Totalservicechargeamountforthisexchange. "transId":45178372831, "userAssetDribbletDetails":[//Detailsofthisexchange. { "transId":4359321, "serviceChargeAmount":"0.000009", "amount":"0.0009", "operateTime":1615985535000, "transferedAmount":"0.000441", "fromAsset":"USDT" }, { "transId":4359321, "serviceChargeAmount":"0.00001799", "amount":"0.0009", "operateTime":1615985535000, "transferedAmount":"0.00088156", "fromAsset":"ETH" } ] }, { "operateTime":1616203180000, "totalTransferedAmount":"0.00058795", "totalServiceChargeAmount":"0.000012", "transId":4357015, "userAssetDribbletDetails":[ { "transId":4357015, "serviceChargeAmount":"0.00001", "amount":"0.001", "operateTime":1616203180000, "transferedAmount":"0.00049", "fromAsset":"USDT" }, { "transId":4357015, "serviceChargeAmount":"0.000002", "amount":"0.0001", "operateTime":1616203180000, "transferedAmount":"0.00009795", "fromAsset":"ETH" } ] } ] } } GET/sapi/v1/asset/dribblet(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description startTime LONG NO endTime LONG NO recvWindow LONG NO timestamp LONG YES Onlyreturnlast100records Onlyreturnrecordsafter2020/12/01 GetAssetsThatCanBeConvertedIntoBNB(USER_DATA) Response { "details":[ { "asset":"ADA", "assetFullName":"ADA", "amountFree":"6.21",//Convertibleamount "toBTC":"0.00016848",//BTCamount "toBNB":"0.01777302",//BNBamount(Notdeductedcommissionfee) "toBNBOffExchange":"0.01741756",//BNBamount(Deductedcommissionfee) "exchange":"0.00035546"//Commissionfee } ], "totalTransferBtc":"0.00016848", "totalTransferBNB":"0.01777302", "dribbletPercentage":"0.02"//Commissionfee } POST/sapi/v1/asset/dust-btc(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES DustTransfer(USER_DATA) Response: { "totalServiceCharge":"0.02102542", "totalTransfered":"1.05127099", "transferResult":[ { "amount":"0.03000000", "fromAsset":"ETH", "operateTime":1563368549307, "serviceChargeAmount":"0.00500000", "tranId":2970932918, "transferedAmount":"0.25000000" }, { "amount":"0.09000000", "fromAsset":"LTC", "operateTime":1563368549404, "serviceChargeAmount":"0.01548000", "tranId":2970932918, "transferedAmount":"0.77400000" }, { "amount":"248.61878453", "fromAsset":"TRX", "operateTime":1563368549489, "serviceChargeAmount":"0.00054542", "tranId":2970932918, "transferedAmount":"0.02727099" } ] } POST/sapi/v1/asset/dust(HMACSHA256) ConvertdustassetstoBNB. Weight(UID): 10 Parameters: Name Type Mandatory Description asset ARRAY YES Theassetbeingconverted.Forexample:asset=BTC&asset=USDT recvWindow LONG NO timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. AssetDividendRecord(USER_DATA) Response: { "rows":[ { "id":1637366104, "amount":"10.00000000", "asset":"BHFT", "divTime":1563189166000, "enInfo":"BHFTdistribution", "tranId":2968885920 }, { "id":1631750237, "amount":"10.00000000", "asset":"BHFT", "divTime":1563189165000, "enInfo":"BHFTdistribution", "tranId":2968885920 } ], "total":2 } GET/sapi/v1/asset/assetDividend(HMACSHA256) Queryassetdividendrecord. Weight(IP): 10 Parameters: Name Type Mandatory Description asset STRING NO startTime LONG NO endTime LONG NO limit INT NO Default20,max500 recvWindow LONG NO timestamp LONG YES AssetDetail(USER_DATA) Response: { "CTR":{ "minWithdrawAmount":"70.00000000",//minwithdrawamount "depositStatus":false,//depositstatus(falseifALLofnetworks'arefalse) "withdrawFee":35,//withdrawfee "withdrawStatus":true,//withdrawstatus(falseifALLofnetworks'arefalse) "depositTip":"Delisted,DepositSuspended"//reason }, "SKY":{ "minWithdrawAmount":"0.02000000", "depositStatus":true, "withdrawFee":0.01, "withdrawStatus":true } } GET/sapi/v1/asset/assetDetail(HMACSHA256) FetchdetailsofassetssupportedonBinance. Weight(IP): 1 Parameters: Name Type Mandatory Description asset STRING NO recvWindow LONG NO timestamp LONG YES PleasegetnetworkandotherdepositorwithdrawdetailsfromGET/sapi/v1/capital/config/getall. TradeFee(USER_DATA) Response: [ { "symbol":"ADABNB", "makerCommission":"0.001", "takerCommission":"0.001" }, { "symbol":"BNBBTC", "makerCommission":"0.001", "takerCommission":"0.001" } ] GET/sapi/v1/asset/tradeFee(HMACSHA256) Fetchtradefee Weight(IP): 1 Parameters: Name Type Mandatory Description symbol STRING NO recvWindow LONG NO timestamp LONG YES UserUniversalTransfer(USER_DATA) Response: { "tranId":13526853623 } POST/sapi/v1/asset/transfer(HMACSHA256) YouneedtoenablePermitsUniversalTransferoptionfortheAPIKeywhichrequeststhisendpoint. Weight(IP): 1 Parameters: Name Type Mandatory Description type ENUM YES asset STRING YES amount DECIMAL YES fromSymbol STRING NO toSymbol STRING NO recvWindow LONG NO timestamp LONG YES fromSymbolmustbesentwhentypeareISOLATEDMARGIN_MARGINandISOLATEDMARGIN_ISOLATEDMARGIN toSymbolmustbesentwhentypeareMARGIN_ISOLATEDMARGINandISOLATEDMARGIN_ISOLATEDMARGIN ENUMoftransfertypes: MAIN_UMFUTURESpotaccounttransfertoUSDⓈ-MFuturesaccount MAIN_CMFUTURESpotaccounttransfertoCOIN-MFuturesaccount MAIN_MARGINSpotaccounttransfertoMargin(cross)account UMFUTURE_MAINUSDⓈ-MFuturesaccounttransfertoSpotaccount UMFUTURE_MARGINUSDⓈ-MFuturesaccounttransfertoMargin(cross)account CMFUTURE_MAINCOIN-MFuturesaccounttransfertoSpotaccount CMFUTURE_MARGINCOIN-MFuturesaccounttransfertoMargin(cross)account MARGIN_MAINMargin(cross)accounttransfertoSpotaccount MARGIN_UMFUTUREMargin(cross)accounttransfertoUSDⓈ-MFutures MARGIN_CMFUTUREMargin(cross)accounttransfertoCOIN-MFutures ISOLATEDMARGIN_MARGINIsolatedmarginaccounttransfertoMargin(cross)account MARGIN_ISOLATEDMARGINMargin(cross)accounttransfertoIsolatedmarginaccount ISOLATEDMARGIN_ISOLATEDMARGINIsolatedmarginaccounttransfertoIsolatedmarginaccount MAIN_FUNDINGSpotaccounttransfertoFundingaccount FUNDING_MAINFundingaccounttransfertoSpotaccount FUNDING_UMFUTUREFundingaccounttransfertoUMFUTUREaccount UMFUTURE_FUNDINGUMFUTUREaccounttransfertoFundingaccount MARGIN_FUNDINGMARGINaccounttransfertoFundingaccount FUNDING_MARGINFundingaccounttransfertoMarginaccount FUNDING_CMFUTUREFundingaccounttransfertoCMFUTUREaccount CMFUTURE_FUNDINGCMFUTUREaccounttransfertoFundingaccount QueryUserUniversalTransferHistory(USER_DATA) Response: { "total":2, "rows":[ { "asset":"USDT", "amount":"1", "type":"MAIN_UMFUTURE", "status":"CONFIRMED", "tranId":11415955596, "timestamp":1544433328000 }, { "asset":"USDT", "amount":"2", "type":"MAIN_UMFUTURE", "status":"CONFIRMED", "tranId":11366865406, "timestamp":1544433328000 } ] } GET/sapi/v1/asset/transfer(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description type ENUM YES startTime LONG NO endTime LONG NO current INT NO Default1 size INT NO Default10,Max100 fromSymbol STRING NO toSymbol STRING NO recvWindow LONG NO timestamp LONG YES fromSymbolmustbesentwhentypeareISOLATEDMARGIN_MARGINandISOLATEDMARGIN_ISOLATEDMARGIN toSymbolmustbesentwhentypeareMARGIN_ISOLATEDMARGINandISOLATEDMARGIN_ISOLATEDMARGIN Supportquerywithinthelast6monthsonly IfstartTimeandendTimenotsent,returnrecordsofthelast7daysbydefault FundingWallet(USER_DATA) Response [ { "asset":"USDT", "free":"1",//avaliblebalance "locked":"0",//lockedasset "freeze":"0",//freezeasset "withdrawing":"0", "btcValuation":"0.00000091" } ] POST/sapi/v1/asset/get-funding-asset(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description asset STRING NO needBtcValuation STRING NO trueorfalse recvWindow LONG NO timestamp LONG YES Currentlysupportsqueryingthefollowingbusinessassets:BinancePay,BinanceCard,BinanceGiftCard,StockToken UserAsset(USER_DATA) Response [ { "asset":"AVAX", "free":"1", "locked":"0", "freeze":"0", "withdrawing":"0", "ipoable":"0", "btcValuation":"0" }, { "asset":"BCH", "free":"0.9", "locked":"0", "freeze":"0", "withdrawing":"0", "ipoable":"0", "btcValuation":"0" }, { "asset":"BNB", "free":"887.47061626", "locked":"0", "freeze":"10.52", "withdrawing":"0.1", "ipoable":"0", "btcValuation":"0" }, { "asset":"BUSD", "free":"9999.7", "locked":"0", "freeze":"0", "withdrawing":"0", "ipoable":"0", "btcValuation":"0" }, { "asset":"SHIB", "free":"532.32", "locked":"0", "freeze":"0", "withdrawing":"0", "ipoable":"0", "btcValuation":"0" }, { "asset":"USDT", "free":"50300000001.44911105", "locked":"0", "freeze":"0", "withdrawing":"0", "ipoable":"0", "btcValuation":"0" }, { "asset":"WRZ", "free":"1", "locked":"0", "freeze":"0", "withdrawing":"0", "ipoable":"0", "btcValuation":"0" } ] POST/sapi/v3/asset/getUserAsset Getuserassets,justforpositivedata. Weight(IP): 5 Parameters: Name Type Mandatory Description asset STRING NO Ifassetisblank,thenqueryallpositiveassetsuserhave. needBtcValuation BOOLEAN NO Whetherneedbtcvaluationornot. recvWindow LONG NO timestamp LONG YES Ifassetisset,thenreturnthisasset,otherwisereturnallassetspositive. IfneedBtcValuationisset,thenreturnbtcValudation. ConvertTransfer(TRADE) Response { "tranId":118263407119, "status":"S" } POST/sapi/v1/asset/convert-transfer Converttransfer,convertbetweenBUSDandstablecoins. Weight(UID): 5 Parameters: Name Type Mandatory Description clientTranId STRING YES Theuniqueflag,theminlengthis20 asset STRING YES Thecurrentasset amount BigDecimal YES Theamountmustbepositivenumber targetAsset String YES Targetassetyouwanttoconvert IftheclientTranIdhasbeenusedbefore,willnotdotheconverttransfer,theoriginaltransferwillbereturned. QueryConvertTransfer(USER_DATA) Response { "total":3, "rows": [ { "tranId":118263615991, "type":244, "time":1664442078000, "deductedAsset":"BUSD", "deductedAmount":"1", "targetAsset":"USDC", "targetAmount":"1", "status":"S", "accountType":"MAIN" },{ "tranId":118263598801, "type":244, "time":1664442061000, "deductedAsset":"BUSD", "deductedAmount":"1", "targetAsset":"USDC", "targetAmount":"1", "status":"S", "accountType":"MAIN" },{ "tranId":118263407119, "type":244, "time":1664441820000, "deductedAsset":"BUSD", "deductedAmount":"1", "targetAsset":"USDC", "targetAmount":"1", "status":"S", "accountType":"MAIN" } ] } POST/sapi/v1/asset/convert-transfer/queryByPage Weight(UID): 5 Parameters: Name Type Mandatory Description tranId LONG NO Thetransactionid asset STRING NO Ifitisblank,wewillmatchdeductedassetandtargetasset. startTime LONG YES inclusive,unit:ms endTime LONG YES exclusive,unit:ms accountType STRING NO MAIN:mainaccount.CARD:fundingaccount.Ifitisblank,wewillqueryspotandcardwallet,otherwise,wejustquerythecorrespondingwallet current INTEGER NO currentpage,default1,theminvalueis1 size INTEGER NO pagesize,default10,themaxvalueis100 GetAPIKeyPermission(USER_DATA) Response { "ipRestrict":false, "createTime":1623840271000, "enableWithdrawals":false,//ThisoptionallowsyoutowithdrawviaAPI.YoumustapplytheIPAccessRestrictionfilterinordertoenablewithdrawals "enableInternalTransfer":true,//Thisoptionauthorizesthiskeytotransferfundsbetweenyourmasteraccountandyoursubaccountinstantly "permitsUniversalTransfer":true,//AuthorizesthiskeytobeusedforadedicateduniversaltransferAPItotransfermultiplesupportedcurrencies.Eachbusiness'sowntransferAPIrightsarenotaffectedbythisauthorization "enableVanillaOptions":false,//AuthorizesthiskeytoVanillaoptionstrading "enableReading":true, "enableFutures":false,//APIKeycreatedbeforeyourfuturesaccountopeneddoesnotsupportfuturesAPIservice "enableMargin":false,//ThisoptioncanbeadjustedaftertheCrossMarginaccounttransferiscompleted "enableSpotAndMarginTrading":false,//Spotandmargintrading "tradingAuthorityExpirationTime":1628985600000//Expirationtimeforspotandmargintradingpermission } GET/sapi/v1/account/apiRestrictions(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES Sub-AccountEndpoints TheendpointsdocumentedinthissectionareforCorporateAccounts. Tobecomeacorporateaccount,pleaserefertothisdocument:CorporateAccountApplication CreateaVirtualSub-account(ForMasterAccount) Response: { "email":"[email protected]" } POST/sapi/v1/sub-account/virtualSubAccount(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description subAccountString STRING YES Pleaseinputastring.Wewillcreateavirtualemailusingthatstringforyoutoregister recvWindow LONG NO timestamp LONG YES Thisrequestwillgenerateavirtualsubaccountunderyourmasteraccount. Youneedtoenable"trade"optionfortheAPIKeywhichrequeststhisendpoint. QuerySub-accountList(ForMasterAccount) Response: { "subAccounts":[ { "email":"[email protected]", "isFreeze":false, "createTime":1544433328000, "isManagedSubAccount":false, "isAssetManagementSubAccount":false }, { "email":"[email protected]", "isFreeze":false, "createTime":1544433328000, "isManagedSubAccount":false, "isAssetManagementSubAccount":false } ] } GET/sapi/v1/sub-account/list(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING NO Sub-accountemail isFreeze STRING NO trueorfalse page INT NO Defaultvalue:1 limit INT NO Defaultvalue:1,Maxvalue:200 recvWindow LONG NO timestamp LONG YES QuerySub-accountSpotAssetTransferHistory(ForMasterAccount) Response: [ { "from":"[email protected]", "to":"[email protected]", "asset":"BTC", "qty":"10", "status":"SUCCESS", "tranId":6489943656, "time":1544433328000 }, { "from":"[email protected]", "to":"[email protected]", "asset":"ETH", "qty":"2", "status":"SUCCESS", "tranId":6489938713, "time":1544433328000 } ] GET/sapi/v1/sub-account/sub/transfer/history(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description fromEmail STRING NO toEmail STRING NO startTime LONG NO endTime LONG NO page INT NO Defaultvalue:1 limit INT NO Defaultvalue:500 recvWindow LONG NO timestamp LONG YES fromEmailandtoEmailcannotbesentatthesametime. ReturnfromEmailequalmasteraccountemailbydefault. QuerySub-accountFuturesAssetTransferHistory(ForMasterAccount) Response { "success":true, "futuresType":2, "transfers":[ { "from":"[email protected]", "to":"[email protected]", "asset":"BTC", "qty":"1", "tranId":11897001102, "time":1544433328000 }, { "from":"[email protected]", "to":"[email protected]", "asset":"ETH", "qty":"2", "tranId":11631474902, "time":1544433328000 } ] } GET/sapi/v1/sub-account/futures/internalTransfer(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail futuresType LONG YES 1:USDT-marginedFutures,2:Coin-marginedFutures startTime LONG NO Defaultreturnthehistorywithin100days endTime LONG NO Defaultreturnthehistorywithin100days page INT NO Defaultvalue:1 limit INT NO Defaultvalue:50,Maxvalue:500 recvWindow LONG NO timestamp LONG YES Sub-accountFuturesAssetTransfer(ForMasterAccount) Response { "success":true, "txnId":"2934662589" } POST/sapi/v1/sub-account/futures/internalTransfer(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description fromEmail STRING YES Senderemail toEmail STRING YES Recipientemail futuresType LONG YES 1:USDT-marginedFutures,2:Coin-marginedFutures asset STRING YES amount DECIMAL YES recvWindow LONG NO timestamp LONG YES Masteraccountcantransfermax2000timesaminute Theremustbesufficientmarginbalanceinfutureswallettoexecutetransferring. QuerySub-accountAssets(ForMasterAccount) Response: { "balances":[ { "asset":"ADA", "free":10000, "locked":0 }, { "asset":"BNB", "free":10003, "locked":0 }, { "asset":"BTC", "free":11467.6399, "locked":0 }, { "asset":"ETH", "free":10004.995, "locked":0 }, { "asset":"USDT", "free":11652.14213, "locked":0 } ] } GET/sapi/v3/sub-account/assets(HMACSHA256) Fetchsub-accountassets Weight(UID): 60 Parameters: Name Type Mandatory Description email STRING YES Subaccountemail recvWindow LONG NO timestamp LONG YES QuerySub-accountSpotAssetsSummary(ForMasterAccount) Response: { "totalCount":2, "masterAccountTotalAsset":"0.23231201", "spotSubUserAssetBtcVoList":[ { "email":"[email protected]", "totalAsset":"9999.00000000" }, { "email":"[email protected]", "totalAsset":"0.00000000" } ] } GetBTCvaluedassetsummaryofsubaccounts. GET/sapi/v1/sub-account/spotSummary(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING NO Subaccountemail page LONG NO default1 size LONG NO default10,max20 recvWindow LONG NO timestamp LONG YES GetSub-accountDepositAddress(ForMasterAccount) Response: { "address":"TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV", "coin":"USDT", "tag":"", "url":"https://tronscan.org/#/address/TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV" } GET/sapi/v1/capital/deposit/subAddress(HMACSHA256) Fetchsub-accountdepositaddress Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING YES Subaccountemail coin STRING YES network STRING NO recvWindow LONG NO timestamp LONG YES GetSub-accountDepositHistory(ForMasterAccount) Response: [ { "id":"769800519366885376", "amount":"0.001", "coin":"BNB", "network":"BNB", "status":0, "address":"bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23", "addressTag":"101764890", "txId":"98A3EA560C6B3336D348B6C83F0F95ECE4F1F5919E94BD006E5BF3BF264FACFC", "insertTime":1661493146000, "transferType":0, "confirmTimes":"1/1", "unlockConfirm":0, "walletType":0 }, { "id":"769754833590042625", "amount":"0.50000000", "coin":"IOTA", "network":"IOTA", "status":1, "address":"SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW", "addressTag":"", "txId":"ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999", "insertTime":1599620082000, "transferType":0, "confirmTimes":"1/1", "unlockConfirm":0, "walletType":0 } ] GET/sapi/v1/capital/deposit/subHisrec(HMACSHA256) Fetchsub-accountdeposithistory Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING YES Subaccountemail coin STRING NO status INT NO 0(0:pending,6:creditedbutcannotwithdraw,1:success) startTime LONG NO endTime LONG NO limit INT NO offset INT NO default:0 recvWindow LONG NO timestamp LONG YES txId STRING NO GetSub-account'sStatusonMargin/Futures(ForMasterAccount) Response [ { "email":"[email protected]",//useremail "isSubUserEnabled":true,//trueorfalse "isUserActive":true,//trueorfalse "insertTime":1570791523523,//subaccountcreatetime "isMarginEnabled":true,//trueorfalseformargin "isFutureEnabled":true,//trueorfalseforfutures. "mobile":1570791523523//usermobilenumber } ] GET/sapi/v1/sub-account/status(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description email STRING NO Sub-accountemail recvWindow LONG NO timestamp LONG YES Ifnoemailsent,allsub-accounts'informationwillbereturned. EnableMarginforSub-account(ForMasterAccount) Response { "email":"[email protected]", "isMarginEnabled":true } POST/sapi/v1/sub-account/margin/enable(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail recvWindow LONG NO timestamp LONG YES GetDetailonSub-account'sMarginAccount(ForMasterAccount) Response { "email":"[email protected]", "marginLevel":"11.64405625", "totalAssetOfBtc":"6.82728457", "totalLiabilityOfBtc":"0.58633215", "totalNetAssetOfBtc":"6.24095242", "marginTradeCoeffVo": { "forceLiquidationBar":"1.10000000",//Liquidationmarginratio "marginCallBar":"1.50000000",//Margincallmarginratio "normalBar":"2.00000000"//Initialmarginratio }, "marginUserAssetVoList":[ { "asset":"BTC", "borrowed":"0.00000000", "free":"0.00499500", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"0.00499500" }, { "asset":"BNB", "borrowed":"201.66666672", "free":"2346.50000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"2144.83333328" }, { "asset":"ETH", "borrowed":"0.00000000", "free":"0.00000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"0.00000000" }, { "asset":"USDT", "borrowed":"0.00000000", "free":"0.00000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"0.00000000" } ] } GET/sapi/v1/sub-account/margin/account(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail recvWindow LONG NO timestamp LONG YES GetSummaryofSub-account'sMarginAccount(ForMasterAccount) Response { "totalAssetOfBtc":"4.33333333", "totalLiabilityOfBtc":"2.11111112", "totalNetAssetOfBtc":"2.22222221", "subAccountList":[ { "email":"[email protected]", "totalAssetOfBtc":"2.11111111", "totalLiabilityOfBtc":"1.11111111", "totalNetAssetOfBtc":"1.00000000" }, { "email":"[email protected]", "totalAssetOfBtc":"2.22222222", "totalLiabilityOfBtc":"1.00000001", "totalNetAssetOfBtc":"1.22222221" } ] } GET/sapi/v1/sub-account/margin/accountSummary(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES EnableFuturesforSub-account(ForMasterAccount) Response { "email":"[email protected]", "isFuturesEnabled":true//trueorfalse } POST/sapi/v1/sub-account/futures/enable(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail recvWindow LONG NO timestamp LONG YES GetDetailonSub-account'sFuturesAccount(ForMasterAccount) Response { "email":"[email protected]", "asset":"USDT", "assets":[ { "asset":"USDT", "initialMargin":"0.00000000", "maintenanceMargin":"0.00000000", "marginBalance":"0.88308000", "maxWithdrawAmount":"0.88308000", "openOrderInitialMargin":"0.00000000", "positionInitialMargin":"0.00000000", "unrealizedProfit":"0.00000000", "walletBalance":"0.88308000" } ], "canDeposit":true, "canTrade":true, "canWithdraw":true, "feeTier":2, "maxWithdrawAmount":"0.88308000", "totalInitialMargin":"0.00000000", "totalMaintenanceMargin":"0.00000000", "totalMarginBalance":"0.88308000", "totalOpenOrderInitialMargin":"0.00000000", "totalPositionInitialMargin":"0.00000000", "totalUnrealizedProfit":"0.00000000", "totalWalletBalance":"0.88308000", "updateTime":1576756674610 } GET/sapi/v1/sub-account/futures/account(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail recvWindow LONG NO timestamp LONG YES GetSummaryofSub-account'sFuturesAccount(ForMasterAccount) Response { "totalInitialMargin":"9.83137400", "totalMaintenanceMargin":"0.41568700", "totalMarginBalance":"23.03235621", "totalOpenOrderInitialMargin":"9.00000000", "totalPositionInitialMargin":"0.83137400", "totalUnrealizedProfit":"0.03219710", "totalWalletBalance":"22.15879444", "asset":"USD",//ThesumofBUSDandUSDT "subAccountList":[ { "email":"[email protected]", "totalInitialMargin":"9.00000000", "totalMaintenanceMargin":"0.00000000", "totalMarginBalance":"22.12659734", "totalOpenOrderInitialMargin":"9.00000000", "totalPositionInitialMargin":"0.00000000", "totalUnrealizedProfit":"0.00000000", "totalWalletBalance":"22.12659734", "asset":"USD"//ThesumofBUSDandUSDT }, { "email":"[email protected]", "totalInitialMargin":"0.83137400", "totalMaintenanceMargin":"0.41568700", "totalMarginBalance":"0.90575887", "totalOpenOrderInitialMargin":"0.00000000", "totalPositionInitialMargin":"0.83137400", "totalUnrealizedProfit":"0.03219710", "totalWalletBalance":"0.87356177", "asset":"USD" } ] } GET/sapi/v1/sub-account/futures/accountSummary(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES GetFuturesPosition-RiskofSub-account(ForMasterAccount) Response [ { "entryPrice":"9975.12000", "leverage":"50",//currentinitialleverage "maxNotional":"1000000",//notionalvaluelimitofcurrentinitialleverage "liquidationPrice":"7963.54", "markPrice":"9973.50770517", "positionAmount":"0.010", "symbol":"BTCUSDT", "unrealizedProfit":"-0.01612295" } ] GET/sapi/v1/sub-account/futures/positionRisk(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail recvWindow LONG NO timestamp LONG YES FuturesTransferforSub-account(ForMasterAccount) Response { "txnId":"2966662589" } POST/sapi/v1/sub-account/futures/transfer(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail asset STRING YES Theassetbeingtransferred,e.g.,USDT amount DECIMAL YES Theamounttobetransferred type INT YES 1:transferfromsubaccount'sspotaccounttoitsUSDT-marginedfuturesaccount2:transferfromsubaccount'sUSDT-marginedfuturesaccounttoitsspotaccount3:transferfromsubaccount'sspotaccounttoitsCOIN-marginedfuturesaccount4:transferfromsubaccount'sCOIN-marginedfuturesaccounttoitsspotaccount recvWindow LONG NO timestamp LONG YES MarginTransferforSub-account(ForMasterAccount) Response { "txnId":"2966662589" } POST/sapi/v1/sub-account/margin/transfer(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail asset STRING YES Theassetbeingtransferred,e.g.,BTC amount DECIMAL YES Theamounttobetransferred type INT YES 1:transferfromsubaccount'sspotaccounttomarginaccount2:transferfromsubaccount'smarginaccounttoitsspotaccount recvWindow LONG NO timestamp LONG YES TransfertoSub-accountofSameMaster(ForSub-account) Response { "txnId":"2966662589" } POST/sapi/v1/sub-account/transfer/subToSub(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description toEmail STRING YES Sub-accountemail asset STRING YES amount DECIMAL YES recvWindow LONG NO timestamp LONG YES TransfertoMaster(ForSub-account) Response { "txnId":"2966662589" } POST/sapi/v1/sub-account/transfer/subToMaster(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description asset STRING YES amount DECIMAL YES recvWindow LONG NO timestamp LONG YES Sub-accountTransferHistory(ForSub-account) Response [ { "counterParty":"master", "email":"[email protected]", "type":1,//1fortransferin,2fortransferout "asset":"BTC", "qty":"1", "fromAccountType":"SPOT", "toAccountType":"SPOT", "status":"SUCCESS", "tranId":11798835829, "time":1544433325000 }, { "counterParty":"subAccount", "email":"[email protected]", "type":1, "asset":"ETH", "qty":"2", "fromAccountType":"SPOT", "toAccountType":"SPOT", "status":"SUCCESS", "tranId":11798829519, "time":1544433326000 } ] GET/sapi/v1/sub-account/transfer/subUserHistory(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description asset STRING NO Ifnotsent,resultofallassetswillbereturned type INT NO 1:transferin,2:transferout startTime LONG NO endTime LONG NO limit INT NO Default500 recvWindow LONG NO timestamp LONG YES Iftypeisnotsent,therecordsoftype2:transferoutwillbereturnedbydefault. IfstartTimeandendTimearenotsent,therecent30-daydatawillbereturned. UniversalTransfer(ForMasterAccount) Response { "tranId":11945860693, "clientTranId":"test" } POST/sapi/v1/sub-account/universalTransfer(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description fromEmail STRING NO toEmail STRING NO fromAccountType STRING YES "SPOT","USDT_FUTURE","COIN_FUTURE","MARGIN"(Cross),"ISOLATED_MARGIN" toAccountType STRING YES "SPOT","USDT_FUTURE","COIN_FUTURE","MARGIN"(Cross),"ISOLATED_MARGIN" clientTranId STRING NO Mustbeunique symbol STRING NO OnlysupportedunderISOLATED_MARGINtype asset STRING YES amount DECIMAL YES recvWindow LONG NO timestamp LONG YES Youneedtoenable"internaltransfer"optionfortheapikeywhichrequeststhisendpoint. TransferfrommasteraccountbydefaultiffromEmailisnotsent. TransfertomasteraccountbydefaultiftoEmailisnotsent. AtleasteitherfromEmailortoEmailneedtobesent. Supportedtransferscenarios: SPOTtransfertoSPOT,USDT_FUTURE,COIN_FUTURE(regardlessofmasterorsub) SPOT,USDT_FUTURE,COIN_FUTUREtransfertoSPOT(regardlessofmasterorsub) MasteraccountSPOTtransfertosub-accountMARGIN(Cross),ISOLATED_MARGIN Sub-accountMARGIN(Cross),ISOLATED_MARGINtransfertomasteraccountSPOT QueryUniversalTransferHistory(ForMasterAccount) Response { "result":[ { "tranId":92275823339, "fromEmail":"[email protected]", "toEmail":"[email protected]", "asset":"BNB", "amount":"0.01", "createTimeStamp":1640317374000, "fromAccountType":"USDT_FUTURE", "toAccountType":"SPOT", "status":"SUCCESS", "clientTranId":"test" } ], "totalCount":1 } GET/sapi/v1/sub-account/universalTransfer(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description fromEmail STRING NO toEmail STRING NO clientTranId STRING NO startTime LONG NO endTime LONG NO page INT NO Default1 limit INT NO Default500,Max500 recvWindow LONG NO timestamp LONG YES fromEmailandtoEmailcannotbesentatthesametime. ReturnfromEmailequalmasteraccountemailbydefault. Thequerytimeperiodmustbelessthen30days. IfstartTimeandendTimenotsent,returnrecordsofthelast30daysbydefault. GetDetailonSub-account'sFuturesAccountV2(ForMasterAccount) Response USDTMarginedFutures: { "futureAccountResp":{ "email":"[email protected]", "assets":[ { "asset":"USDT", "initialMargin":"0.00000000", "maintenanceMargin":"0.00000000", "marginBalance":"0.88308000", "maxWithdrawAmount":"0.88308000", "openOrderInitialMargin":"0.00000000", "positionInitialMargin":"0.00000000", "unrealizedProfit":"0.00000000", "walletBalance":"0.88308000" } ], "canDeposit":true, "canTrade":true, "canWithdraw":true, "feeTier":2, "maxWithdrawAmount":"0.88308000", "totalInitialMargin":"0.00000000", "totalMaintenanceMargin":"0.00000000", "totalMarginBalance":"0.88308000", "totalOpenOrderInitialMargin":"0.00000000", "totalPositionInitialMargin":"0.00000000", "totalUnrealizedProfit":"0.00000000", "totalWalletBalance":"0.88308000", "updateTime":1576756674610 } } COINMarginedFutures: { "deliveryAccountResp":{ "email":"[email protected]", "assets":[ { "asset":"BTC", "initialMargin":"0.00000000", "maintenanceMargin":"0.00000000", "marginBalance":"0.88308000", "maxWithdrawAmount":"0.88308000", "openOrderInitialMargin":"0.00000000", "positionInitialMargin":"0.00000000", "unrealizedProfit":"0.00000000", "walletBalance":"0.88308000" } ], "canDeposit":true, "canTrade":true, "canWithdraw":true, "feeTier":2, "updateTime":1598959682001 } } GET/sapi/v2/sub-account/futures/account(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail futuresType INT YES 1:USDTMarginedFutures,2:COINMarginedFutures recvWindow LONG NO timestamp LONG YES GetSummaryofSub-account'sFuturesAccountV2(ForMasterAccount) Response USDTMarginedFutures: { "futureAccountSummaryResp":{ "totalInitialMargin":"9.83137400", "totalMaintenanceMargin":"0.41568700", "totalMarginBalance":"23.03235621", "totalOpenOrderInitialMargin":"9.00000000", "totalPositionInitialMargin":"0.83137400", "totalUnrealizedProfit":"0.03219710", "totalWalletBalance":"22.15879444", "asset":"USD",//ThesumofBUSDandUSDT "subAccountList":[ { "email":"[email protected]", "totalInitialMargin":"9.00000000", "totalMaintenanceMargin":"0.00000000", "totalMarginBalance":"22.12659734", "totalOpenOrderInitialMargin":"9.00000000", "totalPositionInitialMargin":"0.00000000", "totalUnrealizedProfit":"0.00000000", "totalWalletBalance":"22.12659734", "asset":"USD"//ThesumofBUSDandUSDT }, { "email":"[email protected]", "totalInitialMargin":"0.83137400", "totalMaintenanceMargin":"0.41568700", "totalMarginBalance":"0.90575887", "totalOpenOrderInitialMargin":"0.00000000", "totalPositionInitialMargin":"0.83137400", "totalUnrealizedProfit":"0.03219710", "totalWalletBalance":"0.87356177", "asset":"USD" } ] } } COINMarginedFutures: { "deliveryAccountSummaryResp":{ "totalMarginBalanceOfBTC":"25.03221121", "totalUnrealizedProfitOfBTC":"0.12233410", "totalWalletBalanceOfBTC":"22.15879444", "asset":"BTC", "subAccountList":[ { "email":"[email protected]", "totalMarginBalance":"22.12659734", "totalUnrealizedProfit":"0.00000000", "totalWalletBalance":"22.12659734", "asset":"BTC" }, { "email":"[email protected]", "totalMarginBalance":"0.90575887", "totalUnrealizedProfit":"0.03219710", "totalWalletBalance":"0.87356177", "asset":"BTC" } ] } } GET/sapi/v2/sub-account/futures/accountSummary(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description futuresType INT YES 1:USDTMarginedFutures,2:COINMarginedFutures page INT NO default:1 limit INT NO default:10,max:20 recvWindow LONG NO timestamp LONG YES GetFuturesPosition-RiskofSub-accountV2(ForMasterAccount) Response USDTMarginedFutures: { "futurePositionRiskVos":[ { "entryPrice":"9975.12000", "leverage":"50",//currentinitialleverage "maxNotional":"1000000",//notionalvaluelimitofcurrentinitialleverage "liquidationPrice":"7963.54", "markPrice":"9973.50770517", "positionAmount":"0.010", "symbol":"BTCUSDT", "unrealizedProfit":"-0.01612295" } ] } COINMarginedFutures: { "deliveryPositionRiskVos":[ { "entryPrice":"9975.12000", "markPrice":"9973.50770517", "leverage":"20", "isolated":"false", "isolatedWallet":"9973.50770517", "isolatedMargin":"0.00000000", "isAutoAddMargin":"false", "positionSide":"BOTH", "positionAmount":"1.230", "symbol":"BTCUSD_201225", "unrealizedProfit":"-0.01612295" } ] } GET/sapi/v2/sub-account/futures/positionRisk(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail futuresType INT YES 1:USDTMarginedFutures,2:COINMarginedFutures recvWindow LONG NO timestamp LONG YES EnableLeverageTokenforSub-account(ForMasterAccount) Response { "email":"[email protected]", "enableBlvt":true } POST/sapi/v1/sub-account/blvt/enable(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail enableBlvt BOOLEAN YES Onlytruefornow recvWindow LONG NO timestamp LONG YES EnableorDisableIPRestrictionforaSub-accountAPIKey(ForMasterAccount) Response: { "ipRestrict":"true", "ipList":[ "0.0.0.0",//0.0.0.0isjustaninitialstatereference(noextrameaning).Youcanuse`POST/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList`toaddanIPwhitelist "69.210.67.14", "8.34.21.10", "thirdPartyName"//onlyreturnifyouopenthirdpartyIPlistandinputathirdpartyname.Youcanuse`POST/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList`toaddthirdpartyname. ], "updateTime":1636371437000, "apiKey":"k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf" } POST/sapi/v1/sub-account/subAccountApi/ipRestriction(HMACSHA256) Weight(UID): 3000 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail subAccountApiKey STRING YES ipRestrict BOOLEAN YES trueorfalse thirdParty BOOLEAN NO falsebydefault recvWindow LONG NO timestamp LONG YES AddIPListforaSub-accountAPIKey(ForMasterAccount) Response: { "ip":[ "8.34.21.101,5.24.40.1", "thirdPartyName"//onlyreturnifyouopenthirdpartyIPlistandinputathirdpartyname.Youcanuse`POST/sapi/v1/sub-account/subAccountApi/ipRestriction`toaddanIPwhitelist. ], "updateTime":1636369557189, "apiKey":"k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf" } POST/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList(HMACSHA256) Beforetheusageofthisendpoint,pleaseensurePOST/sapi/v1/sub-account/subAccountApi/ipRestrictionwasusedtoenabletheIPrestriction Weight(UID): 3000 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail subAccountApiKey STRING YES ipAddress STRING NO Canbeaddedinbatches,separatedbycommas.Max30foranAPIkey thirdPartyName STRING NO recvWindow LONG NO timestamp LONG YES GetIPRestrictionforaSub-accountAPIKey(ForMasterAccount) Response: { "ipRestrict":"true", "ipList":[ "69.210.67.14", "8.34.21.10" ], "updateTime":1636371437000, "apiKey":"k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf" } GET/sapi/v1/sub-account/subAccountApi/ipRestriction(HMACSHA256) Weight(UID): 3000 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail subAccountApiKey STRING YES recvWindow LONG NO timestamp LONG YES DeleteIPListForaSub-accountAPIKey(ForMasterAccount) Response: { "ipRestrict":"true", "ipList":[ "69.210.67.14", "8.34.21.10", "thirdPartyName"//onlyreturnifyouopenthirdpartyIPlistandinputathirdpartyname.Youcanuse`POST/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList`toaddthirdpartyname. ], "updateTime":1636371437000, "apiKey":"k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf" } DELETE/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList(HMACSHA256) Weight(UID): 3000 Parameters: Name Type Mandatory Description email STRING YES Sub-accountemail subAccountApiKey STRING YES ipAddress STRING NO Canbeaddedinbatches,separatedbycommas thirdPartyName STRING NO recvWindow LONG NO timestamp LONG YES DepositAssetsIntoTheManagedSub-account(ForInvestorMasterAccount) Response { "tranId":66157362489 } POST/sapi/v1/managed-subaccount/deposit(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description toEmail STRING YES asset STRING YES amount DECIMAL YES recvWindow LONG NO timestamp LONG YES YouneedtoenableEnableSpot&MarginTradingoptionfortheapikeywhichrequeststhisendpoint QueryManagedSub-accountAssetDetails(ForInvestorMasterAccount) Response [ { "coin":"INJ", "name":"InjectiveProtocol", "totalBalance":"0", "availableBalance":"0", "inOrder":"0", "btcValue":"0" }, { "coin":"FILDOWN", "name":"FILDOWN", "totalBalance":"0", "availableBalance":"0", "inOrder":"0", "btcValue":"0" } ] GET/sapi/v1/managed-subaccount/asset(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description email STRING YES recvWindow LONG NO timestamp LONG YES WithdrawlAssetsFromTheManagedSub-account(ForInvestorMasterAccount) Response { "tranId":66157362489 } POST/sapi/v1/managed-subaccount/withdraw(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description fromEmail STRING YES asset STRING YES amount DECIMAL YES transferDate LONG NO Withdrawalsisautomaticallyoccuronthetransferdate(UTC0).Ifadateisnotselected,thewithdrawaloccursrightnow recvWindow LONG NO timestamp LONG YES YouneedtoenableEnableSpot&MarginTradingoptionfortheapikeywhichrequeststhisendpoint QueryManagedSub-accountSnapshot(ForInvestorMasterAccount) Response: { "code":200,//200forsuccess;othersareerrorcodes "msg":"",//errormessage "snapshotVos":[ { "data":{ "balances":[ { "asset":"BTC", "free":"0.09905021", "locked":"0.00000000" }, { "asset":"USDT", "free":"1.89109409", "locked":"0.00000000" } ], "totalAssetOfBtc":"0.09942700" }, "type":"spot", "updateTime":1576281599000 } ] } OR { "code":200,//200forsuccess;othersareerrorcodes "msg":"",//errormessage "snapshotVos":[ { "data":{ "marginLevel":"2748.02909813", "totalAssetOfBtc":"0.00274803", "totalLiabilityOfBtc":"0.00000100", "totalNetAssetOfBtc":"0.00274750", "userAssets":[ { "asset":"XRP", "borrowed":"0.00000000", "free":"1.00000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"1.00000000" } ] }, "type":"margin", "updateTime":1576281599000 } ] } OR { "code":200,//200forsuccess;othersareerrorcodes "msg":"",//errormessage "snapshotVos":[ { "data":{ "assets":[ { "asset":"USDT", "marginBalance":"118.99782335", "walletBalance":"120.23811389" } ], "position":[ { "entryPrice":"7130.41000000", "markPrice":"7257.66239673", "positionAmt":"0.01000000", "symbol":"BTCUSDT", "unRealizedProfit":"1.24029054"//Onlyshowthevalueatthetimeofopeningtheposition } ] }, "type":"futures", "updateTime":1576281599000 } ] } GET/sapi/v1/managed-subaccount/accountSnapshot(HMACSHA256) Weight(IP): 2400 Parameters: Name Type Mandatory Description email STRING YES type STRING YES "SPOT","MARGIN"(cross),"FUTURES"(UM) startTime LONG NO endTime LONG NO limit INT NO min7,max30,default7 recvWindow LONG NO timestamp LONG YES Thequerytimeperiodmustbelessthen30days Supportquerywithinthelastonemonthonly IfstartTimeandendTimenotsent,returnrecordsofthelast7daysbydefault MarketDataEndpointsTestConnectivity Response: {} GET/api/v3/ping TestconnectivitytotheRestAPI. Weight(IP): 1 Parameters: NONE DataSource:Memory CheckServerTime Response: { "serverTime":1499827319559 } GET/api/v3/time TestconnectivitytotheRestAPIandgetthecurrentservertime. Weight(IP): 1 Parameters: NONE DataSource: Memory ExchangeInformation Response: { "timezone":"UTC", "serverTime":1565246363776, "rateLimits":[ { //Thesearedefinedinthe`ENUMdefinitions`sectionunder`RateLimiters(rateLimitType)`. //Alllimitsareoptional } ], "exchangeFilters":[ //Thesearethedefinedfiltersinthe`Filters`section. //Allfiltersareoptional. ], "symbols":[ { "symbol":"ETHBTC", "status":"TRADING", "baseAsset":"ETH", "baseAssetPrecision":8, "quoteAsset":"BTC", "quotePrecision":8, "quoteAssetPrecision":8, "orderTypes":[ "LIMIT", "LIMIT_MAKER", "MARKET", "STOP_LOSS", "STOP_LOSS_LIMIT", "TAKE_PROFIT", "TAKE_PROFIT_LIMIT" ], "icebergAllowed":true, "ocoAllowed":true, "quoteOrderQtyMarketAllowed":true, "allowTrailingStop":false, "cancelReplaceAllowed":false, "isSpotTradingAllowed":true, "isMarginTradingAllowed":true, "filters":[ //ThesearedefinedintheFilterssection. //Allfiltersareoptional ], "permissions":[ "SPOT", "MARGIN" ] } ] } GET/api/v3/exchangeInfo Currentexchangetradingrulesandsymbolinformation Weight(IP): 10 Parameters: Thereare4possibleoptions: Options Example Noparameter curl-XGET"https://api.binance.com/api/v3/exchangeInfo" symbol curl-XGET"https://api.binance.com/api/v3/exchangeInfo?symbol=BNBBTC" symbols curl-XGET"https://api.binance.com/api/v3/exchangeInfo?symbols=%5B%22BNBBTC%22,%22BTCUSDT%22%5D"orcurl-g-XGET'https://api.binance.com/api/v3/exchangeInfo?symbols=["BTCUSDT","BNBBTC"]' permissions curl-XGET"https://api.binance.com/api/v3/exchangeInfo?permissions=SPOT"orcurl-XGET"https://api.binance.com/api/v3/exchangeInfo?permissions=%5B%22MARGIN%22%2C%22LEVERAGED%22%5D"orcurl-g-XGET'https://api.binance.com/api/v3/exchangeInfo?permissions=["MARGIN","LEVERAGED"]' Notes: Ifthevalueprovidedtosymbolorsymbolsdonotexist,theendpointwillthrowanerrorsayingthesymbolisinvalid. Allparametersareoptional. permissionscansupportsingleormultiplevalues(e.g.SPOT,["MARGIN","LEVERAGED"]) Ifpermissionsparameternotprovided,thedefaultvalueswillbe["SPOT","MARGIN","LEVERAGED"]. IfonewantstoviewallsymbolsonGET/api/v3/exchangeInfo,thenonehastosearchwithallpermissionsexplicitlyspecified (i.e.permissions=["SPOT","MARGIN","LEVERAGED","TRD_GRP_002","TRD_GRP_003","TRD_GRP_004","TRD_GRP_005"]) DataSource: Memory OrderBook Response: { "lastUpdateId":1027024, "bids":[ [ "4.00000000",//PRICE "431.00000000"//QTY ] ], "asks":[ [ "4.00000200", "12.00000000" ] ] } GET/api/v3/depth Weight(IP): Adjustedbasedonthelimit: 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 Default100;max5000.Iflimit>5000,thentheresponsewilltruncateto5000. DataSource: Memory RecentTradesList Response: [ { "id":28457, "price":"4.00000100", "qty":"12.00000000", "quoteQty":"48.000012", "time":1499865549590, "isBuyerMaker":true, "isBestMatch":true } ] GET/api/v3/trades Getrecenttrades. Weight(IP): 1 Parameters: Name Type Mandatory Description symbol STRING YES limit INT NO Default500;max1000. DataSource: Memory OldTradeLookup(MARKET_DATA) Response: [ { "id":28457, "price":"4.00000100", "qty":"12.00000000", "quoteQty":"48.000012", "time":1499865549590,//Tradeexecutedtimestamp,assameas`T`inthestream "isBuyerMaker":true, "isBestMatch":true } ] GET/api/v3/historicalTrades Getoldermarkettrades. Weight(IP): 5 Parameters: Name Type Mandatory Description symbol STRING YES limit INT NO Default500;max1000. fromId LONG NO Tradeidtofetchfrom.Defaultgetsmostrecenttrades. DataSource: Database Compressed/AggregateTradesList Response: [ { "a":26129,//AggregatetradeId "p":"0.01633102",//Price "q":"4.70443515",//Quantity "f":27781,//FirsttradeId "l":27781,//LasttradeId "T":1498793709153,//Timestamp "m":true,//Wasthebuyerthemaker? "M":true//Wasthetradethebestpricematch? } ] GET/api/v3/aggTrades Getcompressed,aggregatetrades.Tradesthatfillatthetime,fromthesame order,withthesamepricewillhavethequantityaggregated. Weight(IP): 1 Parameters: Name Type Mandatory Description symbol STRING YES fromId LONG NO idtogetaggregatetradesfromINCLUSIVE. startTime LONG NO TimestampinmstogetaggregatetradesfromINCLUSIVE. endTime LONG NO TimestampinmstogetaggregatetradesuntilINCLUSIVE. limit INT NO Default500;max1000. IfstartTimeandendTimearesent,timebetweenstartTimeandendTimemustbelessthan1hour. IffromId,startTime,andendTimearenotsent,themostrecentaggregatetradeswillbereturned. Notethatifatradehasthefollowingvalues,thiswasaduplicateaggregatetradeandmarkedasinvalid: p='0'//price q='0'//qty f=-1//first_trade_id l=-1//last_trade_id DataSource: Database Kline/CandlestickData Response: [ [ 1499040000000,//Klineopentime "0.01634790",//Openprice "0.80000000",//Highprice "0.01575800",//Lowprice "0.01577100",//Closeprice "148976.11427815",//Volume 1499644799999,//KlineClosetime "2434.19055334",//Quoteassetvolume 308,//Numberoftrades "1756.87402397",//Takerbuybaseassetvolume "28.46694368",//Takerbuyquoteassetvolume "0"//Unusedfield,ignore. ] ] GET/api/v3/klines Kline/candlestickbarsforasymbol. Klinesareuniquelyidentifiedbytheiropentime. Weight(IP): 1 Parameters: Name Type Mandatory Description symbol STRING YES interval ENUM YES startTime LONG NO endTime LONG NO limit INT NO Default500;max1000. IfstartTimeandendTimearenotsent,themostrecentklinesarereturned. DataSource: Database UIKlines Response: [ [ 1499040000000,//Klineopentime "0.01634790",//Openprice "0.80000000",//Highprice "0.01575800",//Lowprice "0.01577100",//Closeprice "148976.11427815",//Volume 1499644799999,//Klineclosetime "2434.19055334",//Quoteassetvolume 308,//Numberoftrades "1756.87402397",//Takerbuybaseassetvolume "28.46694368",//Takerbuyquoteassetvolume "0"//Unusedfield.Ignore. ] ] GET/api/v3/uiKlines Therequestissimilartoklineshavingthesameparametersandresponse. uiKlinesreturnmodifiedklinedata,optimizedforpresentationofcandlestickcharts. Weight: 1 Parameters: Name Type Mandatory Description symbol STRING YES interval ENUM YES startTime LONG NO endTime LONG NO limit INT NO Default500;max1000. IfstartTimeandendTimearenotsent,themostrecentklinesarereturned. DataSource: Database CurrentAveragePrice Response: { "mins":5, "price":"9.35751834" } GET/api/v3/avgPrice Currentaveragepriceforasymbol. Weight(IP): 1 Parameters: Name Type Mandatory Description symbol STRING YES DataSource: Memory 24hrTickerPriceChangeStatistics Response:-FULL { "symbol":"BNBBTC", "priceChange":"-94.99999800", "priceChangePercent":"-95.960", "weightedAvgPrice":"0.29628482", "prevClosePrice":"0.10002000", "lastPrice":"4.00000200", "lastQty":"200.00000000", "bidPrice":"4.00000000", "bidQty":"100.00000000", "askPrice":"4.00000200", "askQty":"100.00000000", "openPrice":"99.00000000", "highPrice":"100.00000000", "lowPrice":"0.10000000", "volume":"8913.30000000", "quoteVolume":"15.30000000", "openTime":1499783499040, "closeTime":1499869899040, "firstId":28385,//FirsttradeId "lastId":28460,//LasttradeId "count":76//Tradecount } OR [ { "symbol":"BNBBTC", "priceChange":"-94.99999800", "priceChangePercent":"-95.960", "weightedAvgPrice":"0.29628482", "prevClosePrice":"0.10002000", "lastPrice":"4.00000200", "lastQty":"200.00000000", "bidPrice":"4.00000000", "bidQty":"100.00000000", "askPrice":"4.00000200", "askQty":"100.00000000", "openPrice":"99.00000000", "highPrice":"100.00000000", "lowPrice":"0.10000000", "volume":"8913.30000000", "quoteVolume":"15.30000000", "openTime":1499783499040, "closeTime":1499869899040, "firstId":28385,//FirsttradeId "lastId":28460,//LasttradeId "count":76//Tradecount } ] Response-MINI { "symbol":"BNBBTC",//SymbolName "openPrice":"99.00000000",//OpeningpriceoftheInterval "highPrice":"100.00000000",//Highestpriceintheinterval "lowPrice":"0.10000000",//Lowestpriceintheinterval "lastPrice":"4.00000200",//Closingpriceoftheinterval "volume":"8913.30000000",//Totaltradevolume(inbaseasset) "quoteVolume":"15.30000000",//Totaltradevolume(inquoteasset) "openTime":1499783499040,//Startofthetickerinterval "closeTime":1499869899040,//Endofthetickerinterval "firstId":28385,//FirsttradeIdconsidered "lastId":28460,//LasttradeIdconsidered "count":76//Totaltradecount } OR [ { "symbol":"BNBBTC", "openPrice":"99.00000000", "highPrice":"100.00000000", "lowPrice":"0.10000000", "lastPrice":"4.00000200", "volume":"8913.30000000", "quoteVolume":"15.30000000", "openTime":1499783499040, "closeTime":1499869899040, "firstId":28385, "lastId":28460, "count":76 }, { "symbol":"LTCBTC", "openPrice":"0.07000000", "highPrice":"0.07000000", "lowPrice":"0.07000000", "lastPrice":"0.07000000", "volume":"11.00000000", "quoteVolume":"0.77000000", "openTime":1656908192899, "closeTime":1656994592899, "firstId":0, "lastId":10, "count":11 } ] GET/api/v3/ticker/24hr 24hourrollingwindowpricechangestatistics.Carefulwhenaccessingthiswithnosymbol. Weight(IP): Parameter SymbolsProvided Weight symbol 1 1 symbolparameterisomitted 40 symbols 1-20 1 21-100 20 101ormore 40 symbolsparameterisomitted 40 Parameters: Name Type Mandatory Description symbol STRING NO Parametersymbolandsymbolscannotbeusedincombination.Ifneitherparameterissent,tickersforallsymbolswillbereturnedinanarray. Examplesofacceptedformatforthesymbolsparameter: ["BTCUSDT","BNBUSDT"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D symbols STRING NO type ENUM NO Supportedvalues:FULLorMINI.Ifnoneprovided,thedefaultisFULL DataSource: Memory SymbolPriceTicker Response: { "symbol":"LTCBTC", "price":"4.00000200" } OR [ { "symbol":"LTCBTC", "price":"4.00000200" }, { "symbol":"ETHBTC", "price":"0.07946600" } ] GET/api/v3/ticker/price Latestpriceforasymbolorsymbols. Weight(IP): Parameter SymbolsProvided Weight symbol 1 1 symbolparameterisomitted 2 symbols Any 2 Parameters: Name Type Mandatory Description symbol STRING NO Parametersymbolandsymbolscannotbeusedincombination.Ifneitherparameterissent,pricesforallsymbolswillbereturnedinanarray.Examplesofacceptedformatforthesymbolsparameter: ["BTCUSDT","BNBUSDT"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D symbols STRING NO DataSource: Memory SymbolOrderBookTicker Response: { "symbol":"LTCBTC", "bidPrice":"4.00000000", "bidQty":"431.00000000", "askPrice":"4.00000200", "askQty":"9.00000000" } OR [ { "symbol":"LTCBTC", "bidPrice":"4.00000000", "bidQty":"431.00000000", "askPrice":"4.00000200", "askQty":"9.00000000" }, { "symbol":"ETHBTC", "bidPrice":"0.07946700", "bidQty":"9.00000000", "askPrice":"100000.00000000", "askQty":"1000.00000000" } ] GET/api/v3/ticker/bookTicker Bestprice/qtyontheorderbookforasymbolorsymbols. Weight(IP): Parameter SymbolsProvided Weight symbol 1 1 symbolparameterisomitted 2 symbols Any 2 Parameters: Name Type Mandatory Description symbol STRING NO Parametersymbolandsymbolscannotbeusedincombination.Ifneitherparameterissent,bookTickersforallsymbolswillbereturnedinanarray.Examplesofacceptedformatforthesymbolsparameter: ["BTCUSDT","BNBUSDT"] or %5B%22BTCUSDT%22,%22BNBUSDT%22%5D symbols STRING NO DataSource: Memory Rollingwindowpricechangestatistics Response:-FULL { "symbol":"BNBBTC", "priceChange":"-8.00000000",//Absolutepricechange "priceChangePercent":"-88.889",//Relativepricechangeinpercent "weightedAvgPrice":"2.60427807",//QuoteVolume/Volume "openPrice":"9.00000000", "highPrice":"9.00000000", "lowPrice":"1.00000000", "lastPrice":"1.00000000", "volume":"187.00000000", "quoteVolume":"487.00000000",//Sumof(price*volume)foralltrades "openTime":1641859200000,//Opentimefortickerwindow "closeTime":1642031999999,//CurrentTimeoftheRequest "firstId":0,//TradeIDs "lastId":60, "count":61//Numberoftradesintheinterval } OR [ { "symbol":"BTCUSDT", "priceChange":"-154.13000000",//Absolutepricechange "priceChangePercent":"-0.740",//Relativepricechangeinpercent "weightedAvgPrice":"20677.46305250",//QuoteVolume/Volume "openPrice":"20825.27000000", "highPrice":"20972.46000000", "lowPrice":"20327.92000000", "lastPrice":"20671.14000000", "volume":"72.65112300", "quoteVolume":"1502240.91155513",//Sumof(price*volume)foralltrades "openTime":1655432400000,//Opentimefortickerwindow "closeTime":1655446835460,//Closetimefortickerwindow "firstId":11147809,//TradeIDs "lastId":11149775, "count":1967//Numberoftradesintheinterval }, { "symbol":"BNBBTC", "priceChange":"0.00008530", "priceChangePercent":"0.823", "weightedAvgPrice":"0.01043129", "openPrice":"0.01036170", "highPrice":"0.01049850", "lowPrice":"0.01033870", "lastPrice":"0.01044700", "volume":"166.67000000", "quoteVolume":"1.73858301", "openTime":1655432400000, "closeTime":1655446835460, "firstId":2351674, "lastId":2352034, "count":361 } ] Response-MINI { "symbol":"LTCBTC", "openPrice":"0.10000000", "highPrice":"2.00000000", "lowPrice":"0.10000000", "lastPrice":"2.00000000", "volume":"39.00000000", "quoteVolume":"13.40000000",//Sumof(price*volume)foralltrades "openTime":1656986580000,//Opentimefortickerwindow "closeTime":1657001016795,//Closetimefortickerwindow "firstId":0,//TradeIDs "lastId":34, "count":35//Numberoftradesintheinterval } OR [ { "symbol":"BNBBTC", "openPrice":"0.10000000", "highPrice":"2.00000000", "lowPrice":"0.10000000", "lastPrice":"2.00000000", "volume":"39.00000000", "quoteVolume":"13.40000000",//Sumof(price*volume)foralltrades "openTime":1656986880000,//Opentimefortickerwindow "closeTime":1657001297799,//Closetimefortickerwindow "firstId":0,//TradeIDs "lastId":34, "count":35//Numberoftradesintheinterval }, { "symbol":"LTCBTC", "openPrice":"0.07000000", "highPrice":"0.07000000", "lowPrice":"0.07000000", "lastPrice":"0.07000000", "volume":"33.00000000", "quoteVolume":"2.31000000", "openTime":1656986880000, "closeTime":1657001297799, "firstId":0, "lastId":32, "count":33 } ] GET/api/v3/ticker Note:ThisendpointisdifferentfromtheGET/api/v3/ticker/24hrendpoint. Thewindowusedtocomputestatisticswillbenomorethan59999msfromtherequestedwindowSize. openTimefor/api/v3/tickeralwaysstartsonaminute,whilethecloseTimeisthecurrenttimeoftherequest. Assuch,theeffectivewindowwillbeupto59999mswiderthanwindowSize. E.g.IfthecloseTimeis1641287867099(January04,202209:17:47:099UTC),andthewindowSizeis1d.theopenTimewillbe:1641201420000(January3,2022,09:17:00UTC) Weight:(IP) 2foreachrequestedsymbolregardlessofwindowSizeTheweightforthisrequestwillcapat100oncethenumberofsymbolsintherequestismorethan50. Parameters Name Type Mandatory Description symbol STRING YES EithersymbolorsymbolsmustbeprovidedExamplesofacceptedformatforthesymbolsparameter:["BTCUSDT","BNBUSDT"]or%5B%22BTCUSDT%22,%22BNBUSDT%22%5DThemaximumnumberofsymbolsallowedinarequestis100. symbols windowSize ENUM NO Defaultsto1difnoparameterprovidedSupportedwindowSizevalues:1m,2m....59mforminutes1h,2h....23h-forhours1d...7d-fordaysUnitscannotbecombined(e.g.1d2hisnotallowed) type ENUM NO Supportedvalues:FULLorMINI.Ifnoneprovided,thedefaultisFULL DataSource: Database WebsocketMarketStreams Thebaseendpointis:wss://stream.binance.com:9443 Streamscanbeaccessedeitherinasinglerawstreamorinacombinedstream Rawstreamsareaccessedat/ws/ Combinedstreamsareaccessedat/stream?streams=// Combinedstreameventsarewrappedasfollows:{"stream":"","data":} Allsymbolsforstreamsarelowercase Asingleconnectiontostream.binance.comisonlyvalidfor24hours;expecttobedisconnectedatthe24hourmark Thewebsocketserverwillsendapingframeevery3minutes.Ifthewebsocketserverdoesnotreceiveapongframebackfromtheconnectionwithina10minuteperiod,theconnectionwillbedisconnected.Unsolicitedpongframesareallowed. LiveSubscribing/Unsubscribingtostreams Thefollowingdatacanbesentthroughthewebsocketinstanceinordertosubscribe/unsubscribefromstreams.Examplescanbeseenbelow. TheidusedintheJSONpayloadsisanunsignedINTusedasanidentifiertouniquelyidentifythemessagesgoingbackandforth. Intheresponse,iftheresultreceivedisnullthismeanstherequestsentwasasuccess. Subscribetoastream Response { "result":null, "id":1 } Request { "method":"SUBSCRIBE", "params": [ "btcusdt@aggTrade", "btcusdt@depth" ], "id":1 } Unsubscribetoastream Response { "result":null, "id":312 } Request { "method":"UNSUBSCRIBE", "params": [ "btcusdt@depth" ], "id":312 } ListingSubscriptions Response { "result":[ "btcusdt@aggTrade" ], "id":3 } Request { "method":"LIST_SUBSCRIPTIONS", "id":3 } SettingProperties Currently,theonlypropertycanbesetistosetwhethercombinedstreampayloadsareenabledornot. Thecombinedpropertyissettofalsewhenconnectingusing/ws/("rawstreams")andtruewhenconnectingusing/stream/. Response { "result":null, "id":5 } Request { "method":"SET_PROPERTY", "params": [ "combined", true ], "id":5 } RetrievingProperties Response { "result":true,//Indicatesthatcombinedissettotrue. "id":2 } Request { "method":"GET_PROPERTY", "params": [ "combined" ], "id":2 } ErrorMessages ErrorMessage Description {"code":0,"msg":"Unknownproperty","id":'%s'} ParameterusedintheSET_PROPERTYorGET_PROPERTYwasinvalid {"code":1,"msg":"Invalidvaluetype:expectedBoolean","id":'%s'} Valueshouldonlybetrueorfalse {"code":2,"msg":"Invalidrequest:propertynamemustbeastring"} Propertynameprovidedwasinvalid {"code":2,"msg":"Invalidrequest:requestIDmustbeanunsignedinteger"} Parameteridhadtobeprovidedorthevalueprovidedintheidparameterisanunsupportedtype {"code":2,"msg":"Invalidrequest:unknownvariant%s,expectedoneofSUBSCRIBE,UNSUBSCRIBE,LIST_SUBSCRIPTIONS,SET_PROPERTY,GET_PROPERTYatline1column28"} Possibletypointheprovidedmethodorprovidedmethodwasneitheroftheexpectedvalues {"code":2,"msg":"Invalidrequest:toomanyparameters"} Unnecessaryparametersprovidedinthedata {"code":2,"msg":"Invalidrequest:propertynamemustbeastring"} Propertynamewasnotprovided {"code":2,"msg":"Invalidrequest:missingfieldmethodatline1column73"} methodwasnotprovidedinthedata {"code":3,"msg":"InvalidJSON:expectedvalueatline%scolumn%s"} JSONdatasenthasincorrectsyntax. AggregateTradeStreams Payload: { "e":"aggTrade",//Eventtype "E":123456789,//Eventtime "s":"BNBBTC",//Symbol "a":12345,//AggregatetradeID "p":"0.001",//Price "q":"100",//Quantity "f":100,//FirsttradeID "l":105,//LasttradeID "T":123456785,//Tradetime "m":true,//Isthebuyerthemarketmaker? "M":true//Ignore } TheAggregateTradeStreamspushtradeinformationthatisaggregatedforasingletakerorder. StreamName:@aggTrade UpdateSpeed:Real-time TradeStreams Payload: { "e":"trade",//Eventtype "E":123456789,//Eventtime "s":"BNBBTC",//Symbol "t":12345,//TradeID "p":"0.001",//Price "q":"100",//Quantity "b":88,//BuyerorderID "a":50,//SellerorderID "T":123456785,//Tradetime "m":true,//Isthebuyerthemarketmaker? "M":true//Ignore } TheTradeStreamspushrawtradeinformation;eachtradehasauniquebuyerandseller. StreamName:@trade UpdateSpeed:Real-time Kline/CandlestickStreams Payload: { "e":"kline",//Eventtype "E":123456789,//Eventtime "s":"BNBBTC",//Symbol "k":{ "t":123400000,//Klinestarttime "T":123460000,//Klineclosetime "s":"BNBBTC",//Symbol "i":"1m",//Interval "f":100,//FirsttradeID "L":200,//LasttradeID "o":"0.0010",//Openprice "c":"0.0020",//Closeprice "h":"0.0025",//Highprice "l":"0.0015",//Lowprice "v":"1000",//Baseassetvolume "n":100,//Numberoftrades "x":false,//Isthisklineclosed? "q":"1.0000",//Quoteassetvolume "V":"500",//Takerbuybaseassetvolume "Q":"0.500",//Takerbuyquoteassetvolume "B":"123456"//Ignore } } TheKline/CandlestickStreampushupdatestothecurrentklines/candlestickeverysecond. StreamName:@kline_ UpdateSpeed:2000ms Kline/Candlestickchartintervals: s->seconds;m->minutes;h->hours;d->days;w->weeks;M->months 1s 1m 3m 5m 15m 30m 1h 2h 4h 6h 8h 12h 1d 3d 1w 1M IndividualSymbolMiniTickerStream Payload: { "e":"24hrMiniTicker",//Eventtype "E":123456789,//Eventtime "s":"BNBBTC",//Symbol "c":"0.0025",//Closeprice "o":"0.0010",//Openprice "h":"0.0025",//Highprice "l":"0.0010",//Lowprice "v":"10000",//Totaltradedbaseassetvolume "q":"18"//Totaltradedquoteassetvolume } 24hrrollingwindowmini-tickerstatistics.TheseareNOTthestatisticsoftheUTCday,buta24hrrollingwindowfortheprevious24hrs. StreamName:@miniTicker UpdateSpeed:1000ms AllMarketMiniTickersStream Payload: [ { //Sameas@miniTickerpayload } ] 24hrrollingwindowmini-tickerstatisticsforallsymbolsthatchangedinanarray.TheseareNOTthestatisticsoftheUTCday,buta24hrrollingwindowfortheprevious24hrs.Notethatonlytickersthathavechangedwillbepresentinthearray. StreamName:!miniTicker@arr UpdateSpeed:1000ms IndividualSymbolTickerStreams Payload: { "e":"24hrTicker",//Eventtype "E":123456789,//Eventtime "s":"BNBBTC",//Symbol "p":"0.0015",//Pricechange "P":"250.00",//Pricechangepercent "w":"0.0018",//Weightedaverageprice "x":"0.0009",//Firsttrade(F)-1price(firsttradebeforethe24hrrollingwindow) "c":"0.0025",//Lastprice "Q":"10",//Lastquantity "b":"0.0024",//Bestbidprice "B":"10",//Bestbidquantity "a":"0.0026",//Bestaskprice "A":"100",//Bestaskquantity "o":"0.0010",//Openprice "h":"0.0025",//Highprice "l":"0.0010",//Lowprice "v":"10000",//Totaltradedbaseassetvolume "q":"18",//Totaltradedquoteassetvolume "O":0,//Statisticsopentime "C":86400000,//Statisticsclosetime "F":0,//FirsttradeID "L":18150,//LasttradeId "n":18151//Totalnumberoftrades } 24hrrollingwindowtickerstatisticsforasinglesymbol.TheseareNOTthestatisticsoftheUTCday,buta24hrrollingwindowfortheprevious24hrs. StreamName:@ticker UpdateSpeed:1000ms AllMarketTickersStream Payload: [ { //Sameas@tickerpayload } ] 24hrrollingwindowtickerstatisticsforallsymbolsthatchangedinanarray.TheseareNOTthestatisticsoftheUTCday,buta24hrrollingwindowfortheprevious24hrs.Notethatonlytickersthathavechangedwillbepresentinthearray. StreamName:!ticker@arr UpdateSpeed:1000ms IndividualSymbolRollingWindowStatisticsStreams Payload: { "e":"1hTicker",//Eventtype "E":123456789,//Eventtime "s":"BNBBTC",//Symbol "p":"0.0015",//Pricechange "P":"250.00",//Pricechangepercent "o":"0.0010",//Openprice "h":"0.0025",//Highprice "l":"0.0010",//Lowprice "c":"0.0025",//Lastprice "w":"0.0018",//Weightedaverageprice "v":"10000",//Totaltradedbaseassetvolume "q":"18",//Totaltradedquoteassetvolume "O":0,//Statisticsopentime "C":86400000,//Statisticsclosetime "F":0,//FirsttradeID "L":18150,//LasttradeId "n":18151//Totalnumberoftrades } Rollingwindowtickerstatisticsforasinglesymbol,computedovermultiplewindows. StreamName:@ticker_ WindowSizes:1h,4h,1d UpdateSpeed:1000ms Note:Thisstreamisdifferentfromthe@tickerstream. TheopentimeOalwaysstartsonaminute,whiletheclosingtimeCisthecurrenttimeoftheupdate. Assuch,theeffectivewindowmightbeupto59999mswiderthat. AllMarketRollingWindowStatisticsStreams Payload: [ { //Sameas@ticker_payload, //oneforeachsymbolupdatedwithintheinterval. } ] Rollingwindowtickerstatisticsforallmarketsymbols,computedovermultiplewindows. Notethatonlytickersthathavechangedwillbepresentinthearray. StreamName:!ticker_@arr WindowSize:1h,4h,1d UpdateSpeed:1000ms IndividualSymbolBookTickerStreams Payload: { "u":400900217,//orderbookupdateId "s":"BNBUSDT",//symbol "b":"25.35190000",//bestbidprice "B":"31.21000000",//bestbidqty "a":"25.36520000",//bestaskprice "A":"40.66000000"//bestaskqty } Pushesanyupdatetothebestbidorask'spriceorquantityinreal-timeforaspecifiedsymbol. Multiple@bookTickerstreamscanbesubscribedtooveroneconnection. StreamName:@bookTicker UpdateSpeed:Real-time AllBookTickersStream Payload: { //Sameas@bookTickerpayload } ThisfeatureisscheduledtoberemovedaroundNovember2022.Oncethishasbeenremoved,pleaseusetheIndividualSymbolBookTickerStreamsinstead.Multiple@bookTickerstreamscanbesubscribedtooveroneconnection. Pushesanyupdatetothebestbidorask'spriceorquantityinreal-timeforallsymbols. StreamName:!bookTicker UpdateSpeed:Real-time PartialBookDepthStreams Payload: { "lastUpdateId":160,//LastupdateID "bids":[//Bidstobeupdated [ "0.0024",//Priceleveltobeupdated "10"//Quantity ] ], "asks":[//Askstobeupdated [ "0.0026",//Priceleveltobeupdated "100"//Quantity ] ] } Topbidsandasks,Validare5,10,or20. StreamNames:@depthOR@depth@100ms. UpdateSpeed:1000msor100ms Diff.DepthStream Payload: { "e":"depthUpdate",//Eventtype "E":123456789,//Eventtime "s":"BNBBTC",//Symbol "U":157,//FirstupdateIDinevent "u":160,//FinalupdateIDinevent "b":[//Bidstobeupdated [ "0.0024",//Priceleveltobeupdated "10"//Quantity ] ], "a":[//Askstobeupdated [ "0.0026",//Priceleveltobeupdated "100"//Quantity ] ] } StreamName:@depthOR@depth@100ms UpdateSpeed:1000msor100ms Orderbookpriceandquantitydepthupdatesusedtolocallymanageanorderbook. Howtomanagealocalorderbookcorrectly Openastreamtowss://stream.binance.com:9443/ws/bnbbtc@depth. Buffertheeventsyoureceivefromthestream. Getadepthsnapshotfromhttps://api.binance.com/api/v3/depth?symbol=BNBBTC&limit=1000. Dropanyeventwhereuis<=lastUpdateIdinthesnapshot. ThefirstprocessedeventshouldhaveU<=lastUpdateId+1ANDu>=lastUpdateId+1. Whilelisteningtothestream,eachnewevent'sUshouldbeequaltothepreviousevent'su+1. Thedataineacheventistheabsolutequantityforapricelevel. Ifthequantityis0,removethepricelevel. Receivinganeventthatremovesapricelevelthatisnotinyourlocalorderbookcanhappenandisnormal. Note: Duetodepthsnapshotshavingalimitonthenumberofpricelevels,apriceleveloutsideoftheinitialsnapshotthatdoesn'thaveaquantitychangewon'thaveanupdateintheDiff.DepthStream.Consequently,thosepricelevelswillnotbevisibleinthelocalorderbookevenwhenapplyingallupdatesfromtheDiff.DepthStreamcorrectlyandcausethelocalorderbooktohavesomeslightdifferenceswiththerealorderbook.However,formostusecasesthedepthlimitof5000isenoughtounderstandthemarketandtradeeffectively. SpotAccount/TradeTestNewOrder(TRADE) Response: {} POST/api/v3/order/test(HMACSHA256) Testnewordercreationandsignature/recvWindowlong. Createsandvalidatesaneworderbutdoesnotsenditintothematchingengine. Weight: 1 Parameters: SameasPOST/api/v3/order DataSource: Memory NewOrder(TRADE) ResponseACK: { "symbol":"BTCUSDT", "orderId":28, "orderListId":-1,//UnlessOCO,valuewillbe-1 "clientOrderId":"6gCrw2kRUAF9CvJDGP16IP", "transactTime":1507725176595 } ResponseRESULT: { "symbol":"BTCUSDT", "orderId":28, "orderListId":-1,//UnlessOCO,valuewillbe-1 "clientOrderId":"6gCrw2kRUAF9CvJDGP16IP", "transactTime":1507725176595, "price":"0.00000000", "origQty":"10.00000000", "executedQty":"10.00000000", "cummulativeQuoteQty":"10.00000000", "status":"FILLED", "timeInForce":"GTC", "type":"MARKET", "side":"SELL", "strategyId":1,//Thisisonlyvisibleifthefieldwaspopulatedonorderplacement. "strategyType":1000000//Thisisonlyvisibleifthefieldwaspopulatedonorderplacement. } ResponseFULL: { "symbol":"BTCUSDT", "orderId":28, "orderListId":-1,//UnlessOCO,valuewillbe-1 "clientOrderId":"6gCrw2kRUAF9CvJDGP16IP", "transactTime":1507725176595, "price":"0.00000000", "origQty":"10.00000000", "executedQty":"10.00000000", "cummulativeQuoteQty":"10.00000000", "status":"FILLED", "timeInForce":"GTC", "type":"MARKET", "side":"SELL", "strategyId":1,//Thisisonlyvisibleifthefieldwaspopulatedonorderplacement. "strategyType":1000000//Thisisonlyvisibleifthefieldwaspopulatedonorderplacement. "fills":[ { "price":"4000.00000000", "qty":"1.00000000", "commission":"4.00000000", "commissionAsset":"USDT", "tradeId":56 }, { "price":"3999.00000000", "qty":"5.00000000", "commission":"19.99500000", "commissionAsset":"USDT", "tradeId":57 }, { "price":"3998.00000000", "qty":"2.00000000", "commission":"7.99600000", "commissionAsset":"USDT", "tradeId":58 }, { "price":"3997.00000000", "qty":"1.00000000", "commission":"3.99700000", "commissionAsset":"USDT", "tradeId":59 }, { "price":"3995.00000000", "qty":"1.00000000", "commission":"3.99500000", "commissionAsset":"USDT", "tradeId":60 } ] } POST/api/v3/order(HMACSHA256) Sendinaneworder. 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 Auniqueidamongopenorders.Automaticallygeneratedifnotsent. strategyId INT NO strategyType INT NO Thevaluecannotbelessthan1000000. stopPrice DECIMAL NO UsedwithSTOP_LOSS,STOP_LOSS_LIMIT,TAKE_PROFIT,andTAKE_PROFIT_LIMITorders. trailingDelta LONG NO UsedwithSTOP_LOSS,STOP_LOSS_LIMIT,TAKE_PROFIT,andTAKE_PROFIT_LIMITorders.FormoredetailsonSPOTimplementationontrailingstops,pleaserefertoTrailingStopFAQ icebergQty DECIMAL NO UsedwithLIMIT,STOP_LOSS_LIMIT,andTAKE_PROFIT_LIMITtocreateanicebergorder. newOrderRespType ENUM NO SettheresponseJSON.ACK,RESULT,orFULL;MARKETandLIMITordertypesdefaulttoFULL,allotherordersdefaulttoACK. recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Additionalmandatoryparametersbasedontype: Type Additionalmandatoryparameters LIMIT timeInForce,quantity,price MARKET quantityorquoteOrderQty STOP_LOSS quantity,stopPriceortrailingDelta STOP_LOSS_LIMIT timeInForce,quantity,price,stopPriceortrailingDelta TAKE_PROFIT quantity,stopPriceortrailingDelta TAKE_PROFIT_LIMIT timeInForce,quantity,price,stopPriceortrailingDelta LIMIT_MAKER quantity,price Otherinfo: LIMIT_MAKERareLIMITordersthatwillberejectediftheywouldimmediatelymatchandtradeasataker. STOP_LOSSandTAKE_PROFITwillexecuteaMARKETorderwhenthestopPriceisreached. AnyLIMITorLIMIT_MAKERtypeordercanbemadeanicebergorderbysendinganicebergQty. AnyorderwithanicebergQtyMUSThavetimeInForcesettoGTC. MARKETordersusingthequantityfieldspecifiestheamountofthebaseassettheuserwantstobuyorsellatthemarketprice. Forexample,sendingaMARKETorderonBTCUSDTwillspecifyhowmuchBTCtheuserisbuyingorselling. MARKETordersusingquoteOrderQtyspecifiestheamounttheuserwantstospend(whenbuying)orreceive(whenselling)thequoteasset;thecorrectquantitywillbedeterminedbasedonthemarketliquidityandquoteOrderQty. UsingBTCUSDTasanexample: OntheBUYside,theorderwillbuyasmanyBTCasquoteOrderQtyUSDTcan. OntheSELLside,theorderwillsellasmuchBTCneededtoreceivequoteOrderQtyUSDT. MARKETordersusingquoteOrderQtywillnotbreakLOT_SIZEfilterrules;theorderwillexecuteaquantitythatwillhavethenotionalvalueascloseaspossibletoquoteOrderQty. samenewClientOrderIdcanbeacceptedonlywhenthepreviousoneisfilled,otherwisetheorderwillberejected. ForSTOP_LOSS,STOP_LOSS_LIMIT,TAKE_PROFIT_LIMITandTAKE_PROFITorders,trailingDeltacanbecombinedwithstopPrice. TriggerorderpricerulesagainstmarketpriceforbothMARKETandLIMITversions: Priceabovemarketprice:STOP_LOSSBUY,TAKE_PROFITSELL Pricebelowmarketprice:STOP_LOSSSELL,TAKE_PROFITBUY DataSource: MatchingEngine CancelOrder(TRADE) Response: { "symbol":"LTCBTC", "origClientOrderId":"myOrder1", "orderId":4, "orderListId":-1,//UnlesspartofanOCO,thevaluewillalwaysbe-1. "clientOrderId":"cancelMyOrder1", "price":"2.00000000", "origQty":"1.00000000", "executedQty":"0.00000000", "cummulativeQuoteQty":"0.00000000", "status":"CANCELED", "timeInForce":"GTC", "type":"LIMIT", "side":"BUY" } DELETE/api/v3/order(HMACSHA256) Cancelanactiveorder. Weight(IP): 1 Parameters: Name Type Mandatory Description symbol STRING YES orderId LONG NO origClientOrderId STRING NO newClientOrderId STRING NO Usedtouniquelyidentifythiscancel.Automaticallygeneratedbydefault. recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES EitherorderIdororigClientOrderIdmustbesent. IfbothorderIdandorigClientOrderIdareprovided,orderIdtakesprecedence. DataSource: MatchingEngine CancelallOpenOrdersonaSymbol(TRADE) Response: [ { "symbol":"BTCUSDT", "origClientOrderId":"E6APeyTJvkMvLMYMqu1KQ4", "orderId":11, "orderListId":-1, "clientOrderId":"pXLV6Hz6mprAcVYpVMTGgx", "price":"0.089853", "origQty":"0.178622", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"CANCELED", "timeInForce":"GTC", "type":"LIMIT", "side":"BUY" }, { "symbol":"BTCUSDT", "origClientOrderId":"A3EF2HCwxgZPFMrfwbgrhv", "orderId":13, "orderListId":-1, "clientOrderId":"pXLV6Hz6mprAcVYpVMTGgx", "price":"0.090430", "origQty":"0.178622", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"CANCELED", "timeInForce":"GTC", "type":"LIMIT", "side":"BUY" }, { "orderListId":1929, "contingencyType":"OCO", "listStatusType":"ALL_DONE", "listOrderStatus":"ALL_DONE", "listClientOrderId":"2inzWQdDvZLHbbAmAozX2N", "transactionTime":1585230948299, "symbol":"BTCUSDT", "orders":[ { "symbol":"BTCUSDT", "orderId":20, "clientOrderId":"CwOOIPHSmYywx6jZX77TdL" }, { "symbol":"BTCUSDT", "orderId":21, "clientOrderId":"461cPg51vQjV3zIMOXNz39" } ], "orderReports":[ { "symbol":"BTCUSDT", "origClientOrderId":"CwOOIPHSmYywx6jZX77TdL", "orderId":20, "orderListId":1929, "clientOrderId":"pXLV6Hz6mprAcVYpVMTGgx", "price":"0.668611", "origQty":"0.690354", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"CANCELED", "timeInForce":"GTC", "type":"STOP_LOSS_LIMIT", "side":"BUY", "stopPrice":"0.378131", "icebergQty":"0.017083" }, { "symbol":"BTCUSDT", "origClientOrderId":"461cPg51vQjV3zIMOXNz39", "orderId":21, "orderListId":1929, "clientOrderId":"pXLV6Hz6mprAcVYpVMTGgx", "price":"0.008791", "origQty":"0.690354", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"CANCELED", "timeInForce":"GTC", "type":"LIMIT_MAKER", "side":"BUY", "icebergQty":"0.639962" } ] } ] DELETE/api/v3/openOrders Cancelsallactiveordersonasymbol. ThisincludesOCOorders. Weight(IP): 1 Parameters Name Type Mandatory Description symbol STRING YES recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES DataSource: MatchingEngine QueryOrder(USER_DATA) Response: { "symbol":"LTCBTC", "orderId":1, "orderListId":-1,//UnlessOCO,valuewillbe-1 "clientOrderId":"myOrder1", "price":"0.1", "origQty":"1.0", "executedQty":"0.0", "cummulativeQuoteQty":"0.0", "status":"NEW", "timeInForce":"GTC", "type":"LIMIT", "side":"BUY", "stopPrice":"0.0", "icebergQty":"0.0", "time":1499827319559, "updateTime":1499827319559, "isWorking":true, "origQuoteOrderQty":"0.000000" } GET/api/v3/order(HMACSHA256) Checkanorder'sstatus. Weight(IP): 2 Parameters: Name Type Mandatory Description symbol STRING YES orderId LONG NO origClientOrderId STRING NO recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Notes: EitherorderIdororigClientOrderIdmustbesent. ForsomehistoricalorderscummulativeQuoteQtywillbe<0,meaningthedataisnotavailableatthistime. DataSource: Memory=>Database CancelanExistingOrderandSendaNewOrder(TRADE) ResponseSUCCESS: //Boththecancelorderplacementandneworderplacementsucceeded. { "cancelResult":"SUCCESS", "newOrderResult":"SUCCESS", "cancelResponse":{ "symbol":"BTCUSDT", "origClientOrderId":"DnLo3vTAQcjha43lAZhZ0y", "orderId":9, "orderListId":-1, "clientOrderId":"osxN3JXAtJvKvCqGeMWMVR", "price":"0.01000000", "origQty":"0.000100", "executedQty":"0.00000000", "cummulativeQuoteQty":"0.00000000", "status":"CANCELED", "timeInForce":"GTC", "type":"LIMIT", "side":"SELL" }, "newOrderResponse":{ "symbol":"BTCUSDT", "orderId":10, "orderListId":-1, "clientOrderId":"wOceeeOzNORyLiQfw7jd8S", "transactTime":1652928801803, "price":"0.02000000", "origQty":"0.040000", "executedQty":"0.00000000", "cummulativeQuoteQty":"0.00000000", "status":"NEW", "timeInForce":"GTC", "type":"LIMIT", "side":"BUY", "fills":[] } } ResponsewhenCancelOrderFailswithSTOP_ON_FAILURE: { "code":-2022, "msg":"Ordercancel-replacefailed.", "data":{ "cancelResult":"FAILURE", "newOrderResult":"NOT_ATTEMPTED", "cancelResponse":{ "code":-2011, "msg":"Unknownordersent." }, "newOrderResponse":null } } ResponsewhenCancelOrderSucceedsbutNewOrderPlacementFails: { "code":-2021, "msg":"Ordercancel-replacepartiallyfailed.", "data":{ "cancelResult":"SUCCESS", "newOrderResult":"FAILURE", "cancelResponse":{ "symbol":"BTCUSDT", "origClientOrderId":"86M8erehfExV8z2RC8Zo8k", "orderId":3, "orderListId":-1, "clientOrderId":"G1kLo6aDv2KGNTFcjfTSFq", "price":"0.006123", "origQty":"10000.000000", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"CANCELED", "timeInForce":"GTC", "type":"LIMIT_MAKER", "side":"SELL" }, "newOrderResponse":{ "code":-2010, "msg":"Orderwouldimmediatelymatchandtake." } } } ResponsewhenCancelOrderfailswithALLOW_FAILURE: { "code":-2021, "msg":"Ordercancel-replacepartiallyfailed.", "data":{ "cancelResult":"FAILURE", "newOrderResult":"SUCCESS", "cancelResponse":{ "code":-2011, "msg":"Unknownordersent." }, "newOrderResponse":{ "symbol":"BTCUSDT", "orderId":11, "orderListId":-1, "clientOrderId":"pfojJMg6IMNDKuJqDxvoxN", "transactTime":1648540168818 } } } ResponsewhenbothCancelOrderandNewOrderPlacementfail: { "code":-2022, "msg":"Ordercancel-replacefailed.", "data":{ "cancelResult":"FAILURE", "newOrderResult":"FAILURE", "cancelResponse":{ "code":-2011, "msg":"Unknownordersent." }, "newOrderResponse":{ "code":-2010, "msg":"Orderwouldimmediatelymatchandtake." } } } POST/api/v3/order/cancelReplace Cancelsanexistingorderandplacesaneworderonthesamesymbol. FiltersandOrderCountareevaluatedbeforetheprocessingofthecancellationandorderplacementoccurs. Aneworderthatwasnotattempted(i.e.whennewOrderResult:NOT_ATTEMPTED),willstillincreasetheordercountby1. Weight(IP): 1 Parameters: Name Type Mandatory Description symbol STRING YES side ENUM YES type ENUM YES cancelReplaceMode ENUM YES Theallowedvaluesare:STOP_ON_FAILURE-Ifthecancelrequestfails,theneworderplacementwillnotbeattempted.ALLOW_FAILURE-neworderplacementwillbeattemptedevenifcancelrequestfails. timeInForce ENUM NO quantity DECIMAL NO quoteOrderQty DECIMAL NO price DECIMAL NO cancelNewClientOrderId STRING NO Usedtouniquelyidentifythiscancel.Automaticallygeneratedbydefault. cancelOrigClientOrderId STRING NO EitherthecancelOrigClientOrderIdorcancelOrderIdmustbeprovided.Ifbothareprovided,cancelOrderIdtakesprecedence. cancelOrderId LONG NO EitherthecancelOrigClientOrderIdorcancelOrderIdmustbeprovided.Ifbothareprovided,cancelOrderIdtakesprecedence. newClientOrderId STRING NO Usedtoidentifytheneworder. strategyId INT NO strategyType INT NO Thevaluecannotbelessthan1000000. stopPrice DECIMAL NO trailingDelta LONG NO icebergQty DECIMAL NO newOrderRespType ENUM NO Allowedvalues:ACK,RESULT,FULLMARKETandLIMITorderstypesdefaulttoFULL;allotherordersdefaulttoACK recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES SimilartoPOST/api/v3/order,additionalmandatoryparametersaredeterminedbytype. Responseformatvariesdependingonwhethertheprocessingofthemessagesucceeded,partiallysucceeded,orfailed. DataSource: MatchingEngine CurrentOpenOrders(USER_DATA) Response: [ { "symbol":"LTCBTC", "orderId":1, "orderListId":-1,//UnlessOCO,thevaluewillalwaysbe-1 "clientOrderId":"myOrder1", "price":"0.1", "origQty":"1.0", "executedQty":"0.0", "cummulativeQuoteQty":"0.0", "status":"NEW", "timeInForce":"GTC", "type":"LIMIT", "side":"BUY", "stopPrice":"0.0", "icebergQty":"0.0", "time":1499827319559, "updateTime":1499827319559, "isWorking":true, "origQuoteOrderQty":"0.000000" } ] GET/api/v3/openOrders(HMACSHA256) Getallopenordersonasymbol.Carefulwhenaccessingthiswithnosymbol. Weight(IP): 3forasinglesymbol; 40whenthesymbolparameterisomitted; Parameters: Name Type Mandatory Description symbol STRING NO recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Ifthesymbolisnotsent,ordersforallsymbolswillbereturnedinanarray. DataSource: Memory=>Database AllOrders(USER_DATA) Response: [ { "symbol":"LTCBTC", "orderId":1, "orderListId":-1,//UnlessOCO,thevaluewillalwaysbe-1 "clientOrderId":"myOrder1", "price":"0.1", "origQty":"1.0", "executedQty":"0.0", "cummulativeQuoteQty":"0.0", "status":"NEW", "timeInForce":"GTC", "type":"LIMIT", "side":"BUY", "stopPrice":"0.0", "icebergQty":"0.0", "time":1499827319559, "updateTime":1499827319559, "isWorking":true, "origQuoteOrderQty":"0.000000" } ] GET/api/v3/allOrders(HMACSHA256) Getallaccountorders;active,canceled,orfilled. Weight(IP): 10withsymbol Parameters: Name Type Mandatory Description symbol STRING YES orderId LONG NO startTime LONG NO endTime LONG NO limit INT NO Default500;max1000. recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Notes: IforderIdisset,itwillgetorders>=thatorderId.Otherwisemostrecentordersarereturned. ForsomehistoricalorderscummulativeQuoteQtywillbe<0,meaningthedataisnotavailableatthistime. IfstartTimeand/orendTimeprovided,orderIdisnotrequired. DataSource: Database NewOCO(TRADE) Response: { "orderListId":0, "contingencyType":"OCO", "listStatusType":"EXEC_STARTED", "listOrderStatus":"EXECUTING", "listClientOrderId":"JYVpp3F0f5CAG15DhtrqLp", "transactionTime":1563417480525, "symbol":"LTCBTC", "orders":[ { "symbol":"LTCBTC", "orderId":2, "clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos" }, { "symbol":"LTCBTC", "orderId":3, "clientOrderId":"xTXKaGYd4bluPVp78IVRvl" } ], "orderReports":[ { "symbol":"LTCBTC", "orderId":2, "orderListId":0, "clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos", "transactTime":1563417480525, "price":"0.000000", "origQty":"0.624363", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"NEW", "timeInForce":"GTC", "type":"STOP_LOSS", "side":"BUY", "stopPrice":"0.960664" }, { "symbol":"LTCBTC", "orderId":3, "orderListId":0, "clientOrderId":"xTXKaGYd4bluPVp78IVRvl", "transactTime":1563417480525, "price":"0.036435", "origQty":"0.624363", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"NEW", "timeInForce":"GTC", "type":"LIMIT_MAKER", "side":"BUY" } ] } POST/api/v3/order/oco(HMACSHA256) SendinanewOCO Weight(UID):2 Weight(IP):1 Parameters: Name Type Mandatory Description symbol STRING YES listClientOrderId STRING NO AuniqueIdfortheentireorderList side ENUM YES quantity DECIMAL YES limitClientOrderId STRING NO AuniqueIdforthelimitorder limitStrategyId INT NO limitStrategyType INT NO Thevaluecannotbelessthan1000000. price DECIMAL YES limitIcebergQty DECIMAL NO trailingDelta LONG NO stopClientOrderId STRING NO AuniqueIdforthestoploss/stoplosslimitleg stopPrice DECIMAL YES stopStrategyId INT NO stopStrategyType INT NO Thevaluecannotbelessthan1000000. stopLimitPrice DECIMAL NO Ifprovided,stopLimitTimeInForceisrequired. stopIcebergQty DECIMAL NO stopLimitTimeInForce ENUM NO ValidvaluesareGTC/FOK/IOC newOrderRespType ENUM NO SettheresponseJSON. recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES OtherInfo: PriceRestrictions: SELL:LimitPrice>LastPrice>StopPrice BUY:LimitPriceDatabase AccountTradeList(USER_DATA) Response: [ { "symbol":"BNBBTC", "id":28457, "orderId":100234, "orderListId":-1,//UnlessOCO,thevaluewillalwaysbe-1 "price":"4.00000100", "qty":"12.00000000", "quoteQty":"48.000012", "commission":"10.10000000", "commissionAsset":"BNB", "time":1499865549590, "isBuyer":true, "isMaker":false, "isBestMatch":true } ] GET/api/v3/myTrades(HMACSHA256) Gettradesforaspecificaccountandsymbol. Weight(IP): 10 Parameters: Name Type Mandatory Description symbol STRING YES orderId LONG NO Thiscanonlybeusedincombinationwithsymbol. startTime LONG NO endTime LONG NO fromId LONG NO TradeIdtofetchfrom.Defaultgetsmostrecenttrades. limit INT NO Default500;max1000. recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Notes: IffromIdisset,itwillgetid>=thatfromId. Otherwisemostrecenttradesarereturned. ThetimebetweenstartTimeandendTimecan'tbelongerthan24hours. DataSource: Memory=>Database QueryCurrentOrderCountUsage(TRADE) Response: [ { "rateLimitType":"ORDERS", "interval":"SECOND", "intervalNum":10, "limit":10000, "count":0 }, { "rateLimitType":"ORDERS", "interval":"DAY", "intervalNum":1, "limit":20000, "count":0 } ] GET/api/v3/rateLimit/order Displaystheuser'scurrentordercountusageforallintervals. Weight(IP): 20 Parameters: Name Type Mandatory Description recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES DataSource: Memory MarginAccount/TradeCrossMarginAccountTransfer(MARGIN) Response: { //transactionid "tranId":100000001 } POST/sapi/v1/margin/transfer(HMACSHA256) Executetransferbetweenspotaccountandcrossmarginaccount. Weight(IP): 600 Parameters: Name Type Mandatory Description asset STRING YES Theassetbeingtransferred,e.g.,BTC amount DECIMAL YES Theamounttobetransferred type INT YES 1:transferfrommainaccounttocrossmarginaccount2:transferfromcrossmarginaccounttomainaccount recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES MarginAccountBorrow(MARGIN) Response: { //transactionid "tranId":100000001 } POST/sapi/v1/margin/loan(HMACSHA256) Applyforaloan. Weight(UID): 3000 Parameters: Name Type Mandatory Description asset STRING YES isIsolated STRING NO forisolatedmarginornot,"TRUE","FALSE",default"FALSE" symbol STRING NO isolatedsymbol amount DECIMAL YES recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES If"isIsolated"="TRUE","symbol"mustbesent "isIsolated"="FALSE"forcrossedmarginloan MarginAccountRepay(MARGIN) Response: { //transactionid "tranId":100000001 } POST/sapi/v1/margin/repay(HMACSHA256) Repayloanformarginaccount. Weight(UID): 3000 Parameters: Name Type Mandatory Description asset STRING YES isIsolated STRING NO forisolatedmarginornot,"TRUE","FALSE",default"FALSE" symbol STRING NO isolatedsymbol amount DECIMAL YES recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES If"isIsolated"="TRUE","symbol"mustbesent "isIsolated"="FALSE"forcrossedmarginrepay QueryMarginAsset(MARKET_DATA) Response: { "assetFullName":"BinanceCoin", "assetName":"BNB", "isBorrowable":false, "isMortgageable":true, "userMinBorrow":"0.00000000", "userMinRepay":"0.00000000" } GET/sapi/v1/margin/asset Weight(IP): 10 Parameters: Name Type Mandatory Description asset STRING YES QueryCrossMarginPair(MARKET_DATA) Response: { "id":323355778339572400, "symbol":"BTCUSDT", "base":"BTC", "quote":"USDT", "isMarginTrade":true, "isBuyAllowed":true, "isSellAllowed":true } GET/sapi/v1/margin/pair Weight(IP): 10 Parameters: Name Type Mandatory Description symbol STRING YES GetAllMarginAssets(MARKET_DATA) Response: [ { "assetFullName":"USDcoin", "assetName":"USDC", "isBorrowable":true, "isMortgageable":true, "userMinBorrow":"0.00000000", "userMinRepay":"0.00000000" }, { "assetFullName":"BNB-coin", "assetName":"BNB", "isBorrowable":true, "isMortgageable":true, "userMinBorrow":"1.00000000", "userMinRepay":"0.00000000" }, { "assetFullName":"Tether", "assetName":"USDT", "isBorrowable":true, "isMortgageable":true, "userMinBorrow":"1.00000000", "userMinRepay":"0.00000000" }, { "assetFullName":"etherum", "assetName":"ETH", "isBorrowable":true, "isMortgageable":true, "userMinBorrow":"0.00000000", "userMinRepay":"0.00000000" }, { "assetFullName":"Bitcoin", "assetName":"BTC", "isBorrowable":true, "isMortgageable":true, "userMinBorrow":"0.00000000", "userMinRepay":"0.00000000" } ] GET/sapi/v1/margin/allAssets Weight(IP): 1 Parameters: None GetAllCrossMarginPairs(MARKET_DATA) Response: [ { "base":"BNB", "id":351637150141315861, "isBuyAllowed":true, "isMarginTrade":true, "isSellAllowed":true, "quote":"BTC", "symbol":"BNBBTC" }, { "base":"TRX", "id":351637923235429141, "isBuyAllowed":true, "isMarginTrade":true, "isSellAllowed":true, "quote":"BTC", "symbol":"TRXBTC" }, { "base":"XRP", "id":351638112213990165, "isBuyAllowed":true, "isMarginTrade":true, "isSellAllowed":true, "quote":"BTC", "symbol":"XRPBTC" }, { "base":"ETH", "id":351638524530850581, "isBuyAllowed":true, "isMarginTrade":true, "isSellAllowed":true, "quote":"BTC", "symbol":"ETHBTC" }, { "base":"BNB", "id":376870400832855109, "isBuyAllowed":true, "isMarginTrade":true, "isSellAllowed":true, "quote":"USDT", "symbol":"BNBUSDT" } ] GET/sapi/v1/margin/allPairs Weight(IP): 1 Parameters: None QueryMarginPriceIndex(MARKET_DATA) Response: { "calcTime":1562046418000, "price":"0.00333930", "symbol":"BNBBTC" } GET/sapi/v1/margin/priceIndex Weight(IP): 10 Parameters: Name Type Mandatory Description symbol STRING YES MarginAccountNewOrder(TRADE) ResponseACK: { "symbol":"BTCUSDT", "orderId":28, "clientOrderId":"6gCrw2kRUAF9CvJDGP16IP", "isIsolated":true,//ifisolatedmargin "transactTime":1507725176595 } ResponseRESULT: { "symbol":"BTCUSDT", "orderId":28, "clientOrderId":"6gCrw2kRUAF9CvJDGP16IP", "transactTime":1507725176595, "price":"1.00000000", "origQty":"10.00000000", "executedQty":"10.00000000", "cummulativeQuoteQty":"10.00000000", "status":"FILLED", "timeInForce":"GTC", "type":"MARKET", "isIsolated":true,//ifisolatedmargin "side":"SELL" } ResponseFULL: { "symbol":"BTCUSDT", "orderId":28, "clientOrderId":"6gCrw2kRUAF9CvJDGP16IP", "transactTime":1507725176595, "price":"1.00000000", "origQty":"10.00000000", "executedQty":"10.00000000", "cummulativeQuoteQty":"10.00000000", "status":"FILLED", "timeInForce":"GTC", "type":"MARKET", "side":"SELL", "marginBuyBorrowAmount":5,//willnotreturnifnomargintradehappens "marginBuyBorrowAsset":"BTC",//willnotreturnifnomargintradehappens "isIsolated":true,//ifisolatedmargin "fills":[ { "price":"4000.00000000", "qty":"1.00000000", "commission":"4.00000000", "commissionAsset":"USDT" }, { "price":"3999.00000000", "qty":"5.00000000", "commission":"19.99500000", "commissionAsset":"USDT" }, { "price":"3998.00000000", "qty":"2.00000000", "commission":"7.99600000", "commissionAsset":"USDT" }, { "price":"3997.00000000", "qty":"1.00000000", "commission":"3.99700000", "commissionAsset":"USDT" }, { "price":"3995.00000000", "qty":"1.00000000", "commission":"3.99500000", "commissionAsset":"USDT" } ] } POST/sapi/v1/margin/order(HMACSHA256) Postaneworderformarginaccount. Weight(UID): 6 Parameters: Name Type Mandatory Description symbol STRING YES isIsolated STRING NO forisolatedmarginornot,"TRUE","FALSE",default"FALSE" side ENUM YES BUYSELL type ENUM YES quantity DECIMAL NO quoteOrderQty DECIMAL NO price DECIMAL NO stopPrice DECIMAL NO UsedwithSTOP_LOSS,STOP_LOSS_LIMIT,TAKE_PROFIT,andTAKE_PROFIT_LIMITorders. newClientOrderId STRING NO Auniqueidamongopenorders.Automaticallygeneratedifnotsent. icebergQty DECIMAL NO UsedwithLIMIT,STOP_LOSS_LIMIT,andTAKE_PROFIT_LIMITtocreateanicebergorder. newOrderRespType ENUM NO SettheresponseJSON.ACK,RESULT,orFULL;MARKETandLIMITordertypesdefaulttoFULL,allotherordersdefaulttoACK. sideEffectType ENUM NO NO_SIDE_EFFECT,MARGIN_BUY,AUTO_REPAY;defaultNO_SIDE_EFFECT. timeInForce ENUM NO GTC,IOC,FOK recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES MarginAccountCancelOrder(TRADE) Response: { "symbol":"LTCBTC", "isIsolated":true,//ifisolatedmargin "orderId":28, "origClientOrderId":"myOrder1", "clientOrderId":"cancelMyOrder1", "price":"1.00000000", "origQty":"10.00000000", "executedQty":"8.00000000", "cummulativeQuoteQty":"8.00000000", "status":"CANCELED", "timeInForce":"GTC", "type":"LIMIT", "side":"SELL" } DELETE/sapi/v1/margin/order(HMACSHA256) Cancelanactiveorderformarginaccount. Weight(IP): 10 Parameters: Name Type Mandatory Description symbol STRING YES isIsolated STRING NO forisolatedmarginornot,"TRUE","FALSE",default"FALSE" orderId LONG NO origClientOrderId STRING NO newClientOrderId STRING NO Usedtouniquelyidentifythiscancel.Automaticallygeneratedbydefault. recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES EitherorderIdororigClientOrderIdmustbesent. MarginAccountCancelallOpenOrdersonaSymbol(TRADE) Response: [ { "symbol":"BTCUSDT", "isIsolated":true,//ifisolatedmargin "origClientOrderId":"E6APeyTJvkMvLMYMqu1KQ4", "orderId":11, "orderListId":-1, "clientOrderId":"pXLV6Hz6mprAcVYpVMTGgx", "price":"0.089853", "origQty":"0.178622", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"CANCELED", "timeInForce":"GTC", "type":"LIMIT", "side":"BUY" }, { "symbol":"BTCUSDT", "isIsolated":false,//ifisolatedmargin "origClientOrderId":"A3EF2HCwxgZPFMrfwbgrhv", "orderId":13, "orderListId":-1, "clientOrderId":"pXLV6Hz6mprAcVYpVMTGgx", "price":"0.090430", "origQty":"0.178622", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"CANCELED", "timeInForce":"GTC", "type":"LIMIT", "side":"BUY" }, { "orderListId":1929, "contingencyType":"OCO", "listStatusType":"ALL_DONE", "listOrderStatus":"ALL_DONE", "listClientOrderId":"2inzWQdDvZLHbbAmAozX2N", "transactionTime":1585230948299, "symbol":"BTCUSDT", "isIsolated":true,//ifisolatedmargin "orders":[ { "symbol":"BTCUSDT", "orderId":20, "clientOrderId":"CwOOIPHSmYywx6jZX77TdL" }, { "symbol":"BTCUSDT", "orderId":21, "clientOrderId":"461cPg51vQjV3zIMOXNz39" } ], "orderReports":[ { "symbol":"BTCUSDT", "origClientOrderId":"CwOOIPHSmYywx6jZX77TdL", "orderId":20, "orderListId":1929, "clientOrderId":"pXLV6Hz6mprAcVYpVMTGgx", "price":"0.668611", "origQty":"0.690354", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"CANCELED", "timeInForce":"GTC", "type":"STOP_LOSS_LIMIT", "side":"BUY", "stopPrice":"0.378131", "icebergQty":"0.017083" }, { "symbol":"BTCUSDT", "origClientOrderId":"461cPg51vQjV3zIMOXNz39", "orderId":21, "orderListId":1929, "clientOrderId":"pXLV6Hz6mprAcVYpVMTGgx", "price":"0.008791", "origQty":"0.690354", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"CANCELED", "timeInForce":"GTC", "type":"LIMIT_MAKER", "side":"BUY", "icebergQty":"0.639962" } ] } ] DELETE/sapi/v1/margin/openOrders(HMACSHA256) Cancelsallactiveordersonasymbolformarginaccount. ThisincludesOCOorders. Weight(IP): 1 Parameters Name Type Mandatory Description symbol STRING YES isIsolated STRING NO forisolatedmarginornot,"TRUE","FALSE",default"FALSE" recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES GetCrossMarginTransferHistory(USER_DATA) Response: { "rows":[ { "amount":"0.10000000", "asset":"BNB", "status":"CONFIRMED", "timestamp":1566898617, "txId":5240372201, "type":"ROLL_IN" }, { "amount":"5.00000000", "asset":"USDT", "status":"CONFIRMED", "timestamp":1566888436, "txId":5239810406, "type":"ROLL_OUT" }, { "amount":"1.00000000", "asset":"EOS", "status":"CONFIRMED", "timestamp":1566888403, "txId":5239808703, "type":"ROLL_IN" } ], "total":3 } GET/sapi/v1/margin/transfer(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description asset STRING NO type STRING NO TransferType:ROLL_IN,ROLL_OUT startTime LONG NO endTime LONG NO current LONG NO Currentlyqueryingpage.Startfrom1.Default:1 size LONG NO Default:10Max:100 archived STRING NO Default:false.Settotrueforarchiveddatafrom6monthsago recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Responseindescendingorder ThemaxintervalbetweenstartTimeandendTimeis30days. Returnsdataforlast7daysbydefault Setarchivedtotruetoquerydatafrom6monthsago QueryLoanRecord(USER_DATA) Response: { "rows":[ { "isolatedSymbol":"BNBUSDT",//isolatedsymbol,willnotbereturnedforcrossedmargin "txId":12807067523, "asset":"BNB", "principal":"0.84624403", "timestamp":1555056425000, "status":"CONFIRMED"//oneofPENDING(pendingexecution),CONFIRMED(successfullyloaned),FAILED(executionfailed,nothinghappenedtoyouraccount); } ], "total":1 } GET/sapi/v1/margin/loan(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description asset STRING YES isolatedSymbol STRING NO isolatedsymbol txId LONG NO thetranIdinPOST/sapi/v1/margin/loan startTime LONG NO endTime LONG NO current LONG NO Currentlyqueryingpage.Startfrom1.Default:1 size LONG NO Default:10Max:100 archived STRING NO Default:false.Settotrueforarchiveddatafrom6monthsago recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES txIdorstartTimemustbesent.txIdtakesprecedence. Responseindescendingorder IfisolatedSymbolisnotsent,crossedmargindatawillbereturned ThemaxintervalbetweenstartTimeandendTimeis30days. IfstartTimeandendTimenotsent,returnrecordsofthelast7daysbydefault Setarchivedtotruetoquerydatafrom6monthsago QueryRepayRecord(USER_DATA) Response: { "rows":[ { "isolatedSymbol":"BNBUSDT",//isolatedsymbol,willnotbereturnedforcrossedmargin "amount":"14.00000000",//Totalamountrepaid "asset":"BNB", "interest":"0.01866667",//Interestrepaid "principal":"13.98133333",//Principalrepaid "status":"CONFIRMED",//oneofPENDING(pendingexecution),CONFIRMED(successfullyexecution),FAILED(executionfailed,nothinghappenedtoyouraccount) "timestamp":1563438204000, "txId":2970933056 } ], "total":1 } GET/sapi/v1/margin/repay(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description asset STRING YES isolatedSymbol STRING NO isolatedsymbol txId LONG NO returnof/sapi/v1/margin/repay startTime LONG NO endTime LONG NO current LONG NO Currentlyqueryingpage.Startfrom1.Default:1 size LONG NO Default:10Max:100 archived STRING NO Default:false.Settotrueforarchiveddatafrom6monthsago recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES txIdorstartTimemustbesent.txIdtakesprecedence. Responseindescendingorder IfisolatedSymbolisnotsent,crossedmargindatawillbereturned ThemaxintervalbetweenstartTimeandendTimeis30days. IfstartTimeandendTimenotsent,returnrecordsofthelast7daysbydefault Setarchivedtotruetoquerydatafrom6monthsago GetInterestHistory(USER_DATA) Response: { "rows":[ { "isolatedSymbol":"BNBUSDT",//isolatedsymbol,willnotbereturnedforcrossedmargin "asset":"BNB", "rawAsset":"BTC",//willnotbereturnedforisolatedmargin "interest":"0.02414667", "interestAccuredTime":1566813600000, "interestRate":"0.01600000", "principal":"36.22000000", "type":"ON_BORROW" } ], "total":1 } GET/sapi/v1/margin/interestHistory(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description asset STRING NO isolatedSymbol STRING NO isolatedsymbol startTime LONG NO endTime LONG NO current LONG NO Currentlyqueryingpage.Startfrom1.Default:1 size LONG NO Default:10Max:100 archived STRING NO Default:false.Settotrueforarchiveddatafrom6monthsago recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Responseindescendingorder IfisolatedSymbolisnotsent,crossedmargindatawillbereturned ThemaxintervalbetweenstartTimeandendTimeis30days. IfstartTimeandendTimenotsent,returnrecordsofthelast7daysbydefault Setarchivedtotruetoquerydatafrom6monthsago typeinresponsehas4enums: PERIODICinterestchargedperhour ON_BORROWfirstinterestchargedonborrow PERIODIC_CONVERTEDinterestchargedperhourconvertedintoBNB ON_BORROW_CONVERTEDfirstinterestchargedonborrowconvertedintoBNB GetForceLiquidationRecord(USER_DATA) Response: { "rows":[ { "avgPrice":"0.00388359", "executedQty":"31.39000000", "orderId":180015097, "price":"0.00388110", "qty":"31.39000000", "side":"SELL", "symbol":"BNBBTC", "timeInForce":"GTC", "isIsolated":true, "updatedTime":1558941374745 } ], "total":1 } GET/sapi/v1/margin/forceLiquidationRec(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description startTime LONG NO endTime LONG NO isolatedSymbol STRING NO current LONG NO Currentlyqueryingpage.Startfrom1.Default:1 size LONG NO Default:10Max:100 recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Responseindescendingorder QueryCrossMarginAccountDetails(USER_DATA) Response: { "borrowEnabled":true, "marginLevel":"11.64405625", "totalAssetOfBtc":"6.82728457", "totalLiabilityOfBtc":"0.58633215", "totalNetAssetOfBtc":"6.24095242", "tradeEnabled":true, "transferEnabled":true, "userAssets":[ { "asset":"BTC", "borrowed":"0.00000000", "free":"0.00499500", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"0.00499500" }, { "asset":"BNB", "borrowed":"201.66666672", "free":"2346.50000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"2144.83333328" }, { "asset":"ETH", "borrowed":"0.00000000", "free":"0.00000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"0.00000000" }, { "asset":"USDT", "borrowed":"0.00000000", "free":"0.00000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"0.00000000" } ] } GET/sapi/v1/margin/account(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES QueryMarginAccount'sOrder(USER_DATA) Response: { "clientOrderId":"ZwfQzuDIGpceVhKW5DvCmO", "cummulativeQuoteQty":"0.00000000", "executedQty":"0.00000000", "icebergQty":"0.00000000", "isWorking":true, "orderId":213205622, "origQty":"0.30000000", "price":"0.00493630", "side":"SELL", "status":"NEW", "stopPrice":"0.00000000", "symbol":"BNBBTC", "isIsolated":true, "time":1562133008725, "timeInForce":"GTC", "type":"LIMIT", "updateTime":1562133008725 } GET/sapi/v1/margin/order(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description symbol STRING YES isIsolated STRING NO forisolatedmarginornot,"TRUE","FALSE",default"FALSE" orderId LONG NO origClientOrderId STRING NO recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES EitherorderIdororigClientOrderIdmustbesent. ForsomehistoricalorderscummulativeQuoteQtywillbe<0,meaningthedataisnotavailableatthistime. QueryMarginAccount'sOpenOrders(USER_DATA) Response: [ { "clientOrderId":"qhcZw71gAkCCTv0t0k8LUK", "cummulativeQuoteQty":"0.00000000", "executedQty":"0.00000000", "icebergQty":"0.00000000", "isWorking":true, "orderId":211842552, "origQty":"0.30000000", "price":"0.00475010", "side":"SELL", "status":"NEW", "stopPrice":"0.00000000", "symbol":"BNBBTC", "isIsolated":true, "time":1562040170089, "timeInForce":"GTC", "type":"LIMIT", "updateTime":1562040170089 } ] GET/sapi/v1/margin/openOrders(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description symbol STRING NO isIsolated STRING NO forisolatedmarginornot,"TRUE","FALSE",default"FALSE" recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Ifthesymbolisnotsent,ordersforallsymbolswillbereturnedinanarray. Whenallsymbolsarereturned,thenumberofrequestscountedagainsttheratelimiterisequaltothenumberofsymbolscurrentlytradingontheexchange. IfisIsolated="TRUE",symbolmustbesent. QueryMarginAccount'sAllOrders(USER_DATA) Response: [ { "clientOrderId":"D2KDy4DIeS56PvkM13f8cP", "cummulativeQuoteQty":"0.00000000", "executedQty":"0.00000000", "icebergQty":"0.00000000", "isWorking":false, "orderId":41295, "origQty":"5.31000000", "price":"0.22500000", "side":"SELL", "status":"CANCELED", "stopPrice":"0.18000000", "symbol":"BNBBTC", "isIsolated":false, "time":1565769338806, "timeInForce":"GTC", "type":"TAKE_PROFIT_LIMIT", "updateTime":1565769342148 }, { "clientOrderId":"gXYtqhcEAs2Rn9SUD9nRKx", "cummulativeQuoteQty":"0.00000000", "executedQty":"0.00000000", "icebergQty":"1.00000000", "isWorking":true, "orderId":41296, "origQty":"6.65000000", "price":"0.18000000", "side":"SELL", "status":"CANCELED", "stopPrice":"0.00000000", "symbol":"BNBBTC", "isIsolated":false, "time":1565769348687, "timeInForce":"GTC", "type":"LIMIT", "updateTime":1565769352226 }, { "clientOrderId":"duDq1BqohhcMmdMs9FSuDy", "cummulativeQuoteQty":"0.39450000", "executedQty":"2.63000000", "icebergQty":"0.00000000", "isWorking":true, "orderId":41297, "origQty":"2.63000000", "price":"0.00000000", "side":"SELL", "status":"FILLED", "stopPrice":"0.00000000", "symbol":"BNBBTC", "isIsolated":false, "time":1565769358139, "timeInForce":"GTC", "type":"MARKET", "updateTime":1565769358139 } ] GET/sapi/v1/margin/allOrders(HMACSHA256) Weight(IP): 200 RequestLimit 60times/minperIP Parameters: Name Type Mandatory Description symbol STRING YES isIsolated STRING NO forisolatedmarginornot,"TRUE","FALSE",default"FALSE" orderId LONG NO startTime LONG NO endTime LONG NO limit INT NO Default500;max500. recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES IforderIdisset,itwillgetorders>=thatorderId.Otherwisemostrecentordersarereturned. ForsomehistoricalorderscummulativeQuoteQtywillbe<0,meaningthedataisnotavailableatthistime. MarginAccountNewOCO(TRADE) Response: { "orderListId":0, "contingencyType":"OCO", "listStatusType":"EXEC_STARTED", "listOrderStatus":"EXECUTING", "listClientOrderId":"JYVpp3F0f5CAG15DhtrqLp", "transactionTime":1563417480525, "symbol":"LTCBTC", "marginBuyBorrowAmount":"5",//willnotreturnifnomargintradehappens "marginBuyBorrowAsset":"BTC",//willnotreturnifnomargintradehappens "isIsolated":false,//ifisolatedmargin "orders":[ { "symbol":"LTCBTC", "orderId":2, "clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos" }, { "symbol":"LTCBTC", "orderId":3, "clientOrderId":"xTXKaGYd4bluPVp78IVRvl" } ], "orderReports":[ { "symbol":"LTCBTC", "orderId":2, "orderListId":0, "clientOrderId":"Kk7sqHb9J6mJWTMDVW7Vos", "transactTime":1563417480525, "price":"0.000000", "origQty":"0.624363", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"NEW", "timeInForce":"GTC", "type":"STOP_LOSS", "side":"BUY", "stopPrice":"0.960664" }, { "symbol":"LTCBTC", "orderId":3, "orderListId":0, "clientOrderId":"xTXKaGYd4bluPVp78IVRvl", "transactTime":1563417480525, "price":"0.036435", "origQty":"0.624363", "executedQty":"0.000000", "cummulativeQuoteQty":"0.000000", "status":"NEW", "timeInForce":"GTC", "type":"LIMIT_MAKER", "side":"BUY" } ] } POST/sapi/v1/margin/order/oco(HMACSHA256) SendinanewOCOforamarginaccount Weight(UID):6 Parameters: Name Type Mandatory Description symbol STRING YES isIsolated STRING NO forisolatedmarginornot,"TRUE","FALSE",default"FALSE" listClientOrderId STRING NO AuniqueIdfortheentireorderList side ENUM YES quantity DECIMAL YES limitClientOrderId STRING NO AuniqueIdforthelimitorder price DECIMAL YES limitIcebergQty DECIMAL NO stopClientOrderId STRING NO AuniqueIdforthestoploss/stoplosslimitleg stopPrice DECIMAL YES stopLimitPrice DECIMAL NO Ifprovided,stopLimitTimeInForceisrequired. stopIcebergQty DECIMAL NO stopLimitTimeInForce ENUM NO ValidvaluesareGTC/FOK/IOC newOrderRespType ENUM NO SettheresponseJSON. sideEffectType ENUM NO NO_SIDE_EFFECT,MARGIN_BUY,AUTO_REPAY;defaultNO_SIDE_EFFECT. recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES OtherInfo: PriceRestrictions: SELL:LimitPrice>LastPrice>StopPrice BUY:LimitPrice=thatfromId.Otherwisemostrecenttradesarereturned. QueryMaxBorrow(USER_DATA) Response: { "amount":"1.69248805",//account'scurrentlymaxborrowableamountwithsufficientsystemavailability "borrowLimit":"60"//maxborrowableamountlimitedbytheaccountlevel } GET/sapi/v1/margin/maxBorrowable(HMACSHA256) Weight(IP): 50 Parameters: Name Type Mandatory Description asset STRING YES isolatedSymbol STRING NO isolatedsymbol recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES IfisolatedSymbolisnotsent,crossedmargindatawillbesent. borrowLimitisalsoavailablefromhttps://www.binance.com/en/margin-fee QueryMaxTransfer-OutAmount(USER_DATA) Response: { "amount":"3.59498107" } GET/sapi/v1/margin/maxTransferable(HMACSHA256) Weight(IP): 50 Parameters: Name Type Mandatory Description asset STRING YES isolatedSymbol STRING NO isolatedsymbol recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES IfisolatedSymbolisnotsent,crossedmargindatawillbesent. GetSummaryofMarginaccount(USER_DATA) Response: { "normalBar":"1.5", "marginCallBar":"1.3", "forceLiquidationBar":"1.1" } GET/sapi/v1/margin/tradeCoeff(HMACSHA256) Getpersonalmarginlevelinformation Weight(IP): 10 Parameters: Name Type Mandatory Description email STRING YES recvWindow LONG NO timestamp LONG YES IsolatedMarginAccountTransfer(MARGIN) Response: { //transactionid "tranId":100000001 } POST/sapi/v1/margin/isolated/transfer(HMACSHA256) Weight(UID): 600 Parameters: Name Type Mandatory Description asset STRING YES asset,suchasBTC symbol STRING YES transFrom STRING YES "SPOT","ISOLATED_MARGIN" transTo STRING YES "SPOT","ISOLATED_MARGIN" amount DECIMAL YES recvWindow LONG NO Nomorethan60000 timestamp LONG YES GetIsolatedMarginTransferHistory(USER_DATA) Response: { "rows":[ { "amount":"0.10000000", "asset":"BNB", "status":"CONFIRMED", "timestamp":1566898617000, "txId":5240372201, "transFrom":"SPOT", "transTo":"ISOLATED_MARGIN" }, { "amount":"5.00000000", "asset":"USDT", "status":"CONFIRMED", "timestamp":1566888436123, "txId":5239810406, "transFrom":"ISOLATED_MARGIN", "transTo":"SPOT" } ], "total":2 } GET/sapi/v1/margin/isolated/transfer(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description asset STRING NO symbol STRING YES transFrom STRING NO "SPOT","ISOLATED_MARGIN" transTo STRING NO "SPOT","ISOLATED_MARGIN" startTime LONG NO endTime LONG NO current LONG NO Currentpage,default1 size LONG NO Default10,max100 archived STRING NO Default:false.Settotrueforarchiveddatafrom6monthsago recvWindow LONG NO Nomorethan60000 timestamp LONG YES ThemaxintervalbetweenstartTimeandendTimeis30days. IfstartTimeandendTimenotsent,returnrecordsofthelast7daysbydefault Setarchivedtotruetoquerydatafrom6monthsago QueryIsolatedMarginAccountInfo(USER_DATA) Response: If"symbols"isnotsent { "assets":[ { "baseAsset": { "asset":"BTC", "borrowEnabled":true, "borrowed":"0.00000000", "free":"0.00000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"0.00000000", "netAssetOfBtc":"0.00000000", "repayEnabled":true, "totalAsset":"0.00000000" }, "quoteAsset": { "asset":"USDT", "borrowEnabled":true, "borrowed":"0.00000000", "free":"0.00000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"0.00000000", "netAssetOfBtc":"0.00000000", "repayEnabled":true, "totalAsset":"0.00000000" }, "symbol":"BTCUSDT", "isolatedCreated":true, "enabled":true,//true-enabled,false-disabled "marginLevel":"0.00000000", "marginLevelStatus":"EXCESSIVE",//"EXCESSIVE","NORMAL","MARGIN_CALL","PRE_LIQUIDATION","FORCE_LIQUIDATION" "marginRatio":"0.00000000", "indexPrice":"10000.00000000", "liquidatePrice":"1000.00000000", "liquidateRate":"1.00000000", "tradeEnabled":true } ], "totalAssetOfBtc":"0.00000000", "totalLiabilityOfBtc":"0.00000000", "totalNetAssetOfBtc":"0.00000000" } If"symbols"issent { "assets":[ { "baseAsset": { "asset":"BTC", "borrowEnabled":true, "borrowed":"0.00000000", "free":"0.00000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"0.00000000", "netAssetOfBtc":"0.00000000", "repayEnabled":true, "totalAsset":"0.00000000" }, "quoteAsset": { "asset":"USDT", "borrowEnabled":true, "borrowed":"0.00000000", "free":"0.00000000", "interest":"0.00000000", "locked":"0.00000000", "netAsset":"0.00000000", "netAssetOfBtc":"0.00000000", "repayEnabled":true, "totalAsset":"0.00000000" }, "symbol":"BTCUSDT", "isolatedCreated":true, "enabled":true,//true-enabled,false-disabled "marginLevel":"0.00000000", "marginLevelStatus":"EXCESSIVE",//"EXCESSIVE","NORMAL","MARGIN_CALL","PRE_LIQUIDATION","FORCE_LIQUIDATION" "marginRatio":"0.00000000", "indexPrice":"10000.00000000", "liquidatePrice":"1000.00000000", "liquidateRate":"1.00000000", "tradeEnabled":true } ] } GET/sapi/v1/margin/isolated/account(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description symbols STRING NO Max5symbolscanbesent;separatedby",".e.g."BTCUSDT,BNBUSDT,ADAUSDT" recvWindow LONG NO Nomorethan60000 timestamp LONG YES If"symbols"isnotsent,allisolatedassetswillbereturned. If"symbols"issent,onlytheisolatedassetsofthesentsymbolswillbereturned. DisableIsolatedMarginAccount(TRADE) Response: { "success":true, "symbol":"BTCUSDT" } DELETE/sapi/v1/margin/isolated/account(HMACSHA256) Disableisolatedmarginaccountforaspecificsymbol.Eachtradingpaircanonlybedeactivatedonceevery24 hours. Weight(UID): 300 Parameters: Name Type Mandatory Description symbol STRING YES recvWindow LONG NO Nomorethan60000 timestamp LONG YES EnableIsolatedMarginAccount(TRADE) Response: { "success":true, "symbol":"BTCUSDT" } POST/sapi/v1/margin/isolated/account(HMACSHA256) Enableisolatedmarginaccountforaspecificsymbol(Onlysupportsactivationofpreviouslydisabledaccounts). Weight(UID): 300 Parameters: Name Type Mandatory Description symbol STRING YES recvWindow LONG NO Nomorethan60000 timestamp LONG YES QueryEnabledIsolatedMarginAccountLimit(USER_DATA) Response: { "enabledAccount":5, "maxAccount":20 } GET/sapi/v1/margin/isolated/accountLimit(HMACSHA256) Queryenabledisolatedmarginaccountlimit. Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO Nomorethan60000 timestamp LONG YES QueryIsolatedMarginSymbol(USER_DATA) Response: { "symbol":"BTCUSDT", "base":"BTC", "quote":"USDT", "isMarginTrade":true, "isBuyAllowed":true, "isSellAllowed":true } GET/sapi/v1/margin/isolated/pair(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description symbol STRING YES recvWindow LONG NO Nomorethan60000 timestamp LONG YES GetAllIsolatedMarginSymbol(USER_DATA) Response: [ { "base":"BNB", "isBuyAllowed":true, "isMarginTrade":true, "isSellAllowed":true, "quote":"BTC", "symbol":"BNBBTC" }, { "base":"TRX", "isBuyAllowed":true, "isMarginTrade":true, "isSellAllowed":true, "quote":"BTC", "symbol":"TRXBTC" } ] GET/sapi/v1/margin/isolated/allPairs(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description recvWindow LONG NO Nomorethan60000 timestamp LONG YES ToggleBNBBurnOnSpotTradeAndMarginInterest(USER_DATA) Response: { "spotBNBBurn":true, "interestBNBBurn":false } POST/sapi/v1/bnbBurn(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description spotBNBBurn STRING NO "true"or"false";DetermineswhethertouseBNBtopayfortradingfeesonSPOT interestBNBBurn STRING NO "true"or"false";DetermineswhethertouseBNBtopayformarginloan'sinterest recvWindow LONG NO Nomorethan60000 timestamp LONG YES "spotBNBBurn"and"interestBNBBurn"shouldbesentatleastone. GetBNBBurnStatus(USER_DATA) Response: { "spotBNBBurn":true, "interestBNBBurn":false } GET/sapi/v1/bnbBurn(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO Nomorethan60000 timestamp LONG YES QueryMarginInterestRateHistory(USER_DATA) Response: [ { "asset":"BTC", "dailyInterestRate":"0.00025000", "timestamp":1611544731000, "vipLevel":1 }, { "asset":"BTC", "dailyInterestRate":"0.00035000", "timestamp":1610248118000, "vipLevel":1 } ] GET/sapi/v1/margin/interestRateHistory(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description asset STRING YES vipLevel INT NO Default:user'sviplevel startTime LONG NO Default:7daysago endTime LONG NO Default:present.Maximumrange:1months. recvWindow LONG NO Nomorethan60000 timestamp LONG YES QueryCrossMarginFeeData(USER_DATA) Response: [ { "vipLevel":0, "coin":"BTC", "transferIn":true, "borrowable":true, "dailyInterest":"0.00026125", "yearlyInterest":"0.0953", "borrowLimit":"180", "marginablePairs":[ "BNBBTC", "TRXBTC", "ETHBTC", "BTCUSDT" ] } ] GET/sapi/v1/margin/crossMarginData(HMACSHA256) Getcrossmarginfeedatacollectionwithanyvipleveloruser'scurrentspecificdataashttps://www.binance.com/en/margin-fee Weight(IP): 1whencoinisspecified; 5whenthecoinparameterisomitted Parameters: Name Type Mandatory Description vipLevel INT NO User'scurrentspecificmargindatawillbereturnedifvipLevelisomitted coin STRING NO recvWindow LONG NO Nomorethan60000 timestamp LONG YES QueryIsolatedMarginFeeData(USER_DATA) Response: [ { "vipLevel":0, "symbol":"BTCUSDT", "leverage":"10", "data":[ { "coin":"BTC", "dailyInterest":"0.00026125", "borrowLimit":"270" }, { "coin":"USDT", "dailyInterest":"0.000475", "borrowLimit":"2100000" } ] } ] GET/sapi/v1/margin/isolatedMarginData(HMACSHA256) Getisolatedmarginfeedatacollectionwithanyvipleveloruser'scurrentspecificdataashttps://www.binance.com/en/margin-fee Weight(IP): 1whenasingleisspecified; 10whenthesymbolparameterisomitted Parameters: Name Type Mandatory Description vipLevel INT NO User'scurrentspecificmargindatawillbereturnedifvipLevelisomitted symbol STRING NO recvWindow LONG NO Nomorethan60000 timestamp LONG YES QueryIsolatedMarginTierData(USER_DATA) Response: [ { "symbol":"BTCUSDT", "tier":1, "effectiveMultiple":"10", "initialRiskRatio":"1.111", "liquidationRiskRatio":"1.05", "baseAssetMaxBorrowable":"9", "quoteAssetMaxBorrowable":"70000" } ] GET/sapi/v1/margin/isolatedMarginTier(HMACSHA256) Getisolatedmargintierdatacollectionwithanytierashttps://www.binance.com/en/margin-data Weight(IP): 1 Parameters: Name Type Mandatory Description symbol STRING YES tier INTEGER NO Allmargintierdatawillbereturnediftierisomitted recvWindow LONG NO Nomorethan60000 timestamp LONG YES QueryCurrentMarginOrderCountUsage(TRADE) Response: [ { "rateLimitType":"ORDERS", "interval":"SECOND", "intervalNum":10, "limit":10000, "count":0 }, { "rateLimitType":"ORDERS", "interval":"DAY", "intervalNum":1, "limit":20000, "count":0 } ] GET/sapi/v1/margin/rateLimit/order Displaystheuser'scurrentmarginordercountusageforallintervals. Weight(IP): 20 Parameters: Name Type Mandatory Description isIsolated STRING NO forisolatedmarginornot,"TRUE","FALSE",default"FALSE" symbol STRING NO isolatedsymbol,mandatoryforisolatedmargin recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES MarginDustlog(USER_DATA) Response: { "total":8,//Totalcountsofexchange "userAssetDribblets":[ { "operateTime":1615985535000, "totalTransferedAmount":"0.00132256",//TotaltransferedBNBamountforthisexchange. "totalServiceChargeAmount":"0.00002699",//Totalservicechargeamountforthisexchange. "transId":45178372831, "userAssetDribbletDetails":[//Detailsofthisexchange. { "transId":4359321, "serviceChargeAmount":"0.000009", "amount":"0.0009", "operateTime":1615985535000, "transferedAmount":"0.000441", "fromAsset":"USDT" }, { "transId":4359321, "serviceChargeAmount":"0.00001799", "amount":"0.0009", "operateTime":1615985535000, "transferedAmount":"0.00088156", "fromAsset":"ETH" } ] }, { "operateTime":1616203180000, "totalTransferedAmount":"0.00058795", "totalServiceChargeAmount":"0.000012", "transId":4357015, "userAssetDribbletDetails":[ { "transId":4357015, "serviceChargeAmount":"0.00001", "amount":"0.001", "operateTime":1616203180000, "transferedAmount":"0.00049", "fromAsset":"USDT" }, { "transId":4357015, "serviceChargeAmount":"0.000002", "amount":"0.0001", "operateTime":1616203180000, "transferedAmount":"0.00009795", "fromAsset":"ETH" } ] } ] } } GET/sapi/v1/margin/dribblet(HMACSHA256) Querythehistoricalinformationofuser'smarginaccountsmall-valueassetconversionBNB. Parameters: Name Type Mandatory Description startTime LONG NO endTime LONG NO recvWindow LONG NO timestamp LONG YES UserDataStreams ThebaseAPIendpointis:https://api.binance.com AUserDataStreamlistenKeyisvalidfor60minutesaftercreation. DoingaPUTonalistenKeywillextenditsvalidityfor60minutes. DoingaDELETEonalistenKeywillclosethestreamandinvalidatethelistenKey. DoingaPOSTonanaccountwithanactivelistenKeywillreturnthecurrentlyactivelistenKeyandextenditsvalidityfor60minutes. Thebasewebsocketendpointis:wss://stream.binance.com:9443 UserDataStreamsareaccessedat/ws/or/stream?streams= Asingleconnectiontostream.binance.comisonlyvalidfor24hours;expecttobedisconnectedatthe24hourmark LISTENKEY(SPOT)CreateaListenKey(USER_STREAM) Response: { "listenKey":"pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1" } POST/api/v3/userDataStream Startanewuserdatastream.Thestreamwillcloseafter60minutesunlessakeepaliveissent.IftheaccounthasanactivelistenKey,thatlistenKeywillbereturnedanditsvaliditywillbeextendedfor60minutes. Weight: 1 Parameters: NONE DataSource: Memory Ping/Keep-aliveaListenKey(USER_STREAM) Response: {} PUT/api/v3/userDataStream Keepaliveauserdatastreamtopreventatimeout.Userdatastreamswillcloseafter60minutes.It'srecommendedtosendapingaboutevery30minutes. Weight: 1 Parameters: Name Type Mandatory Description listenKey STRING YES DataSource: Memory CloseaListenKey(USER_STREAM) Response: {} DELETE/api/v3/userDataStream Closeoutauserdatastream. Weight: 1 Parameters: Name Type Mandatory Description listenKey STRING YES DataSource: Memory LISTENKEY(MARGIN)CreateaListenKey(USER_STREAM) Response: {"listenKey":"T3ee22BIYuWqmvne0HNq2A2WsFlEtLhvWCtItw6ffhhdmjifQ2tRbuKkTHhr"} POST/sapi/v1/userDataStream Weight: 1 Parameters: NONE Ping/Keep-aliveaListenKey(USER_STREAM) Response: {} PUT/sapi/v1/userDataStream Weight: 1 Parameters: Name Type Mandatory Description listenKey STRING YES CloseaListenKey(USER_STREAM) Response: {} DELETE/sapi/v1/userDataStream Weight: 1 Parameters: Name Type Mandatory Description listenKey STRING YES LISTENKEY(ISOLATEDMARGIN)GenerateaListenKey(USER_STREAM) Response: { "listenKey":"T3ee22BIYuWqmvne0HNq2A2WsFlEtLhvWCtItw6ffhhdmjifQ2tRbuKkTHhr" } POST/sapi/v1/userDataStream/isolated Weight: 1 Parameters: Name Type Mandatory Description symbol STRING YES Ping/Keep-aliveaListenKey(USER_STREAM) Response: {} PUT/sapi/v1/userDataStream/isolated Weight: 1 Parameters: Name Type Mandatory Description symbol STRING YES listenKey STRING YES CloseaListenKey(USER_STREAM) Response: {} DELETE/sapi/v1/userDataStream/isolated Weight: 1 Parameters: Name Type Mandatory Description symbol STRING YES listenKey STRING YES Payload:AccountUpdate outboundAccountPositionissentanytimeanaccountbalancehaschangedandcontainstheassetsthatwerepossiblychangedbytheeventthatgeneratedthebalancechange. Payload: { "e":"outboundAccountPosition",//Eventtype "E":1564034571105,//EventTime "u":1564034571073,//Timeoflastaccountupdate "B":[//BalancesArray { "a":"ETH",//Asset "f":"10000.000000",//Free "l":"0.000000"//Locked } ] } Payload:BalanceUpdate BalanceUpdateoccursduringthefollowing: Depositsorwithdrawalsfromtheaccount Transferoffundsbetweenaccounts(e.g.SpottoMargin) Payload { "e":"balanceUpdate",//EventType "E":1573200697110,//EventTime "a":"BTC",//Asset "d":"100.00000000",//BalanceDelta "T":1573200697068//ClearTime } Payload:OrderUpdate OrdersareupdatedwiththeexecutionReportevent. CheckthePublicAPIDefinitionsandbelowforrelevantenumdefinitions. AveragepricecanbefoundbydoingZdividedbyz. Payload: { "e":"executionReport",//Eventtype "E":1499405658658,//Eventtime "s":"ETHBTC",//Symbol "c":"mUvoqJxFIILMdfAW5iGSOW",//ClientorderID "S":"BUY",//Side "o":"LIMIT",//Ordertype "f":"GTC",//Timeinforce "q":"1.00000000",//Orderquantity "p":"0.10264410",//Orderprice "P":"0.00000000",//Stopprice "d":4,//TrailingDelta;Thisisonlyvisibleiftheorderwasatrailingstoporder. "F":"0.00000000",//Icebergquantity "g":-1,//OrderListId "C":"",//OriginalclientorderID;ThisistheIDoftheorderbeingcanceled "x":"NEW",//Currentexecutiontype "X":"NEW",//Currentorderstatus "r":"NONE",//Orderrejectreason;willbeanerrorcode. "i":4293153,//OrderID "l":"0.00000000",//Lastexecutedquantity "z":"0.00000000",//Cumulativefilledquantity "L":"0.00000000",//Lastexecutedprice "n":"0",//Commissionamount "N":null,//Commissionasset "T":1499405658657,//Transactiontime "t":-1,//TradeID "I":8641984,//Ignore "w":true,//Istheorderonthebook? "m":false,//Isthistradethemakerside? "M":false,//Ignore "O":1499405658657,//Ordercreationtime "Z":"0.00000000",//Cumulativequoteassettransactedquantity "Y":"0.00000000",//Lastquoteassettransactedquantity(i.e.lastPrice*lastQty) "Q":"0.00000000",//QuoteOrderQty "j":1,//StrategyID;ThisisonlyvisibleifthestrategyIdparameterwasprovideduponorderplacement "J":1000000//StrategyType;ThisisonlyvisibleifthestrategyTypeparameterwasprovideduponorderplacement } Executiontypes: NEW-Theorderhasbeenacceptedintotheengine. CANCELED-Theorderhasbeencanceledbytheuser. REPLACED(currentlyunused) REJECTED-Theorderhasbeenrejectedandwasnotprocessed.(ThisisneverpushedintotheUserDataStream) TRADE-Partoftheorderoralloftheorder'squantityhasfilled. EXPIRED-Theorderwascanceledaccordingtotheordertype'srules(e.g.LIMITFOKorderswithnofill,LIMITIOCorMARKETordersthatpartiallyfill)orbytheexchange,(e.g.orderscanceledduringliquidation,orderscanceledduringmaintenance) IftheorderisanOCO,aneventwillbedisplayednamedListStatusinadditiontotheexecutionReportevent. Payload { "e":"listStatus",//EventType "E":1564035303637,//EventTime "s":"ETHBTC",//Symbol "g":2,//OrderListId "c":"OCO",//ContingencyType "l":"EXEC_STARTED",//ListStatusType "L":"EXECUTING",//ListOrderStatus "r":"NONE",//ListRejectReason "C":"F4QN4G8DlFATFlIUQ0cjdD",//ListClientOrderID "T":1564035303625,//TransactionTime "O":[//Anarrayofobjects { "s":"ETHBTC",//Symbol "i":17,//orderId "c":"AJYsMjErWJesZvqlJCTUgL"//ClientOrderId }, { "s":"ETHBTC", "i":18, "c":"bfYPSQdLoqAJeNrOr9adzq" } ] } SavingsEndpoints TheendpointsbelowallowyoutointeractwithBinanceSavings,previouslyknownasBinanceLending. Formoreinformationonthis,pleaserefertotheBinanceSavingspage GetFlexibleProductList(USER_DATA) Response: [ { "asset":"BTC", "avgAnnualInterestRate":"0.05000000" "tierAnnualInterestRate":{ "0-5BTC":0.05, "5-10BTC":0.03, ">10BTC":0.01 }, "canPurchase":true, "canRedeem":true, "dailyInterestPerThousand":"0.00685000",//abandoned "featured":true, "minPurchaseAmount":"0.01000000", "productId":"BTC001", "purchasedAmount":"16.32467016", "status":"PURCHASING",//PREHEATING:Warmingup;PURCHASING:Subscribing;END:Finish "upLimit":"200.00000000", "upLimitPerUser":"5.00000000" }, { "asset":"BUSD", "avgAnnualInterestRate":"0.01228590", "tierAnnualInterestRate":"", "canPurchase":true, "canRedeem":true, "dailyInterestPerThousand":"0.03836000",//abandoned "featured":true, "minPurchaseAmount":"0.10000000", "productId":"BUSD001", "purchasedAmount":"10.38932339", "status":"PURCHASING",//PREHEATING:Warmingup;PURCHASING:Subscribing;END:Finish "upLimit":"100000.00000000", "upLimitPerUser":"50000.00000000" } ] GET/sapi/v1/lending/daily/product/list(HMACSHA256) 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 Currentquerypage.Default:1,Min:1 size LONG NO Default:50,Max:100 recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES GetLeftDailyPurchaseQuotaofFlexibleProduct(USER_DATA) Response: { "asset":"BUSD", "leftQuota":"50000.00000000" } GET/sapi/v1/lending/daily/userLeftQuota(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description productId STRING YES recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES PurchaseFlexibleProduct(USER_DATA) Response: { "purchaseId":40607 } POST/sapi/v1/lending/daily/purchase(HMACSHA256) Weight(IP): 1 RateLimit: 1/3speraccount Parameters: Name Type Mandatory Description productId STRING YES amount DECIMAL YES recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. GetLeftDailyRedemptionQuotaofFlexibleProduct(USER_DATA) Response: { "asset":"USDT", "dailyQuota":"10000000.00000000", "leftQuota":"0.00000000", "minRedemptionAmount":"0.10000000" } GET/sapi/v1/lending/daily/userRedemptionQuota(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description productId STRING YES type ENUM YES "FAST","NORMAL" recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES RedeemFlexibleProduct(USER_DATA) Response: {} POST/sapi/v1/lending/daily/redeem(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description productId STRING YES amount DECIMAL YES type ENUM YES "FAST","NORMAL" recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. GetFlexibleProductPosition(USER_DATA) Response: [ { "tierAnnualInterestRate":{ "0-5BTC":0.05, "5-10BTC":0.03, ">10BTC":0.01 }, "annualInterestRate":"0.02599895", "asset":"USDT", "avgAnnualInterestRate":"0.02599895", "canRedeem":true, "dailyInterestRate":"0.00007123", "freeAmount":"75.46000000", "freezeAmount":"0.00000000",//abandoned "lockedAmount":"0.00000000",//abandoned "productId":"USDT001", "productName":"USDT", "redeemingAmount":"0.00000000", "todayPurchasedAmount":"0.00000000", "totalAmount":"75.46000000", "totalInterest":"0.22759183" } ] GET/sapi/v1/lending/daily/token/position(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description asset STRING NO recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES GetFixedandActivityProjectList(USER_DATA) Response: [ { "asset":"USDT", "displayPriority":1, "duration":90, "interestPerLot":"1.35810000", "interestRate":"0.05510000", "lotSize":"100.00000000", "lotsLowLimit":1, "lotsPurchased":74155, "lotsUpLimit":80000, "maxLotsPerUser":2000, "needKyc":false, "projectId":"CUSDT90DAYSS001", "projectName":"USDT", "status":"PURCHASING", "type":"CUSTOMIZED_FIXED", "withAreaLimitation":false } ] GET/sapi/v1/lending/project/list(HMACSHA256) 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 Currentlyqueryingpage.Startfrom1.Default:1 size LONG NO Default:10,Max:100 recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES PurchaseFixed/ActivityProject(USER_DATA) Response: { "purchaseId":"18356" } POST/sapi/v1/lending/customizedFixed/purchase(HMACSHA256) Weight(IP): 1 RateLimit: 1/3speraccount Parameters: Name Type Mandatory Description projectId STRING YES lot LONG YES recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. GetFixed/ActivityProjectPosition(USER_DATA) Response: [ { "asset":"USDT", "canTransfer":true, "createTimestamp":1587010770000, "duration":14, "endTime":1588291200000, "interest":"0.19950000", "interestRate":"0.05201250", "lot":1, "positionId":51724, "principal":"100.00000000", "projectId":"CUSDT14DAYSS001", "projectName":"USDT", "purchaseTime":1587010771000, "redeemDate":"2020-05-01", "startTime":1587081600000, "status":"HOLDING", "type":"CUSTOMIZED_FIXED" } ] GET/sapi/v1/lending/project/position/list(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description asset STRING NO projectId STRING NO status ENUM NO "HOLDING","REDEEMED" recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES LendingAccount(USER_DATA) Response: { "positionAmountVos":[ { "amount":"75.46000000", "amountInBTC":"0.01044819", "amountInUSDT":"75.46000000", "asset":"USDT" }, { "amount":"1.67072036", "amountInBTC":"0.00023163", "amountInUSDT":"1.67289230", "asset":"BUSD" } ], "totalAmountInBTC":"0.01067982", "totalAmountInUSDT":"77.13289230", "totalFixedAmountInBTC":"0.00000000", "totalFixedAmountInUSDT":"0.00000000", "totalFlexibleInBTC":"0.01067982", "totalFlexibleInUSDT":"77.13289230" } GET/sapi/v1/lending/union/account(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES GetPurchaseRecord(USER_DATA) Response: FlexibleProducts [ { "amount":"100.00000000", "asset":"USDT", "createTime":1575018510000, "lendingType":"DAILY", "productName":"USDT", "purchaseId":26055, "status":"SUCCESS" } ] Fixed/ActivityProducts [ { "amount":"100.00000000", "asset":"USDT", "createTime":1575018453000, "lendingType":"ACTIVITY", "lot":1, "productName":"【Special】USDT7D(8%)", "purchaseId":36857, "status":"SUCCESS" } ] GET/sapi/v1/lending/union/purchaseRecord(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description lendingType ENUM YES "DAILY"forflexible,"ACTIVITY"foractivity,"CUSTOMIZED_FIXED"forfixed asset STRING NO startTime LONG NO endTime LONG NO current LONG NO Currentlyqueryingpage.Startfrom1.Default:1 size LONG NO Default:10,Max:100 recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Thetimebetween startTime and endTime cannotbelongerthan30days. If startTime and endTime arebothnotsent,thenthelast30days'datawillbereturned. GetRedemptionRecord(USER_DATA) Response: FlexibleProducts [ { "amount":"10.54000000", "asset":"USDT", "createTime":1577257222000, "principal":"10.54000000", "projectId":"USDT001", "projectName":"USDT", "status":"PAID", "type":"FAST" } ] Fixed/ActivityProducts [ { "amount":"0.07070000", "asset":"USDT", "createTime":1566200161000, "interest":"0.00070000", "principal":"0.07000000", "projectId":"test06", "projectName":"USDT1day(10%anniualized)", "startTime":1566198000000, "status":"PAID" } ] GET/sapi/v1/lending/union/redemptionRecord(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description lendingType ENUM YES "DAILY"forflexible,"ACTIVITY"foractivity,"CUSTOMIZED_FIXED"forfixed asset STRING NO startTime LONG NO endTime LONG NO current LONG NO Currentlyqueryingpage.Startfrom1.Default:1 size LONG NO Default:10,Max:100 recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Thetimebetween startTime and endTime cannotbelongerthan30days. If startTime and endTime arebothnotsent,thenthelast30days'datawillbereturned. GetInterestHistory(USER_DATA) Response: [ { "asset":"BUSD", "interest":"0.00006408", "lendingType":"DAILY", "productName":"BUSD", "time":1577233578000 }, { "asset":"USDT", "interest":"0.00687654", "lendingType":"DAILY", "productName":"USDT", "time":1577233562000 } ] GET/sapi/v1/lending/union/interestHistory(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description lendingType ENUM YES "DAILY"forflexible,"ACTIVITY"foractivity,"CUSTOMIZED_FIXED"forfixed asset STRING NO startTime LONG NO endTime LONG NO current LONG NO Currentlyqueryingpage.Startfrom1.Default:1 size LONG NO Default:10,Max:100 recvWindow LONG NO Thevaluecannotbegreaterthan60000 timestamp LONG YES Thetimebetween startTime and endTime cannotbelongerthan30days. If startTime and endTime arebothnotsent,thenthelast30days'datawillbereturned. ChangeFixed/ActivityPositiontoDailyPosition(USER_DATA) Response: { "dailyPurchaseId":862290, "success":true, "time":1577233578000 } POST/sapi/v1/lending/positionChanged(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description projectId STRING YES lot LONG YES positionId LONG NO forfixedposition recvWindow LONG NO nomorethan60000 timestamp LONG YES PositionIdismandatoryparameterforfixedposition. YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. StakingEndpoints TheendpointsbelowallowyoutointeractwithStaking. Formoreinformationonthis,pleaserefertotheStakingpage GetStakingProductList(USER_DATA) Response: [ { "projectId":"Axs*90", "detail":{ "asset":"AXS",//Lockupasset "rewardAsset":"AXS",//EarnAsset "duration":90,//Lockperiod(days) "renewable":true,//Projectsupportsrenewal "apy":"1.2069" }, "quota":{ "totalPersonalQuota":"2",//TotalPersonalquota "minimum":"0.001"//Minimumamountperorder } }, { "projectId":"Fio*90", "detail":{ "asset":"FIO", "rewardAsset":"FIO", "duration":90, "renewable":true, "apy":"1.0769" }, "quota":{ "totalPersonalQuota":"600", "minimum":"0.1" } } ] GET/sapi/v1/staking/productList(HMACSHA256) GetavailableStakingproductlist Weight(IP): 1 Parameters: Name Type Mandatory Description product ENUM YES "STAKING"forLockedStaking,"F_DEFI"forflexibleDeFiStaking,"L_DEFI"forlockedDeFiStaking asset STRING NO current LONG NO Currentlyqueryingpage.Startfrom1.Default:1 size LONG NO Default:10,Max:100 recvWindow LONG NO timestamp LONG YES PurchaseStakingProduct(USER_DATA) Response: { "positionId":"12345", "success":true } POST/sapi/v1/staking/purchase(HMACSHA256) Weight(IP): 1 RateLimit: 1/3speraccount Parameters: Name Type Mandatory Description product ENUM YES "STAKING"forLockedStaking,"F_DEFI"forflexibleDeFiStaking,"L_DEFI"forlockedDeFiStaking productId STRING YES amount DECIMAL YES renewable STRING NO trueorfalse,defaultfalse.Activeifproductis"STAKING"or"L_DEFI" recvWindow LONG NO timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. RedeemStakingProduct(USER_DATA) Response: { "success":true } POST/sapi/v1/staking/redeem(HMACSHA256) RedeemStakingproduct.LockedstakingandLockedDeFIstakingbelongtoearlyredemption,redeeminginadvancewillresultinlossofinterestthatyouhaveearned. Weight(IP): 1 Parameters: Name Type Mandatory Description product ENUM YES "STAKING"forLockedStaking,"F_DEFI"forflexibleDeFiStaking,"L_DEFI"forlockedDeFiStaking positionId STRING NO "1234",Mandatoryifproductis"STAKING"or"L_DEFI" productId STRING YES amount DECIMAL NO Mandatoryifproductis"F_DEFI" recvWindow LONG NO timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. GetStakingProductPosition(USER_DATA) Response: [ { "positionId":"123123",//StakingpositionID "projectId":"Axs*90",//StakingprojectID "asset":"AXS",//Lockedasset "amount":"122.09202928",//LockedAmount "purchaseTime":"1646182276000",//Subscriptiontime "duration":"60",//Lockperiod(days) "accrualDays":"4",//Accruedays "rewardAsset":"AXS",//Earnedasset "APY":"0.2032", "rewardAmt":"5.17181528",//Earnedamount "extraRewardAsset":"BNB",//Rewardsassetsofextrastakingtype "extraRewardAPY":"0.0203",//APYofextrastakingtype "estExtraRewardAmt":"5.17181528",//Rewardsofextrastakingtype,distributewhenorderexpires "nextInterestPay":"1.29295383",//Nextestimatedinterestpayment "nextInterestPayDate":"1646697600000",//Nextinterestpaymentdate "payInterestPeriod":"1",//Interestcycle "redeemAmountEarly":"2802.24068892",//Earlyredemptionamount "interestEndDate":"1651449600000",//Interestaccrualenddate "deliverDate":"1651536000000",//Redemptionarrivaltime "redeemPeriod":"1",//Redemptioninterval "redeemingAmt":"232.2323",//Amountunderredemption "partialAmtDeliverDate":"1651536000000",//Arrivaltimeofpartialredemptionamountoforder "canRedeemEarly":true,//Whenitistrue,earlyredemptioncanbeoperated "renewable":true,//Whenitistrue,autostakingcanbeoperated "type":"AUTO",//Ordertypeisauto-stakingornormal "status":"HOLDING" } ] GET/sapi/v1/staking/position(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description product ENUM YES "STAKING"forLockedStaking,"F_DEFI"forflexibleDeFiStaking,"L_DEFI"forlockedDeFiStaking productId STRING NO asset STRING NO current LONG NO Currentlyqueryingthepage.Startfrom1.Default:1 size LONG NO Default:10,Max:100 recvWindow LONG NO timestamp LONG YES GetStakingHistory(USER_DATA) Response: [ { "positionId":"123123", "time":1575018510000, "asset":"BNB", "project":"BSC",//DeFiStaking’sproject "amount":"21312.23223", "lockPeriod":"30", "deliverDate":"1575018510000",//Redemptiondate "type":"AUTO",//displayonlyforsubscription "status":"success" } ] GET/sapi/v1/staking/stakingRecord(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description product ENUM YES "STAKING"forLockedStaking,"F_DEFI"forflexibleDeFiStaking,"L_DEFI"forlockedDeFiStaking txnType ENUM YES "SUBSCRIPTION","REDEMPTION","INTEREST" asset STRING NO startTime LONG NO endTime LONG NO current LONG NO Currentlyqueryingthepage.Startfrom1.Default:1 size LONG NO Default:10,Max:100 recvWindow LONG NO timestamp LONG YES ThetimebetweenstartTimeandendTimecannotbelongerthan3months. IfstartTimeandendTimearebothnotsent,thenthelast30days'datawillbereturned. SetAutoStaking(USER_DATA) Response: { "success":true } POST/sapi/v1/staking/setAutoStaking(HMACSHA256) SetautostakingonLockedStakingorLockedDeFiStaking Weight(IP): 1 Parameters: Name Type Mandatory Description product ENUM YES "STAKING"forLockedStaking,"L_DEFI"forlockedDeFiStaking positionId STRING YES renewable STRING YES trueorfalse recvWindow LONG NO timestamp LONG YES GetPersonalLeftQuotaofStakingProduct(USER_DATA) Response: [ { "leftPersonalQuota":"1000"//Userleftquota } ] GET/sapi/v1/staking/personalLeftQuota(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description product ENUM YES "STAKING"forLockedStaking,"F_DEFI"forflexibleDeFiStaking,"L_DEFI"forlockedDeFiStaking productId STRING YES recvWindow LONG NO timestamp LONG YES MiningEndpoints TheendpointsbelowallowtointeractwithBinancePool. Formoreinformationonthis,pleaserefertotheBinancePoolpage AcquiringAlgorithm(MARKET_DATA) Response: { "code":0, "msg":"", "data":[ { "algoName":"sha256",//Algorithmname "algoId":1,//AlgorithmID "poolIndex":0,//Sequence "unit":"h/s"//Unit } ] } GET/sapi/v1/mining/pub/algoList(HMACSHA256) Weight(IP): 1 Parameter: None AcquiringCoinName(MARKET_DATA) GET/sapi/v1/mining/pub/coinList(HMACSHA256) Weight(IP): 1 Parameter: None Response: { "code":0, "msg":"", "data":[ { "coinName":"BTC",//Currencyname "coinId":1,//id "poolIndex":0,//Sort "algoId":1,//Algorithm "algoName":"sha256"//Nameofalgorithm } ] } RequestforDetailMinerList(USER_DATA) Response: { "code":0, "msg":"", "data":[ { "workerName":"bhdc1.16A10404B",//MiningAccountname "type":"H_hashrate",//Typeofhourlyhashrate "hashrateDatas":[ { "time":1587902400000,//Time "hashrate":"0",//Hashrate "reject":0//RejectionRate }, { "time":1587906000000, "hashrate":"0", "reject":0 } ] }, { "workerName":"bhdc1.16A10404B",//MiningAccountname "type":"D_hashrate",//Typeofdailyhashrate "hashrateDatas":[ { "time":1587902400000,//Time "hashrate":"0",//Hashrate "reject":0//RejectionRate }, { "time":1587906000000, "hashrate":"0", "reject":0 } ] } ] } GET/sapi/v1/mining/worker/detail(HMACSHA256) Weight(IP): 5 Parameter: Name Type Mandatory Description ForExample algo STRING YES Algorithm(sha256) sha256 userName STRING YES Miningaccount test workerName STRING YES Miner’sname(required) bhdc1.16A10404B recvWindow LONG NO timestamp LONG YES RequestforMinerList(USER_DATA) Response: { "code":0, "msg":"", "data":{ "workerDatas":[ { "workerId":"1420554439452400131",//MinerID "workerName":"2X73",//Miner'sname "status":3,//Status:1valid,2invalid,3nolongervalid "hashRate":0,//Real-timerate "dayHashRate":0,//24HHashrate "rejectRate":0,//Real-timeRejectionRate "lastShareTime":1587712919000//Lastsubmissiontime }, { "workerId":"7893926126382807951", "workerName":"AZDC1.1A10101", "status":2, "hashRate":29711247541680, "dayHashRate":12697781298013.66, "rejectRate":0, "lastShareTime":1587969727000 } ], "totalNum":18530,//Totalamount "pageSize":20//Rowsperpage } } GET/sapi/v1/mining/worker/list(HMACSHA256) Weight(IP): 5 Parameter: Name Type Mandatory Description ForExample algo STRING YES Algorithm(sha256) sha256 userName STRING YES Miningaccount test pageIndex INTEGER NO Pagenumber,defaultisfirstpage,startform1 sort INTEGER NO sortsequence(default=0)0positivesequence,1negativesequence sortColumn INTEGER NO Sortby(default1):1:minername,2:real-timecomputingpower,3:dailyaveragecomputingpower,4:real-timerejectionrate,5:lastsubmissiontime workerStatus INTEGER NO minersstatus(default=0)0all,1valid,2invalid,3failure recvWindow LONG NO timestamp LONG YES EarningsList(USER_DATA) Response: { "code":0, "msg":"", "data":{ "accountProfits":[ { "time":1586188800000,//Miningdate "type":31,//0:MiningWallet,5:MiningAddress,7:PoolSavings,8:Transferred,31:IncomeTransfer,32:HashrateResale-MiningWallet33:HashrateResale-PoolSavings "hashTransfer":null,//TransferredHashrate "transferAmount":null,//TransferredIncome "dayHashRate":129129903378244,//DailyHashrate "profitAmount":8.6083060304,//EarningsAmount "coinName":"BTC",//CoinType "status":2//Status:0:Unpaid,1:Paying2:Paid }, { "time":1607529600000, "coinName":"BTC", "type":0, "dayHashRate":9942053925926, "profitAmount":0.85426469, "hashTransfer":200000000000, "transferAmount":0.02180958, "status":2 }, { "time":1607443200000, "coinName":"BTC", "type":31, "dayHashRate":200000000000, "profitAmount":0.02905916, "hashTransfer":null, "transferAmount":null, "status":2 } ], "totalNum":3,//TotalRows "pageSize":20//Rowsperpage } } GET/sapi/v1/mining/payment/list(HMACSHA256) Weight(IP): 5 Parameter: Name Type Mandatory Description Example algo STRING YES Transferalgorithm(sha256) sha256 userName STRING YES Miningaccount test coin STRING NO Coinname startDate Long NO Searchdate,millisecondtimestamp,whileemptyqueryall endDate Long NO Searchdate,millisecondtimestamp,whileemptyqueryall pageIndex INTEGER NO Pagenumber,emptydefaultfirstpage,startingfrom1 pageSize INTEGER NO Numberofpages,minimum10,maximum200 recvWindow LONG NO timestamp LONG YES ExtraBonusList(USER_DATA) Response: { "code":0, "msg":"", "data":{ "otherProfits":[ { "time":1607443200000,//Miningdate "coinName":"BTC",//CoinName "type":4,//1:MergedMining,2:ActivityBonus,3:Rebate4:SmartPool6:IncomeTransfer7:PoolSavings "profitAmount":0.0011859,//Amount "status":2//Status:0:Unpaid,1:Paying2:Paid } ], "totalNum":3,//TotalRows "pageSize":20//Rowsperpage } } GET/sapi/v1/mining/payment/other(HMACSHA256) Weight(IP): 5 Parameter: Name Type Mandatory Description Example algo STRING YES Transferalgorithm(sha256) sha256 userName STRING YES MiningAccount test coin STRING NO CoinName startDate Long NO Searchdate,millisecondtimestamp,whileemptyqueryall endDate Long NO Searchdate,millisecondtimestamp,whileemptyqueryall pageIndex INTEGER NO Pagenumber,emptydefaultfirstpage,startingfrom1 pageSize INTEGER NO Numberofpages,minimum10,maximum200 recvWindow LONG NO timestamp LONG YES HashrateResaleList(USER_DATA) Response: { "code":0, "msg":"", "data":{ "configDetails":[ { "configId":168,//MiningID "poolUsername":"123",//Transferoutofsubaccount "toPoolUsername":"user1",//Transferintosubaccount "algoName":"Ethash",//Transferalgorithm "hashRate":5000000,//TransferredHashratequantity "startDay":20201210,//Startdate "endDay":20210405,//Enddate "status":1//Status:0Processing,1:Cancelled,2:Terminated }, { "configId":166, "poolUsername":"pop", "toPoolUsername":"111111", "algoName":"Ethash", "hashRate":3320000, "startDay":20201226, "endDay":20201227, "status":0 } ], "totalNum":21, "pageSize":200 } } GET/sapi/v1/mining/hash-transfer/config/details/list(HMACSHA256) Weight(IP): 5 Parameter: Name Type Mandatory Description Example pageIndex INTEGER NO Pagenumber,emptydefaultfirstpage,startingfrom1 pageSize INTEGER NO Numberofpages,minimum10,maximum200 recvWindow LONG NO timestamp LONG YES HashrateResaleDetail(USER_DATA) Response: { "code":0, "msg":"", "data":{ "profitTransferDetails":[{ "poolUsername":"test4001",//Transferoutofsub-account "toPoolUsername":"pop",//Transferintosubaccount "algoName":"sha256",//Transferalgorithm "hashRate":200000000000,//TransferredHashratequantity "day":20201213,//Transferdate "amount":0.2256872,//Transferredincome "coinName":"BTC"//CoinName }, { "poolUsername":"test4001", "toPoolUsername":"pop", "algoName":"sha256", "hashRate":200000000000, "day":20201213, "amount":0.2256872, "coinName":"BTC" } ], "totalNum":8, "pageSize":200 } } GET/sapi/v1/mining/hash-transfer/profit/details(HMACSHA256) Weight(IP): 5 Parameter: Name Type Mandatory Description Example configId INTEGER YES MiningID 168 userName STRING YES MiningAccount test pageIndex INTEGER NO Pagenumber,emptydefaultfirstpage,startingfrom1 pageSize INTEGER NO Numberofpages,minimum10,maximum200 recvWindow LONG NO timestamp LONG YES HashrateResaleRequest(USER_DATA) Response: { "code":0, "msg":"", "data":171//MiningAccount } POST/sapi/v1/mining/hash-transfer/config(HMACSHA256) Weight(IP): 5 Parameter: Name Type Mandatory Description Example userName STRING YES MiningAccount test algo STRING YES Transferalgorithm(sha256) sha256 endDate Long YES ResaleEndTime(Millisecondtimestamp) 1617659086000 startDate Long YES ResaleStartTime(Millisecondtimestamp) 1607659086000 toPoolUser STRING YES MiningAccount S19pro hashRate Long YES Resalehashrateh/smustbetransferred(BTCisgreaterthan500000000000ETHisgreaterthan500000) 100000000 recvWindow LONG NO timestamp LONG YES Cancelhashrateresaleconfiguration(USER_DATA) Response: { "code":0, "msg":"", "data":true } POST/sapi/v1/mining/hash-transfer/config/cancel(HMACSHA256) Weight(IP): 5 Parameter: Name Type Mandatory Description Example configId INTEGER YES MiningID 168 userName STRING YES MiningAccount test recvWindow LONG NO timestamp LONG YES StatisticList(USER_DATA) Response: { "code":0, "msg":"", "data":{ "fifteenMinHashRate":"457835490067496409.00000000",//15minshashrate "dayHashRate":"214289268068874127.65000000",//24HHashrate "validNum":0,//Effectivequantity "invalidNum":17562,//Invalidquantity "profitToday":{//Today'sestimate "BTC":"0.00314332", "BSV":"56.17055953", "BCH":"106.61586001" }, "profitYesterday":{//Yesterday'searnings "BTC":"0.00314332", "BSV":"56.17055953", "BCH":"106.61586001" }, "userName":"test",//Miningaccount "unit":"h/s",//Hashrateunit "algo":"sha256"//Algorithm } } GET/sapi/v1/mining/statistics/user/status(HMACSHA256) Weight(IP): 5 Parameter: Name Type Mandatory Description ForExample algo STRING YES Algorithm(sha256) sha256 userName STRING YES Miningaccount test recvWindow LONG NO timestamp LONG YES AccountList(USER_DATA) Response: { "code":0, "msg":"", "data":[ { "type":"H_hashrate",//Typeofhourlyhashrate "userName":"test",//Miningaccount "list":[ { "time":1585267200000,//Time "hashrate":"0.00000000",//Hashrate "reject":"0.00000000"//RejectionRate }, { "time":1585353600000, "hashrate":"0.00000000", "reject":"0.00000000" } ] }, { "type":"D_hashrate",//Typeofdailyhashrate "userName":"test",//Miningaccount "list":[ { "time":1587906000000,//Time "hashrate":"0.00000000",//Hashrate "reject":"0.00000000"//RejectionRate }, { "time":1587909600000, "hashrate":"0.00000000", "reject":"0.00000000" } ] } ] } GET/sapi/v1/mining/statistics/user/list(HMACSHA256) Weight(IP): 5 Parameter: Name Type Mandatory Description ForExample algo STRING YES Algorithm(sha256) sha256 userName STRING YES Miningaccount test recvWindow LONG NO timestamp LONG YES MiningAccountEarning(USER_DATA) Response: { "code":0, "msg":"", "data":{ "accountProfits":[ { "time":1607443200000, "coinName":"BTC",//Coin "type":2,//0:Referral1:Refund2:Rebate "puid":59985472,//Sub-accountid "subName":"vdvaghani",//Miningaccount "amount":0.09186957//Amount } ], "totalNum":3,//Totalrecords "pageSize":20//Sizeofonepage } } GET/sapi/v1/mining/payment/uid(HMACSHA256) Weight(IP): 5 Parameter: Name Type Mandatory Description ForExample algo STRING YES Algorithm(sha256) sha256 startDate Long NO Millisecondtimestamp endDate Long NO Millisecondtimestamp pageIndex INTEGER NO Default1 pageSize INTEGER NO Min10,Max200 recvWindow LONG NO timestamp LONG YES FuturesNewFutureAccountTransfer(USER_DATA) Response: { "tranId":100000001//transactionid } POST/sapi/v1/futures/transfer(HMACSHA256) Executetransferbetweenspotaccountandfuturesaccount. Weight(IP): 1 Parameters: Name Type Mandatory Description asset STRING YES Theassetbeingtransferred,e.g.,USDT amount DECIMAL YES Theamounttobetransferred type INT YES 1:transferfromspotaccounttoUSDT-Ⓜfuturesaccount.2:transferfromUSDT-Ⓜfuturesaccounttospotaccount.3:transferfromspotaccounttoCOIN-Ⓜfuturesaccount.4:transferfromCOIN-Ⓜfuturesaccounttospotaccount. recvWindow LONG NO timestamp LONG YES GetFutureAccountTransactionHistoryList(USER_DATA) Response: { "rows":[ { "asset":"USDT", "tranId":100000001, "amount":"40.84624400", "type":"1",//oneof1(fromspottoUSDT-Ⓜ),2(fromUSDT-Ⓜtospot),3(fromspottoCOIN-Ⓜ),and4(fromCOIN-Ⓜtospot) "timestamp":1555056425000, "status":"CONFIRMED"//oneofPENDING(pendingtoexecution),CONFIRMED(successfullytransfered),FAILED(executionfailed,nothinghappenedtoyouraccount); } ], "total":1 } GET/sapi/v1/futures/transfer(HMACSHA256) Weight(IP): 10 Parameters: Name Type Mandatory Description asset STRING YES startTime LONG YES endTime LONG NO current LONG NO Currentlyqueryingpage.Startfrom1.Default:1 size LONG NO Default:10Max:100 recvWindow LONG NO timestamp LONG YES Supportquerywithinthelast6monthsonly IfstartTimeandendTimenotsent,returnrecordsofthelast7daysbydefault Cross-CollateralBorrowHistory(USER_DATA) Response: { "rows":[ { "confirmedTime":1582540328433, "coin":"USDT", "collateralRate":"0.89991001",//collateralLevel "leftTotal":"4.5", "leftPrincipal":"4.5", "deadline":4736102399000, "collateralCoin":"BUSD", "collateralAmount":"5.0", "orderStatus":"PENDING", "borrowId":"438648398970089472" } ], "total":1 } GET/sapi/v1/futures/loan/borrow/history(HMACSHA256) Parameters: Name Type Mandatory Description coin STRING NO startTime LONG NO endTime LONG NO limit LONG NO default500,max1000 recvWindow LONG NO timestamp LONG YES Weight(IP): 10 Cross-CollateralRepaymentHistory(USER_DATA) Response: { "rows":[ { "coin":"USDT", "amount":"1.68", "collateralCoin":"BUSD", "repayType":"NORMAL",//"COLLATERAL"forcollateralrepayment "releasedCollateral":"1.80288889", "price":"1.001",//Loan/collateralexchangerate "repayCollateral":"10010",//Onlyforcollateralrepayment "confirmedTime":1582781327575, "updateTime":1582794387516,//time "status":"PENDING", "repayId":"439659223998894080" } ], "total":1 } GET/sapi/v1/futures/loan/repay/historyHMACSHA256) Parameters: Name Type Mandatory Description coin STRING NO startTime LONG NO endTime LONG NO limit LONG NO default500,max1000 recvWindow LONG NO timestamp LONG YES Weight(IP): 10 Cross-CollateralWalletV2(USER_DATA) Response: { "totalCrossCollateral":"5.8238577133", "totalBorrowed":"5.07000000", "totalInterest":"0.0",//Newforinterestcollection "interestFreeLimit":"100000",//Newforinterestfreelimit "asset":"USD",//NewforUSDvalue "crossCollaterals":[ { "loanCoin":"USDT", "collateralCoin":"BUSD", "locked":"5.82211108", "loanAmount":"5.07", "currentCollateralRate":"0.87168984",//collateralLevel "interestFreeLimitUsed":"5.07",//Newforinterestfreelimit "principalForInterest":"0.0",//Newforinterestcollection "interest":"0.0"//Newforinterestcollection }, { "loanCoin":"BUSD", "collateralCoin":"BTC", "locked":"0", "loanAmount":"0", "currentCollateralRate":"0",//collateralLevel "interestFreeLimitUsed":"0",//Newforinterestfreelimit "principalForInterest":"0.0",//Newforinterestcollection "interest":"0.0"//Newforinterestcollection } ] } GET/sapi/v2/futures/loan/wallet(HMACSHA256) Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES Weight(IP): 1 AdjustCross-CollateralLTVHistory(USER_DATA) Response: { "rows":[ { "amount":".17398184", "collateralCoin":"BUSD", "coin":"USDT", "preCollateralRate":"0.87054861", "afterCollateralRate":"0.89736451", "direction":"REDUCED", "status":"COMPLETED", "adjustTime":1583978243588 } ], "total":1 } GET/sapi/v1/futures/loan/adjustCollateral/history(HMACSHA256) Parameters: Name Type Mandatory Description loanCoin STRING NO collateralCoin STRING NO startTime LONG NO endTime LONG NO limit LONG NO default500,max1000 recvWindow LONG NO timestamp LONG YES AlldatawillbereturnedifloanCoinorcollateralCoinisnotsent Weight(IP): 10 Cross-CollateralLiquidationHistory(USER_DATA) Response: { "rows":[ { "collateralAmountForLiquidation":"10.12345678", "collateralCoin":"BUSD", "forceLiquidationStartTime":1583978243588, "coin":"USDT", "restCollateralAmountAfterLiquidation":"15.12345678", "restLoanAmount":"11.12345678", "status":"PENDING" } ], "total":1 } GET/sapi/v1/futures/loan/liquidationHistory(HMACSHA256) Parameters: Name Type Mandatory Description loanCoin STRING NO collateralCoin STRING NO startTime LONG NO endTime LONG NO limit LONG NO default500,max1000 recvWindow LONG NO timestamp LONG YES AlldatawillbereturnedifloanCoinorcollateralCoinisnotsent Weight(IP): 10 Cross-CollateralInterestHistory(USER_DATA) Response: { "rows":[ { "collateralCoin":"BUSD", "interestCoin":"USDT", "interest":"2.354", "interestFreeLimitUsed":"0",//Newforinterestfreelimit "principalForInterest":"10000", "interestRate":"0.002", "time":1582794387516 } ], "total":1 } GET/sapi/v1/futures/loan/interestHistory(HMACSHA256) Parameters: Name Type Mandatory Description collateralCoin STRING NO startTime LONG NO endTime LONG NO current LONG NO Currentlyqueryingpage.Startfrom1.Default:1 limit LONG NO Default:500Max:1000 recvWindow LONG NO timestamp LONG YES Weight(IP): 1 FuturesAlgoEndpoints BinanceFuturesExecutionAlgorithmAPIsolutionaimstoprovideusersabilitytoprogrammaticallyleverageBinancein-housealgorithmictradingcapabilitytoautomateorderexecutionstrategy,improveexecutiontransparencyandgiveuserssmartaccesstotheavailablemarketliquidity. FAQ:VolumeParticipation(VP)Introduction FAQ:Time-WeightedAveragePrice(Twap)Introduction VolumeParticipation(VP)NewOrder(TRADE) Response: { "clientAlgoId":"00358ce6a268403398bd34eaa36dffe7", "success":true, "code":0, "msg":"OK" } POST/sapi/v1/algo/futures/newOrderVp(HMACSHA256) SendinaVPneworder. OnlysupportonUSDⓈ-MContracts. Weight(UID): 3000 Noted: YouneedtoenableFuturesTradingPermissionfortheapikeywhichrequeststhisendpoint. BaseURL:https://api.binance.com Parameters: Name Type Mandatory Description symbol STRING YES Tradingsymboleg.BTCUSDT side ENUM YES Tradingside(BUYorSELL) positionSide ENUM NO DefaultBOTHforOne-wayMode;LONGorSHORTforHedgeMode.ItmustbesentinHedgeMode. quantity DECIMAL YES Quantityofbaseasset;Thenotional(quantity*markprice(baseasset))mustbemorethantheequivalentof10,000USDTandlessthantheequivalentof1,000,000USDT urgency ENUM YES Representtherelativespeedofthecurrentexecution;ENUM:LOW,MEDIUM,HIGH clientAlgoId STRING NO AuniqueidamongAlgoorders(lengthshouldbe32characters),Ifitisnotsent,wewillgivedefaultvalue reduceOnly BOOLEAN NO "true"or"false".Default"false";CannotbesentinHedgeMode;Cannotbesentwhenyouopenaposition limitPrice DECIMAL NO Limitpriceoftheorder;Ifitisnotsent,willplaceorderbymarketpricebydefault recvWindow LONG NO timestamp LONG YES OtherInfo: TotalAlgoopenordersmaxallowed:10orders. Leverageofsymbolsandpositionmodewillbethesameasyourfuturesaccountsettings.Youcansetupthroughthetradingpageorfapi. Receiving"success":truedoesnotmeanthatyourorderwillbeexecuted.Pleaseusethequeryorderendpoints(GETsapi/v1/algo/futures/openOrdersorGETsapi/v1/algo/futures/historicalOrders)tochecktheorderstatus. Forexample:Yourfuturesbalanceisinsufficient,oropenpositionwithreduceonlyorpositionsideisinconsistentwithyourownsetting.Inthesecasesyouwillreceive"success":true,buttheorderstatuswillbeexpiredafterwecheckit. Time-WeightedAveragePrice(Twap)NewOrder(TRADE) Response: { "clientAlgoId":"65ce1630101a480b85915d7e11fd5078", "success":true, "code":0, "msg":"OK" } POST/sapi/v1/algo/futures/newOrderTwap(HMACSHA256) SendinaTwapneworder. OnlysupportonUSDⓈ-MContracts. Weight(UID): 3000 Noted: YouneedtoenableFuturesTradingPermissionfortheapikeywhichrequeststhisendpoint. BaseURL:https://api.binance.com Parameters: Name Type Mandatory Description symbol STRING YES Tradingsymboleg.BTCUSDT side ENUM YES Tradingside(BUYorSELL) positionSide ENUM NO DefaultBOTHforOne-wayMode;LONGorSHORTforHedgeMode.ItmustbesentinHedgeMode. quantity DECIMAL YES Quantityofbaseasset;Thenotional(quantity*markprice(baseasset))mustbemorethantheequivalentof10,000USDTandlessthantheequivalentof1,000,000USDT duration LONG YES DurationforTWAPordersinseconds.[300,86400];Lessthan5min=>defaultsto5min;Greaterthan24h=>defaultsto24h clientAlgoId STRING NO AuniqueidamongAlgoorders(lengthshouldbe32characters),Ifitisnotsent,wewillgivedefaultvalue reduceOnly BOOLEAN NO "true"or"false".Default"false";CannotbesentinHedgeMode;Cannotbesentwhenyouopenaposition limitPrice DECIMAL NO Limitpriceoftheorder;Ifitisnotsent,willplaceorderbymarketpricebydefault recvWindow LONG NO timestamp LONG YES OtherInfo: TotalAlgoopenordersmaxallowed:10orders. Leverageofsymbolsandpositionmodewillbethesameasyourfuturesaccountsettings.Youcansetupthroughthetradingpageorfapi. Receiving"success":truedoesnotmeanthatyourorderwillbeexecuted.Pleaseusethequeryorderendpoints(GETsapi/v1/algo/futures/openOrdersorGETsapi/v1/algo/futures/historicalOrders)tochecktheorderstatus. Forexample:Yourfuturesbalanceisinsufficient,oropenpositionwithreduceonlyorpositionsideisinconsistentwithyourownsetting.Inthesecasesyouwillreceive"success":true,buttheorderstatuswillbeexpiredafterwecheckit. quantity*60/durationshouldbelargerthanminQty durationcannotbelessthan5minsormorethan24hours. Fordeliverycontracts,TWAPendtimeshouldbeonehourearlierthanthedeliverytimeofthesymbol. CancelAlgoOrder(TRADE) Response: { "algoId":14511, "success":true, "code":0, "msg":"OK" } DELETE/sapi/v1/algo/futures/order(HMACSHA256) Cancelanactiveorder. Weight(IP): 1 Noted: YouneedtoenableFuturesTradingPermissionfortheapikeywhichrequeststhisendpoint. BaseURL:https://api.binance.com Parameters: Name Type Mandatory Description algoId LONG YES eg.14511 recvWindow LONG NO timestamp LONG YES QueryCurrentAlgoOpenOrders(USER_DATA) Response: { "total":1, "orders":[ { "algoId":14517, "symbol":"ETHUSDT", "side":"SELL", "positionSide":"SHORT", "totalQty":"5.000", "executedQty":"0.000", "executedAmt":"0.00000000", "avgPrice":"0.00", "clientAlgoId":"d7096549481642f8a0bb69e9e2e31f2e", "bookTime":1649756817004, "endTime":0, "algoStatus":"WORKING", "algoType":"VP", "urgency":"LOW" } ] } GET/sapi/v1/algo/futures/openOrders(HMACSHA256) Weight(IP): 1 Noted: YouneedtoenableFuturesTradingPermissionfortheapikeywhichrequeststhisendpoint. BaseURL:https://api.binance.com Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES QueryHistoricalAlgoOrders(USER_DATA) Response: { "total":1, "orders":[ { "algoId":14518, "symbol":"BNBUSDT", "side":"BUY", "positionSide":"BOTH", "totalQty":"100.00", "executedQty":"0.00", "executedAmt":"0.00000000", "avgPrice":"0.000", "clientAlgoId":"acacab56b3c44bef9f6a8f8ebd2a8408", "bookTime":1649757019503, "endTime":1649757088101, "algoStatus":"CANCELLED", "algoType":"VP", "urgency":"LOW" } ] } GET/sapi/v1/algo/futures/historicalOrders(HMACSHA256) Weight(IP): 1 Noted: YouneedtoenableFuturesTradingPermissionfortheapikeywhichrequeststhisendpoint. BaseURL:https://api.binance.com Parameters: Name Type Mandatory Description symbol STRING NO Tradingsymboleg.BTCUSDT side ENUM NO BUYorSELL startTime LONG NO inmillisecondseg.1641522717552 endTime LONG NO inmillisecondseg.1641522526562 page INT NO Defaultis1 pageSize INT NO MIN1,MAX100;Default100 recvWindow LONG NO timestamp LONG YES QuerySubOrders(USER_DATA) Response: { "total":1, "executedQty":"1.000", "executedAmt":"3229.44000000", "subOrders":[ { "algoId":13723, "orderId":8389765519993908929, "orderStatus":"FILLED", "executedQty":"1.000", "executedAmt":"3229.44000000", "feeAmt":"-1.61471999", "feeAsset":"USDT", "bookTime":1649319001964, "avgPrice":"3229.44", "side":"SELL", "symbol":"ETHUSDT", "subId":1, "timeInForce":"IMMEDIATE_OR_CANCEL", "origQty":"1.000" } ] } GET/sapi/v1/algo/futures/subOrders(HMACSHA256) GetrespectivesubordersforaspecifiedalgoId Weight(IP): 1 Noted: YouneedtoenableFuturesTradingPermissionfortheapikeywhichrequeststhisendpoint. BaseURL:https://api.binance.com Parameters: Name Type Mandatory Description algoId LONG YES page INT NO Defaultis1 pageSize INT NO MIN1,MAX100;Default100 recvWindow LONG NO timestamp LONG YES PortfolioMarginEndpoints TheBinancePortfolioMarginProgramisacross-assetmarginprogramsupportingconsolidatedmarginbalanceacrosstradingproductswithover200+effectivecryptocollaterals.Itisdesignedforprofessionaltraders,marketmakers,andinstitutionaluserslookingtoactivelytrade&hedgecross-assetandoptimizerisk-managementinaconsolidatedsetup. FAQ:PortfolioMarginProgram OnlyPortfolioMarginAccountisaccessibletotheseendpoints.Toenroll,kindlyreferto:HowtoEnrollintotheBinancePortfolioMarginProgram GetPortfolioMarginAccountInfo(USER_DATA) Response: { "uniMMR":"5167.92171923",//Portfoliomarginaccountmaintenancemarginrate "accountEquity":"122607.35137903",//Accountequity,unit:USD "accountMaintMargin":"23.72469206",//Portfoliomarginaccountmaintenancemargin,unit:USD "accountStatus":"NORMAL"//Portfoliomarginaccountstatus:"NORMAL","MARGIN_CALL","SUPPLY_MARGIN","REDUCE_ONLY","ACTIVE_LIQUIDATION","FORCE_LIQUIDATION","BANKRUPTED" } GET/sapi/v1/portfolio/account(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES PortfolioMarginCollateralRate(MARKET_DATA) Response: [ { "asset":"USDC", "collateralRate":"1.0000" }, { "asset":"BUSD", "collateralRate":"1.0000" }, ] GET/sapi/v1/portfolio/collateralRate PortfolioMarginCollateralRate Weight(IP): 50 Parameters: None QueryPortfolioMarginBankruptcyLoanAmount(USER_DATA) Response: { "asset":"BUSD", "amount":"579.45",//portfoliomarginbankruptcyloanamountinBUSD } GET/sapi/v1/portfolio/pmLoan QueryPortfolioMarginBankruptcyLoanAmount Weight(UID): 500 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES Ifthere’snoportfoliomarginbankruptcyloan,theamountwouldbe0 PortfolioMarginBankruptcyLoanRepay Response: { "tranId":58203331886213504 } POST/sapi/v1/portfolio/repay RepayPortfolioMarginBankruptcyLoan Weight(UID): 3000 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES BLVTEndpointsGetBLVTInfo(MARKET_DATA) Response: [ { "tokenName":"BTCDOWN", "description":"3XShortBitcoinToken", "underlying":"BTC", "tokenIssued":"717953.95", "basket":"-821.474BTCUSDTFutures", "currentBaskets":[ { "symbol":"BTCUSDT", "amount":"-1183.984", "notionalValue":"-22871089.96704" } ], "nav":"4.79", "realLeverage":"-2.316", "fundingRate":"0.001020", "dailyManagementFee":"0.0001", "purchaseFeePct":"0.0010", "dailyPurchaseLimit":"100000.00", "redeemFeePct":"0.0010", "dailyRedeemLimit":"1000000.00", "timestamp":1583127900000 }, { "tokenName":"LINKUP", "description":"3XLONGChainLinkToken", "underlying":"LINK", "tokenIssued":"163846.99", "basket":"417288.870LINKUSDTFutures", "currentBaskets":[ { "symbol":"LINKUSDT", "amount":"1640883.83", "notionalValue":"22596611.22293" } ], "nav":"9.60", "realLeverage":"2.597", "fundingRate":"-0.000917", "dailyManagementFee":"0.0001", "purchaseFeePct":"0.0010", "dailyPurchaseLimit":"100000.00", "redeemFeePct":"0.0010", "dailyRedeemLimit":"1000000.00", "timestamp":1583127900000 } ] GET/sapi/v1/blvt/tokenInfo Weight(IP): 1 Parameters: Name Type Mandatory Description tokenName STRING NO BTCDOWN,BTCUP HistoricalBLVTNAVKline/Candlestick TheBLVTNAVsystemisbasedonBinanceFutures,sotheendpointisbasedonfapi Pleasegotoheretochecktheendpointandoperateinaccordancewiththefapiusagespecifications. SubscribeBLVT(USER_DATA) Response: { "id":123, "status":"S",//S,P,andFfor"success","pending",and"failure" "tokenName":"LINKUP", "amount":"0.95590905",//subscribedtokenamount "cost":"9.99999995",//subscriptioncostinusdt "timestamp":1600249972899 } POST/sapi/v1/blvt/subscribe(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description tokenName STRING YES BTCDOWN,BTCUP cost DECIMAL YES spotbalance recvWindow LONG NO timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. QuerySubscriptionRecord(USER_DATA) Response: [ { "id":1, "tokenName":"LINKUP", "amount":"0.54216292",//Subscriptionamount "nav":"18.42621386",//NAVpriceofsubscription "fee":"0.00999000",//Subscriptionfeeinusdt "totalCharge":"9.99999991",//Subscriptioncostinusdt "timestamp":1599127217916 } ] GET/sapi/v1/blvt/subscribe/record(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description tokenName STRING NO BTCDOWN,BTCUP id LONG NO startTime LONG NO endTime LONG NO limit INT NO default1000,max1000 recvWindow LONG NO timestamp LONG YES Onlythedataofthelatest90daysisavailable RedeemBLVT(USER_DATA) Response: { "id":123, "status":"S",//S,P,andFfor"success","pending",and"failure" "tokenName":"LINKUP", "redeemAmount":"0.95590905",//Redemptiontokenamount "amount":"10.05022099",//Redemptionvalueinusdt "timestamp":1600250279614 } POST/sapi/v1/blvt/redeem(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description tokenName STRING YES BTCDOWN,BTCUP amount DECIMAL YES recvWindow LONG NO timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. QueryRedemptionRecord(USER_DATA) Response: [ { "id":1, "tokenName":"LINKUP", "amount":"0.54216292",//Redemptionamount "nav":"18.36345064",//NAVofredemption "fee":"0.00995598",//Reemptionfee "netProceed":"9.94602604",//Netredemptionvalueinusdt "timestamp":1599128003050 } ] GET/sapi/v1/blvt/redeem/record(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description tokenName STRING NO BTCDOWN,BTCUP id LONG NO startTime LONG NO endTime LONG NO limit INT NO default1000,max1000 recvWindow LONG NO timestamp LONG YES Onlythedataofthelatest90daysisavailable GetBLVTUserLimitInfo(USER_DATA) Response: [ { "tokenName":"LINKUP", "userDailyTotalPurchaseLimit":"1000",//USDT "userDailyTotalRedeemLimit":"1000"//USDT }, { "tokenName":"LINKDOWN", "userDailyTotalPurchaseLimit":"1000",//USDT "userDailyTotalRedeemLimit":"50000"//USDT } ] GET/sapi/v1/blvt/userLimit(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description tokenName STRING NO BTCDOWN,BTCUP recvWindow LONG NO timestamp LONG YES WebsocketBLVTInfoStreams Payload: { "e":"nav",//Eventtype "E":1600245286355,//Eventtime "s":"TRXDOWN",//BLVTname "m":74164.75496502663,//Tokenissued "b":[//Baskets { "s":"TRXUSDT",//futuressymbol "n":-87988261//position } ], "n":14.78454447,//BLVTNAV "l":2.1786579638117898,//Realleverage "t":3,//Targetleverage "f":-0.0048925//Fundingratio } StreamName:@tokenNav Note:Youshouldusethebaseurl:wss://nbstream.binance.com/lvt-pforthisstream Note:tokenNamemustbeuppercase,e.g."TRXDOWN@tokenNav" UpdateSpeed:3s WebsocketBLVTNAVKline/CandlestickStreams Payload: { "e":"kline",//Eventname "E":1600243159447,//Eventtime "s":"TRXDOWN",//BLVTname "k":{ "t":1600243140000,//Klinestarttime "T":1600243199999,//Klineclosetime "s":"TRXDOWN",//BLVTname "i":"1m",//Interval "f":1600243140484,//FirstNAVupdatetime "L":1600243159424,//LastNAVupdatetime "o":"14.56800297",//OpenNAVprice "c":"14.59766270",//CLoseNAVprice "h":"14.63325437",//HighestNAVprice "l":"14.56207102",//LowestNAVprice "v":"2.22524220",//Realleverage "n":33,//NumberofNAVupdate "x":false,//Ignore "q":"0",//Ignore "V":"73.42663923",//Ignore "Q":"0",//Ignore "B":"0"//Ignore } } StreamName:@nav_kline_ Note:Youshouldusethebaseurl:wss://nbstream.binance.com/lvt-pforthisstream Note:tokenNamemustbeuppercase,e.g."TRXDOWN@nav_kline_1d" UpdateSpeed:300ms Kline/Candlestickchartintervals: m->minutes;h->hours;d->days;w->weeks;M->months 1m 3m 5m 15m 30m 1h 2h 4h 6h 8h 12h 1d 3d 1w 1M BSwapEndpoints TheendpointsbelowallowyoutointeractwithBSwap. Formoreinformationonthis,pleaserefertotheBSwappage ListAllSwapPools(MARKET_DATA) Response: [ { "poolId":2, "poolName":"BUSD/USDT", "assets":[ "BUSD", "USDT" ] }, { "poolId":3, "poolName":"BUSD/DAI", "assets":[ "BUSD", "DAI" ] }, { "poolId":4, "poolName":"USDT/DAI", "assets":[ "USDT", "DAI" ] } ] GET/sapi/v1/bswap/pools Getmetadataaboutallswappools. Weight(IP): 1 Parameters: None Getliquidityinformationofapool(USER_DATA) Response: [ { "poolId":2, "poolNmae":"BUSD/USDT", "updateTime":1565769342148, "liquidity":{ "BUSD":100000315.79, "USDT":99999245.54 }, "share":{ "shareAmount":12415, "sharePercentage":0.00006207, "asset":{ "BUSD":6207.02, "USDT":6206.95 } } } ] GET/sapi/v1/bswap/liquidity(HMACSHA256) Getliquidityinformationandusershareofapool. Weight(IP): 1foronepool 10whenthepoolIdparameterisomitted RateLimit: 3/1speraccountandperpool Parameter: Name Type Mandatory Description poolId LONG NO recvWindow LONG NO timestamp LONG YES AddLiquidity(TRADE) Response: { "operationId":12341 } POST/sapi/v1/bswap/liquidityAdd(HMACSHA256) Addliquiditytoapool. Weight(UID): 1000(Additional:1requesteverythreeseconds) Parameter: Name Type Mandatory Description poolId LONG YES type STRING NO "SINGLE"toaddasingletoken;"COMBINATION"toadddualtokens.Default"SINGLE" asset STRING YES quantity DECIMAL YES recvWindow LONG NO timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. RemoveLiquidity(TRADE) Response: { "operationId":12341 } POST/sapi/v1/bswap/liquidityRemove(HMACSHA256) Removeliquidityfromapool,typeincludeSINGLEandCOMBINATION,assetismandatoryforsingleassetremoval Weight(UID): 1000(Additional:1requesteverythreeseconds) Parameters: Name Type Mandatory Description poolId LONG YES type STRING YES SINGLEforsingleassetremoval,COMBINATIONforcombinationofallcoinsremoval asset LIST NO Mandatoryforsingleassetremoval shareAmount DECIMAL YES recvWindow LONG NO timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. GetLiquidityOperationRecord(USER_DATA) Response: [ { "operationId":12341, "poolId":2, "poolName":"BUSD/USDT", "operation":"ADD",//"ADD"or"REMOVE" "status":1,//0:pending,1:success,2:failed "updateTime":1565769342148, "shareAmount":"10.1" } ] GET/sapi/v1/bswap/liquidityOps(HMACSHA256) Getliquidityoperation(add/remove)records. Weight(UID): 3000 Parameters: Name Type Mandatory Description operationId LONG NO poolId LONG NO operation ENUM NO ADDorREMOVE startTime LONG NO endTime LONG NO limit LONG NO default3,max100 recvWindow LONG NO timestamp LONG YES RequestQuote(USER_DATA) Response: { "quoteAsset":"USDT", "baseAsset":"BUSD", "quoteQty":300000, "baseQty":299975, "price":1.00008334, "slippage":0.00007245, "fee":120 } GET/sapi/v1/bswap/quote(HMACSHA256) Requestaquoteforswapquoteasset(sellingasset)forbaseasset(buyingasset),essentiallyprice/exchangerates. quoteQtyisquantityofquoteasset(tosell). Pleasebenotedthequoteisforreferenceonly,theactualpricewillchangeastheliquiditychanges,it'srecommendedtoswapimmediateafterrequestaquoteforslippageprevention. Weight(UID): 150 RateLimit: 3/1speraccountandperpool Parameters: Name Type Mandatory Description quoteAsset STRING YES baseAsset STRING YES quoteQty DECIMAL YES recvWindow LONG NO timestamp LONG YES Swap(TRADE) Response: { "swapId":2314 } POST/sapi/v1/bswap/swap(HMACSHA256) SwapquoteAssetforbaseAsset. Weight(UID): 1000(Additional:1requesteverytwoseconds) Parameters: Name Type Mandatory Description quoteAsset STRING YES baseAsset STRING YES quoteQty DECIMAL YES recvWindow LONG NO timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. GetSwapHistory(USER_DATA) Response: [ { "swapId":2314, "swapTime":1565770342148, "status":0,//0:pending,1:success,2:failed "quoteAsset":"USDT", "baseAsset":"BUSD", "quoteQty":300000, "baseQty":299975, "price":1.00008334, "fee":120 } ] GET/sapi/v1/bswap/swap(HMACSHA256) Getswaphistory. Weight(UID): 3000 Parameters: Name Type Mandatory Description swapId LONG NO startTime LONG NO endTime LONG NO status INT NO 0:pendingforswap,1:success,2:failed quoteAsset STRING NO baseAsset STRING NO limit LONG NO default3,max100 recvWindow LONG NO timestamp LONG YES GetPoolConfigure(USER_DATA) Response: [ { "poolId":2, "poolNmae":"BUSD/USDT", "updateTime":1565769342148, "liquidity":{ "constantA":2000,//"NA"ifpoolisaninnovationpool "minRedeemShare":0.1, "slippageTolerance":0.2//Theswapproceedsonlywhentheslippageiswithinthesetrange }, "assetConfigure":{ "BUSD":{ "minAdd":10, "maxAdd":20, "minSwap":10, "maxSwap":30 }, "USDT":{ "minAdd":10, "maxAdd":20, "minSwap":10, "maxSwap":30 } } } ] GET/sapi/v1/bswap/poolConfigure(HMACSHA256) Weight(IP): 150 Parameters: Name Type Mandatory Description poolId LONG NO recvWindow LONG NO timestamp LONG YES AddLiquidityPreview(USER_DATA) Response: { "quoteAsset":"USDT", "baseAsset":"BUSD",//Displaywhentypeis"COMBINATION" "quoteAmt":300000, "baseAmt":299975,//Displaywhentypeis"COMBINATION" "price":1.00008334, "share":1.23, "slippage":0.00007245,//Displaywhentypeis"SINGLE" "fee":120,//Displaywhentypeis"SINGLE" } GET/sapi/v1/bswap/addLiquidityPreview(HMACSHA256) Calculateexpectedshareamountforaddingliquidityinsingleordualtoken. Weight(IP): 150 Parameters: Name Type Mandatory Description poolId LONG YES type STRING YES "SINGLE"foraddingasingletoken;"COMBINATION"foraddingdualtokens quoteAsset STRING YES quoteQty DECIMAL YES recvWindow LONG NO timestamp LONG YES RemoveLiquidityPreview(USER_DATA) Response: { "quoteAsset":"USDT", "baseAsset":"BUSD",//Displaywhentypeis"COMBINATION" "quoteAmt":300000, "baseAmt":299975,//Displaywhentypeis"COMBINATION" "price":1.00008334, "slippage":0.00007245,//Displaywhentypeis"SINGLE" "fee":120//Displaywhentypeis"SINGLE" } GET/sapi/v1/bswap/removeLiquidityPreview(HMACSHA256) Calculatetheexpectedassetamountofsingletokenredemptionordualtokenredemption. Weight(IP): 150 Parameters: Name Type Mandatory Description poolId LONG YES type STRING YES Typeis"SINGLE",removeandobtainasingletoken;Typeis"COMBINATION",removeandobtaindualtoken. quoteAsset STRING YES shareAmount DECIMAL YES recvWindow LONG NO timestamp LONG YES GetUnclaimedRewardsRecord(USER_DATA) Response: { "totalUnclaimedRewards":{ "BUSD":100000315.79, "BNB":0.00000001, "USDT":0.00000002 }, "details":{ "BNB/USDT":{ "BUSD":100000315.79, "USDT":0.00000002 }, "BNB/BTC":{ "BNB":0.00000001 } } } GET/sapi/v1/bswap/unclaimedRewards(HMACSHA256) Getunclaimedrewardsrecord. Weight(UID): 1000 Parameters: Name Type Mandatory Description type INT NO 0:Swaprewards,1:Liquidityrewards,defaultto0 recvWindow LONG NO timestamp LONG YES ClaimRewards(TRADE) Response: { "success":true } POST/sapi/v1/bswap/claimRewards(HMACSHA256) Claimswaprewardsorliquidityrewards Weight(UID): 1000 Parameters: Name Type Mandatory Description type INT NO 0:Swaprewards,1:Liquidityrewards,defaultto0 recvWindow LONG NO timestamp LONG YES YouneedtoopenEnableSpot&MarginTradingpermissionfortheAPIKeywhichrequeststhisendpoint. GetClaimedHistory(USER_DATA) Response: [ { "poolId":52, "poolName":"BNB/USDT", "assetRewards":"BNB", "claimTime":1565769342148, "claimAmount":0.00000023, "status":1//0:pending,1:success } ] GET/sapi/v1/bswap/claimedHistory(HMACSHA256) Gethistoryofclaimedrewards. Weight(UID): 1000 Parameters: Name Type Mandatory Description poolId LONG NO assetRewards STRING NO type INT NO 0:Swaprewards,1:Liquidityrewards,defaultto0 startTime LONG NO endTime LONG NO limit LONG NO Default3,max100 recvWindow LONG NO timestamp LONG YES FiatEndpointsGetFiatDeposit/WithdrawHistory(USER_DATA) Response: { "code":"000000", "message":"success", "data":[ { "orderNo":"7d76d611-0568-4f43-afb6-24cac7767365", "fiatCurrency":"BRL", "indicatedAmount":"10.00", "amount":"10.00", "totalFee":"0.00",//Tradefee "method":"BankAccount",//Trademethod "status":"Expired",//Processing,Failed,Successful,Finished,Refunding,Refunded,RefundFailed,OrderPartialcreditStopped "createTime":1626144956000, "updateTime":1626400907000 } ], "total":1, "success":true } GET/sapi/v1/fiat/orders(HMACSHA256) Weight(UID): 90000 Parameters: Name Type Mandatory Description transactionType STRING YES 0-deposit,1-withdraw beginTime LONG NO endTime LONG NO page INT NO default1 rows INT NO default100,max500 recvWindow LONG NO timestamp LONG YES IfbeginTimeandendTimearenotsent,therecent30-daydatawillbereturned. GetFiatPaymentsHistory(USER_DATA) Response: { "code":"000000", "message":"success", "data":[ { "orderNo":"353fca443f06466db0c4dc89f94f027a", "sourceAmount":"20.0",//Fiattradeamount "fiatCurrency":"EUR",//Fiattoken "obtainAmount":"4.462",//Cryptotradeamount "cryptoCurrency":"LUNA",//Cryptotoken "totalFee":"0.2",//Tradefee "price":"4.437472", "status":"Failed",//Processing,Completed,Failed,Refunded "paymentMethod":"CreditCard", "createTime":1624529919000, "updateTime":1624529919000 } ], "total":1, "success":true } GET/sapi/v1/fiat/payments(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description transactionType STRING YES 0-buy,1-sell beginTime LONG NO endTime LONG NO page INT NO default1 rows INT NO default100,max500 recvWindow LONG NO timestamp LONG YES IfbeginTimeandendTimearenotsent,therecent30-daydatawillbereturned. paymentMethod:Onlywhenrequestingpaymentshistoryforbuy(transactionType=0),responsecontainspaymentMethodrepresentingthewayofpurchase.Nowwehave: CashBalance CreditCard OnlineBanking BankTransfer C2CEndpointsGetC2CTradeHistory(USER_DATA) Response: { "code":"000000", "message":"success", "data":[ { "orderNumber":"20219644646554779648", "advNo":"11218246497340923904", "tradeType":"SELL", "asset":"BUSD", "fiat":"CNY", "fiatSymbol":"¥", "amount":"5000.00000000",//Quantity(inCrypto) "totalPrice":"33400.00000000", "unitPrice":"6.68",//UnitPrice(inFiat) "orderStatus":"COMPLETED",//PENDING,TRADING,BUYER_PAYED,DISTRIBUTING,COMPLETED,IN_APPEAL,CANCELLED,CANCELLED_BY_SYSTEM "createTime":1619361369000, "commission":"0",//TransactionFee(inCrypto) "counterPartNickName":"ab***", "advertisementRole":"TAKER" } ], "total":1, "success":true } GET/sapi/v1/c2c/orderMatch/listUserOrderHistory(HMACSHA256) Weight(IP): 1 Parameters: Name Type Mandatory Description tradeType STRING YES BUY,SELL startTimestamp LONG NO endTimestamp LONG NO page INT NO default1 rows INT NO default100,max100 recvWindow LONG NO timestamp LONG YES IfstartTimestampandendTimestamparenotsent,therecent30-daydatawillbereturned. ThemaxintervalbetweenstartTimestampandendTimestampis30days. Onlythelast6monthsofdatacanberetrieved.ToviewthecompleteP2Porderhistory,youcandownloaditfromhttps://c2c.binance.com/en/fiatOrder CryptoLoansEndpointsGetCryptoLoansIncomeHistory(USER_DATA) Response: [ { "asset":"BUSD", "type":"borrowIn", "amount":"100", "timestamp":1633771139847, "tranId":"80423589583" }, { "asset":"BUSD", "type":"borrowIn", "amount":"100", "timestamp":1634638371496, "tranId":"81685123491" } ] GET/sapi/v1/loan/income(HMACSHA256) Weight(UID): 6000 Parameters: Name Type Mandatory Description asset STRING NO type STRING NO Alltypeswillbereturnedbydefault.Enum:borrowIn,collateralSpent,repayAmount,collateralReturn(Collateralreturnafterrepayment),addCollateral,removeCollateral,collateralReturnAfterLiquidation startTime LONG NO endTime LONG NO limit INT NO default20,max100 recvWindow LONG NO timestamp LONG YES IfstartTimeandendTimearenotsent,therecent7-daydatawillbereturned. ThemaxintervalbetweenstartTimeandendTimeis30days. Borrow-CryptoLoanBorrow(TRADE) Response: { "loanCoin":"BUSD", "loanAmount":"100.5", "collateralCoin":"BNB", "collateralAmount":"50.5", "hourlyInterestRate":"0.001234", "orderId":"100000001" } POST/sapi/v1/loan/borrow Weight(UID): 6000 Parameters: Name Type Mandatory Description loanCoin STRING YES loanAmount DECIMAL NO MandatorywhencollateralAmountisempty collateralCoin STRING YES collateralAmount DECIMAL NO MandatorywhenloanAmountisempty loanTerm INT YES 7/14/30/90/180days recvWindow LONG NO timestamp LONG YES Borrow-GetLoanBorrowHistory(USER_DATA) Response: { "rows":[ { "orderId":100000001, "loanCoin":"BUSD", "initialLoanAmount":"10000", "hourlyInterestRate":"0.000057" "loanTerm":"7" "collateralCoin":"BNB", "initialCollateralAmount":"49.27565492" "borrowTime":1575018510000 "status":"Repaid"//Accruing_Interest,Overdue,Liquidating,Repaying,Repaid,Liquidated,Pending,Failed } ], "total":1 } GET/sapi/v1/loan/borrow/history Weight(IP): 400 Parameters: Name Type Mandatory Description orderId LONG NO orderIdinPOST/sapi/v1/loan/borrow loanCoin STRING NO collateralCoin STRING NO startTime LONG NO endTime LONG NO current LONG NO Currentqueryingpage.Startfrom1;default:1;max:1000. limit LONG NO Default:10;max:100. recvWindow LONG NO timestamp LONG YES IfstartTimeandendTimearenotsent,therecent90-daydatawillbereturned. ThemaxintervalbetweenstartTimeandendTimeis180days. Borrow-GetLoanOngoingOrders(USER_DATA) Response: { "rows":[ { "orderId":100000001, "loanCoin":"BUSD", "totalDebt":"10000", "residualInterest":"10.27687923" "collateralCoin":"BNB", "collateralAmount":"49.27565492" "currentLTV":"0.57" "expirationTime":1575018510000 } ], "total":1 } GET/sapi/v1/loan/ongoing/orders Weight(IP): 400 Parameters: Name Type Mandatory Description orderId LONG NO orderIdinPOST/sapi/v1/loan/borrow loanCoin STRING NO collateralCoin STRING NO current LONG NO Currentqueryingpage.Startfrom1;default:1;max:1000 limit LONG NO Default:10;max:100 recvWindow LONG NO timestamp LONG YES Repay-CryptoLoanRepay(TRADE) Response: { "loanCoin":"BUSD" "remainingPrincipal":"100.5" "remainingInterest":"0" "collateralCoin":"BNB" "remainingCollateral":"5.253" "currentLTV":"0.25" "repayStatus":"Repaid"//Repaid,Repaying } or { "loanCoin":"BUSD" "collateralCoin":"BNB" "repayStatus":"Repaying"//Repaid,Repaying } POST/sapi/v1/loan/repay Weight(UID): 6000 Parameters: Name Type Mandatory Description orderId LONG YES amount DECIMAL YES type INT NO Default:1.1for"repaywithborrowedcoin";2for"repaywithcollateral". collateralReturn BOOLEAN NO Default:TRUE.TRUE:Returnextracollateraltospotaccount;FALSE:Keepextracollateralintheorder. recvWindow LONG NO timestamp LONG YES Repay-GetLoanRepaymentHistory(USER_DATA) Response: { "rows":[ { "loanCoin":"BUSD", "repayAmount":"10000", "collateralCoin":"BNB", "collateralUsed":"0" "collateralReturn":"49.27565492" "repayType":"1"//1for"repaywithborrowedcoin",2for"repaywithcollateral" "repayStatus":"Repaid"//Repaid,Repaying,Failed "repayTime":1575018510000 "orderId":756783308056935434 } ], "total":1 } GET/sapi/v1/loan/repay/history Weight(IP): 400 Parameters: Name Type Mandatory Description orderId LONG NO loanCoin STRING NO collateralCoin STRING NO startTime LONG NO endTime LONG NO current LONG NO Currentqueryingpage.Startfrom1;default:1;max:1000 limit LONG NO Default:10;max:100 recvWindow LONG NO timestamp LONG YES IfstartTimeandendTimearenotsent,therecent90-daydatawillbereturned. ThemaxintervalbetweenstartTimeandendTimeis180days. AdjustLTV-CryptoLoanAdjustLTV(TRADE) Response: { "loanCoin":"BUSD", "collateralCoin":"BNB", "direction":"ADDITIONAL", "amount":"5.235", "currentLTV":"0.52" } POST/sapi/v1/loan/adjust/ltv Weight(UID): 6000 Parameters: Name Type Mandatory Description orderId LONG YES amount DECIMAL YES direction ENUM YES "ADDITIONAL","REDUCED" recvWindow LONG NO timestamp LONG YES AdjustLTV-GetLoanLTVAdjustmentHistory(USER_DATA) Response: { "rows":[ { "loanCoin":"BUSD", "collateralCoin":"BNB", "direction":"ADDITIONAL", "amount":"5.235", "preLTV":"0.78", "afterLTV":"0.56", "adjustTime":1575018510000, "orderId":756783308056935434 } ], "total":1 } GET/sapi/v1/loan/ltv/adjustment/history Weight(IP): 400 Parameters: Name Type Mandatory Description orderId LONG NO loanCoin STRING NO collateralCoin STRING NO startTime LONG NO endTime LONG NO current LONG NO Currentqueryingpage.Startfrom1;default:1;max:1000 limit LONG NO Default:10;max:100 recvWindow LONG NO timestamp LONG YES IfstartTimeandendTimearenotsent,therecent90-daydatawillbereturned. ThemaxintervalbetweenstartTimeandendTimeis180days. PayEndpointsGetPayTradeHistory(USER_DATA) Response: { "code":"000000", "message":"success", "data":[ { "orderType":"C2C",//Enum:PAY(C2BMerchantAcquiringPayment),PAY_REFUND(C2BMerchantAcquiringPayment,refund),C2C(C2CTransferPayment),CRYPTO_BOX(Cryptobox),CRYPTO_BOX_RF(CryptoBox,refund),C2C_HOLDING(TransfertonewBinanceuser),C2C_HOLDING_RF(TransfertonewBinanceuser,refund),PAYOUT(B2CDisbursementPayment) "transactionId":"M_P_71505104267788288", "transactionTime":1610090460133,//tradetimestamp "amount":"23.72469206",//orderamount(upto8decimalplaces),positiveisincome,negativeisexpenditure "currency":"BNB", "walletType":1,//1forfundingwalletand2forspotwallet "fundsDetail":[//ddetails { "currency":"USDT",//asset "amount":"1.2" }, { "currency":"ETH", "amount":"0.0001" } ] } ], "success":true } GET/sapi/v1/pay/transactions(HMACSHA256) Weight(UID): 3000 Parameters: Name Type Mandatory Description startTime LONG NO endTime LONG NO limit INT NO default100,max100 recvWindow LONG NO timestamp LONG YES IfstartTimeandendTimearenotsent,therecent90days'datawillbereturned. ThemaxintervalbetweenstartTimeandendTimeis90days. Supportforqueryingorderswithinthelast18months. ConvertEndpointsGetConvertTradeHistory(USER_DATA) Response: { "list":[ { "quoteId":"f3b91c525b2644c7bc1e1cd31b6e1aa6", "orderId":940708407462087195, "orderStatus":"SUCCESS",//orderstatus "fromAsset":"USDT",//fromasset "fromAmount":"20",//fromamount "toAsset":"BNB",//toasset "toAmount":"0.06154036",//toamount "ratio":"0.00307702",//priceratio "inverseRatio":"324.99",//inverseprice "createTime":1624248872184 } ], "startTime":1623824139000, "endTime":1626416139000, "limit":100, "moreData":false } GET/sapi/v1/convert/tradeFlow(HMACSHA256) Weight(UID): 3000 Parameters: Name Type Mandatory Description startTime LONG YES endTime LONG YES limit INT NO Default100,Max1000 recvWindow LONG NO timestamp LONG YES ThemaxintervalbetweenstartTimeandendTimeis30days. RebateEndpointsGetSpotRebateHistoryRecords(USER_DATA) Response: { "status":"OK", "type":"GENERAL", "code":"000000000", "data":{ "page":1,//currentpage "totalRecords":2,//totalrecords "totalPageNum":1,//totalpages "data":[ { "asset":"USDT",//rebateasset "type":1,//rebatetype:1iscommissionrebate,2isreferralkickback "amount":"0.0001126", "updateTime":1637651320000 }, { "asset":"ETH", "type":1, "amount":"0.00000056", "updateTime":1637928379000 } ] } } GET/sapi/v1/rebate/taxQuery(HMACSHA256) Weight(UID): 12000 Parameters: Name Type Mandatory Description startTime LONG NO endTime LONG NO page INT NO Default1 recvWindow LONG NO timestamp LONG YES ThemaxintervalbetweenstartTimeandendTimeis30days. IfstartTimeandendTimearenotsent,therecent7days'datawillbereturned. TheearlieststartTimeissupportedonJune10,2020 NFTEndpointsGetNFTTransactionHistory(USER_DATA) Response: { "total":2,//totalrecords "list":[ { "orderNo":"1_470502070600699904",//0:purchaseorder,1:sellorder,2:royaltyincome,3:primarymarketorder,4:mintfee "tokens":[ { "network":"BSC",//NFTNetwork "tokenId":"216000000496",//NFTTokenID "contractAddress":"MYSTERY_BOX0000087"//NFTContractAddress } ], "tradeTime":1626941236000, "tradeAmount":"19.60000000", "tradeCurrency":"BNB" }, { "orderNo":"1_488306442479116288", "tokens":[ { "network":"BSC", "tokenId":"132900000007", "contractAddress":"0xAf12111a592e408DAbC740849fcd5e68629D9fb6" } ], "tradeTime":1631186130000, "tradeAmount":"192.00000000", "tradeCurrency":"BNB" } ] } GET/sapi/v1/nft/history/transactions(HMACSHA256) Weight(UID): 3000 Parameters: Name Type Mandatory Description orderType INT YES 0:purchaseorder,1:sellorder,2:royaltyincome,3:primarymarketorder,4:mintfee startTime LONG NO endTime LONG NO limit INT NO Default50,Max50 page INT NO Default1 recvWindow LONG NO timestamp LONG YES ThemaxintervalbetweenstartTimeandendTimeis90days. IfstartTimeandendTimearenotsent,therecent7days'datawillbereturned. GetNFTDepositHistory(USER_DATA) Response: { "total":2, "list":[ { "network":"ETH",//NFTNetwork "txID":null,//TransactionID "contractAdrress":"0xe507c961ee127d4439977a61af39c34eafee0dc6",//NFTContractAddress "tokenId":"10014",//NFTTokenID "timestamp":1629986047000 }, { "network":"BSC", "txID":null, "contractAdrress":"0x058451b463bab04f52c0799d55c4094f507acfa9", "tokenId":"10016", "timestamp":1630083581000 } ] } GET/sapi/v1/nft/history/deposit(HMACSHA256) Weight(UID): 3000 Parameters: Name Type Mandatory Description startTime LONG NO endTime LONG NO limit INT NO Default50,Max50 page INT NO Default1 recvWindow LONG NO timestamp LONG YES ThemaxintervalbetweenstartTimeandendTimeis90days. IfstartTimeandendTimearenotsent,therecent7days'datawillbereturned. GetNFTWithdrawHistory(USER_DATA) Response: { "total":178, "list":[ { "network":"ETH", "txID":"0x2be5eed31d787fdb4880bc631c8e76bdfb6150e137f5cf1732e0416ea206f57f", "contractAdrress":"0xe507c961ee127d4439977a61af39c34eafee0dc6",//NFTContractAddress "tokenId":"1000001247",//NFTTokenID "timestamp":1633674433000, "fee":0.1,//WithdrawFee "feeAsset":"ETH"//Asset }, { "network":"ETH", "txID":"0x3b3aea5c0a4faccd6f306641e6deb9713ab229ac233be3be227f580311e4362a", "contractAdrress":"0xe507c961ee127d4439977a61af39c34eafee0dc6", "tokenId":"40000030", "timestamp":1633677022000, "fee":0.1, "feeAsset":"ETH" } ] } GET/sapi/v1/nft/history/withdraw(HMACSHA256) Weight(UID): 3000 Parameters: Name Type Mandatory Description startTime LONG NO endTime LONG NO limit INT NO Default50,Max50 page INT NO Default1 recvWindow LONG NO timestamp LONG YES ThemaxintervalbetweenstartTimeandendTimeis90days. IfstartTimeandendTimearenotsent,therecent7days'datawillbereturned. GetNFTAsset(USER_DATA) Response: { "total":347, "list":[ { "network":"BSC",//NFTNetwork "contractAddress":"REGULAR11234567891779",//NFTContractAddress "tokenId":"100900000017"//NFTTokenID }, { "network":"BSC", "contractAddress":"SSMDQ8W59", "tokenId":"200500000011" }, { "network":"BSC", "contractAddress":"SSMDQ8W59", "tokenId":"200500000019" } ] } GET/sapi/v1/nft/user/getAsset(HMACSHA256) Weight(UID): 3000 Parameters: Name Type Mandatory Description limit INT NO Default50,Max50 page INT NO Default1 recvWindow LONG NO timestamp LONG YES BinanceCodeEndpoints BinanceCode(orBinanceGiftCardCode)allowssimplecryptotransferandexchangethroughsecuredandprepaidcodesthatgiveaccesstocryptoassets.BinanceCodeAPIsolutionistofacilitateinstantcreation,redemptionandvalue-checkingforBinanceCode.BinanceCodeproductfeatureconsistsoftwoparts:"ReferenceNumber"and"BinanceCode".TheReferenceNumbercanbecirculatedinpublic,anditisusedtoverifythevalidityoftheBinanceCode;BinanceCodeshouldbekeptcarefully,becauseaslongassomeoneknowsthe“BinanceCode”,hecanredeemitanytime. Note:Thefollowingendpointsdonotcurrentlysupportsub-accountrequests CreateaBinanceCode(USER_DATA) Response: { "code":"000000", "message":"success", "data":{ "referenceNo":"0033002327977405",//ReferenceNumber "code":"AOGANK3NB4GIT3C6"//BinanceCode }, "success":true } POST/sapi/v1/giftcard/createCode(HMACSHA256) ThisAPIisforcreatingaBinanceCode. Togetstartedwith,pleasemakesure: YouhaveaBinanceaccount Youhavepassedkyc YouhaveasufficientbalanceinyourBinancefundingwallet YouneedEnableWithdrawalsfortheAPIKeywhichrequeststhisendpoint. Weight(IP): 1 Dailycreationvolume:2BTC/24H Dailycreationtimes:200Codes/24H Parameters: Name Type Mandatory Description token STRING YES ThecointypecontainedintheBinanceCode amount DOUBLE YES Theamountofthecoin recvWindow LONG NO timestamp LONG YES RedeemaBinanceCode(USER_DATA) Response: { "code":"000000", "message":"success", "data":{ "token":"BNB",//coin "amount":"10",//amount "referenceNo":"0033002327977405",//ReferenceNumber "identityNo":"10316281761814589440"//ignore }, "success":true } POST/sapi/v1/giftcard/redeemCode(HMACSHA256) ThisAPIisforredeemingtheBinanceCode. Onceredeemed,thecoinswillbedepositedinyourfundingwallet. Pleasenotethatifyouenterthewrongcode5timeswithin24hours,youwillnolongerbeabletoredeemanyBinanceCodethatday. Weight(IP): 1 Parameters: Name Type Mandatory Description code STRING YES BinanceCodetoberedeemed,supportsbothPlaintext&Encryptedcode. externalUid STRING NO EachexternaluniqueIDrepresentsauniqueuseronthepartnerplatform.Thefunctionhelpsyoutoidentifytheredemptionbehaviorofdifferentusers,suchasredemptionfrequencyandamount.Italsohelpsriskandlimitcontrolofasingleaccount,suchasdailylimitonredemptionvolume,frequency,andincorrectnumberofentries.Thiswillalsopreventasingleuseraccountreachthepartner'sdailyredemptionlimits.WestronglyrecommendyoutousethisfeatureandtransferustheUserIDofyourusersifyouhavedifferentusersredeemingBinancecodesonyourplatform.Toprotectuserdataprivacy,youmaychoosetotransfertheuseridinanydesiredformat(max.400characters). recvWindow LONG NO timestamp LONG YES Notes: Parametercodecanbesentintwoformats: Plaintext Encrypted SendingcodeinEncryptedformatprovidesmoresecuritythansendingitasaplaintext.Tosendcardcodeinencryptedformatthefollowingstepsmustbefollowed: FetchRSApublickeyfromapistatedbelow. UsethebelowalgorithmtoencryptthecardcodeusingtheRSApublickeyfetchedabove:RSA/ECB/OAEPWithSHA-256AndMGF1Padding Asamplecodesnippet(JAVA)isstatedbelowforreference,thesameapproachcanbeusedfordifferentlanguageslikeC#,PERL,PYTHON,SHELLetc.: privatestaticPublicKeygetPublicKey(StringpublicKey)throwsException{ KeyFactorykeyFactory=KeyFactory.getInstance("RSA"); byte[]decodedKey=Base64.decodeBase64(publicKey.getBytes()); X509EncodedKeySpeckeySpec=newX509EncodedKeySpec(decodedKey); returnkeyFactory.generatePublic(keySpec); } publicstaticStringencrypt(Stringcontent,StringpublicKeyString)throwsException{ if(StringUtils.isAnyEmpty(newCharSequence[]{content,publicKeyString})){ thrownewIllegalArgumentException("invalidcontentorprivateKey."); }else{ Ciphercipher=Cipher.getInstance("RSA/ECB/OAEPWITHSHA-256ANDMGF1PADDING","BC"); cipher.init(Cipher.ENCRYPT_MODE,getPublicKey(publicKeyString)); returnnewString(Base64.encodeBase64URLSafe(cipher.doFinal(content.getBytes("UTF-8")))); } } static{ Security.addProvider(newBouncyCastleProvider()); } VerifyaBinanceCode(USER_DATA) Response: { "code":"000000", "message":"success", "data":{ "valid":true, "token":"BNB",//coin "amount":"0.00000001"//amount }, "success":true } GET/sapi/v1/giftcard/verify(HMACSHA256) ThisAPIisforverifyingwhethertheBinanceCodeisvalidornotbyenteringReferenceNumber. PleasenotethatifyouenterthewrongBinancecode5timeswithinanhour,youwillnolongerbeabletoverifyanyBinancecodeforthathour. Weight(IP): 1 Parameters: Name Type Mandatory Description referenceNo STRING YES ReferenceNumber recvWindow LONG NO timestamp LONG YES FetchRSAPublicKey(USER_DATA) Response: { "code":"000000", "message":"success", "data":"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXBBVKLAc1GQ5FsIFFqOHrPTox5noBONIKr+IAedTR9FkVxq6e65updEbfdhRNkMOeYIO2i0UylrjGC0X8YSoIszmrVHeV0l06Zh1oJuZos1+7N+WLuz9JvlPaawof3GUakTxYWWCa9+8KIbLKsoKMdfS96VT+8iOXO3quMGKUmQIDAQAB", "success":true } GET/sapi/v1/giftcard/cryptography/rsa-public-key(HMACSHA256) ThisAPIisforfetchingtheRSAPublicKey. ThisRSAPublickeywillbeusedtoencryptthecardcode. PleasenotethattheRSAPublickeyfetchedisvalidonlyforthecurrentday. Weight(IP): 1 Parameters: Name Type Mandatory Description recvWindow LONG NO timestamp LONG YES BuyaBinanceCode(TRADE) Response: { "code":"000000", "message":"success", "data":{ "referenceNo":"0033002327977405", "code":"AOGANK3NB4GIT3C6" }, "success":true } POST/sapi/v1/giftcard/buyCode(HMACSHA256) ThisAPIisforbuyingafixed-valueBinanceCode,whichmeansyourBinanceCodewillberedeemabletoatokenthatisdifferenttothetokenthatyouarepayingin.Ifthetokenyou’repayingandtheredeemabletokenarethesame,pleaseusetheCreateBinanceCodeendpoint. YoucanusesupportedcryptocurrencyorfiattokenasbaseTokentobuyBinanceCodethatisredeemabletoyourchosenfaceToken. Oncesuccessfullypurchased,theamountofbaseTokenwouldbedeductedfromyourfundingwallet. Togetstartedwith,pleasemakesure: YouhaveaBinanceaccount Youhavepassedkyc YouhaveasufficientbalanceinyourBinancefundingwallet YouneedEnableWithdrawalsfortheAPIKeywhichrequeststhisendpoint. Weight(IP): 1 Dailycreationvolume:2BTC/24H Dailycreationtimes:200Codes/24H Parameters: Name Type Mandatory Description baseToken STRING YES Thetokenyouwanttopay,example:BUSD faceToken STRING YES Thetokenyouwanttobuy,example:BNB.IffaceToken=baseToken,it'sthesameascreateCodeendpoint. baseTokenAmount DOUBLE YES Thebasetokenassetquantity,example:1.002 recvWindow LONG NO timestamp LONG YES FetchTokenLimit(USER_DATA) Response: { "code":"000000", "message":"success", "data":[ { "coin":"BNB", "fromMin":"0.01", "fromMax":"1" } ], "success":true } GET/sapi/v1/giftcard/buyCode/token-limit(HMACSHA256) ThisAPIistohelpyouverifywhichtokensareavailableforyoutopurchasefixed-valuegiftcardsasmentionedinsection2andits’limitation. Weight(IP): 1 Parameters: Name Type Mandatory Description baseToken STRING YES Thetokenyouwanttopay,example:BUSD recvWindow LONG NO timestamp LONG YES ErrorCodes TheerrorJSONpayload: { "code":-1121, "msg":"Invalidsymbol." } Errorsconsistoftwoparts:anerrorcodeandamessage.Codesareuniversal,butmessagescanvary. 10xx-GeneralServerorNetworkissues-1000UNKNOWN Anunknownerroroccurredwhileprocessingtherequest. Anunknownerroroccurredwhileprocessingtherequest.[%s] -1001DISCONNECTED Internalerror;unabletoprocessyourrequest.Pleasetryagain. -1002UNAUTHORIZED Youarenotauthorizedtoexecutethisrequest. -1003TOO_MANY_REQUESTS Toomanyrequestsqueued. Toomuchrequestweightused;pleaseusethewebsocketforliveupdatestoavoidpollingtheAPI. Toomuchrequestweightused;currentlimitis%srequestweightper%s%s.PleaseusethewebsocketforliveupdatestoavoidpollingtheAPI. Waytoomuchrequestweightused;IPbanneduntil%s.Pleaseusethewebsocketforliveupdatestoavoidbans. -1004SERVER_BUSY Serverisbusy,pleasewaitandtryagain -1006UNEXPECTED_RESP Anunexpectedresponsewasreceivedfromthemessagebus.Executionstatusunknown. -1007TIMEOUT Timeoutwaitingforresponsefrombackendserver.Sendstatusunknown;executionstatusunknown. -1008SERVER_BUSY Spotserveriscurrentlyoverloadedwithotherrequests.Pleasetryagaininafewminutes. -1014UNKNOWN_ORDER_COMPOSITION Unsupportedordercombination. -1015TOO_MANY_ORDERS Toomanyneworders. Toomanyneworders;currentlimitis%sordersper%s. -1016SERVICE_SHUTTING_DOWN Thisserviceisnolongeravailable. -1020UNSUPPORTED_OPERATION Thisoperationisnotsupported. -1021INVALID_TIMESTAMP TimestampforthisrequestisoutsideoftherecvWindow. Timestampforthisrequestwas1000msaheadoftheserver'stime. -1022INVALID_SIGNATURE Signatureforthisrequestisnotvalid. -1099Notfound,authenticated,orauthorized Thisreplaceserrorcode-1999 11xx-2xxxRequestissues-1100ILLEGAL_CHARS Illegalcharactersfoundinaparameter. Illegalcharactersfoundinaparameter.%s Illegalcharactersfoundinparameter%s;legalrangeis%s. -1101TOO_MANY_PARAMETERS Toomanyparameterssentforthisendpoint. Toomanyparameters;expected%sandreceived%s. Duplicatevaluesforaparameterdetected. -1102MANDATORY_PARAM_EMPTY_OR_MALFORMED Amandatoryparameterwasnotsent,wasempty/null,ormalformed. Mandatoryparameter%swasnotsent,wasempty/null,ormalformed. Param%sor%smustbesent,butbothwereempty/null! -1103UNKNOWN_PARAM Anunknownparameterwassent. -1104UNREAD_PARAMETERS Notallsentparameterswereread. Notallsentparameterswereread;read%sparameter(s)butwassent%s. -1105PARAM_EMPTY Aparameterwasempty. Parameter%swasempty. -1106PARAM_NOT_REQUIRED Aparameterwassentwhennotrequired. Parameter%ssentwhennotrequired. -1111BAD_PRECISION Precisionisoverthemaximumdefinedforthisasset. -1112NO_DEPTH Noordersonbookforsymbol. -1114TIF_NOT_REQUIRED TimeInForceparametersentwhennotrequired. -1115INVALID_TIF InvalidtimeInForce. -1116INVALID_ORDER_TYPE InvalidorderType. -1117INVALID_SIDE Invalidside. -1118EMPTY_NEW_CL_ORD_ID NewclientorderIDwasempty. -1119EMPTY_ORG_CL_ORD_ID OriginalclientorderIDwasempty. -1120BAD_INTERVAL Invalidinterval. -1121BAD_SYMBOL Invalidsymbol. -1125INVALID_LISTEN_KEY ThislistenKeydoesnotexist. -1127MORE_THAN_XX_HOURS Lookupintervalistoobig. Morethan%shoursbetweenstartTimeandendTime. -1128OPTIONAL_PARAMS_BAD_COMBO Combinationofoptionalparametersinvalid. -1130INVALID_PARAMETER Invaliddatasentforaparameter. Datasentforparameter%sisnotvalid. -1131BAD_RECV_WINDOW recvWindowmustbelessthan60000 -1134BAD_STRATEGY_TYPE strategyTypewaslessthan1000000. -2010NEW_ORDER_REJECTED NEW_ORDER_REJECTED -2011CANCEL_REJECTED CANCEL_REJECTED -2013NO_SUCH_ORDER Orderdoesnotexist. -2014BAD_API_KEY_FMT API-keyformatinvalid. -2015REJECTED_MBX_KEY InvalidAPI-key,IP,orpermissionsforaction. -2016NO_TRADING_WINDOW Notradingwindowcouldbefoundforthesymbol.Tryticker/24hrsinstead. 3xxx-5xxxSAPI-specificissues-3000INNER_FAILURE Internalservererror. -3001NEED_ENABLE_2FA Pleaseenable2FAfirst. -3002ASSET_DEFICIENCY Wedon'thavethisasset. -3003NO_OPENED_MARGIN_ACCOUNT Marginaccountdoesnotexist. -3004TRADE_NOT_ALLOWED Tradenotallowed. -3005TRANSFER_OUT_NOT_ALLOWED Transferringoutnotallowed. -3006EXCEED_MAX_BORROWABLE Yourborrowamounthasexceedmaximumborrowamount. -3007HAS_PENDING_TRANSACTION Youhavependingtransaction,pleasetryagainlater. -3008BORROW_NOT_ALLOWED Borrownotallowed. -3009ASSET_NOT_MORTGAGEABLE Thisassetarenotallowedtotransferintomarginaccountcurrently. -3010REPAY_NOT_ALLOWED Repaynotallowed. -3011BAD_DATE_RANGE Yourinputdateisinvalid. -3012ASSET_ADMIN_BAN_BORROW Borrowisbannedforthisasset. -3013LT_MIN_BORROWABLE Borrowamountlessthanminimumborrowamount. -3014ACCOUNT_BAN_BORROW Borrowisbannedforthisaccount. -3015REPAY_EXCEED_LIABILITY Repayamountexceedsborrowamount. -3016LT_MIN_REPAY Repayamountlessthanminimumrepayamount. -3017ASSET_ADMIN_BAN_MORTGAGE Thisassetarenotallowedtotransferintomarginaccountcurrently. -3018ACCOUNT_BAN_MORTGAGE Transferringinhasbeenbannedforthisaccount. -3019ACCOUNT_BAN_ROLLOUT Transferringouthasbeenbannedforthisaccount. -3020EXCEED_MAX_ROLLOUT Transferoutamountexceedsmaxamount. -3021PAIR_ADMIN_BAN_TRADE Marginaccountarenotallowedtotradethistradingpair. -3022ACCOUNT_BAN_TRADE Youaccount'stradingisbanned. -3023WARNING_MARGIN_LEVEL Youcan'ttransferout/placeorderundercurrentmarginlevel. -3024FEW_LIABILITY_LEFT Theunpaiddebtistoosmallafterthisrepayment. -3025INVALID_EFFECTIVE_TIME Yourinputdateisinvalid. -3026VALIDATION_FAILED Yourinputparamisinvalid. -3027NOT_VALID_MARGIN_ASSET Notavalidmarginasset. -3028NOT_VALID_MARGIN_PAIR Notavalidmarginpair. -3029TRANSFER_FAILED Transferfailed. -3036ACCOUNT_BAN_REPAY Thisaccountisnotallowedtorepay. -3037PNL_CLEARING PNLisclearing.Waitasecond. -3038LISTEN_KEY_NOT_FOUND Listenkeynotfound. -3041BALANCE_NOT_CLEARED Balanceisnotenough -3042PRICE_INDEX_NOT_FOUND PriceIndexnotavailableforthismarginpair. -3043TRANSFER_IN_NOT_ALLOWED Transferringinnotallowed. -3044SYSTEM_BUSY Systembusy. -3045SYSTEM Thesystemdoesn'thaveenoughassetnow. -3999NOT_WHITELIST_USER Thisfunctionisonlyavailableforinvitedusers. -4001CAPITAL_INVALID Invalidoperation. -4002CAPITAL_IG Invalidget. -4003CAPITAL_IEV Yourinputemailisinvalid. -4004CAPITAL_UA Youdon'tloginorauth. -4005CAPAITAL_TOO_MANY_REQUEST Toomanynewrequests. -4006CAPITAL_ONLY_SUPPORT_PRIMARY_ACCOUNT Supportmainaccountonly. -4007CAPITAL_ADDRESS_VERIFICATION_NOT_PASS Addressvalidationisnotpassed. -4008CAPITAL_ADDRESS_TAG_VERIFICATION_NOT_PASS Addresstagvalidationisnotpassed. -4010CAPITAL_WHITELIST_EMAIL_CONFIRM Whitelistmailhasbeenconfirmed. -4011CAPITAL_WHITELIST_EMAIL_EXPIRED Whitelistmailisinvalid. -4012CAPITAL_WHITELIST_CLOSE Whitelistisnotopened. -4013CAPITAL_WITHDRAW_2FA_VERIFY 2FAisnotopened. -4014CAPITAL_WITHDRAW_LOGIN_DELAY Withdrawisnotallowedwithin2minlogin. -4015CAPITAL_WITHDRAW_RESTRICTED_MINUTE Withdrawislimited. -4016CAPITAL_WITHDRAW_RESTRICTED_PASSWORD Within24hoursafterpasswordmodification,withdrawalisprohibited. -4017CAPITAL_WITHDRAW_RESTRICTED_UNBIND_2FA Within24hoursafterthereleaseof2FA,withdrawalisprohibited. -4018CAPITAL_WITHDRAW_ASSET_NOT_EXIST Wedon'thavethisasset. -4019CAPITAL_WITHDRAW_ASSET_PROHIBIT Currentassetisnotopenforwithdrawal. -4021CAPITAL_WITHDRAW_AMOUNT_MULTIPLE Assetwithdrawalmustbean%smultipleof%s. -4022CAPITAL_WITHDRAW_MIN_AMOUNT Notlessthantheminimumpick-upquantity%s. -4023CAPITAL_WITHDRAW_MAX_AMOUNT Within24hours,thewithdrawalexceedsthemaximumamount. -4024CAPITAL_WITHDRAW_USER_NO_ASSET Youdon'thavethisasset. -4025CAPITAL_WITHDRAW_USER_ASSET_LESS_THAN_ZERO Thenumberofholdassetislessthanzero. -4026CAPITAL_WITHDRAW_USER_ASSET_NOT_ENOUGH Youhaveinsufficientbalance. -4027CAPITAL_WITHDRAW_GET_TRAN_ID_FAILURE FailedtoobtaintranId. -4028CAPITAL_WITHDRAW_MORE_THAN_FEE TheamountofwithdrawalmustbegreaterthantheCommission. -4029CAPITAL_WITHDRAW_NOT_EXIST Thewithdrawalrecorddoesnotexist. -4030CAPITAL_WITHDRAW_CONFIRM_SUCCESS Confirmationofsuccessfulassetwithdrawal. -4031CAPITAL_WITHDRAW_CANCEL_FAILURE Cancellationfailed. -4032CAPITAL_WITHDRAW_CHECKSUM_VERIFY_FAILURE Withdrawverificationexception. -4033CAPITAL_WITHDRAW_ILLEGAL_ADDRESS Illegaladdress. -4034CAPITAL_WITHDRAW_ADDRESS_CHEAT Theaddressissuspectedoffake. -4035CAPITAL_WITHDRAW_NOT_WHITE_ADDRESS Thisaddressisnotonthewhitelist.Pleasejoinandtryagain. -4036CAPITAL_WITHDRAW_NEW_ADDRESS Thenewaddressneedstobewithdrawnin{0}hours. -4037CAPITAL_WITHDRAW_RESEND_EMAIL_FAIL Re-sendingMailfailed. -4038CAPITAL_WITHDRAW_RESEND_EMAIL_TIME_OUT Pleasetryagainin5minutes. -4039CAPITAL_USER_EMPTY Theuserdoesnotexist. -4040CAPITAL_NO_CHARGE Thisaddressnotcharged. -4041CAPITAL_MINUTE_TOO_SMALL Pleasetryagaininoneminute. -4042CAPITAL_CHARGE_NOT_RESET Thisassetcannotgetdepositaddressagain. -4043CAPITAL_ADDRESS_TOO_MUCH Morethan100rechargeaddresseswereusedin24hours. -4044CAPITAL_BLACKLIST_COUNTRY_GET_ADDRESS Thisisablacklistcountry. -4045CAPITAL_GET_ASSET_ERROR Failuretoacquireassets. -4046CAPITAL_AGREEMENT_NOT_CONFIRMED Agreementnotconfirmed. -4047CAPITAL_DATE_INTERVAL_LIMIT Timeintervalmustbewithin0-90days -5001ASSET_DRIBBLET_CONVERT_SWITCH_OFF Don'tallowtransfertomicroassets. -5002ASSET_ASSET_NOT_ENOUGH Youhaveinsufficientbalance. -5003ASSET_USER_HAVE_NO_ASSET Youdon'thavethisasset. -5004USER_OUT_OF_TRANSFER_FLOAT Theresidualbalanceshaveexceeded0.001BTC,Pleasere-choose. Theresidualbalancesof%shaveexceeded0.001BTC,Pleasere-choose. -5005USER_ASSET_AMOUNT_IS_TOO_LOW TheresidualbalancesoftheBTCistoolow Theresidualbalancesof%sistoolow,Pleasere-choose. -5006USER_CAN_NOT_REQUEST_IN_24_HOURS Onlytransferoncein24hours. -5007AMOUNT_OVER_ZERO Quantitymustbegreaterthanzero. -5008ASSET_WITHDRAW_WITHDRAWING_NOT_ENOUGH Insufficientamountofreturnableassets. -5009PRODUCT_NOT_EXIST Productdoesnotexist. -5010TRANSFER_FAIL Assettransferfail. -5011FUTURE_ACCT_NOT_EXIST futureaccountnotexists. -5012TRANSFER_PENDING Assettransferisinpending. -5021PARENT_SUB_HAVE_NO_RELATION Thisparentsubhavenorelation -5012FUTURE_ACCT_OR_SUBRELATION_NOT_EXIST futureaccountorsubrelationnotexists. 6XXX-SavingsIssues-6001DAILY_PRODUCT_NOT_EXIST Dailyproductnotexists. -6003DAILY_PRODUCT_NOT_ACCESSIBLE Productnotexistoryoudon'thavepermission -6004DAILY_PRODUCT_NOT_PURCHASABLE Productnotinpurchasestatus -6005DAILY_LOWER_THAN_MIN_PURCHASE_LIMIT Smallerthanminpurchaselimit -6006DAILY_REDEEM_AMOUNT_ERROR Redeemamounterror -6007DAILY_REDEEM_TIME_ERROR Notinredeemtime -6008DAILY_PRODUCT_NOT_REDEEMABLE Productnotinredeemstatus -6009REQUEST_FREQUENCY_TOO_HIGH Requestfrequencytoohigh -6011EXCEEDED_USER_PURCHASE_LIMIT Exceedingthemaximumnumallowedtopurchaseperuser -6012BALANCE_NOT_ENOUGH Balancenotenough -6013PURCHASING_FAILED Purchasingfailed -6014UPDATE_FAILED Exceedup-limitallowedtopurchased -6015EMPTY_REQUEST_BODY Emptyrequestbody -6016PARAMS_ERR Parametererr -6017NOT_IN_WHITELIST Notinwhitelist -6018ASSET_NOT_ENOUGH Assetnotenough -6019PENDING Needconfirm -6020PROJECT_NOT_EXISTS Projectnotexists 70xx-Futures-7001FUTURES_BAD_DATE_RANGE Daterangeisnotsupported. -7002FUTURES_BAD_TYPE Datarequesttypeisnotsupported. 20xxx-FuturesAlgo-20121 Invalidsymbol. -20124 Invalidalgoidorithasbeencompleted. -20130 Invaliddatasentforaparameter. -20132 Theclientalgoidisduplicated. -20194 Durationistooshorttoexecuteallrequiredquantity. -20195 Thetotalsizeistoosmall. -20196 Thetotalsizeistoolarge. -20198 Reachthemaxopenordersallowed. -9xxxFilterfailures Errormessage Description "Filterfailure:PRICE_FILTER" priceistoohigh,toolow,and/ornotfollowingtheticksizeruleforthesymbol. "Filterfailure:PERCENT_PRICE" priceisX%toohighorX%toolowfromtheaverageweightedpriceoverthelastYminutes. "Filterfailure:PERCENT_PRICE_BY_SIDE" priceisX%toohighorY%toolowfromthelastPriceonthatside(i.e.BUY/SELL) "Filterfailure:LOT_SIZE" quantityistoohigh,toolow,and/ornotfollowingthestepsizeruleforthesymbol. "Filterfailure:MIN_NOTIONAL" price*quantityistoolowtobeavalidorderforthesymbol. "Filterfailure:ICEBERG_PARTS" ICEBERGorderwouldbreakintotoomanyparts;icebergQtyistoosmall. "Filterfailure:MARKET_LOT_SIZE" MARKETorder'squantityistoohigh,toolow,and/ornotfollowingthestepsizeruleforthesymbol. "Filterfailure:MAX_POSITION" Theaccount'spositionhasreachedthemaximumdefinedlimit.Thisiscomposedofthesumofthebalanceofthebaseasset,andthesumofthequantityofallopenBUYorders. "Filterfailure:MAX_NUM_ORDERS" Accounthastoomanyopenordersonthesymbol. "Filterfailure:MAX_NUM_ALGO_ORDERS" Accounthastoomanyopenstoplossand/ortakeprofitordersonthesymbol. "Filterfailure:MAX_NUM_ICEBERG_ORDERS" Accounthastoomanyopenicebergordersonthesymbol. "Filterfailure:TRAILING_DELTA" trailingDeltaisnotwithinthedefinedrangeofthefilterforthatordertype. "Filterfailure:EXCHANGE_MAX_NUM_ORDERS" Accounthastoomanyopenordersontheexchange. "Filterfailure:EXCHANGE_MAX_NUM_ALGO_ORDERS" Accounthastoomanyopenstoplossand/ortakeprofitordersontheexchange. 10xxx-CryptoLoans-10001SYSTEM_MAINTENANCE Thesystemisundermaintenance,pleasetryagainlater. -10002INVALID_INPUT Invalidinputparameters. -10005NO_RECORDS Norecordsfound. -10007COIN_NOT_LOANABLE Thiscoinisnotloanable. -10008COIN_NOT_LOANABLE Thiscoinisnotloanable -10009COIN_NOT_COLLATERAL Thiscoincannotbeusedascollateral. -10010COIN_NOT_COLLATERAL Thiscoincannotbeusedascollateral. -10011INSUFFICIENT_ASSET Insufficientspotassets. -10012INVALID_AMOUNT Invalidrepaymentamount. -10013INSUFFICIENT_AMOUNT Insufficientcollateralamount. -10015DEDUCTION_FAILED Collateraldeductionfailed. -10016LOAN_FAILED Failedtoprovideloan. -10017REPAY_EXCEED_DEBT Repaymentamountexceedsdebt. -10018INVALID_AMOUNT Invalidrepaymentamount. -10019CONFIG_NOT_EXIST Configurationdoesnotexists. -10020UID_NOT_EXIST UserIDdoesnotexist. -10021ORDER_NOT_EXIST Orderdoesnotexist. -10022INVALID_AMOUNT Invalidadjustmentamount. -10023ADJUST_LTV_FAILED FailedtoadjustLTV. -10024ADJUST_LTV_NOT_SUPPORTED LTVadjustmentnotsupported. -10025REPAY_FAILED Repaymentfailed. -10026INVALID_PARAMETER Invalidparameter. -10028INVALID_PARAMETER Invalidparameter. -10029AMOUNT_TOO_SMALL Loanamountistoosmall. -10030AMOUNT_TOO_LARGE Loanamountistoomuch. -10031QUOTA_REACHED Individualloanquotareached. -10032REPAY_NOT_AVAILABLE Repaymentistemporarilyunavailable. -10034REPAY_NOT_AVAILABLE Repaywithcollateralisnotavailablecurrently,pleasetrytorepaywithborrowedcoin. -10039AMOUNT_TOO_SMALL Repaymentamountistoosmall. -10040AMOUNT_TOO_LARGE Repaymentamountistoolarge. -10041INSUFFICIENT_AMOUNT Duetohighdemand,therearecurrentlyinsufficientloanableassetsfor{0}.Pleaseadjustyourborrowamountortryagaintomorrow. -10042ASSET_NOT_SUPPORTED asset%sisnotsupported -10043ASSET_NOT_SUPPORTED {0}borrowingiscurrentlynotsupported. -10044QUOTA_REACHED Collateralamounthasreachedthelimit.Pleasereduceyourcollateralamountortrywithothercollaterals. -10045COLLTERAL_REPAY_NOT_SUPPORTED Theloancoindoesnotsupportcollateralrepayment.Pleasetryagainlater. -10046EXCEED_MAX_ADJUSTMENT CollateralAdjustmentexceedsthemaximumlimit.Pleasetryagain. -10047REGION_NOT_SUPPORTED Thiscoiniscurrentlynotsupportedinyourlocationduetolocalregulations. 13xxx-BLVT-13000BLVT_FORBID_REDEEM Redeptionofthetokenisforbidennow -13001BLVT_EXCEED_DAILY_LIMIT Exceedsindividual24hredemptionlimitofthetoken -13002BLVT_EXCEED_TOKEN_DAILY_LIMIT Exceedstotal24hredemptionlimitofthetoken -13003BLVT_FORBID_PURCHASE Subscriptionofthetokenisforbidennow -13004BLVT_EXCEED_DAILY_PURCHASE_LIMIT Exceedsindividual24hsubscriptionlimitofthetoken -13005BLVT_EXCEED_TOKEN_DAILY_PURCHASE_LIMIT Exceedstotal24hsubscriptionlimitofthetoken -13006BLVT_PURCHASE_LESS_MIN_AMOUNT Subscriptionamountistoosmall -13007BLVT_PURCHASE_AGREEMENT_NOT_SIGN TheAgreementisnotsigned 12xxx-LiquidSwap-12014TOOMANYREQUESTS Morethan1requestin2seconds 18xxx-BinanceCode-18002 Thetotalamountofcodesyoucreatedhasexceededthe24-hourlimit,pleasetryagainafterUTC0 -18003 Toomanycodescreatedin24hours,pleasetryagainafterUTC0 -18004 Toomanyinvalidredeemattemptsin24hours,pleasetryagainafterUTC0 -18005 Toomanyinvalidverifyattempts,pleasetrylater -18006 Theamountistoosmall,pleasere-enter -18007 Thistokenisnotcurrentlysupported,pleasere-enter 21xxx-PortfolioMarginAccount-21001USER_IS_NOT_UNIACCOUNT RequestIDisnotaPortfolioMarginAccount. -21002UNI_ACCOUNT_CANT_TRANSFER_FUTURE PortfolioMarginAccountdoesn'tsupporttransferfrommargintofutures. -21003NET_ASSET_MUST_LTE_RATIO Failtoretrievemarginassets. -21004USER_NO_LIABILITY Userdoesn’thaveportfoliomarginbankruptcyloan -21005NO_ENOUGH_ASSET User’sspotwalletdoesn’thaveenoughBUSDtorepayportfoliomarginbankruptcyloan -21006HAD_IN_PROCESS_REPAY Userhadportfoliomarginbankruptcyloanrepaymentinprocess -21007IN_FORCE_LIQUIDATION Userfailedtorepayportfoliomarginbankruptcyloansinceliquidationwasinprocess OrderRejectionIssues Errormessagesliketheseareindicatedwhentheerroriscomingspecificallyfromthematchingengine: -1010ERROR_MSG_RECEIVED -2010NEW_ORDER_REJECTED -2011CANCEL_REJECTED Thefollowingmessageswhichwillindicatethespecificerror: Errormessage Description "Unknownordersent." Theorder(byeitherorderId,clientOrderId,origClientOrderId)couldnotbefound. "Duplicateordersent." TheclientOrderIdisalreadyinuse. "Marketisclosed." Thesymbolisnottrading. "Accounthasinsufficientbalanceforrequestedaction." Notenoughfundstocompletetheaction. "Marketordersarenotsupportedforthissymbol." MARKETisnotenabledonthesymbol. "Icebergordersarenotsupportedforthissymbol." icebergQtyisnotenabledonthesymbol "Stoplossordersarenotsupportedforthissymbol." STOP_LOSSisnotenabledonthesymbol "Stoplosslimitordersarenotsupportedforthissymbol." STOP_LOSS_LIMITisnotenabledonthesymbol "Takeprofitordersarenotsupportedforthissymbol." TAKE_PROFITisnotenabledonthesymbol "Takeprofitlimitordersarenotsupportedforthissymbol." TAKE_PROFIT_LIMITisnotenabledonthesymbol "Price*QTYiszeroorless." price*quantityistoolow "IcebergQtyexceedsQTY." icebergQtymustbelessthantheorderquantity "Thisactionisdisabledonthisaccount." Contactcustomersupport;someactionshavebeendisabledontheaccount. "Unsupportedordercombination" TheorderType,timeInForce,stopPrice,and/oricebergQtycombinationisn'tallowed. "Orderwouldtriggerimmediately." Theorder'sstoppriceisnotvalidwhencomparedtothelasttradedprice. "Cancelorderisinvalid.CheckorigClientOrderIdandorderId." NoorigClientOrderIdororderIdwassentin. "Orderwouldimmediatelymatchandtake." LIMIT_MAKERordertypewouldimmediatelymatchandtrade,andnotbeapuremakerorder. "Therelationshipofthepricesfortheordersisnotcorrect." ThepricessetintheOCOisbreakingthePricerules.Therulesare:SELLOrders:LimitPrice>LastPrice>StopPriceBUYOrders:LimitPrice



請為這篇文章評分?