Skip to main content

@cryptobot api asynchronous python wrapper

Project description

@cryptobot asynchronous api wrapper

Docs: https://help.crypt.bot/crypto-pay-api

Basic methods

from aiocryptopay import AioCryptoPay, Networks

api = AioCryptoPay(token='1337:JHigdsaASq', network=Networks.MAIN_NET)

profile = await api.get_me()
currencies = await api.get_currencies()
balance = await api.get_balance()
rates = await api.get_exchange_rates()

print(profile, currencies, balance, rates, sep='\n')

Create and get invoice methods

from aiocryptopay import AioCryptoPay, Networks

api = AioCryptoPay(token='1337:JHigdsaASq', network=Networks.MAIN_NET)

invoice = await api.create_invoice(asset='TON', amount=1.5)
print(invoice.pay_url)

invoices = await api.get_invoices(invoice_ids=invoice.invoice_id)
print(invoices.status)

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

aiocryptopay-0.1.0.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

aiocryptopay-0.1.0-py3-none-any.whl (9.2 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