A fully typed, validated async client for the Bit2Me API.
- Documentation: https://tribulnation.com/typed/bit2me
- Source Code: https://github.com/tribulnation/typed/tree/main/packages/bit2me
from dotenv import load_dotenv
from typed_bit2me import Bit2Me
load_dotenv()
async with Bit2Me.new() as client:
balances = await client.v1.trading.balance()
print(balances[0].get('currency'), balances[0].get('balance'))
Why Typed Bit2Me?
- 🎯 Precise Types: literal types for order sides, order types, and statuses;
Decimalfor prices and amounts; a fullTypedDictper response. - ✅ Runtime Validation: every REST response and every WebSocket push is validated against its documented schema by default.
- ⚡ Async First: async HTTP plus two independent WebSocket surfaces (the Trading Spot socket for order commands and channel subscriptions, and the account-notifications socket), built for concurrent trading workflows.
- 📚 Full Surface: the complete
v1/v2/v3REST surface (trading, wallet, account, earn, and more), not just tickers.
Installation
pip install typed-bit2me
How To
- Fetch Market Data
- Listen To Streams
- Place & Manage Orders
- Fetch Account Data
- Query & Manage Earn
- Query & Manage Deposits/Withdrawals
Reference
Design Philosophy
Typed Bit2Me 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_bit2me-0.3.0.tar.gz.
File metadata
- Download URL: typed_bit2me-0.3.0.tar.gz
- Upload date:
- Size: 73.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ead9c223e2a89b89d5981b381f83ab815c88b0fa1715f223136d4e591f14477
|
|
| MD5 |
68d7d19dd2c10061cc1e91c0bcd70a42
|
|
| BLAKE2b-256 |
c869d08e0d44ad8df4d908a7cbc9de86aa5d1bb18912cc9d4d8cce9883c08903
|
Provenance
The following attestation bundles were made for typed_bit2me-0.3.0.tar.gz:
Publisher:
release-bit2me.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_bit2me-0.3.0.tar.gz -
Subject digest:
2ead9c223e2a89b89d5981b381f83ab815c88b0fa1715f223136d4e591f14477 - Sigstore transparency entry: 2551111733
- Sigstore integration time:
-
Permalink:
tribulnation/typed@494b5738074bd0e2b85a6d06123d0ef95fe84d96 -
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-bit2me.yml@494b5738074bd0e2b85a6d06123d0ef95fe84d96 -
Trigger Event:
pull_request
-
Statement type:
File details
Details for the file typed_bit2me-0.3.0-py3-none-any.whl.
File metadata
- Download URL: typed_bit2me-0.3.0-py3-none-any.whl
- Upload date:
- Size: 156.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0cc7b4f66355910cb866dd5e6672a7a2ac9697ff5511d9bf93206cca1dc42f7
|
|
| MD5 |
a4f116b9b00bfbb936df8f7d6474de1e
|
|
| BLAKE2b-256 |
6195ea62f17e5db9b8bb4ce653f47c423d93ec36568c92b12c8571eddc7569ee
|
Provenance
The following attestation bundles were made for typed_bit2me-0.3.0-py3-none-any.whl:
Publisher:
release-bit2me.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_bit2me-0.3.0-py3-none-any.whl -
Subject digest:
e0cc7b4f66355910cb866dd5e6672a7a2ac9697ff5511d9bf93206cca1dc42f7 - Sigstore transparency entry: 2551111736
- Sigstore integration time:
-
Permalink:
tribulnation/typed@494b5738074bd0e2b85a6d06123d0ef95fe84d96 -
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-bit2me.yml@494b5738074bd0e2b85a6d06123d0ef95fe84d96 -
Trigger Event:
pull_request
-
Statement type: