Telegram Wallet API
Project description
Telegram Wallet API
Unofficial library for managing your personal Wallet account
Table Of Contents
About The Project
Send and receive tokens | Trade on P2P Market
Built With
To obtain an authorization token, the "selenium" library is used. Working with the API is implemented using "requests"
Getting Started
pip install pyTelegramWalletApi
Example
import time
from wallet import Client, Wallet
# singin/singup to tg account
c = Client(profile='main')
# get wallet auth token
auth_token = c.get_token()
w = Wallet(auth_token)
ton_balance = w.get_user_balance('TON')['available_balance']
print(f'[*] Balance: {ton_balance} TON')
tx_id = w.send_to_address(0.01, 'TON', 'EQA5IHeHWX9BkTsI71ECzuD-HeYL-br36UmFoTWZFihU3fLz')['transaction_id']
tx_link = None
status = ''
# wait tx in block
while tx_link is None:
details = w.get_transaction_details(tx_id)
tx_link = details["transaction_link"]
status = details['status']
time.sleep(2)
print(f'[*] Tx status: {status} | {tx_link}')
""" Logs
[*] Starting parse wallet authorization token...
[*] Token find: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpX....
[*] Balance: 100 TON
[*] Tx status: success | https://tonscan.org/tx/....
"""
Realised methods
Wallet Account Methods:
- send_to_address()
- get_user_balance()
- get_transaction_details()
- get_transactions()
- get_rate()
Wallet P2P Methods:
- get_p2p_market()
- create_p2p_offer()
- edit_p2p_offer()
- get_p2p_offer()
- get_own_p2p_offer_by_id()
- get_user_p2p_payment()
- get_user_p2p_order_history()
- get_own_p2p_offer()
- get_own_p2p_offers()
- enable_p2p_bidding()
- disable_p2p_bidding()
- p2p_offer_activate()
- p2p_offer_deactivate()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for pyTelegramWalletApi-0.2.17.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59d07b5ad3eb6ee24885b4b4c3bf995c45ee9c6f24bc6de40731f6336ecec622 |
|
MD5 | 5262350d98b2a10770b6a5b64a03696a |
|
BLAKE2b-256 | 9073d33bba94326e1c208cf5f990d712b7b554114fb80bf72e000df7d251a782 |