Библиотека для удобного использования API CryptoPay
Project description
Module CryptoBot API(non-official)
Docs: https://help.crypt.bot/crypto-pay-api
Install
pip install TeleCryptoBot
Basic Methods
import TeleCryptoBot
crypto = TeleCryptoBot.TeleCryptoBot("0000:qwertyuiop")
info_profile = crypto.getMe()
balance = crypto.getBalance()
print(info_profile, balance, sep='\n')
Create and Delete Invoice
import TeleCryptoBot
crypto = TeleCryptoBot.TeleCryptoBot("0000:qwertyuiop")
#create invoice
invoice = crypto.createInvoice(asset="USDT", amount=1.0)
print(invoice.invoice_id)
# delete invoice
delete = crypto.deleteInvoice(invoice_id=invoice.invoice_id)
Create and Delete Check
import TeleCryptoBot
crypto = TeleCryptoBot.TeleCryptoBot("0000:qwertyuiop")
#create invoice
check = crypto.createCheck(asset="USDT", amount=1.0, pin_to_username="durov")
print(check.check_id)
# delete invoice
delete = crypto.deleteCheck(check_id.check.check_id)
Get Amount By Fiat
import TeleCryptoBot
crypto = TeleCryptoBot.TeleCryptoBot("0000:qwertyuiop")
# Get amount in crypto by fiat summ
amount = crypto.getAmounByFiat(summ=13, asset='TON', target='USD')
invoice = crypto.createInvoice(asset='TON', amount=amount)
print(invoice.bot_invoice_url)
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
TeleCryptoBot-1.1.1.tar.gz
(6.0 kB
view details)
File details
Details for the file TeleCryptoBot-1.1.1.tar.gz.
File metadata
- Download URL: TeleCryptoBot-1.1.1.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
453b006a8321cb2f8b1ded4e81923977f289f55e7c94539e437d519cbfd873cd
|
|
| MD5 |
93b2d19a8cafb26d568d57a3f4371448
|
|
| BLAKE2b-256 |
178f9eb91ea78c21d247d08f917002c6a42338c06f1aa308d277b4f65c22298c
|