- Add timeout parameter to Websocket clients
- Add method for
GET /sapi/v1/asset/wallet/balance
- Portfolio endpoints:
POST /sapi/v1/portfolio/interest-history
POST /sapi/v1/portfolio/asset-index-price
POST /sapi/v1/portfolio/auto-collection
POST /sapi/v1/portfolio/bnb-transfer
POST /sapi/v1/portfolio/repay-futures-switch
GET /sapi/v1/portfolio/repay-futures-switch
POST /sapi/v1/portfolio/repay-futures-negative-balance
POST /sapi/v1/portfolio/asset-collection
- Convert
GET /sapi/v1/convert/exchangeInfo
GET /sapi/v1/convert/assetInfo
POST /sapi/v1/convert/getQuote
POST /sapi/v1/convert/acceptQuote
GET /sapi/v1/convert/orderStatus
- Crypto Loan
POST /sapi/v1/loan/flexible/borrow
GET /sapi/v1/loan/flexible/ongoing/order
GET /sapi/v1/loan/flexible/borrow/history
POST /sapi/v1/loan/flexible/repay
GET /sapi/v1/loan/flexible/repay/history
POST /sapi/v1/loan/flexible/adjust/ltv
GET /sapi/v1/loan/flexible/ltv/adjustment/history
GET /sapi/v1/loan/flexible/loanable/data
GET /sapi/v1/loan/flexible/collateral/data
- Margin
GET /sapi/v1/margin/crossMarginCollateralRatio
GET /sapi/v1/margin/exchange-small-liability
GET /sapi/v1/margin/exchange-small-liability-history
GET /sapi/v1/margin/next-hourly-interest-rate
GET /sapi/v1/margin/dust
POST /sapi/v1/margin/dust
GET /sapi/v1/margin/max-leverage
- SubAccount
POST /sapi/v4/sub-account/assets
POST /sapi/v1/sub-account/eoptions/enable
GET /sapi/v1/sub-account/transaction-statistics
GET /sapi/v1/managed-subaccount/query-trans-log
GET /sapi/v1/managed-subaccount/info
GET /sapi/v1/managed-subaccount/marginAsset
GET /sapi/v1/managed-subaccount/fetch-future-asset
GET /sapi/v1/sub-account/futures/positionRisk
GET /sapi/v1/sub-account/futures/accountSummary
GET /sapi/v1/sub-account/futures/account
- Trade
GET /api/v3/myPreventedMatches
- Wallet
POST /sapi/v1/capital/deposit/credit-apply
- Simple Earn
GET /sapi/v1/simple-earn/flexible/list
GET /sapi/v1/simple-earn/locked/list
POST /sapi/v1/simple-earn/flexible/subscribe
POST /sapi/v1/simple-earn/locked/subscribe
POST /sapi/v1/simple-earn/flexible/redeem
POST /sapi/v1/simple-earn/locked/redeem
GET /sapi/v1/simple-earn/flexible/position
GET /sapi/v1/simple-earn/locked/position
GET /sapi/v1/simple-earn/account
GET /sapi/v1/simple-earn/flexible/history/subscriptionRecord
GET /sapi/v1/simple-earn/locked/history/subscriptionRecord
GET /sapi/v1/simple-earn/flexible/history/redemptionRecord
GET /sapi/v1/simple-earn/locked/history/redemptionRecord
GET /sapi/v1/simple-earn/flexible/history/rewardsRecord
GET /sapi/v1/simple-earn/locked/history/rewardsRecord
POST /sapi/v1/simple-earn/flexible/setAutoSubscribe
POST /sapi/v1/simple-earn/locked/setAutoSubscribe
GET /sapi/v1/simple-earn/flexible/personalLeftQuota
GET /sapi/v1/simple-earn/locked/personalLeftQuota
GET /sapi/v1/simple-earn/flexible/subscriptionPreview
GET /sapi/v1/simple-earn/locked/subscriptionPreview
GET /sapi/v1/simple-earn/flexible/history/rateHistory
GET /sapi/v1/simple-earn/flexible/history/collateralRecord
- All Auto-Invest endpoints
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
GET /sapi/v1/lending/project/list
POST /sapi/v1/lending/customizedFixed/purchase
GET /sapi/v1/lending/project/position/list
POST /sapi/v1/lending/positionChanged
GET /sapi/v1/futures/loan/borrow/history
GET /sapi/v1/futures/loan/repay/history
GET /sapi/v2/futures/loan/wallet
GET /sapi/v1/futures/loan/adjustCollateral/history
GET /sapi/v1/futures/loan/liquidationHistory
GET /sapi/v1/futures/loan/interestHistory
- Change
Loan
module name toCrypto Loan
- Pump dependencies
- Add missing enum values in the
User Universal Transfer
endpoint
- Add support for proxy in Websocket clients
- Remove support for python 3.7
- Changes to
GET /api/v3/historicalTrades
: api key is not required.
- Change
User-Agent
- Add support for use of ED25519 Key to generate signatures
- Modified format of combined streams in Websocket Market Streams. Please refer to
examples/websocket/websocket_stream/combined_streams.py
for example implementation.
- Discontinued official support for Python 3.6
- Removed endpoint
POST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList
- Removed endpoint
POST /sapi/v1/sub-account/subAccountApi/ipRestriction
POST /sapi/v2/sub-account/subAccountApi/ipRestriction
GET /sapi/v1/managed-subaccount/deposit/address
- Redesign of Websocket part. Please consult
README.md
for details on its new usage.
- Add Websocket API
- 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.
- New endpoints for Sub-Account
GET /v1/managed-subaccount/queryTransLogForInvestor
Investor can use this api to query managed sub account transfer logGET /v1/managed-subaccount/queryTransLogForTradeParent
Trading team can use this api to query managed sub account transfer log
- New endpoints for 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 HistoryGET /sapi/v1/loan/vip/collateral/account
Check Locked Value of VIP Collateral AccountGET /sapi/v1/loan/loanable/data
Get Loanable Assets DataGET /sapi/v1/loan/collateral/data
Get Collateral Assets DataGET /sapi/v1/loan/repay/collateral/rate
Check Collateral Repay RatePOST /sapi/v1/loan/customize/margin_call
Customize margin call for ongoing orders only.
- New endpoints for Wallet
GET /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage
Get Cloud-Mining payment and refund historyPOST /sapi/v1/asset/convert-transfer
BUSD ConvertGET /sapi/v1/asset/convert-transfer/queryByPage
BUSD Convert History
- New endpoint for gift card
POST /sapi/v1/giftcard/buyCode
Create a dual-token gift cardGET /sapi/v1/giftcard/buyCode/token-limit
Fetch Token Limit
- Remove
!bookTicker
Websocket
- Rewrite reading API key in example files.
- Python 3.6 Support Removed
- Futures Loan Endpoints:
POST /sapi/v1/futures/loan/borrow
- spot.futures_loan_borrowPOST /sapi/v1/futures/loan/repay
- spot.futures_loan_repayGET /sapi/v2/futures/loan/configs
- spot.futures_loan_configsGET /sapi/v2/futures/loan/calcAdjustLevel
- spot.futures_loan_calc_adjust_levelGET /sapi/v2/futures/loan/calcMaxAdjustAmount
- spot.futures_loan_calc_max_adjust_amountPOST /sapi/v2/futures/loan/adjustCollateral
- spot.futures_loan_adjust_collateralGET /sapi/v1/futures/loan/collateralRepayLimit
- spot.futures_loan_collateral_repay_limitGET /sapi/v1/futures/loan/collateralRepay
- spot.futures_loan_collateral_repay_quotePOST /sapi/v1/futures/loan/collateralRepay
- spot.futures_loan_repayGET /sapi/v1/futures/loan/collateralRepayResult
- spot.futures_loan_collateral_repay_result
- New Margin Endpoint:
GET /sapi/v1/margin/tradeCoeff
- Get Summary of Margin Account
- Re: binance#184 - Exception handling now returns Raw Data instead of just Error Codes and Error Messages.
- Websocket Enhancements
- Added support for passing list of symbols on all relevant Websocket endpoints to support subscription to multiple streams.
- Stream Identification for when multiple streams are subscribed to at once. Allows users to easily identify which data belongs to which stream.
examples/config.ini
to globally set API and Secret Keys to apply in all example files
- Twisted reactor hanging in some situations due to the main thread not exiting cleanly
- Update version name as hyphens are not recommended.
- Add support for use of RSA Key to generate signatures
- New endpoints for Crypto Loan:
POST /sapi/v1/loan/borrow
- Crypto Loan BorrowGET /sapi/v1/loan/borrow/history
- Get Loan Borrow HistoryGET/sapi/v1/loan/ongoing/orders
- Get Loan Ongoing OrdersPOST/sapi/v1/loan/repay
- Crypto Loan RepayGET/sapi/v1/loan/repay/history
- Get Loan Repayment HistoryPOST/sapi/v1/loan/adjust/ltv
- Crypto Loan Adjust LTVGET/sapi/v1/loan/ltv/adjustment/history
- Get Loan LTV Adjustment History
- Changes to
GET /api/v3/exchangeInfo
:- New optional parameter
permissions
added 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"]
- Cannot be combined with symbol or symbols
- New optional parameter
- New endpoint for Market:
GET /api/v3/uiKlines
- New kline interval:
1s
- Changes to
GET /api/v3/ticker
andGET /api/v3/ticker/24hr
- New optional parameter type added
- Supported values for parameter type are
FULL
andMINI
FULL
is the default value and the response that is currently being returned from the endpointMINI
omits the following fields from the response:priceChangePercent
,weightedAvgPrice
,bidPrice
,bidQty
,askPrice
,askQty
, andlastQty
- New endpoint for Portfolio Margin:
GET /sapi/v1/portfolio/pmLoan
to query Portfolio Margin Bankruptcy Loan Record.POST /sapi/v1/portfolio/repay
to repay Portfolio Margin Bankruptcy Loan.GET /sapi/v1/portfolio/collateralRate
to get Portfolio Margin Collateral Rate.
- Changes to
POST /api/v3/order
andPOST /api/v3/order/cancelReplace
- New optional field
strategyId
is a parameter used to identify an order as part of a strategy. - New optional field
strategyType
is 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 to strategyType=1000000) - Note:
strategyType
cannot be less than 1000000.
- 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.
limitStrategyType
andstopStrategyType
both cannot be less than 1000000.
- New optional fields
asset
is no longer mandatory inGET /sapi/v1/lending/project/position/list
-
New endpoint for Margin:
POST /sapi/v3/asset/getUserAsset
to get user assets.
-
New endpoint for Wallet:
GET /sapi/v1/margin/dribblet
to query the historical information of user's margin account small-value asset conversion BNB.
- New endpoint
GET /api/v3/ticker
- New endpoint
POST /api/v3/order/cancelReplace
- New websocket stream
<symbol>@ticker_<window_size>
- New websocket stream
!ticker_<window-size>@arr
- #146
savings_flexible_product_position
asset
parameter should be optional
-
New endpoint for Gift Card:
GET /sapi/v1/giftcard/cryptography/rsa-public-key
to fetch RSA public key.
-
New endpoints for Staking:
GET /sapi/v1/staking/productList
to get Staking product listPOST /sapi/v1/staking/purchase
to stake productPOST /sapi/v1/staking/redeem
to redeem productGET /sapi/v1/staking/position
to get Staking product holding positionGET /sapi/v1/staking/stakingRecord
to inquiry Staking history recordsPOST /sapi/v1/staking/setAutoStaking
to set Auto Staking functionGET /sapi/v1/staking/personalLeftQuota
to inquiry Staking left quota
-
Update endpoints for Market:
GET /api/v3/ticker/24hr
,GET /api/v3/ticker/price
andGET /api/v3/ticker/bookTicker
new optional parameter symbols.
-
Update endpoint for Gift Card:
POST /sapi/v1/giftcard/redeemCode
: new optional parameter externalUid. Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users.
- New endpoint
GET /sapi/v1/managed-subaccount/accountSnapshot
to support investor master account query asset snapshot of managed sub-account. - New endpoint
GET /sapi/v1/portfolio/account
to support query portfolio margin account info - New endpoint
GET /sapi/v1/margin/rateLimit/order
, which will display the user's current margin order count usage for all intervals.
- New endpoints for Gift Card (Binance Code in the API Documentation):
POST /sapi/v1/giftcard/createCode
to create a Binance CodePOST /sapi/v1/giftcard/redeemCode
to redeem a Binance CodeGET /sapi/v1/giftcard/verify
to verify a Binance Code
- New endpoint for Wallet:
POST /sapi/v1/asset/dust-btc
to get assets that can be converted into BNB
- New endpoint for Mining:
GET /sapi/v1/mining/payment/uid
to get Mining account earning
- New endpoint for BSwap:
GET /sapi/v1/bswap/unclaimedRewards
to get unclaimed rewards recordPOST /sapi/v1/bswap/claimRewards
to claim swap rewards or liquidity rewardsGET /sapi/v1/bswap/claimedHistory
to get history of claimed rewards
- Transfer types
MAIN_MINING
,MINING_MAIN
,MINING_UMFUTURE
,MARGIN_MINING
, andMINING_MARGIN
as they are discontinued in Universal Transfer endpointPOST /sapi/v1/asset/transfer
from January 05, 2022 08:00 AM UTC
- New endpoint for Convert:
GET /sapi/v1/convert/tradeFlow
to support user query convert trade history records
- New endpoint for Rebate:
GET /sapi/v1/rebate/taxQuery
to support user query spot rebate history records
- New endpoints for Margin:
GET /sapi/v1/margin/crossMarginData
to get cross margin fee data collectionGET /sapi/v1/margin/isolatedMarginData
to get isolated margin fee data collectionGET /sapi/v1/margin/isolatedMarginTier
to get isolated margin tier data collection
- New endpoints for NFT:
GET /sapi/v1/nft/history/transactions
to get NFT transaction historyGET /sapi/v1/nft/history/deposit
to get NFT deposit historyGET /sapi/v1/nft/history/withdraw
to get NFT withdraw historyGET /sapi/v1/nft/user/getAsset
to get NFT asset
- New endpoint for Crypto Loans:
GET /sapi/v1/loan/income
to query an asset's loan history
- New endpoints for Sub-Account:
POST /sapi/v1/sub-account/subAccountApi/ipRestriction
to support master account enable and disable IP restriction for a sub-account API KeyPOST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList
to support master account add IP list for a sub-account API KeyGET /sapi/v1/sub-account/subAccountApi/ipRestriction
to support master account query IP restriction for a sub-account API KeyDELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList
to support master account delete IP list for a sub-account API Key
- New endpoint for Pay:
GET /sapi/v1/pay/transactions
to support user query Pay trade history
- Removed epoch time in util method
config_logging
to provide compatibility with Windows OS - Allow optional parameter for method
isolated_margin_account_limit
- Universal transfer types:
- Added
MAIN_FUNDING
,FUNDING_MAIN
,FUNDING_UMFUTURE
,UMFUTURE_FUNDING
,MARGIN_FUNDING
,FUNDING_MARGIN
,FUNDING_CMFUTURE
andCMFUTURE_FUNDING
to support transfer assets among funding account and other accounts - Deleted
MAIN_C2C
,C2C_MAIN
,C2C_UMFUTURE
,C2C_MINING
,UMFUTURE_C2C
,MINING_C2C
,MARGIN_C2C
,C2C_MARGIN
,MAIN_PAY
andPAY_MAIN
as C2C account, Binance Payment, Binance Card and other business accounts are merged into a Funding account and they'll be discontinued on November 04, 2021 08:00 AM UTC
- Added
- Util method
config_logging
can now provide date time in UTC and epoch time
- New endpoint
GET api/v3/rateLimit/order
to display the user's current order count usage for all intervals
- Universal transfer types
MAIN_PAY
,PAY_MAIN
,ISOLATEDMARGIN_MARGIN
,MARGIN_ISOLATEDMARGIN
,ISOLATEDMARGIN_ISOLATEDMARGIN
- New endpoints for Margin OCO orders:
POST /sapi/v1/margin/order/oco
to send new margin OCO orderDELETE /sapi/v1/margin/orderList
to cancel margin OCO orderGET /sapi/v1/margin/orderList
to query a margin OCO orderGET /sapi/v1/margin/allOrderList
to query all margin OCO ordersGET /sapi/v1/margin/openOrderList
to query open margin OCO orders
- New endpoints for Isolated Margin:
DELETE /sapi/v1/margin/isolated/account
to disable isolated margin account for a specific symbolPOST /sapi/v1/margin/isolated/account
to enable isolated margin account for a specific symbolGET /sapi/v1/margin/isolated/accountLimit
to query num of enabled isolated margin accounts and its max limit
- New endpoints for BSwap:
GET /sapi/v1/bswap/poolConfigure
to get pool configureGET /sapi/v1/bswap/addLiquidityPreview
to calculate expected share amount for adding liquidity in single or dual tokenGET /sapi/v1/bswap/removeLiquidityPreview
to calculate expected asset amount of single token redemption or dual token redemption
GET api/v3/exchangeInfo
now supports single or multi-symbol queryGET api/v3/myTrades
has a new optional fieldorderId
GET /sapi/v1/c2c/orderMatch/listUserOrderHistory
to query user C2C trade history
- New Fiat endpoints:
GET /sapi/v1/fiat/orders
to query user fiat deposit and withdraw historyGET /sapi/v1/fiat/payments
to query user fiat payments history
- Typo in
margin_max_transferable
- New endpoints for Wallet:
POST /sapi/v1/asset/get-funding-asset
to query funding wallet, includes Binance Pay, Binance Card, Binance Gift Card, Stock TokenGET /sapi/v1/account/apiRestrictions
to query user API Key permission
- Remove default value in the parameters
- Upgrade the dependency packages
- A link to the document on
README.md
- Enabled the sub menu on document nav bar.
GET /sapi/v1/lending/daily/product/list
includes new parameters, current and size.- New endpoints for Sub-Account:
POST /sapi/v1/managed-subaccount/deposit
to deposit assets into the managed sub-account (only for investor master account)GET /sapi/v1/managed-subaccount/asset
to query managed sub-account asset details (only for investor master account)POST /sapi/v1/managed-subaccount/withdraw
to withdrawal assets from the managed sub-account (only for investor master account)
- First release, please find details from
README.md