Async crypto pay api wrapper for https://t.me/cryptobot
Find a file
2025-07-18 15:32:13 +09:00
.zed Init project 2025-07-17 02:44:45 +09:00
src/async_crypto_pay_api Add UNKNOWN to asset enums v1.2.0 2025-07-18 15:32:13 +09:00
.gitignore Init project 2025-07-17 02:44:45 +09:00
.python-version Release v.1.0.0 2025-07-17 15:31:54 +09:00
LICENSE Init project 2025-07-17 02:44:45 +09:00
pyproject.toml Release v.1.0.0 2025-07-17 15:31:54 +09:00
README.md Add README.md 2025-07-17 15:58:03 +09:00
uv.lock Release v.1.0.0 2025-07-17 15:31:54 +09:00

async-crypto-pay-api

PyPI version Python versions License

Async Crypto Pay API wrapper for Telegram Crypto Bot written in Python 3.10+.

Requirements

  • Python 3.10 or higher
  • Valid Crypto Bot API token (get one here)

Installation

pip install async-crypto-pay-api

Example

from asyncio import run
from async_crypto_pay_api import CryptoPayApi
from async_crypto_pay_api.models import CurrencyType, FiatAsset

crypto = CryptoPayApi("{token}")

async def main() -> None:
    # Context manager handles connection lifecycle
    async with crypto:
        app_info = await crypto.get_me()
        print(app_info.model_dump_json(indent=4))

        # Create payment invoice
        invoice = await crypto.create_invoice(
            currency_type=CurrencyType.FIAT,
            fiat=FiatAsset.USD,
            amount=100,
        )
        print(f"Invoice URL: {invoice.bot_invoice_url}")

run(main())

License

This project is licensed under the GNU Lesser General Public License v3.0 only. See LICENSE for details.

Contributing

Contributions are welcome! Please open an issue or submit a PR for:

  • Bug fixes
  • New features
  • Documentation improvements