pip install -r requirements.txt
from telethon import TelegramClient
from auto_tonnel import AutoTonnel
client = TelegramClient('AutoTonnel', api_id, api_hash)
client.start()
tonnel = AutoTonnel(client)
gifts = await tonnel.get_gifts(limit=30,
gift_name="Top Hat",
backdrops=["ALL!"],
models=["Pixel Perfect"],
symbols=["ALL!"],
asset="TON")
print(gifts)
buy = await tonnel.buy_gift(gift_id=1488, price=100, asset="TON") # Gift ID and price are retrieved from get_gifts()
premarket = await tonnel.buy_gift(gift_id=1337, price=69, asset="TON", premarket=True) # If the gift is from premarket
print(buy, premarket)
Note: API prices do not include fees. The final cost is approximately 10% higher.
info = await tonnel.get_info()
print(info)