Skip to main content

CryptoPayAPI

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

Installation

$ pip install CryptoPayAPI

Usage

Asynchronous

from CryptoPayAPI.AioCryptoPay import AioCryptoPay
from CryptoPayAPI.types.asset import USDT

import asyncio

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

    await cryptopay.get_balance()

    invoice = await cryptopay.create_invoice(amount=1, asset=USDT)
    print(invoice.bot_invoice_url)

    await cryptopay.close()

asyncio.run(main())

Synchronous

from CryptoPayAPI.CryptoPay import CryptoPay
from CryptoPayAPI.types.asset import BTC

# create session
cryptopay = CryptoPay(
    token="token"
)

cryptopay.get_balance()

invoice = cryptopay.create_invoice(amount=0.3, asset=BTC)
print(invoice.bot_invoice_url)

Docs

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

Release files for CryptoPayAPI 1.4.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CryptoPayAPI 1.4.8
File Size Uploaded
CryptoPayAPI-1.4.8.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CryptoPayAPI 1.4.8
File Interpreter ABI Platform
CryptoPayAPI-1.4.8-py3-none-any.whl Python 3 none any Details

Total release size: 27.3 kB

Release files / CryptoPayAPI-1.4.8.tar.gz

Download URL CryptoPayAPI-1.4.8.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d15b2c13ea4e4e5e66d81b610521e1cee6d710cc4cb7104f83c0e1981f14f06f
BLAKE2b-256 checksum
How to use checksums
0ba54955a16f0ee35491107cfa91f1e97e7f6355caa4d1ae2faed71c2e3c1fd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.6

Release files / CryptoPayAPI-1.4.8-py3-none-any.whl

Download URL CryptoPayAPI-1.4.8-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5d057d73a9a51270b38dac93087a9703f14c6627491e60a6064106acc6268ab
BLAKE2b-256 checksum
How to use checksums
92b96f9fa11a9475ced80609f66034b7a4918e3e53cd0301b6be2c2a5c6e0d8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.6

Release history Release notifications | RSS feed

This release

1.4.8 This release

2 release files

1.4.7

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page