Python binance API wrapper
Project description
This is an asynchronous Python wrapper for Binance exchange API.
Features
- Implementation of all general, market, spot and websocket endpoints
- Easy to contribute and use
- Fully typed
Installation
pip install -U binance4py
Quick Start
import asyncio
from binance4py import Binance
async def handle_kline(k):
print(k)
async def main():
client = Binance("<API_KEY>", "<API_SECRET>")
async with client:
print(await client.general.server_time())
await client.ws.start()
await client.ws.kline(handle_kline, "btcbusd", "1m")
print(await client.ws.subscriptions())
await client.ws.wait_stop()
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
binance4py-1.0.0rc1.tar.gz
(9.5 kB
view hashes)
Built Distribution
Close
Hashes for binance4py-1.0.0rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1332a13f64a001a19fbacaf242e2528d9d93351f1fbdfc0a8b9579e3d73e9e5 |
|
MD5 | f566a5c11d608a2447dc4b09ff8e9fd3 |
|
BLAKE2b-256 | 6111059097088499ecac4a256e238a7423ad02d8a1bf16d6a167e2258766c8dc |