Getting Started
This guide gets you from installation to your first public and authenticated Bit2Me requests.
Install The Package
Make A Public Request
For public-only market data, use Bit2Me.public():
from bit2me import Bit2Me
async with Bit2Me.public() as client:
tickers = await client.v2.trading.tickers(symbol='BTC/EUR')
print(tickers[0]['close'])
Make An Authenticated Request
Once your credentials are configured, you can call private endpoints:
from bit2me import Bit2Me
async with Bit2Me.new() as client:
balances = await client.v1.trading.balance()
print(balances[0]['balance'])
Context Manager Pattern
Use async with so HTTP sessions open and close cleanly:
See Reference > Async Usage for the recommended lifecycle pattern.
Next Steps
- Go to API Keys Setup if you have not configured credentials yet
- Read API Overview to understand the versioned router structure
- Browse How To for common workflows