Install from PyPI:
pip install bitstamp-api-client
How to use the public client:
from bitstamp_api.clients.public import PublicApiClient
from bitstamp_api.models.tickers import MarketSymbol
public_api_client = PublicApiClient()
market_ticker = public_api_client.get_market_ticker(MarketSymbol.BTCUSD)
How to use the private client:
from bitstamp_api.clients.private import PrivateApiClient
private_api_client = PrivateApiClient(
key="<bitstamp-api-key>",
secret="<bitstamp-api-secret>",
username="<bitstamp-username>",
)
account_balances = private_api_client.get_account_balances()