AioCrypto

Async Crypto API for humans


License
Apache-2.0
Install
pip install AioCrypto==1.0.71

Documentation

AioCrypto

Telegram Crypto PyPi Package Version Downloads Supported python versions Crypto API Github issues APACHE2 License

AioCrypto is a fairly simple and convenient library for working with the Crypto API, written in Python 3.8 with asyncio and aiohttp.

Examples

📚 Click to see some basic examples

Few steps before getting started...

  • Install latest stable version of aiocrypto, simply running pip install AioCrypto

- Get me

from aiocrypto import CryptoApi

async def main():
    app = CryptoApi(token='12345:AaSvhiRsAHazxVB91KIB1dwia0OkmN')
    print(await app.get_me()) # App(app_id=12345, name='Magni..

- Get Balance

from aiocrypto import CryptoApi

async def main():
    app = CryptoApi(token='12345:AaSvhiRsAHazxVB91KIB1dwia0OkmN')
    balances = await app.get_balance()
    print(balances) # List[Balance(...), Balance(...)]
    # print(balances[0]) Balance(currency_code='BTC', available=1.027)

- Create Invoice

from aiocrypto import CryptoApi

async def main():
    app = CryptoApi(token='12345:AaSvhiRsAHazxVB91KIB1dwia0OkmN')
    invoice = await app.create_invoice(asset="ETH", amount="0.023")
    print(invoice) 
    # {'invoice_id': 229875, 'status': 'active', ...}

Moar!

You can find more examples in examples/ directory

Official AioCrypto resources