Skip to content

This Python script sets up a Telegram bot that allows users to fetch the latest transaction for a given wallet address on various blockchain networks (Ethereum, Binance Smart Chain, Polygon, Avalanche, Arbitrum, Optimism, and Fantom). The bot uses the respective blockchain explorers' APIs to retrieve the transaction data.

License

Notifications You must be signed in to change notification settings

fd2013/multichain_wallets_tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Multichain Wallets Tracker Bot

This Python script sets up a Telegram bot that allows users to fetch the latest transaction for a given wallet address on various blockchain networks (Ethereum, Binance Smart Chain, Polygon, Avalanche, Arbitrum, Optimism, and Fantom). The bot uses the respective blockchain explorers' APIs to retrieve the transaction data.

Supported Networks

  • Ethereum
  • Binance Smart Chain
  • Polygon
  • Avalanche
  • Arbitrum
  • Optimism
  • Fantom

Prerequisites

  • Python 3.7+
  • Telegram Bot Token
  • API keys from blockchain explorers

Getting a Telegram Bot Token

  1. Open Telegram and search for @BotFather
  2. Send /newbot command
  3. Follow prompts to set:
    • Bot name (display name)
    • Bot username (must end in 'bot')
  4. BotFather will provide a token like: 123456789:ABCdefGHIjklmNOPQrstUVwxyz
  5. Keep this token secure - it provides full control of your bot

Installation

pip install python-telegram-bot aiohttp

Configuration

  1. Create a Telegram bot via BotFather
  2. Obtain API keys from blockchain explorers:
  3. Update API keys in the script

Usage

  1. Start the bot:
python telegram-wallets-tracker-bot.py
  1. Telegram Commands:
  • /start - Welcome message
  • /tx <network> <address> - Get latest transaction

Example:

/tx ethereum 0x742d35Cc6634C0532925a3b844Bc454e4438f44e

Error Handling

  • Invalid network names
  • Invalid addresses
  • API rate limits
  • Network connection issues

License

MIT

About

This Python script sets up a Telegram bot that allows users to fetch the latest transaction for a given wallet address on various blockchain networks (Ethereum, Binance Smart Chain, Polygon, Avalanche, Arbitrum, Optimism, and Fantom). The bot uses the respective blockchain explorers' APIs to retrieve the transaction data.

Topics

Resources

License

Stars

Watchers

Forks

Languages