--- id: python-binance version: "1.0.37" license: MIT license_treatment: permissive maintenance: active --- # python-binance — Binance REST API python implementation License: permissive · Maintenance: active · Downloads: 629.2K/mo ## What it is and what it does python-binance is an unofficial client library that wraps Binance's REST API v3, letting you automate trading, fetch market data, and manage account operations programmatically. It supports both synchronous and asynchronous workflows, with built-in handling for authentication (including RSA and EDDSA keys), timestamp generation, and response exceptions. The library covers spot trading, futures, margin trading, and portfolio margin, plus websocket streams for real-time price and order updates with automatic reconnection and multiplexing. The package includes convenience features like historical kline fetching, deposit/withdrawal management, depth cache management, and proxy support. It provides threaded managers for websocket connections and depth caching, reducing boilerplate for common patterns. Version 1.0.20 or higher is recommended due to endpoint deprecations in earlier releases. Use it for: - Automate spot or futures trading strategies by placing orders, checking balances, and monitoring fills programmatically. - Fetch historical candlestick (kline) data for backtesting or technical analysis across any date range. - Subscribe to real-time market depth and price streams via websockets for live trading dashboards or alerts. - Manage deposits and withdrawals, query transaction history, and handle account operations without the web UI. - Build trading bots using async/await for concurrent order management and low-latency websocket CRUD operations. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Unofficial Python wrapper for the Binance exchange REST API v3, supporting spot trading, futures, margin trading, and real-time websocket streams with both synchronous and asynchronous interfaces. Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It covers the full Binance API surface with both sync and async support, making it the standard choice for Python-based Binance automation. Install it if you need to programmatically trade or fetch data from Binance. ## Install pip install python-binance uv add python-binance poetry add python-binance ## Installing python-binance Before you install: Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release (67 days ago) and 7197 GitHub stars. Depends on six common libraries (requests, aiohttp, websockets, pycryptodome, dateparser) with no compiled dependencies. License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects. Quickstart: pip install python-binance from binance import Client client = Client(api_key='your_key', api_secret='your_secret') depth = client.get_order_book(symbol='BNBBTC') prices = client.get_all_tickers() Requires a Binance account and API key with appropriate permissions; testnet mode available via testnet=True parameter. Verify before relying: - Whether the package maintains backward compatibility across Python 3.5–3.12 or if older versions are no longer tested. - Current status of Vanilla Options endpoints (described as deprecated in the excerpt). - Performance characteristics of orjson support and when it is automatically used. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 629.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags binance api python wrapper, cryptocurrency trading automation, binance spot futures trading, real-time crypto market data, binance websocket streams, async binance client, crypto exchange rest api, trading-api, cryptocurrency, websockets [View on SkillFed](https://skillfed.io/packages/python-binance) · [View on PyPI](https://pypi.org/project/python-binance/)