Библиотека для удобного использования 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.getAmountByFiat(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.3.tar.gz
(6.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file TeleCryptoBot-1.3.tar.gz.
File metadata
- Download URL: TeleCryptoBot-1.3.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd6d39307bb7fa49976af58c81e10884224fac5e086f1881a319625725ac22d2
|
|
| MD5 |
9b90c8707d921a37f61d023bbb0bf2b3
|
|
| BLAKE2b-256 |
1aa0b156953f5d738f22ab5309316790688ea6d13a3e5be247c0de0b33115282
|
File details
Details for the file TeleCryptoBot-1.3-py3-none-any.whl.
File metadata
- Download URL: TeleCryptoBot-1.3-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b14314bbb613b8bd0ea89bc46a59f838ce257e19a4fa80773e14011c99c028ca
|
|
| MD5 |
2f8d313b6433e55af428d9e483446da0
|
|
| BLAKE2b-256 |
ab58d0032bd6f7ea6b5400597143bf1649a19ec987397994f1413a347c31f540
|