Skip to main content

Simple libary for https://t.me/CryptoBot

Project description

CryptoPayAPI

Simple library for https://t.me/CryptoBot

Usage

from CryptoPayAPI.AioCryptoPay import AioCryptoPay
from CryptoPayAPI.types import Asset

import asyncio

async def main():
    #create session
    cryptopay = AioCryptoPay(token="token")

    #get balance wallets
    await cryptopay.get_balance()

    #create invoice
    invoice = await cryptopay.create_invoice(asset=Asset.BTC, amount=10)
    print(invoice.pay_url)

    #get list of inovices
    invoices = await cryptopay.get_invoices(asset=Asset.TON)

    #close session
    await cryptopay.close()

asyncio.run(main())

Docs

The library is fully compatible with the official api - https://help.crypt.bot/crypto-pay-api

Donation

BTC - bc1qltq6d7lzprr9hhpya4pptwj3997gpwkzhulksh ETH - 0x6727e912855A289A340Ba1213E1038AdB0E3CDb9 USDT (TRC20) - TH5JtPd7siwCb4AnHyGniMz52gtysY3zEJ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CryptoPayAPI-0.0.1.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

CryptoPayAPI-0.0.1-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page