A fully typed, validated async client for the Binance API.
- Documentation: https://tribulnation.com/typed/binance
- Source Code: https://github.com/tribulnation/typed/tree/main/packages/binance
from typed_binance import Binance
async with Binance.new(public=True) as client:
price = await client.spot.http.market.ticker_price(symbol='BTCUSDT')
print(price)
Why Typed Binance?
- 🎯 Precise Types: every spot, USD-M futures, COIN-M futures, options, and portfolio margin parameter and response is a precise Python type, not
dict/Any. - ✅ Runtime Validation: every response is validated against its schema by default, not just typed on paper.
- ⚡ Async First: async HTTP requests and WebSocket market-data streams, built for concurrent workflows across every product line.
- 📚 Full Surface: every documented spot, futures, options, and portfolio margin endpoint, not just the popular ones.
Installation
pip install typed-binance
How To
- Fetch Market Data — public prices, order books, and candles
- Listen To Streams — subscribe to market data and account event streams
- Place & Manage Orders — submit, query, cancel, and list spot orders
- Fetch Account Data — balances, positions, and trade history
- Query & Manage Earn Instruments — Simple Earn products, positions, subscribe, and redeem
- Manage Deposits & Withdrawals — deposit addresses/history and withdrawals
- Paginate Through Results — walk a time range across multiple pages
Reference
Design Philosophy
Typed Binance follows the principles outlined in this blog post.
Details matter. Developer experience matters.
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file typed_binance-1.0.0.tar.gz.
File metadata
- Download URL: typed_binance-1.0.0.tar.gz
- Upload date:
- Size: 461.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bb0146c0399c667bb6e0a48f058217597157cf9194fdc9bebf9698c11456bba
|
|
| MD5 |
e02fba76c866ddfc29769ce4e526052a
|
|
| BLAKE2b-256 |
696891f5bf75cebe8e4151ca5b906f047225967cdc278fef30fab11c73c1e7d5
|
Provenance
The following attestation bundles were made for typed_binance-1.0.0.tar.gz:
Publisher:
release-binance.yml on tribulnation/typed
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
typed_binance-1.0.0.tar.gz -
Subject digest:
8bb0146c0399c667bb6e0a48f058217597157cf9194fdc9bebf9698c11456bba - Sigstore transparency entry: 2535948366
- Sigstore integration time:
-
Permalink:
tribulnation/typed@6b40703285d3fdbf67a11fdee77f208eaeee7bcd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tribulnation
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-binance.yml@6b40703285d3fdbf67a11fdee77f208eaeee7bcd -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file typed_binance-1.0.0-py3-none-any.whl.
File metadata
- Download URL: typed_binance-1.0.0-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4416286b6eab5c90bf80e7ec7316cbcab2f7437ff730764823a3d02e17aa2c15
|
|
| MD5 |
d707caf034fb70322f8335c547cbf0d5
|
|
| BLAKE2b-256 |
3cc196800ea4f37847dcb2006fa49ea6b730fa4f0e235ff55821b9c609f8d0e1
|
Provenance
The following attestation bundles were made for typed_binance-1.0.0-py3-none-any.whl:
Publisher:
release-binance.yml on tribulnation/typed
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
typed_binance-1.0.0-py3-none-any.whl -
Subject digest:
4416286b6eab5c90bf80e7ec7316cbcab2f7437ff730764823a3d02e17aa2c15 - Sigstore transparency entry: 2535949132
- Sigstore integration time:
-
Permalink:
tribulnation/typed@6b40703285d3fdbf67a11fdee77f208eaeee7bcd -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tribulnation
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-binance.yml@6b40703285d3fdbf67a11fdee77f208eaeee7bcd -
Trigger Event:
pull_request
-
Statement type: