Change Log
2023-05-26
Notice: The change below are being rolled out, and will take approximately a week to complete.
- The following base endpoints may give better performance but have less stability than https://api.binance.com:
2023-05-24
- The previous market data URLs have been deprecated. Please update your code immediately to
prevent interruption of our services.
- API Market data from
data.binance.comcan now be accessed fromdata-api.binance.vision. - Websocket Market Data from
data-stream.binance.comcan now be accessed fromdata-stream.binance.vision.
- API Market data from
- New endpoints for Classic Portfolio Margin:
POST /sapi/v1/portfolio/auto-collection: classic portfolio Margin fund collectionPOST /sapi/v1/portfolio/bnb-transfer: classic portfolio margin BNB transfer
GET /sapi/v1/portfolio/interest-ratehas be deprecated, users can query the Classic Portfolio Margin Negative Balance Interest Rate by usingGET /sapi/v1/margin/interestRateHistory.
2023-05-18
- New endpoints for Wallet:
POST /sapi/v1/capital/deposit/credit-apply: apply deposit credit for expired address
2023-05-09
- New endpoints for Portfolio Margin:
GET /sapi/v1/portfolio/asset-index-price: query portfolio margin asset index price
- Update endpoints for Wallet:
POST /sapi/v1/asset/transfer: add enumMAIN_PORTFOLIO_MARGINandPORTFOLIO_MARGIN_MAIN
2023-04-20
- New endpoints for Sub-Account:
GET /sapi/v1/managed-subaccount/deposit/address: get managed sub-account deposit address
- Update endpoints for VIP Loans:
GET /sapi/v1/loan/vip/ongoing/orders: add fieldstotalCollateralValueAfterHaircutandlockedCollateralValue
2023-04-18
- New endpoints for Spot Algo:
POST /sapi/v1/algo/spot/newOrderTwapto support new orderDELETE /sapi/v1/algo/spot/orderto support cancel Algo orderGET /sapi/v1/algo/spot/openOrdersto support query Algo open ordersGET /sapi/v1/algo/spot/historicalOrdersto support query Algo historical ordersGET /sapi/v1/algo/spot/subOrdersto support query Algo sub orders for a specified algoId
2023-03-23
- Update endpoints for Sub-Account:
GET /sapi/v1/managed-subaccount/queryTransLogForInvestor: Add response fieldtranIdGET /sapi/v1/managed-subaccount/queryTransLogForTradeParent: Add response fieldtranId
- New endpoints for Sub-Account:
GET /sapi/v1/managed-subaccount/info: query investor's managed sub-account listGET /sapi/v1/sub-account/transaction-statistics: Query sub-account transaction tatistics
2023-03-13
Notice: All changes are being rolled out gradually to all our servers, and may take a week to complete.
GENERAL CHANGES
- The error messages for certain issues have been improved for easier troubleshooting.
- Fixed error message for querying archived orders:
- Previously, If an archived order (i.e. order with status
CANCELEDorEXPIREDwhereexecutedQty== 0 that occurred more than 90 days in the past.) is queried, the error message would be:{"code": -2013,"msg": "Order does not exist."}
- Now, the error message is:
{"code": -2026,"msg": "Order was canceled or expired with no executed qty over 90 days ago and has been archived."}
- Previously, If an archived order (i.e. order with status
- Behavior for API requests with
startTimeandendTime:- Previously some requests failed if the
startTime==endTime. - Now, all API requests that accept
startTimeandendTimeallow the parameters to be equal. This applies to the following requests:- Rest API
GET /api/v3/aggTradesGET /api/v3/klinesGET /api/v3/allOrderListGET /api/v3/allOrdersGET /api/v3/myTrades
- Rest API
- Previously some requests failed if the
The following changes will take effect approximately a week from the release date, but the rest of the documentation has been updated to reflect the future changes:
- Changes to Filter Evaluation:
- Previous behavior:
LOT_SIZEandMARKET_LOT_SIZErequired that (quantity-minQty) %stepSize== 0. - New behavior: This has now been changed to (
quantity%stepSize) == 0.
- Previous behavior:
- Bug fix with reverse
MARKETorders (i.e.,MARKETusingquoteOrderQty):- Previous behavior: Reverse market orders would always have the status
FILLEDeven if the order did not fully fill due to low liquidity. - New behavior: If the reverse market order did not fully fill due to low liquidity the order
status will be
EXPIRED, andFILLEDonly if the order was completely filled.
- Previous behavior: Reverse market orders would always have the status
SPOT API
- Changes to
DELETE /api/v3/orderandPOST /api/v3/order/cancelReplace:- A new optional parameter
cancelRestrictionsthat determines whether the cancel will succeed if the order status isNEWorPARTIALLY_FILLED. - If the order cancellation fails due to
cancelRestrictions, the error will be:{"code": -2011,"msg": "Order was not canceled due to cancel restrictions."}
- A new optional parameter
2023-02-27
- New endpoints for Margin:
/sapi/v1/margin/next-hourly-interest-rate: Get user the next hourly estimate interest
- New endpoints for Porfolio Margin:
GET /sapi/v1/portfolio/interest-history: get user's portfolio margin interest historyGET /sapi/v1/portfolio/interest-rate: get portfolio margin interest rate
2023-02-21
- Adjusted endpoints for Crypto Loan:
POST /sapi/v1/loan/borrow: paramaterloanTermis restricted to 7 or 30
2023-02-17
The Websocket Stream now only allows 300 connections requests every 5 minutes.
This limit is per IP address.
Please be careful when trying to open multiple connections or reconnecting to the Websocket API.
2023-02-13
- New endpoints for Sub-Account:
GET /sapi/v4/sub-account/assets: Fetch sub-account assets
2023-02-02
- New endpoints for Margin:
GET /sapi/v1/margin/exchange-small-liability: Query the coins which can be small liability exchangePOST /sapi/v1/margin/exchange-small-liability: Cross Margin Small Liability ExchangeGET /sapi/v1/margin/exchange-small-liability-history: Get Small liability Exchange History
- Update endpoints for Wallet:
- Universal Transfer
POST /sapi/v1/asset/transfersupport option transfer
- Universal Transfer
2023-01-26
As per the announcement, Self Trade Prevention will be enabled at 2023-01-26 08:00 UTC.
Please refer to GET /api/v3/exchangeInfo from the Rest API or exchangeInfo from the Websocket
API on the default and allowed modes.
2023-01-23
New API cluster has been added. Note that all endpoints are functionally equal, but may vary in performance.
2023-01-19
ACTUAL RELEASE DATE TBD
SPOT API
New Feature: Self-Trade Prevention (aka STP) will be added to the system at a later date. This
will prevent orders from matching with orders from the same account, or accounts under the same
tradeGroupId.
Please refer to GET /api/v3/exchangeInfo from the SPOT API or exchangeInfo from the Websocket
API on the status.
Code
- New order status:
EXPIRED_IN_MATCH- This means that the order expired due to STP being triggered. - New endpoint:
GET /api/v3/myPreventedMatches- This queries the orders that expired due to STP being triggered.
- New optional parameter
selfTradePreventionModehas been added to the following endpoints:POST /api/v3/orderPOST /api/v3/order/ocoPOST /api/v3/cancelReplace
- New responses that will appear for all order placement endpoints if there was a prevented match
(i.e. if an order could have matched with an order of the same account, or the accounts are in the
same
tradeGroupId):tradeGroupId- This will only appear if account is configured to atradeGroupIdand if there was a prevented match.preventedQuantity- Only appears if there was a prevented match.- An array
preventedMatcheswith the following fields:preventedMatchIdmakerOrderIdpricetakerPreventedQuantity- This will only appear ifselfTradePreventionModeset isEXPIRE_TAKERorEXPIRE_BOTH.makerPreventedQuantity- This will only appear ifselfTradePreventionModeset isEXPIRE_MAKERorEXPIRE_BOTH.
- New fields
preventedMatchIdandpreventedQuantitythat can appear in the order query endpoints if the order had expired due to an STP trigger:GET /api/v3/orderGET /api/v3/openOrdersGET /api/v3/allOrders
USER DATA STREAM
- New execution Type:
TRADE_PREVENTION - New fields for
executionReport(These fields will only appear if the order has expired due to STP trigger)u-tradeGroupIdv-preventedMatchIdU-counterOrderIdA-preventedQuantityB-lastPreventedQuantity
2023-01-13
- The following endpoints will be discontinued on January 13, 2023 6:00 AM UTC:
POST /sapi/v1/sub-account/subAccountApi/ipRestrictionto support master account enable and disable IP restriction for a sub-account API KeyPOST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipListto support master account add IP list for a sub-account API Key
- New endpoints for Sub-Account:
GET /sapi/v1/managed-subaccount/fetch-future-asset: Investor can use this api to query managed sub account futures asset detailsGET /sapi/v1/managed-subaccount/marginAsset: Investor can use this api to query managed sub account margin asset details
- New endpoin for Margin:
GET /sapi/v1/margin/crossMarginCollateralRatio: Get cross margin collateral ratio
2023-01-05
- New endpoints for Sub-Account:
GET /sapi/v1/managed-subaccount/queryTransLogForInvestor: Investor can use this api to query managed sub account transfer logGET /sapi/v1/managed-subaccount/queryTransLogForTradeParent: Trading team can use this api to query managed sub account transfer log
2022-12-26
- New endpoints for wallet:
GET /sapi/v1/capital/contract/convertible-coins: Get a user's auto-conversion settings in deposit/withdrawalPOST /sapi/v1/capital/contract/convertible-coins: User can use it to turn on or turn off the BUSD auto-conversion from/to a specific stable coin.
2022-12-15
- New RSA signature
- Documentation has been updated to show how to sign a request using an RSA key.
- For security reasons, we recommend to use RSA keys instead of HMAC keys when generating an API key.
- We accept
PKCS#8(BEGIN PUBLIC KEY). - More details on how to upload your RSA public key will be added at a later date.
2022-12-13
REST API
Some error messages on error code -1003 have changed:
- Previous error message:
Too much request weight used; current limit is %s request weight per %s %s. Please use the websocket for live updates to avoid polling the API.
has been updated to:
Too much request weight used; current limit is %s request weight per %s. Please use WebSocket Streams for live updates to avoid polling the API.
- Previous error message
Way too much request weight used; IP banned until %s. Please use the websocket for live updates to avoid bans.
has been updated to:
Way too much request weight used; IP banned until %s. Please use WebSocket Streams for live updates to avoid bans.
2022-12-05
Notice: These changes are being rolled out gradually to all our servers, and will take approximately a week to complete.
WEBSOCKET
!bookTickerwill be removed by December 7, 2022. Please use the Individual Book Ticker Streams instead. (<symbol>@bookTicker).- Multiple <symbol>@bookTicker streams can be subscribed to over one connection. (E.g.
wss://stream.binance.com:9443/stream?streams=btcusdt@bookTicker/bnbbtc@bookTicker)
- Multiple <symbol>@bookTicker streams can be subscribed to over one connection. (E.g.
SPOT API
- New error code
-1135- This error code will occur if a parameter requiring a JSON object is invalid.
- New error code
-1108- This error will occur if a value to a parameter being sent was too large, potentially causing overflow.
- This error code can occur in the following endpoints:
POST /api/v3/orderPOST /api/v3/order/cancelReplacePOST /api/v3/order/oco
- Changes to
GET /api/v3/aggTrades- Previous behavior:
startTimeandendTimehad to be used in combination and could only be an hour apart. - New behavior:
startTimeandendTimecan be used individually and the 1 hour limit has been removed.- When using
startTimeonly, this will return trades from that time, up to thelimitprovided. - When using
endTimeonly, this will return trades starting from theendTimeincluding all trades before that time, up to the limit provided. - If
limitnot provided, regardless of used in combination or sent individually, the endpoint will use the default limit.
- When using
- Previous behavior:
- Changes to
GET /api/v3/myTrades-
Fixed a bug where
symbol+orderIdcombination would return all trades even if the number of trades went beyond the500default limit. -
Previous behavior: The API would send specific error messages depending on the combination of parameters sent. E.g:
{ "code": -1106, "msg": "Parameter X was sent when not required." } -
New behavior: If the combinations of optional parameters to the endpoint were not supported, then the endpoint will respond with the generic error:
{ "code": -1128, "msg": "Combination of optional parameters invalid." } -
Added a new combination of supported parameters:
symbol+orderId+fromId. -
The following combinations of parameters were previously supported but no longer accepted, as these combinations were only taking
fromIdinto consideration, ignoringstartTimeandendTime:symbol+fromId+startTimesymbol+fromId+endTimesymbol+fromId+startTime+endTime
-
Thus, these are the supported combinations of parameters:
symbolsymbol+orderIdsymbol+startTimesymbol+endTimesymbol+fromIdsymbol+startTime+endTimesymbol+orderId+fromId
-
Note: These new fields will appear approximately a week from the release date.
- Changes to
GET /api/v3/exchangeInfo- New fields
defaultSelfTradePreventionModeandallowedSelfTradePreventionModes
- New fields
- Changes to the Order Placement Endpoints/Order Query/Order Cancellation Endpoints:
- New field
selfTradePreventionModewill appear in the response. - Affects the following endpoints:
POST /api/v3/orderPOST /api/v3/order/ocoPOST /api/v3/order/cancelReplaceGET /api/v3/orderDELETE /api/v3/orderDELETE /api/v3/orderList
- New field
- Changes to
GET /api/v3/account- New field
requireSelfTradePreventionwill appear in the response.
- New field
- New field
workingTime, indicating when the order started working on the order book, will appear in the following endpoints:POST /api/v3/orderGET /api/v3/orderPOST /api/v3/order/cancelReplacePOST /api/v3/order/ocoGET /api/v3/orderGET /api/v3/openOrdersGET /api/v3/allOrders
- Field
trailingTime, indicating the time when the trailing order is active and tracking price changes, will appear for the following order types (TAKE_PROFIT,TAKE_PROFIT_LIMIT,STOP_LOSS,STOP_LOSS_LIMITiftrailingDeltaparameter was provided) for the following endpoints:POST /api/v3/orderGET /api/v3/orderGET /api/v3/openOrdersGET /api/v3/allOrdersPOST /api/v3/order/cancelReplaceDELETE /api/v3/order
- Field
commissionRateswill appear in theGET /api/v3/acccountresponse
USER DATA STREAM
- eventType
executionReporthas new fieldsV-selfTradePreventionModeD-trailing_time(Appears if the trailing stop order is active)W-workingTime(Appears ifisWorking=true)
2022-12-02
- Added a new market data base URL
https://data.binance.com. - Added a new WebSocket URL
wss://data-stream.binance.com.
2022-11-29
- New endpoint for VIP Loan:
- `GET /sapi/v1/loan/vip/collateral/account: Check Locked Value of VIP Collateral Account
2022-11-22
- New endpoints for Convert:
GET /sapi/v1/convert/exchangeInfo: Query for all convertible token pairs and the tokens’ respective upper/lower limitsGET /sapi/v1/convert/assetInfo: Query for supported asset’s precision informationPOST /sapi/v1/convert/getQuote: Request a quote for the requested token pairsPOST /sapi/v1/convert/acceptQuote: Accept the offered quote by quote ID.GET /sapi/v1/convert/orderStatus: Query order status by order ID.
2022-11-18
- New endpoint for Wallet:
GET /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage: The query of Cloud-Mining payment and refund history
- New endpoints for Sub-account:
GET /sapi/v1/sub-account/apiRestrictions/ipRestriction/thirdPartyList: To query Sub-Account API key Third Party IP whitelistPOST /sapi/v2/sub-account/subAccountApi/ipRestriction: To support master account update IP Restriction for Sub-Account API key
2022-11-14
- New endpoints for VIP Loan:
GET /sapi/v1/loan/vip/ongoing/orders: Get VIP Loan Ongoing OrdersPOST /sapi/v1/loan/vip/repay: VIP Loan RepayGET /sapi/v1/loan/vip/repay/history: Get VIP Loan Repayment History
2022-11-02
- Update endpoints for Wallet:
POST /sapi/v1/capital/withdraw/apply: Weight changed to Weight(UID): 600
2022-11-01
- New endpoints for Crypto Loan:
GET /sapi/v1/loan/loanable/data: Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value.GET /sapi/v1/loan/collateral/data: Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value.GET /sapi/v1/loan/repay/collateral/rate: Get the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second.POST /sapi/v1/loan/customize/margin_call: Customize margin call for ongoing orders only.
2022-10-28
- Update endpoints for Wallet:
POST /sapi/v1/asset/convert-transfer: New parameteraccountTypePOST /sapi/v1/asset/convert-transfer/queryByPage: request method is changed toGET, new parameterclientTranId
2022-10-15
- New endpoints for Binance Code:
POST /sapi/v1/giftcard/buyCode: For buying a fixed-value Binance Code.GET /sapi/v1/giftcard/buyCode/token-limit: To verify which tokens are available for you to purchase fixed-value gift cards as mentioned in section 2 and its’ limitation.
2022-09-30
- Delete endpoints for Futures Cross Collateral:
POST /sapi/v1/futures/loan/borrowPOST /sapi/v1/futures/loan/repayGET /sapi/v1/futures/loan/configsGET /sapi/v2/futures/loan/configsGET /sapi/v1/futures/loan/calcAdjustLevelGET /sapi/v2/futures/loan/calcAdjustLevelGET /sapi/v1/futures/loan/calcMaxAdjustAmountGET /sapi/v2/futures/loan/calcMaxAdjustAmountPOST /sapi/v1/futures/loan/adjustCollateralPOST /sapi/v2/futures/loan/adjustCollateralGET /sapi/v1/futures/loan/collateralRepayLimitGET /sapi/v1/futures/loan/collateralRepayPOST /sapi/v1/futures/loan/collateralRepayGET /sapi/v1/futures/loan/collateralRepayResult
2022-09-30
Scheduled changes to the removal of !bookTicker around November 2022.
- The All Book Tickers stream (
!bookTicker) is set to be removed in November 2022 - More details of the actual removal date will be announced at a later time.
- Please use the Individual Book Ticker Streams instead. (
<symbol>@bookTicker). - Multiple
<symbol>@bookTickerstreams can be subscribed to over one connection.- Example: wss://stream.binance.com:9443/stream?streams=btcusdt@bookTicker/bnbbtc@bookTicker
2022-09-29
- New endpoints for Wallet:
POST /sapi/v1/asset/convert-transfer: Convert transfer, convert between BUSD and stablecoins.POST /sapi/v1/asset/convert-transfer/queryByPage: Query convert transfer
2022-09-22
- Update endpoint for Sub-Account:
POST /sapi/v1/sub-account/subAccountApi/ipRestriction: Add new paramthirdPartyPOST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList: Add new paramthirdPartyNameDELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList: Add new paramthirdPartyName
- Add Rate Limit for following endpoints:
GET /sapi/v1/bswap/liquidity: 3/1s per account and per poolGET /sapi/v1/bswap/quote: 3/1s per account and per poolPOST /sapi/v1/lending/daily/purchase: 1/3s per accountPOST /sapi/v1/lending/customizedFixed/purchase: 1/3s per accountPOST /sapi/v1/staking/purchase: 1/3s per account
2022-09-16
- New endpoint for Margin:
GET /sapi/v1/margin/tradeCoeff: Get personal margin level information
2022-09-15
- New endpoints for Crypto Loan
POST /sapi/v1/loan/borrow: Borrow - Crypto Loan BorrowGET /sapi/v1/loan/borrow/history: Borrow - Get Loan Borrow HistoryGET/sapi/v1/loan/ongoing/orders: Borrow - Get Loan Ongoing OrdersPOST/sapi/v1/loan/repay: Repay - Crypto Loan RepayGET/sapi/v1/loan/repay/history: Repay - Get Loan Repayment HistoryPOST/sapi/v1/loan/adjust/ltv: Adjust LTV - Crypto Loan Adjust LTVGET/sapi/v1/loan/ltv/adjustment/history: Adjust LTV - Get Loan LTV Adjustment History
2022-09-15
Note that these are rolling changes, so it may take a few days for it to rollout to all our servers.
- Changes to
GET /api/v3/exchangeInfo- New optional parameter
permissionsadded to display all symbols with the permissions matching the parameter provided. (eg.SPOT,MARGIN,LEVERAGED) - If not provided, the default value will be
["SPOT","MARGIN", "LEVERAGED"].- This means the request
GET /api/v3/exchangeInfowithout any parameters will show all symbols that can be used forSPOT,MARGINand/orLEVERAGEDtrading. - To search for symbols that can be traded on other permissions (e.g.
TRD_GRP_004, etc), then this needs to be searched for explicitly. (e.g.permissions=TRD_GRP_004)
- This means the request
- Cannot be combined with
symbolorsymbols
- New optional parameter
2022-09-12
- Update endpoint for Sub-account: *
GET /sapi/v1/sub-account/subAccountApi/ipRestriction: To support master account query Third party IP list name for a sub account API key
2022-09-05
- Delete endpoint for Futures:
GET /sapi/v1/futures/loan/wallet
2022-08-23
SPOT API
Note that these are rolling changes, so it may take a few days for it to rollout to all our servers.
- Changes to
GET /api/v3/tickerandGET /api/v3/ticker/24hr- New optional parameter
typeadded - Supported values for parameter
typeareFULLandMINIFULLis the default value and the response that is currently being returned from the endpointMINIomits the following fields from the response:priceChangePercent,weightedAvgPrice,bidPrice,bidQty,askPrice,askQty, andlastQty
- New optional parameter
- New error code
-1008- This is sent whenever the servers are overloaded with requests.
- This error code only appears for the SPOT API.
- New field
brokeredhas been added toGET /api/v3/account - New endpoint:
GET /api/v3/uiKlines - New kline interval:
1s
2022-08-18
- Update endpoint for Convert:
GET /sapi/v1/convert/tradeFlow: Update weight from Weight(IP) 3000 to Weight(UID) 3000.
2022-08-08
SPOT API
- Changes to
POST /api/v3/orderandPOST /api/v3/order/cancelReplace- New optional field
strategyIdis a parameter used to identify an order as part of a strategy. - New optional field
strategyTypeis a parameter used to identify what strategy was running. (E.g. If all the orders are part of spot grid strategy, it can be set tostrategyType=1000000) - Note:
strategyTypecannot be less than1000000.
- New optional field
- Changes to
POST /api/v3/order/oco- New optional fields
limitStrategyId,limitStrategyType.stopStrategyId,stopStrategyType - These are the strategy metadata parameters for both legs of the OCO orders.
limitStrategyTypeandstopStrategyTypeboth cannot be less than1000000.
- New optional fields
- Changes to
GET /api/v3/order,GET /api/v3/openOrders, andGET /api/v3/allOrders- New fields
strategyIdandstrategyTypewill appear in the response JSON for orders that had these fields populated upon order placement.
- New fields
- Changes to
DELETE /api/v3/orderandDELETE /api/v3/openOrders- New fields
strategyIdandstrategyTypewill appear in the response JSON for cancelled orders that had these fields populated upon order placement.
- New fields
USER DATA STREAM
- New fields to eventType
executionReportjforstrategyIdJforstrategyType- Note that these fields only appear if these were populated upon order placement.
2022-08-05
- Update endpoint for Convert:
GET /sapi/v1/convert/tradeFlow: Update weight from Weight(IP) 100 to Weight(IP) 3000.
2022-07-21
- New endpoint for Portfolio Margin:
GET /sapi/v1/portfolio/pmLoanQuery Portfolio Margin Bankruptcy Loan RecordPOST /sapi/v1/portfolio/repayPortfolio Margin Bankruptcy Loan Repay
2022-07-18
- New endpoint for Portfolio Margin:
GET /sapi/v1/portfolio/collateralRateto get Portfolio Margin Collateral Rate.
2022-07-01
- New endpoint for Wallet:
POST /sapi/v3/asset/getUserAssetto get user assets.
- New endpoint for Margin:
GET /sapi/v1/margin/dribbletto query the historical information of user's margin account small-value asset conversion BNB.
- Update endpoint for Convert:
GET /sapi/v1/convert/tradeFlow: Update weight from 3000 to 100.
- Update endpoint for Margin:
GET /sapi/v1/margin/repay: Add response field rawAsset.
2022-06-20
SPOT API: Changes to GET /api/v3/ticker
- Weight has been reduced from 5 to 2 per symbol, regardless of
windowSize. - The max number of symbols that can be processed in a request is 100.
- If the number of
symbolssent is more than 100, the error will be as follows:
- If the number of
Code
- The max Weight(IP) for this endpoint will cap at 100.
- I.e. If the request has more than 50 symbols, the Weight will still be 100, regardless of
windowSize.
- I.e. If the request has more than 50 symbols, the Weight will still be 100, regardless of
2022-06-15
Note: The update is being rolled out over the next few days, so these changes may not be visible right away.
GET /api/v3/tickeradded- Rolling window price change statistics based on
windowSizeprovided. - Contrary to
GET /api/v3/ticker/24hrthe list of symbols cannot be omitted. - If
windowSizenot specified, the value will default to1d. - Response is similar to
GET /api/v3/ticker/24hr, minus the following fields:prevClosePrice,lastQty,bidPrice,bidQty,askPrice,askQty
- Rolling window price change statistics based on
POST /api/v3/order/cancelReplaceadded- Cancels an existing order and places a new order on the same symbol.
- The filters are evaluated before the cancel order is placed.
- e.g. If the
MAX_NUM_ORDERSfilter is 10, and the total number of open orders on the account is also 10, when usingPOST /api/v3/order/cancelReplaceboth the cancel order placement and new order will fail because of the filter.
- e.g. If the
- The change is being rolled out in the next few days, thus this feature will be enabled once the upgrade is completed.
GET /api/v3/exchangeInforeturns new fieldcancelReplaceAllowedinsymbolslist.- New filter
NOTIONALhas been added.- Defines the allowed notional value (
price * quantity) based on a configuredminNotionalandmaxNotional
- Defines the allowed notional value (
- New exchange filter
EXCHANGE_MAX_NUM_ICEBERG_ORDERShas been added.- Defines the limit of open iceberg orders on an account
WEBSOCKETS
- New symbol ticker streams with 1h and 4h windows:
- Individual symbol ticker streams
<symbol>@ticker_<window-size>
- All market ticker streams
!ticker_<window-size>@arr
- Individual symbol ticker streams
2022-06-02
- Update endpoint for Subaccount:
GET /sapi/v1/sub-account/sub/transfer/history: fromEmail and toEmail can be master email.
2022-05-31
- Update endpoint for Fiat:
GET /sapi/v1/fiat/orders: Weight changes from UID(3000) to UID(90000)
- Update endpoint for Pay:
GET /sapi/v1/pay/transactions: Param names changed: startTimestamp -> startTime; endTimestamp -> endTime.
2022-05-26
- Update endpoint for Fiat:
GET /sapi/v1/fiat/orders: Weight changes from IP(1) to UID(3000)
- Update info for the following margin account endpoints: The max interval between
startTimeandendTimeis 30 days.:GET /sapi/v1/margin/transferGET /sapi/v1/margin/loanGET /sapi/v1/margin/repayGET /sapi/v1/margin/isolated/transferGET /sapi/v1/margin/interestHistory
2022-05-23
-
Changes to Order Book Depth Levels
- Quantities in the Depth levels were returning negative values in situations where they were exceeding the max value, resulting in an overflow.
- Going forward depth levels will not overflow, but will be capped at the max value based on the
precision of the base asset. This means that the depth level is at max value or more.
- E.g. If the precision is 8, then the max value for quantity will be at 92,233,720,368.54775807.
- When the fix has been applied, a change in the order book at the affected price level is required for the changes to be visible.
-
What does this affect?
- SPOT API
GET /api/v3/depth
- Websocket Streams
<symbol>@depth<symbol>@depth@100ms<symbol>@depth<levels><symbol>@depth<levels>@100ms
- SPOT API
-
Updates to
MAX_POSITION- If an order's
quantitycan cause the position to overflow, this will now fail theMAX_POSITIONfilter.
- If an order's
2022-05-19
- Update endpoint for Mining:
GET /sapi/v1/mining/pub/algoListandGET /sapi/v1/mining/pub/coinList: Need no parameter.
- Add error codes (21xxx) for Portfolio Margin Account: -21001, -21002, -21003
2022-05-17
SPOT API
- Changes to
GET api/v3/aggTrades- When providing
startTimeandendTime, the oldest items are returned.
- When providing
- Changed error messaging on
GET /api/v3/myTradeswhere parametersymbolis not provided:
Code
- The following endpoints now support multi-symbol querying using the parameter
symbols.GET /api/v3/ticker/24hrGET /api/v3/ticker/priceGET /api/v3/ticker/bookTicker
- In the above, the request weight will depend on the number of symbols provided in
symbols. Please refer to the table below:
| Endpoint | Number of Symbols | 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 | 101 or more | 40 |
2022-05-05
- New endpoint for Binance Code:
GET /sapi/v1/giftcard/cryptography/rsa-public-keyto fetch RSA public key.
- Update endpoint for Binance Code:
POST /sapi/v1/giftcard/redeemCode: new optional parameterexternalUid. Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users.
2022-04-28
- New endpoints for Staking:
GET /sapi/v1/staking/productListto get Staking product listPOST /sapi/v1/staking/purchaseto stake productPOST /sapi/v1/staking/redeemto redeem productGET /sapi/v1/staking/positionto get Staking product holding positionGET /sapi/v1/staking/stakingRecordto inquiry Staking history recordsPOST /sapi/v1/staking/setAutoStakingto set Auto Staking functionGET /sapi/v1/staking/personalLeftQuotato inquiry Staking left quota
2022-04-27
- New endpoint for Futures Algo:
POST /sapi/v1/algo/futures/newOrderTwapto support Twap new order
FAQ: Time-Weighted Average Price(Twap) Introduction
2022-04-26
GET /sapi/v1/margin/rateLimit/orderadded- The endpoint will display the user's current margin order count usage for all intervals.
2022-04-20
- New endpoint for Portfolio Margin:
GET /sapi/v1/portfolio/accountto support query portfolio margin account info
Only Portfolio Margin Account is accessible to this endpoint. To enroll, kindly refer to: How to Enroll into the Binance Portfolio Margin Program
2022-04-13
- New endpoints for Futures Algo:
POST /sapi/v1/algo/futures/newOrderVpto support VP new orderDELETE /sapi/v1/algo/futures/orderto support cancel Algo orderGET /sapi/v1/algo/futures/openOrdersto support query Algo open ordersGET /sapi/v1/algo/futures/historicalOrdersto support query Algo historical ordersGET /sapi/v1/algo/futures/subOrdersto support query Algo sub orders for a specified algoId
FAQ: Volume Participation(VP) Introduction
2022-04-13
Information on Trailing Stops
SPOT API
- Trailing Stops have been enabled.
- This is a type of algo order where the activation is based on a percentage of a price change in
the market using the new parameter
trailingDelta. - This can only used with any of the following order types:
STOP_LOSS,STOP_LOSS_LIMIT,TAKE_PROFIT,TAKE_PROFIT_LIMIT. - The
trailingDeltaparameter will be done in Basis Points or BIPS.- For example: a STOP_LOSS SELL order with a
trailingDeltaof 100 will trigger after a price decrease of 1%. (100 / 10,000 => 0.01 => 1%)
- For example: a STOP_LOSS SELL order with a
- When used in combination with OCO Orders, the
trailingDeltawill determine when the contingent leg of the OCO will trigger. - When
trailingDeltais used in combination withstopPrice, once thestopPricecondition is met, the trailing stop starts tracking the price change from thestopPricebased on thetrailingDeltaprovided. - When no
stopPriceis sent, the trailing stop starts tracking the price changes from the last price based on thetrailingDeltaprovided.
- This is a type of algo order where the activation is based on a percentage of a price change in
the market using the new parameter
- Changes to POST
/api/v3/order- New optional field
trailingDelta
- New optional field
- Changes to POST
/api/v3/order/test- New optional field
trailingDelta
- New optional field
- Changes to POST
/api/v3/order/oco- New optional field
trailingDelta
- New optional field
- A new filter
TRAILING_DELTAhas been added.- This filter is defined by the minimum and maximum values for the
trailingDeltavalue.
- This filter is defined by the minimum and maximum values for the
USER DATA STREAM
- New field in
executionReport- "d" for
trailingDelta
- "d" for
2022-04-12
Note: The changes are being rolled out during the next few days, so these will not appear right away.
- Error message changed on
GET api/v3/allOrderswheresymbolis not provided:Code - Fixed a typo with an error message when an account has disabled permissions (e.g. to withdraw, to
trade, etc)
Code
- During a market data audit, we detected some issues with the Spot aggregate trade data.
- Missing aggregate trades were recovered.
- Duplicated records were marked invalid with the following values:
- p = '0' // price
- q = '0' // qty
- f = -1 // first_trade_id
- l = -1 // last_trade_id
2022-04-08
- Update WEBSOCKET for BLVT:* Base url changed to
wss://nbstream.binance.com/lvt-pfor BLVT streams<tokenName>@tokenNavand<tokenName>@nav_Kline_<interval>
2022-3-29
The following updates will take effect on March 31, 2022 08:00 AM UTC
- Update endpoint for Sub-account:
GET /sapi/v1/sub-account/universalTransfer
The query time period must be less then 30 days; If startTime and endTime not sent, return
records of the last 30 days by default
2022-03-25
- Update endpoint for Sub-Account:
- New endpoint
GET /sapi/v1/managed-subaccount/accountSnapshotto support investor master account query asset snapshot of managed sub-account
- New endpoint
2022-03-08
- Update endpoint for Sub-Account:
- New transfer types
MARGIN,ISOLATED_MARGINand parametersymboladded inPOST /sapi/v1/sub-account/universalTransferto support transfer to sub-account cross margin account and isolated margin account
- New transfer types
2022-02-28
- New field
allowTrailingStophas been added toGET /api/v3/exchangeInfo
2022-02-22
SPOT API
(price-minPrice) % tickSize == 0rule inPRICE_FILTERhas been changed toprice % tickSize == 0.- A new filter
PERCENT_PRICE_BY_SIDEhas been added. - Changes to GET
api/v3/depth- The
limitvalue can be outside of the previous values (i.e. 5, 10, 20, 50, 100, 500, 1000,5000) and will return the correct limit. (i.e. if limit=3 then the response will be the top 3 bids and asks) - The limit still cannot exceed 5000. If the limit provided is greater than 5000, then the response will be truncated to 5000.
- Due to the changes, these are the updated request weights based on the limit value provided:
- The
| Limit | Request Weight |
|---|---|
| 1-100 | 1 |
| 101-500 | 5 |
| 501-1000 | 10 |
| 1001-5000 | 50 |
- Changes to GET
api/v3/aggTrades- When providing
startTimeandendTime, the oldest items are returned.
- When providing
2022-2-18
- Update endpoint for Sub-Account:
- New fields
isManagedSubAccountandisAssetManagementSubAccountadded inGET /sapi/v1/sub-account/listto support query whether the sub-account is a managed sub-account or a asset management sub-account
- New fields
2022-2-17
The following updates will take effect on February 24, 2022 08:00 AM UTC
- Update endpoint for Wallet:
GET /sapi/v1/accountSnapshot
The time limit of this endpoint is shortened to only support querying the data of the latest month
2022-2-09
- New endpoint for Wallet:
POST /sapi/v1/asset/dust-btcto get assets that can be converted into BNB
2022-1-25
- From January 28, 2022 4:00 AM UTC, You need to open
Enable Spot & Margin Tradingpermission for the API key which requests these endpoints as following:POST /sapi/v1/asset/dustDust transferPOST /sapi/v1/lending/daily/purchasePurchase Savings flexible productPOST /sapi/v1/lending/daily/redeemRedeem Savings flexible productPOST /sapi/v1/lending/customizedFixed/purchasePurchase Savings Fixed/Activity projectPOST /sapi/v1/lending/positionChangedChange Savings Fixed/Activity position to Daily positionPOST /sapi/v1/bswap/liquidityAddBswap add liquidityPOST /sapi/v1/bswap/liquidityRemoveBswap remove liquidityPOST /sapi/v1/bswap/swapBswap swapPOST /sapi/v1/bswap/claimRewardsBswap claim rewards
2022-1-21
- New endpoints for Binance Code:
POST /sapi/v1/giftcard/createCodeto create a Binance Code.POST /sapi/v1/giftcard/redeemCodeto redeem a Binance Code.GET /sapi/v1/giftcard/verifyto verify a Binance Code.
2022-1-4
-
New endpoint for Mining:
GET /sapi/v1/mining/payment/uidto get Mining account earning.
-
New endpoints for BSwap:
GET /sapi/v1/bswap/unclaimedRewardsto get unclaimed rewards record.POST /sapi/v1/bswap/claimRewardsto claim swap rewards or liquidity rewards.GET /sapi/v1/bswap/claimedHistoryto get history of claimed rewards.
2021-12-30
-
Update endpoint for Margin:
- Removed out
limitfromGET /sapi/v1/margin/interestRateHistory; The max interval between startTime and endTime is 30 days.
- Removed out
-
Update endpoint for Wallet:
- As the Mining account is merged into Funding account, transfer types MAIN_MINING, MINING_MAIN,
MINING_UMFUTURE, MARGIN_MINING, and MINING_MARGIN will be discontinued in Universal Transfer
endpoint
POST /sapi/v1/asset/transferon January 05, 2022 08:00 AM UTC
- As the Mining account is merged into Funding account, transfer types MAIN_MINING, MINING_MAIN,
MINING_UMFUTURE, MARGIN_MINING, and MINING_MARGIN will be discontinued in Universal Transfer
endpoint
2021-12-29
- Removed out dated "Symbol Type" enum; added "Permissions" enum.
2021-12-24
- Update endpoints for Sub-Account:
- New parameter
clientTranIdadded inPOST /sapi/v1/sub-account/universalTransferandGET /sapi/v1/sub-account/universalTransferto support custom transfer id
- New parameter
2021-12-03
-
New endpoints for Margin:
GET /sapi/v1/margin/crossMarginDatato get cross margin fee data collectionGET /sapi/v1/margin/isolatedMarginDatato get isolated margin fee data collectionGET /sapi/v1/margin/isolatedMarginTierto get isolated margin tier data collection
-
New endpoints for NFT:
GET /sapi/v1/nft/history/transactionsto get NFT transaction historyGET /sapi/v1/nft/history/depositto get NFT deposit historyGET /sapi/v1/nft/history/withdrawto get NFT withdraw historyGET /sapi/v1/nft/user/getAssetto get NFT asset
2021-11-30
-
New endpoint for Convert:
GET /sapi/v1/convert/tradeFlowto support user query convert trade history records
-
New endpoint for Rebate:
GET /sapi/v1/rebate/taxQueryto support user query spot rebate history records
2021-11-19
- New endpoint for Pay:
GET /sapi/v1/pay/transactionsto support user query Pay trade history
- Update endpoint for Wallet:
- New field
infoadded inGET /sapi/v1/capital/withdraw/historyto show the reason for withdrawal failure
- New field
2021-11-18
The following updates will take effect on November 25, 2021 08:00 AM UTC
- Update endpoint for Wallet:
GET /sapi/v1/accountSnapshot
The query time range of both endpoints are shortened to support data query within the last 6 months only, where startTime does not support selecting a timestamp beyond 6 months. If you do not specify startTime and endTime, the data of the last 7 days will be returned by default.
2021-11-17
- The following endpoints will be discontinued on November 17, 2021 13:00 PM UTC:
POST /sapi/v1/account/apiRestrictions/ipRestrictionto support user enable and disable IP restriction for an API KeyPOST /sapi/v1/account/apiRestrictions/ipRestriction/ipListto support user add IP list for an API KeyGET /sapi/v1/account/apiRestrictions/ipRestrictionto support user query IP restriction for an API KeyDELETE /sapi/v1/account/apiRestrictions/ipRestriction/ipListto support user delete IP list for an API Key
2021-11-16
- New endpoints for Sub-Account:
POST /sapi/v1/sub-account/subAccountApi/ipRestrictionto support master account enable and disable IP restriction for a sub-account API KeyPOST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipListto support master account add IP list for a sub-account API KeyGET /sapi/v1/sub-account/subAccountApi/ipRestrictionto support master account query IP restriction for a sub-account API KeyDELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipListto support master account delete IP list for a sub-account API Key
2021-11-09
- New endpoints for Wallet:
POST /sapi/v1/account/apiRestrictions/ipRestrictionto support user enable and disable IP restriction for an API KeyPOST /sapi/v1/account/apiRestrictions/ipRestriction/ipListto support user add IP list for an API KeyGET /sapi/v1/account/apiRestrictions/ipRestrictionto support user query IP restriction for an API KeyDELETE /sapi/v1/account/apiRestrictions/ipRestriction/ipListto support user delete IP list for an API Key
2021-11-08
- New endpoint for Crypto Loans:
- New endpoint
GET /sapi/v1/loan/incometo support user query crypto loans income history
- New endpoint
2021-11-05
- Update endpoint for Wallet:
- New parameter
walletTypeadded inPOST /sapi/v1/capital/withdraw/applyto support user choose wallet typespot walletandfunding walletwhen withdraw crypto.
- New parameter
2021-11-04
The following updates will take effect on November 11, 2021 08:00 AM UTC
- Update endpoints for Wallet and Futures:
GET /sapi/v1/asset/transferGET /sapi/v1/futures/transfer
The query time range of both endpoints are shortened to support data query within the last 6 months only, where startTime does not support selecting a timestamp beyond 6 months. If you do not specify startTime and endTime, the data of the last 7 days will be returned by default.
2021-11-01
GET /api/v3/rateLimit/orderadded- The endpoint will display the user's current order count usage for all intervals.
- This endpoint will have a request weight of 20.
2021-10-22
- Update endpoint for Wallet:
- New transfer types
MAIN_FUNDING,FUNDING_MAIN,FUNDING_UMFUTURE,UMFUTURE_FUNDING,MARGIN_FUNDING,FUNDING_MARGIN,FUNDING_CMFUTUREandCMFUTURE_FUNDINGadded in Universal Transfer endpointPOST /sapi/v1/asset/transferandGET /sapi/v1/asset/transferto support transfer assets among funding account and other accounts - As the C2C account, Binance Payment, Binance Card and other business account are merged into a
Funding account, transfer types
MAIN_C2C,C2C_MAIN,C2C_UMFUTURE,C2C_MINING,UMFUTURE_C2C,MINING_C2C,MARGIN_C2C,C2C_MARGIN,MAIN_PAYandPAY_MAINwill be discontinued in Universal Transfer endpointPOST /sapi/v1/asset/transferandGET /sapi/v1/asset/transferon November 04, 2021 08:00 AM UTC
- New transfer types
2021-10-14
- Update the time range of the response data for the following margin account endpoints,
startTimeandendTimetime span will not exceed 30 days, without time parameter sent the system will return the last 7 days of data by default, while thearchivedparameter istrue, the system will return the last 7 days of data 6 months ago by default:GET /sapi/v1/margin/transferGET /sapi/v1/margin/loanGET /sapi/v1/margin/repayGET /sapi/v1/margin/isolated/transferGET /sapi/v1/margin/interestHistory
2021-09-18
- New endpoints for BSwap:
GET /sapi/v1/bswap/poolConfigureto get pool configureGET /sapi/v1/bswap/addLiquidityPreviewto get add liquidity previewGET /sapi/v1/bswap/removeLiquidityPreviewto get remove liquidity preview
2021-09-17
- Add
/api/*and/sapi/*limit introduction in General Info
2021-09-08
-
Add endpoints for enabled isolated margin account limit:
DELETE /sapi/v1/margin/isolated/accountto disable isolated margin account for a specific symbolPOST /sapi/v1/margin/isolated/accountto enable isolated margin account for a specific symbolGET /sapi/v1/margin/isolated/accountLimitto query enabled isolated margin account limit
-
New field "enabled" in response of
GET /sapi/v1/margin/isolated/accountto check if the isolated margin account is enabled
2021-09-03
- Update endpoint for Wallet: _ New fields
sameAddress,depositDustandspecialWithdrawTipsadded inGET /sapi/v1/capital/config/getallsameAddressmeans if the coin needs to provide memo to withdrawdepositDustmeans minimum creditable amountspecialWithdrawTipsmeans special tips for withdraw _ New fieldconfirmNoadded inGET /sapi/v1/capital/withdraw/historyto support query confirm times for withdraw history
2021-08-27
- Update endpoint for Wallet:
- New parameter
withdrawOrderIdadded inGET /sapi/v1/capital/withdraw/historyto support user query withdraw history by withdrawOrderId - New field
unlockConfirmadded inGET /sapi/v1/capital/deposit/hisrecto support query network confirm times for unlocking
- New parameter
2021-08-23
- New endpoints for Margin Account OCO:
POST /sapi/v1/margin/order/ocoDELETE /sapi/v1/margin/orderListGET /sapi/v1/margin/orderListGET /sapi/v1/margin/allOrderListGET /sapi/v1/margin/openOrderList
Same usage as spot account OCO
2021-08-20
- Update endpoint for Wallet:
- New parameters
fromSymbol,toSymboland new transfer typesISOLATEDMARGIN_MARGIN,MARGIN_ISOLATEDMARGINandISOLATEDMARGIN_ISOLATEDMARGINadded inPOST /sapi/v1/asset/transferandGET /sapi/v1/asset/transferto support user transfer assets between Margin(cross) account and Margin(isolated) account
- New parameters
2021-08-12
- GET
api/v3/myTradeshas a new optional fieldorderId
2021-08-05
- New endpoint for C2C:
GET /sapi/v1/c2c/orderMatch/listUserOrderHistoryto query user C2C trade history
2021-08-05
- Update endpoints for Savings:
GET /sapi/v1/lending/union/purchaseRecordGET /sapi/v1/lending/union/redemptionRecordGET /sapi/v1/lending/union/interestHistory
The time between startTime and endTime cannot be longer than 30 days.
If startTime and endTime are both not sent, then the last 30 days' data will be returned
2021-07-29
- Update endpoint for Sub-Account:
GET /sapi/v1/sub-account/transfer/subUserHistoryifstartTimeandendTimeare not sent, the recent 30-day data will be returned by default
2021-07-27
- New endpoint for Fiat:
GET /sapi/v1/fiat/ordersto query user fiat deposit and withdraw historyGET /sapi/v1/fiat/paymentsto query user fiat payments history
2021-07-16
- New endpoint for Wallet:
GET /sapi/v1/account/apiRestrictionsto query user API Key permission
2021-07-09
- New endpoint for Wallet:
POST /sapi/v1/asset/get-funding-assetto query funding wallet, includes Binance Pay, Binance Card, Binance Gift Card, Stock Token
2021-06-24
- Update endpoints for Wallet:
GET /sapi/v1/capital/withdraw/historyadded default value 1000, max value 1000 for the parameterlimitGET /sapi/v1/capital/deposit/hisrecadded default value 1000, max value 1000 for the parameterlimit
2021-06-17
- Update endpoint for Savings:
GET /sapi/v1/lending/daily/product/listto include new parameterscurrentandsize
2021-06-15
- New endpoints for Sub-Account:
POST /sapi/v1/managed-subaccount/depositto deposit assets into the managed sub-account (only for investor master account)GET /sapi/v1/managed-subaccount/assetto query managed sub-account asset details (only for investor master account)POST /sapi/v1/managed-subaccount/withdrawto withdrawal assets from the managed sub-account (only for investor master account)
2021-06-04
On August 01, 2021 02:00 AM UTC the WAPI endpoints will be discontinued:
GET /wapi/v3/systemStatus.htmlPOST /wapi/v3/withdraw.htmlGET /wapi/v3/depositHistory.htmlGET /wapi/v3/withdrawHistory.htmlGET /wapi/v3/depositAddress.htmlGET /wapi/v3/accountStatus.htmlGET /wapi/v3/apiTradingStatus.htmlGET /wapi/v3/userAssetDribbletLog.htmlGET /wapi/v3/assetDetail.htmlGET /wapi/v3/tradeFee.htmlGET /wapi/v3/sub-account/list.htmlGET /wapi/v3/sub-account/transfer/history.htmlPOST /wapi/v3/sub-account/transfer.htmlGET /wapi/v3/sub-account/assets.html
The WAPI endpoints have been removed from Binance API Documentation.To ensure your trading strategies are not affected, all API users are encouraged to upgrade trading bots to SAPI endpoints as soon as possible.
2021-05-26
- Update endpoint for Wallet:
- New transfer types
MAIN_PAY,PAY_MAINadded in Universal Transfer endpointPOST /sapi/v1/asset/transferandGET /sapi/v1/asset/transferto support trasnfer assets between spot account and pay account
- New transfer types
2021-05-12
- Added
Data Sourcein the documentation to explain where each endpoint is retrieving its data - Added field
Data Sourceto each Spot API endpoint in the documentation - GET
api/v3/exchangeInfonow supports single or multi-symbol query
2021-04-28
On May 15, 2021 08:00 UTC the SAPI Create Margin Account endpoint will be discontinued:
POST /sapi/v1/margin/isolated/create
Isolated Margin account creation and trade preparation can be completed directly through Isolated
Margin funds transfer POST /sapi/v1/margin/isolated/transfer
2021-04-26
On April 28, 2021 00:00 UTC the weights to the following endpoints will be adjusted:
GET /api/v3/orderweight increased to 2GET /api/v3/openOrdersweight increased to 3GET /api/v3/allOrdersweight increased to 10GET /api/v3/orderListweight increased to 2GET /api/v3/openOrderListweight increased to 3GET /api/v3/accountweight increased to 10GET /api/v3/myTradesweight increased to 10GET /api/v3/exchangeInfoweight increased to 10
2021-04-08
- Update endpoint for Sub-Account:
GET /sapi/v1/sub-account/futures/accountSummaryandGET /sapi/v2/sub-account/futures/accountSummarythe unit of fieldassetchanged to USD valued summary of sub-account assets
2021-04-02
- New endpoints for Wallet:
GET /sapi/v1/system/statusto query system statusGET /sapi/v1/account/statusto query account statusGET /sapi/v1/account/apiTradingStatusto query account API trading statusGET /sapi/v1/asset/dribbletto query dust logGET /sapi/v1/asset/assetDetailto query asset detailGET /sapi/v1/asset/tradeFeeto query trade fee
- New endpoint for Sub-Account:
GET /sapi/v3/sub-account/assetsto query sub-account assets
2021-04-01
- Update endpoint for Sub-Account:
GET /sapi/v1/sub-account/transfer/subUserHistorynew fieldsfromAccountTypeandtoAccountTypeadded in response
2021-03-31
- Update endpoint for Sub-Account:
GET /wapi/v3/sub-account/transfer/history.htmladded new parametersfromEmailandtoEmail, the original parameteremailis equal tofromEmailby default
2021-03-08
- New endpoint for Sub-Account:
POST /sapi/v1/sub-account/virtualSubAccountto support create a virtual sub-accountGET /sapi/v1/sub-account/listto support query sub-account listPOST /sapi/v1/sub-account/blvt/enableto support enable blvt for sub-account
2021-03-05
- New endpoints for Margin:
GET /sapi/v1/margin/interestRateHistoryto support margin interest rate history query
2021-02-08
- New endpoints for Futures:
GET /sapi/v2/futures/loan/walletto support BUSD loan queryGET /sapi/v2/futures/loan/configsto support BUSD loan queryGET /sapi/v2/futures/loan/calcAdjustLevelto support BUSD loanGET /sapi/v2/futures/loan/calcMaxAdjustAmountto support adjustment of BUSD loanPOST /sapi/v2/futures/loan/adjustCollateralto support adjustment of BUSD loan
- Update endpoints for Futures
GET /sapi/v1/futures/loan/adjustCollateral/historynew parameter and fields in responseloanCoinfor BUSD loanGET /sapi/v1/futures/loan/liquidationHistorynew parameter and fields in responseloanCoinfor BUSD loan
2021-02-04
- New transfer types
MARGIN_MINING,MINING_MARGIN,MARGIN_C2C,C2C_MARGIN,MARGIN_CMFUTURE,CMFUTURE_MARGINadded in Universal Transfer endpointPOST /sapi/v1/asset/transferandGET /sapi/v1/asset/transfer.
2021-01-15
- New endpoint
DELETE /sapi/v1/margin/openOrdersfor Margin Trade- This will allow a user to cancel all open orders on a single symbol for margin account.
- This endpoint will cancel all open orders including OCO orders for margin account.
2021-01-10
-
New parameter
pageSizefor Mining endpointGET /sapi/v1/mining/payment/list -
New fields in response to Mining endpoint
GET /sapi/v1/mining/payment/list:- "type" for income type
- "hashTransfer" for resale Hashrate
- "transferAmount" for transferred Income
-
New Mining endpoints:
GET /sapi/v1/mining/payment/otherGET /sapi/v1/mining/hash-transfer/config/detailsGET /sapi/v1/mining/hash-transfer/config/details/listGET /sapi/v1/mining/hash-transfer/profit/detailsPOST /sapi/v1/mining/hash-transfer/configPOST /sapi/v1/mining/hash-transfer/config/cancel
2021-01-01
USER DATA STREAM
outboundAccountInfohas been removed.
2020-12-30
- New endpoint for Wallet:
POST /sapi/v1/asset/transferto support user universal transfer among Spot, Margin, Futures, C2C, MINING accounts.GET /sapi/v1/asset/transferto get user universal transfer history.
2020-12-22
- New endpoint for Sub-Account:
GET /sapi/v1/sub-account/sub/transfer/historyto get spot asset transfer history.
2020-12-11
- Update endpoints for Futures Cross-Collateral:
GET /sapi/v1/futures/loan/walletnew fields in responseinterestFreeLimitfor total interest free limit,interestFreeLimitUsedfor interest free limit used.GET /sapi/v1/futures/loan/interestHistorynew fields in responseinterestFreeLimitUsedfor interest free limit used.
2020-12-04
- Update endpoint for BLVT:
GET /sapi/v1/blvt/tokenInfonew fields in responsecurrentBaskets(includesymbol,amount,notionalValue),purchaseFeePct,dailyPurchaseLimit,redeemFeePct,dailyRedeemLimit.
- New endpoint for BLVT:
GET /sapi/v1/blvt/userLimitto get BLVT user limit info.
2020-12-02
- New endpoints for Sub-Account:
GET /sapi/v2/sub-account/futures/accountto get detail on sub-account's USDT margined futures account and COIN margined futures account.GET /sapi/v2/sub-account/futures/accountSummaryto get summary of sub-account's USDT margined futures account and COIN margined futures account.GET /sapi/v2/sub-account/futures/positionRiskto get position risk of sub-account's USDT margined futures account and COIN margined futures account.
2020-12-01
- Update Margin Trade Endpoint:
POST /sapi/v1/margin/ordernew parameterquoteOrderQtyallow a user to specify the totalquoteOrderQtyspent or received in theMARKETorder.
2020-11-27
New API clusters have been added in order to improve performance.
Users can access any of the following API clusters, in addition to api.binance.com
If there are any performance issues with accessing api.binance.com please try any of the following
instead:
- https://api1.binance.com/api/v3/*
- https://api2.binance.com/api/v3/*
- https://api3.binance.com/api/v3/*
2020-11-16
- Updated endpoints for Margin, new parameter
archivedto query data from 6 months ago:GET /sapi/v1/margin/loanGET /sapi/v1/margin/repayGET /sapi/v1/margin/interestHistory
2020-11-13
- New endpoints for Sub-Account:
POST /sapi/v1/sub-account/universalTransferto transfer spot and futures asset between master account and sub accounts.GET /sapi/v1/sub-account/universalTransferto search transfer records.
2020-11-10
- New endpoint to toggle BNB Burn:
POST /sapi/v1/bnbBurnto toggle BNB Burn on spot trade and margin interest.GET /sapi/v1/bnbBurnto get BNB Burn status.
2020-11-09
- New field
tranIdis available from endpoints:GET /sapi/v1/sub-account/futures/internalTransferGET /sapi/v1/sub-account/transfer/subUserHistory
2020-11-03
-
Update endpoints for Futures Cross-Collateral:
GET /sapi/v1/futures/loan/repay/historynew fields in responserepayType(NORMALfor normal repayment,COLLATERALfor collateral repayment),price(collateral repayment rate),repayCollateral(collateral amount for collateral repayment).GET /sapi/v1/futures/loan/walletnew fields in responsetotalInterest(total interest for cross-collateral),principalForInterest(cross-collateral principal for interest),interest(cross-collateral interest).GET /sapi/v1/futures/loan/configsnew fields in responseinterestRate(interest rate for cross-collateral),interestGracePeriod(interest grace period for cross-collateral).
-
New endpoints for Futures Cross-Collateral:
GET /sapi/v1/futures/loan/collateralRepayLimitto check the maximum and minimum limit when repay with collateral.GET /sapi/v1/futures/loan/collateralRepayto get quote for collateral repayment.POST /sapi/v1/futures/loan/collateralRepayto repay with collateral.GET /sapi/v1/futures/loan/collateralRepayResultto check collateral repayment result.GET /sapi/v1/futures/loan/interestHistoryto get cross-collateral interest history.
2020-10-14
- Update endpoints for Futures Cross-Collateral:
POST /sapi/v1/futures/loan/borrowandGET /sapi/v1/futures/loan/borrow/historynew fieldborrowIdin response for ID of Cross-Collateral borrow operation.POST /sapi/v1/futures/loan/repayandGET /sapi/v1/futures/loan/repay/historynew fieldrepayIdin response for ID of Cross-Collateral repay operation.
2020-10-10
- New
typeadded in the endpointPOST /sapi/v1/sub-account/futures/transferto support transfer asset from subaccount's spot account to its COIN-margined futures account and transfer asset from subaccount's COIN-margined futures account to its spot account.
2020-09-30
- Update endpoints for Margin Account:
GET /sapi/v1/margin/maxBorrowablenew fieldborrowLimitin response for account borrow limit.
2020-09-28
- New endpoints for Binance Savings:
POST /sapi/v1/lending/positionChangedto change fixed/activity position to daily position.
- New parameter
ACTIVITYreplaceREGULARin the following Binance Savings endpoints:GET /sapi/v1/lending/project/listPOST /sapi/v1/lending/customizedFixed/purchaseGET /sapi/v1/lending/project/position/listGET /sapi/v1/lending/union/purchaseRecordGET /sapi/v1/lending/union/interestHistory
2020-09-23
- New SAPI endpoints for BSwap:
GET /sapi/v1/bswap/poolsto list all swap pools.GET /sapi/v1/bswap/liquidityto get liquidity information of a pool.POST /sapi/v1/bswap/liquidityAddto add liquidity.POST /sapi/v1/bswap/liquidityRemoveto remove liquidity.GET /sapi/v1/bswap/liquidityOpsto get liquidity operation record.GET /sapi/v1/bswap/quoteto request quotes.POST /sapi/v1/bswap/swapto swap.GET /sapi/v1/bswap/swapto get swap history.
2020-09-16
-
New SAPI endpoints for BLVT:
GET /sapi/v1/blvt/tokenInfoto get BLVT info.POST /sapi/v1/blvt/subscribe (HMAC SHA256)to subscribe BLVT.GET /sapi/v1/blvt/subscribe/record (HMAC SHA256)to get subscription record。POST /sapi/v1/blvt/redeem (HMAC SHA256)to redeem BLVT.GET /sapi/v1/blvt/redeem/record (HMAC SHA256to get redemption record.
-
The BLVT NAV system is working relatively with Binance Futures, so some endpoints are based on futures system:
- New endpoint to get historical BLVT Kline.
- New WebSocket streams for BLVT Info and BLVT NAV Kline:
2020-09-09
USER DATA STREAM
outboundAccountInfohas been deprecated.outboundAccountInfowill be removed in the future. (Exact date unknown) Please useoutboundAccountPositioninstead.outboundAccountInfowill now only show the balance of non-zero assets and assets that have been reduced to 0.
2020-09-03
- New endpoint
POST /sapi/v1/sub-account/futures/internalTransferto transfer futures asset between master account and subaccount. - New endpoint
GET /sapi/v1/sub-account/futures/internalTransferto get futures transfer history of subaccount.
2020-09-01
- New parameter
masterAccountTotalAssetadded in the endpointGET /sapi/v1/sub-account/spotSummaryto get BTC valued asset summary of master account.
2020-08-27
- New endpoint
GET /sapi/v1/sub-account/spotSummaryto get BTC valued asset summary of subaccout.
2020-08-26
- New parameter
symbolsadded in the endpointGET /sapi/v1/margin/isolated/account.
2020-07-28
ISOLATED MARGIN
-
New parameters "isIsolated" and "symbol" added for isolated margin in the following endpoints:
POST /sapi/v1/margin/loanPOST /sapi/v1/margin/repay
-
New parameter "isIsolated" and new response field "isIsolated" added for isolated margin in the following endpoints:
POST /sapi/v1/margin/orderDELETE /sapi/v1/margin/orderGET /sapi/v1/margin/orderGET /sapi/v1/margin/openOrdersGET /sapi/v1/margin/allOrdersGET /sapi/v1/margin/myTrades
-
New parameter "isolatedSymbol" and new response field "isolatedSymbol" added for isolated margin in the following endpoints:
GET /sapi/v1/margin/loanGET /sapi/v1/margin/repayGET /sapi/v1/margin/interestHistory
-
New parameter "isolatedSymbol" and new response field "isIsolated" added for isolated margin in the following endpoint
GET /sapi/v1/margin/forceLiquidationRec -
New parameter "isolatedSymbol" added for isolated margin in the following endpoints:
GET /sapi/v1/margin/maxBorrowableGET /sapi/v1/margin/maxTransferable
-
New endpoints for isolated margin:
POST /sapi/v1/margin/isolated/createPOST /sapi/v1/margin/isolated/transferGET /sapi/v1/margin/isolated/transferGET /sapi/v1/margin/isolated/accountGET /sapi/v1/margin/isolated/pairGET /sapi/v1/margin/isolated/allPairs
-
New endpoints for listenKey management of isolated margin account:
POST /sapi/v1/userDataStream/isolatedPUT /sapi/v1/userDataStream/isolatedDELETE /sapi/v1/userDataStream/isolated
2020-07-20
- The max value of parameter "limit" in
GET /sapi/v1/margin/allOrdershas been changed as 500.
2020-07-17
- There is now a request limit specifically for the sapi/v1/margin/allOrders endpoint at 60 raw requests per minute for a single IP address.
2020-07-13
- New SAPI Endpoints for futures Cross-Collateral:
POST /sapi/v1/futures/loan/borrowGET /sapi/v1/futures/loan/borrow/historyPOST /sapi/v1/futures/loan/repayGET /sapi/v1/futures/loan/repay/historyGET /sapi/v1/futures/loan/walletGET /sapi/v1/futures/loan/configsGET /sapi/v1/futures/loan/calcAdjustLevelGET /sapi/v1/futures/loan/calcMaxAdjustAmountPOST /sapi/v1/futures/loan/adjustCollateralGET /sapi/v1/futures/loan/adjustCollateral/historyGET /sapi/v1/futures/loan/liquidationHistory
2020-06-28
- SAPI Endpoints for futures:
POST /sapi/v1/futures/transferGET /sapi/v1/futures/transfer
2020-05-06
- New endpoints for Mining:
GET /sapi/v1/mining/pub/algoListGET /sapi/v1/mining/pub/coinListGET /sapi/v1/mining/worker/detailGET /sapi/v1/mining/worker/listGET /sapi/v1/mining/payment/listGET /sapi/v1/mining/statistics/user/statusGET /sapi/v1/mining/statistics/user/list
2020-05-01
- From 2020-05-01 UTC 00:00, all symbols will have a limit of 200 open orders using the
MAX_NUM_ORDERS filter.
- No existing orders will be removed or canceled.
- Accounts that have 200 or more open orders on a symbol will not be able to place new orders on that symbol until the open order count is below 200.
- OCO orders count as 2 open orders before the
LIMITorder is touched or theSTOP_LOSS(orSTOP_LOSS_LIMIT) order is triggered; once this happens the other order is canceled and will no longer count as an open order.
2020-04-25
SPOT API
- New field
permissions- Defines the trading permissions that are allowed on accounts and symbols.
permissionsis an enum array; values:SPOTMARGIN
permissionswill replaceisSpotTradingAllowedandisMarginTradingAllowedonGET api/v3/exchangeInfoin future API versions (v4+).- For an account to trade on a symbol, the account and symbol must share at least 1 permission in common.
- Updates to GET
api/v3/exchangeInfo- New field
permissionsadded. - New field
quoteAssetPrecisionadded; a duplicate of thequotePrecisionfield.quotePrecisionwill be removed in future API versions (v4+).
- New field
- Updates to GET
api/v3/account- New field
permissionsadded.
- New field
- New endpoint DELETE
api/v3/openOrders- This will allow a user to cancel all open orders on a single symbol.
- This endpoint will cancel all open orders including OCO orders.
- Orders can be canceled via the API on symbols in the
BREAKorHALTstatus.
USER DATA STREAM
OutboundAccountInfohas new fieldPwhich shows the trading permissions of the account.
2020-04-23
WEB SOCKET STREAM
- WebSocket connections have a limit of 5 incoming messages per second. A message is considered:
- A PING frame
- A PONG frame
- A JSON control message (e.g. subscribe, unsubscribe)
- A connection that goes beyond the limit will be disconnected; IPs that are repeatedly disconnected may be banned.
- A single connection can listen to a maximum of 1024 streams.
2020-04-16
-
New fields in response to endpoint
GET /sapi/v1/lending/daily/token/position:todayPurchasedAmountfor user's purchased amount today
-
New lending endpoints for customized fixed projects:
GET /sapi/v1/lending/project/listPOST /sapi/v1/lending/customizedFixed/purchaseGET /sapi/v1/lending/project/position/list
2020-04-02
- New fields in response to endpoint
GET /sapi/v1/capital/config/getall:minConfirmfor min number for balance confirmationunLockConfirmfor confirmation number for balance unlock
2020-03-24
MAX_POSITIONfilter added.-
This filter defines the allowed maximum position an account can have on the base asset of a symbol. An account's position defined as the sum of the account's:
- free balance of the base asset
- locked balance of the base asset
- sum of the qty of all open BUY orders
-
BUYorders will be rejected if the account's position is greater than the maximum position allowed.
-
2020-03-13
- New parameter
transactionFeeFlagis available in endpoint:POST /sapi/v1/capital/withdraw/applyandPOST /wapi/v3/withdraw.html
2020-02-05
- New sub account endpoints:
POST /sapi/v1/sub-account/futures/transferto transfer between futures and spot accout of sub-account.POST /sapi/v1/sub-account/margin/transferto transfer between margin and spot accout of sub-account.POST /sapi/v1/sub-account/transfer/subToSubto transfer to another account by sub-account.POST /sapi/v1/sub-account/transfer/subToMasterto transfer to same master by sub-account.GET /sapi/v1/sub-account/transfer/subUserHistoryto get transfer history of sub-account.
2020-01-15
-
New parameter
withdrawOrderIdfor client customized withdraw id for endpointPOST /wapi/v3/withdraw.html. -
New field
withdrawOrderIdin response toGET /wapi/v3/withdrawHistory.html
2019-12-25
-
New endpoints for Binance Savings:
GET /sapi/v1/lending/daily/product/listGET /sapi/v1/lending/daily/userLeftQuotaPOST /sapi/v1/lending/daily/purchaseGET /sapi/v1/lending/daily/userRedemptionQuotaPOST /sapi/v1/lending/daily/redeemGET /sapi/v1/lending/daily/token/positionGET /sapi/v1/lending/union/accountGET /sapi/v1/lending/union/purchaseRecordGET /sapi/v1/lending/union/redemptionRecordGET /sapi/v1/lending/union/interestHistory
-
Added time interval limit in
GET /sapi/v1/capital/withdraw/history,
GET /wapi/v3/withdrawHistory.html,
GET /sapi/v1/capital/deposit/hisrecand
GET /wapi/v3/depositHistory.html: _ The defaultstartTimeis 90 days from current time, and the defaultendTimeis current time. _ Please notice the defaultstartTimeandendTimeto make sure that time interval is within 0-90 days. * If bothstartTimeandendTimeare sent, time betweenstartTimeandendTimemust be less than 90 days.
2019-12-18
- New endpoint to get daily snapshot of account:
GET /sapi/v1/accountSnapshot
2019-11-30
-
Added parameter
sideEffectTypeinPOST /sapi/v1/margin/order (HMAC SHA256)with enums:NO_SIDE_EFFECTfor normal trade order;MARGIN_BUYfor margin trade order;AUTO_REPAYfor making auto repayment after order filled.
-
New field
marginBuyBorrowAmountandmarginBuyBorrowAssetinFULLresponse toPOST /sapi/v1/margin/order (HMAC SHA256)
2019-11-28
- New SAPI endpoint to disable fast withdraw switch:
POST /sapi/v1/account/disableFastWithdrawSwitch (HMAC SHA256) - New SAPI endpoint to enable fast withdraw switch:
POST /sapi/v1/account/enableFastWithdrawSwitch (HMAC SHA256)
2019-11-22
- Quote Order Qty Market orders have been enabled on all symbols.
- Quote Order Qty
MARKETorders allow a user to specify the totalquoteOrderQtyspent or received in theMARKETorder. - Quote Order Qty
MARKETorders will not breakLOT_SIZEfilter rules; the order will execute a quantity that will have the notional value as close as possible toquoteOrderQty. - Using
BNBBTCas an example:- On the
BUYside, the order will buy as many BNB asquoteOrderQtyBTC can. - On the
SELLside, the order will sell as much BNB as needed to receivequoteOrderQtyBTC.
- On the
- Quote Order Qty
2019-11-19
GET /sapi/v1/sub-account/margin/accounthas new field:marginTradeCoeffVowhich containsforceLiquidationBarfor liquidation margin ratiomarginCallBarfor margin call margin rationormalBarfor initial margin ratio
2019-11-13
Rest API
- api/v3/exchangeInfo has new fields:
quoteOrderQtyMarketAllowedbaseCommissionPrecisionquoteCommissionPrecision
MARKETorders have a new optional field:quoteOrderQtyused to specify the quote quantity to BUY or SELL. This cannot be used in combination withquantity.- The exact timing that
quoteOrderQtyMARKET orders will be enabled is TBD. There will be a separate announcement and further details at that time.
- The exact timing that
- All order query endpoints will return a new field
origQuoteOrderQtyin the JSON payload. (e.g. GET api/v3/allOrders)
Code
-
Updated error messages for -1128
- Sending an
OCOwith astopLimitPricebut without astopLimitTimeInForcewill return the error:
- Sending an
-
Updated error messages for -1003 to specify the limit is referring to the request weight, not to the number of requests.
Deprecation of v1 endpoints:
By end of Q1 2020, the following endpoints will be removed from the API. The documentation has been updated to use the v3 versions of these endpoints.
- GET api/v1/depth
- GET api/v1/historicalTrades
- GET api/v1/aggTrades
- GET api/v1/klines
- GET api/v1/ticker/24hr
- GET api/v1/ticker/price
- GET api/v1/exchangeInfo
- POST api/v1/userDataStream
- PUT api/v1/userDataStream
- GET api/v1/ping
- GET api/v1/time
- GET api/v1/ticker/bookTicker
These endpoints however, will NOT be migrated to v3. Please use the following endpoints instead moving forward.
USER DATA STREAM
-
Changes to
executionReportevent- If the C field is empty, it will now properly return
null, instead of"null". - New field Q which represents the
quoteOrderQty.
- If the C field is empty, it will now properly return
-
balanceUpdateevent type added- This event occurs when funds are deposited or withdrawn from your account.
WEB SOCKET STREAM
- WSS now supports live subscribing/unsubscribing to streams.
2019-11-08
- New sapi for subaccount management on margin and futures:
GET /sapi/v1/sub-account/status (HMAC SHA256)POST /sapi/v1/sub-account/margin/enable (HMAC SHA256)GET /sapi/v1/sub-account/margin/account (HMAC SHA256)GET /sapi/v1/sub-account/margin/accountSummary (HMAC SHA256)POST /sapi/v1/sub-account/futures/enable (HMAC SHA256)GET /sapi/v1/sub-account/futures/account (HMAC SHA256)GET /sapi/v1/sub-account/futures/accountSummary (HMAC SHA256)GET /sapi/v1/sub-account/futures/positionRisk (HMAC SHA256)
2019-11-04
- New sapi endpoints for subaccount wallet.
GET /sapi/v1/capital/deposit/subAddress (HMAC SHA256)): fetch subaccount deposit address.GET /sapi/v1/capital/deposit/subHisrec (HMAC SHA256)): fetch subaccount deposit history.
2019-10-29
- New sapi endpoints for wallet.
POST /sapi/v1/capital/withdraw/apply (HMAC SHA256): withdraw.Get /sapi/v1/capital/withdraw/history (HMAC SHA256): fetch withdraw history with network.
2019-10-14
- New sapi endpoints for wallet.
GET /sapi/v1/capital/config/getall (HMAC SHA256): get all coins' information for user.GET /sapi/v1/capital/deposit/hisrec (HMAC SHA256): fetch deposit history with network.GET /sapi/v1/capital/deposit/address (HMAC SHA256): fetch deposit address with network.
2019-10-11
- Added parameter
networkinPOST /wapi/v3/withdraw.htmlso that asset can be withdrawed with specific network.
2019-09-09
- New WebSocket streams for bookTickers added:
<symbol>@bookTickerand!bookTicker.
2019-09-03
- Faster order book data with 100ms updates:
<symbol>@depth@100msand<symbol>@depth#@100ms - Added "Update Speed:" to
Websocket Market Streams - Removed deprecated v1 endpoints as per previous announcement:
- GET api/v1/order
- GET api/v1/openOrders
- POST api/v1/order
- DELETE api/v1/order
- GET api/v1/allOrders
- GET api/v1/account
- GET api/v1/myTrades
2019-08-16
-
GET api/v1/depth
limitof 10000 has been temporarily removed -
In Q4 2017, the following endpoints were deprecated and removed from the API documentation. They have been permanently removed from the API as of this version. We apologize for the omission from the original changelog:
- GET api/v1/order
- GET api/v1/openOrders
- POST api/v1/order
- DELETE api/v1/order
- GET api/v1/allOrders
- GET api/v1/account
- GET api/v1/myTrades
-
Streams, endpoints, parameters, payloads, etc. described in the documents in this repository are considered official and supported. The use of any other streams, endpoints, parameters, or payloads, etc. is not supported; use them at your own risk and with no guarantees.
2019-09-15
Rest API
-
New order type: OCO ("One Cancels the Other")
-
An OCO has 2 orders: (also known as legs in financial terms)
STOP_LOSSorSTOP_LOSS_LIMITlegLIMIT_MAKERleg
-
Price Restrictions:
SELL Orders: Limit Price > Last Price > Stop PriceBUY Orders: Limit Price < Last Price < Stop Price- As stated, the prices must "straddle" the last traded price on the symbol. EX: If the last
price is 10:
- A SELL OCO must have the limit price greater than 10, and the stop price less than 10.
- A BUY OCO must have a limit price less than 10, and the stop price greater than 10.
-
Quantity Restrictions:
- Both legs must have the same quantity.
ICEBERGquantities however, do not have to be the same.
-
Execution Order:
- If the
LIMIT_MAKERis touched, the limit maker leg will be executed first BEFORE canceling the Stop Loss Leg. - if the Market Price moves such that the
STOP_LOSSorSTOP_LOSS_LIMITwill trigger, the Limit Maker leg will be cancelled BEFORE executing theSTOP_LOSSLeg.
- If the
-
Cancelling an OCO
- Cancelling either order leg will cancel the entire OCO.
- The entire OCO can be canceled via the
orderListIdor thelistClientOrderId.
-
New Enums for OCO:
ListStatusTypeRESPONSE- used when ListStatus is responding to a failed action. (either order list placement or cancellation)EXEC_STARTED- used when an order list has been placed or there is an update to a list's status.ALL_DONE- used when an order list has finished executing and is no longer active.
ListOrderStatusEXECUTING- used when an order list has been placed or there is an update to a list's status.ALL_DONE- used when an order list has finished executing and is no longer active.REJECT- used when ListStatus is responding to a failed action. (either order list placement or cancellation)
ContingencyTypeOCO- specifies the type of order list.
-
New Endpoints:
- POST api/v3/order/oco
- DELETE api/v3/orderList
- GET api/v3/orderList
-
-
recvWindowcannot exceed 60000. -
New
intervalLettervalues for headers:- SECOND => S
- MINUTE => M
- HOUR => H
- DAY => D
-
New Headers
X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)will give your current used request weight for the (intervalNum)(intervalLetter) rate limiter. For example, if there is a one minute request rate weight limiter set, you will get aX-MBX-USED-WEIGHT-1Mheader in the response. The legacy headerX-MBX-USED-WEIGHTwill still be returned and will represent the current used weight for the one minute request rate weight limit. -
New Header
X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)that is updated on any valid order placement and tracks your current order count for the interval; rejected/unsuccessful orders are not guaranteed to haveX-MBX-ORDER-COUNT-**headers in the response.- Eg.
X-MBX-ORDER-COUNT-1Sfor "orders per 1 second" andX-MBX-ORDER-COUNT-1Dfor orders per "one day"
- Eg.
-
GET api/v1/depth now supports
limit5000 and 10000; weights are 50 and 100 respectively. -
GET api/v1/exchangeInfo has a new parameter
ocoAllowed.
USER DATA STREAM
executionReportevent now contains "g" which has theorderListId; it will be set to -1 for non-OCO orders.- New Event Type
listStatus;listStatusis sent on an update to any OCO order. - New Event Type
outboundAccountPosition;outboundAccountPositionis sent any time an account's balance changes and contains the assets that could have changed by the event that generated the balance change (a deposit, withdrawal, trade, order placement, or cancelation).
NEW ERRORS
- -1131 BAD_RECV_WINDOW
recvWindowmust be less than 60000
- -1099 Not found, authenticated, or authorized
- This replaces error code -1999
NEW -2011 ERRORS
- OCO_BAD_ORDER_PARAMS
- A parameter for one of the orders is incorrect.
- OCO_BAD_PRICES
- The relationship of the prices for the orders is not correct.
- UNSUPPORTED_ORD_OCO
- OCO orders are not supported for this symbol.
2019-03-12
Rest API
- X-MBX-USED-WEIGHT header added to Rest API responses.
- Retry-After header added to Rest API 418 and 429 responses.
- When canceling the Rest API can now return
errorCode-1013 OR -2011 if the symbol'sstatusisn'tTRADING. api/v1/depthno longer has the ignored and empty[].api/v3/myTradesnow returnsquoteQty; the price * qty of for the trade.
Websocket streams
<symbol>@depthand<symbol>@depthXstreams no longer have the ignored and empty[].
System improvements
- Matching Engine stability/reliability improvements.
- Rest API performance improvements.
2018-11-13
Rest API
- Can now cancel orders through the Rest API during a trading ban.
- New filters:
PERCENT_PRICE,MARKET_LOT_SIZE,MAX_NUM_ICEBERG_ORDERS. - Added
RAW_REQUESTSrate limit. Limits based on the number of requests over X minutes regardless of weight. - /api/v3/ticker/price increased to weight of 2 for a no symbol query.
- /api/v3/ticker/bookTicker increased weight of 2 for a no symbol query.
- DELETE /api/v3/order will now return an execution report of the final state of the order.
MIN_NOTIONALfilter has two new parameters:applyToMarket(whether or not the filter is applied to MARKET orders) andavgPriceMins(the number of minutes over which the price averaged for the notional estimation).intervalNumadded to /api/v1/exchangeInfo limits.intervalNumdescribes the amount of the interval. For example:intervalNum5, withintervalminute, means "every 5 minutes".
Explanation for the average price calculation:
-
(qty * price) of all trades / sum of qty of all trades over previous 5 minutes.
-
If there is no trade in the last 5 minutes, it takes the first trade that happened outside of the 5min window. For example if the last trade was 20 minutes ago, that trade's price is the 5 min average.
-
If there is no trade on the symbol, there is no average price and market orders cannot be placed. On a new symbol with
applyToMarketenabled on theMIN_NOTIONALfilter, market orders cannot be placed until there is at least 1 trade. -
The current average price can be checked here:
https://api.binance.com/api/v3/avgPrice?symbol=<symbol>For example: https://api.binance.com/api/v3/avgPrice?symbol=BNBUSDT
User data stream
Last quote asset transacted quantity(as variableY) added to execution reports. Represents thelastPrice*lastQty(L*l).
2018-07-18
Rest API
- New filter:
ICEBERG_PARTS POST api/v3/ordernew defaults fornewOrderRespType.ACK,RESULT, orFULL;MARKETandLIMITorder types default toFULL, all other orders default toACK.- POST api/v3/order
RESULTandFULLresponses now havecummulativeQuoteQty - GET api/v3/openOrders with no symbol weight reduced to 40.
- GET api/v3/ticker/24hr with no symbol weight reduced to 40.
- Max amount of trades from GET /api/v1/trades increased to 1000.
- Max amount of trades from GET /api/v1/historicalTrades increased to 1000.
- Max amount of aggregate trades from GET /api/v1/aggTrades increased to 1000.
- Max amount of aggregate trades from GET /api/v1/klines increased to 1000.
- Rest API Order lookups now return
updateTimewhich represents the last time the order was updated;timeis the order creation time. - Order lookup endpoints will now return
cummulativeQuoteQty. IfcummulativeQuoteQtyis < 0, it means the data isn't available for this order at this time. REQUESTSrate limit type changed toREQUEST_WEIGHT. This limit was always logically request weight and the previous name for it caused confusion.
User data stream
cummulativeQuoteQtyfield added to order responses and execution reports (as variableZ). Represents the cummulative amount of thequotethat has been spent (with aBUYorder) or received (with aSELLorder). Historical orders will have a value < 0 in this field indicating the data is not available at this time.cummulativeQuoteQtydivided bycummulativeQtywill give the average price for an order.O(order creation time) added to execution reports
2018-01-23
- GET /api/v1/historicalTrades weight decreased to 5
- GET /api/v1/aggTrades weight decreased to 1
- GET /api/v1/klines weight decreased to 1
- GET /api/v1/ticker/24hr all symbols weight decreased to number of trading symbols / 2
- GET /api/v3/allOrders weight decreased to 5
- GET /api/v3/myTrades weight decreased to 5
- GET /api/v3/account weight decreased to 5
- GET /api/v1/depth limit=500 weight decreased to 5
- GET /api/v1/depth limit=1000 weight decreased to 10
- -1003 error message updated to direct users to websockets
2018-01-20
- GET /api/v1/ticker/24hr single symbol weight decreased to 1
- GET /api/v3/openOrders all symbols weight decreased to number of trading symbols / 2
- GET /api/v3/allOrders weight decreased to 15
- GET /api/v3/myTrades weight decreased to 15
- GET /api/v3/order weight decreased to 1
- myTrades will now return both sides of a self-trade/wash-trade
2018-01-14
- GET /api/v1/aggTrades weight changed to 2
- GET /api/v1/klines weight changed to 2
- GET /api/v3/order weight changed to 2
- GET /api/v3/allOrders weight changed to 20
- GET /api/v3/account weight changed to 20
- GET /api/v3/myTrades weight changed to 20
- GET /api/v3/historicalTrades weight changed to 20