Welcome to CryptoBot Python
CryptoBot Python is an unofficial, friendly client library for the Crypto Bot API. It provides typed models and synchronous/async clients for invoices, transfers, checks, balances, exchange rates, statistics, and webhook handling.
Highlights
Synchronous API client built on
httpxAsync API client built on
httpxDataclass response models (
Invoice,Transfer,Check,Balance,ExchangeRate,Currency,AppStats)Enum safety for assets, statuses, check statuses, and paid button names
Mainnet/testnet support with configurable timeout and retries
Pagination iterators for invoices, transfers, and checks
FastAPI webhook listener with signature verification and optional replay protection
Structured API errors via
CryptoBotError(code,name)
Quick Example
import os
from cryptobot import CryptoBotClient
from cryptobot.models import Asset
client = CryptoBotClient(api_token=os.environ["CRYPTOBOT_API_TOKEN"])
app = client.get_me()
print(app.name)
invoice = client.create_invoice(
asset=Asset.USDT,
amount=5.25,
description="Coffee order #42",
)
print(invoice.invoice_id, invoice.bot_invoice_url)
Contents
User Guide
Production Guides
API Reference