python-binance

Changelog

Version history and release notes for python-binance

v1.0.35 - 2026-02-16

Added

  • chore: normalize package name by @carlosmiei in #1653
  • feat: upgrade margin socket to use websocket api by @pcriadoperez in #1670
  • feat: Update futures algo order API with new TP/SL parameters by @paul-lestyo in #1672

Fixed

  • fix: reconnects for websocket connection closed ok and ws-api by @pcriadoperez in #1655

v1.0.34 - 2025-12-16

Added

  • verbose mode for inspecting requests (verbose=True) (#1642)
  • feat: add support for rpi orders (#1644)
  • feat: update futures ticker endpoint to v2 (#1650)
  • feat: add support for websocket algo orders (#1646)
  • docs: add missing doc references from async client (#1651)

Fixed

  • fix: remove duplicate import and replace type() with isinstance() (#1623)
  • fix(client): use proper exception instead of assert for US endpoints (#1641)

v1.0.33 - 2025-12-06

Fixed

  • fix: reconnect keep alive (#1637)

Added

  • moved conditional orders to the new futures algo service (#1639)

v1.0.32 - 2025-11-03

Fixed

  • signature encoding for non-ascii symbols in both private and public endpoints (#1619)

v1.0.31 - 2025-10-29

Fixed

  • fix signature encoding for non-ascii symbols (#1612)

v1.0.30 - 2025-10-14

Fixed

  • Set default limit=None for futures_historical_klines* (fetch full range by default) (#1607)
  • fixed a typo in a method name (#1605)
  • all links updated (#1600)
  • throw ReadLoopClosed error if trying to connect once read loop is already closed (#1593)
  • ensure spot v3 version (#1587)

Added

  • Demo trading
  • websocket userdatastream.signature support, deprecate listenkey for spot market

v1.0.29 - 2025-05-19

Fixed

  • Ws testnet spot URLs update

v1.0.28 - 2025-02-27

Added

  • Add papi_get_rate_limit
  • Add docs for create_oco_order
  • Add uiKlines support
  • Add options websocket market streams
  • Add dozens of missing endpoints

Fixed

  • Ws API not allowing more than 100 requests
  • Return empty json instead of throwing error on empty response
  • json_dumps when using orjson

v1.0.27 - 2024-12-31

Added

  • Add futures_taker_long_short_ratio endpoint
  • Add portfolio margin user data streams

Fixed

  • Close read loop before closing websocket
  • Fix threaded_stream
  • Closing keepAliveWebsocket fix

v1.0.26 - 2024-12-23

Added

  • Websockets docs
  • Support for microseconds time unit
  • Futures data link endpoints
  • Return type to _get_account_socket
  • futures_index_price_constituents endpoint

Fixed

  • FuturesDepthCacheManager and OptionsDepthCacheManager to __init__
  • EDDSA random error

v1.0.25 - 2024-12-05

Added

  • Borrow-repay endpoints
  • futures_mark_price_klines
  • futures_index_price_klines and futures_premium_index_klines
  • HistoricalKlinesType enum enhanced
  • Block trades endpoints
  • dapi async endpoints

Fixed

  • Removed unnecessary logs with error level
  • Remove CANCEL read_loop error log
  • Fix error type for when message queue is full
  • Fixes that if first connect fails it would not throw
  • Improves error handling passing to user error type

v1.0.24 - 2024-11-28

Added

  • Exposed internal classes for easier subclassing

Fixed

  • Fixed package outdated structure causing import errors

v1.0.23 - 2024-11-27

Added

  • CRUD over Websockets (create/fetch/edit/cancel)
  • orjson support
  • Overridable headers per request
  • Added default recvWindow parameter
  • Proxy support for Websockets
  • Gift card API
  • cancel_replace_order, cancel_all_open_orders and cancel_all_open_margin_orders
  • Missing futures_modify_order from async client
  • Ruff format
  • Missing endpoint for futures_edit_order

Fixed

  • Updated create_oco_order endpoint
  • Batch orders signature issue
  • fail_connection issue related to the websockets upgrade
  • eddsa signature issue

v1.0.22 - 2024-10-29

Added

  • Futures all tickers stream
  • Futures coin-m all tickers stream

Fixed

  • Hang in the ThreadedApiManager

v1.0.21 - 2024-10-23

Added

  • Some new endpoints

Fixed

  • URL encoding for coin-m post endpoints
  • Batch order endpoint
  • Some minor bug fixes

v1.0.20 - 2024-10-22

Added

  • EDDSA authentication
  • Portfolio Margin endpoints
  • Some new futures endpoints
  • Proxy support for the AsyncClient
  • Version override is possible now through params

Fixed

  • Migrated positionRisk to v3
  • Fixed AttributeError("'Connect' object has no attribute 'protocol'")
  • Some minor bug fixes

v1.0.19 - 2023-08-11

Added

  • Some new futures and margin endpoints
  • Pass session_params to streams for AsyncClient

Fixed

  • Removed debug statements
  • Options testnet URL
  • Accessing msg variable before assignment

v1.0.18 - 2023-08-09

Added

  • TRAILING_STOP_MARKET option for orders

Fixed

  • Futures API endpoint versions
  • Margin endpoint request methods

v1.0.17 - 2023-02-21

Added

  • RSA key authentication
  • Support for api1-api4 base endpoints
  • binance.us staking endpoints
  • Options ticker by expiration socket
  • Staking endpoints
  • Pay and Convert endpoints
  • Futures index info endpoint
  • Open OCO Orders endpoint
  • Param to pass session params to aiohttp.ClientSession

Updated

  • Some margin endpoint versions
  • Support testnet for more streams

Fixed

  • Indefinite websocket reconnect loop
  • Crash on parsing code from some errors

v1.0.16 - 2022-04-09

Added

  • Pass limit param to all kline functions
  • Increase default for kline functions from 500 to 1000
  • Add HistoricalKlinesType.FUTURES_COIN as option
  • Testnet URL for coin_futures_socket

Updated

  • round_step_size more accurate

Fixed

  • Remove deprecated loop param
  • Websockets unpinned
  • Hanging websockets in exiting state
  • Check start_ts after end_ts for klines
  • Multi assets margin params

v1.0.15 - 2021-09-27

Added

  • Enable/disable margin account for symbol endpoints
  • Top trader long/short positions endpoint
  • Global long/short ratio endpoint

Fixed

  • Fix websockets to 9.1
  • Websocket reconnect updates
  • Fix futures kline sockets

v1.0.14 - 2021-09-08

Fixed

  • Websocket reconnecting

v1.0.13 - 2021-09-08

Added

  • Futures Depth Cache Manager
  • Futures kline websocket stream
  • Coin Futures User websocket stream
  • New Margin endpoints
  • Margin OCO order endpoints
  • Fiat endpoints
  • C2C endpoints
  • Account API permissions endpoint

Fixed

  • Changed asset to coin in withdraw endpoint

v1.0.12 - 2021-06-03

Added

  • Coin futures batch order function

Fixed

  • Threaded websockets on python3.9
  • Filter out None params in request kwargs
  • Deconflict streams with same name on different websocket urls
  • Reduce close timeout on websocket close

v1.0.10 - 2021-05-13

Added

  • Futures multi-asset margin mode endpoints
  • Optional symbol param to get_all_tickers

Fixed

  • start_multiplex_socket remove lower case filter on stream names

v1.0.9 - 2021-05-12

Fixed

  • start_book_ticker_socket and start_multiplex_socket to call correct async function

v1.0.8 - 2021-05-11

Added

  • Old style websocket and depth cache managers as option without asyncio

Fixed

  • Fixed issue with get_historical_klines in Client
  • Remove print debug line

v1.0.7

Fixed

  • Remove version param from get_sub_account_assets

v1.0.6

Fixed

  • Fix time for authenticated stream keepalive

v1.0.5

Fixed

  • Restored access to last response on client

v1.0.4

Added

  • Futures Testnet support
  • Kline type for fetching historical klines

Fixed

  • Spot Testnet websocket URL

v1.0.3

Added

  • Spot Testnet support

v1.0.2

Added

  • Start of typing to client and websockets

Fixed

  • end_str, limit, spot params in kline fetching
  • Drop None values in params passed

v1.0.1

Fixed

  • Restored params for Client and AsyncClient classes

v1.0.0

Added

  • Async support for all REST endpoints
  • USDM and Coin-M Futures websocket streams
  • Websockets use same tld as Client
  • Convert type option for DepthCache

Breaking Changes

  • Supports only py3.6+
  • All wapi calls changed to sapi
  • Websockets have changed to use Asynchronous context managers

Fixed

  • get_historical_klines params

v0.7.11

Added

  • Vanilla Options REST endpoints
  • Vanilla Options websockets
  • Futures order type enums

Updated

  • Websocket keep-alive functions for different socket types
  • Dependencies

Fixed

  • Change to User-Agent to avoid connection issues

v0.7.5 - 2020-02-06

Added

  • Futures REST endpoints
  • Lending REST endpoints
  • OCO Orders function
  • Average Price function get_avg_price
  • Support for other domains (.us, .jp, etc)

Fixed

  • Websocket keepalive callback not found

v0.7.4 - 2019-09-22

Added

  • Symbol book ticker websocket streams
  • Margin websocket stream

Updated

  • Can call Client without any params
  • Make response a property of the Client class

Fixed

  • Issue with None value params causing errors

v0.7.3 - 2019-08-12

Added

  • Sub account endpoints
  • Dust transfer endpoint
  • Asset dividend history endpoint

Removed

  • Deprecated withdraw fee endpoint

v0.7.2 - 2019-08-01

Added

  • Margin trading endpoints

Fixed

  • Depth cache clearing bug

v0.7.1 - 2019-01-23

Added

  • Limit param to DepthCacheManager
  • Limit param to get_historical_klines
  • update_time to DepthCache class

Fixed

  • Super init in Websocket class
  • Removal of request params from signature
  • Empty set issue in aggregate_trade_iter

v0.7.0 - 2018-08-08

Added

  • get_asset_details endpoint
  • get_dust_log endpoint
  • get_trade_fee endpoint
  • Ability for multiple DepthCacheManagers to share a BinanceSocketManager
  • get_historical_klines_generator function
  • Custom socket timeout param for BinanceSocketManager

Updated

  • General dependency version
  • Removed support for python3.3

Fixed

  • Add a super init on BinanceClientProtocol

v0.6.0 - 2018-01-09

Added

  • get_historical_klines function
  • Ability to override requests parameters globally
  • Error on websocket disconnect

v0.5.0 - 2017-12-05

Added

  • Recent trades endpoint
  • Historical trades endpoint
  • Order response type option
  • Check for invalid user stream listen key

v0.1.0 - 2017-08-16

Websocket release

Added

  • Websocket manager
  • Order parameter validation
  • Order and Symbol enums
  • API Endpoints for Data Streams

v0.0.2 - 2017-08-14

Initial version

Added

  • General, Market Data and Account endpoints

On this page