Skip to content

DevZ44d/Tonviewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Telegram Owner

πŸš€ Quick Start

from Tonviewer import Wallet, HashTx


def main():
    # Replace with your wallet address
    wallet = Wallet("wallet_address_here")

    # Get wallet info (balance + TON details)
    wallet.info()

    # Example: Get last 3 transactions (default limit = 1)
    wallet.transactions(limit=3)


def get_transaction_by_hash():
    # Pass a transaction hash
    tx = HashTx(
        hashtx="b4566294bb20e0c22c57109f1128b903d4446d12710b3926b48c42cfc60dd097"
    )

    tx.get()  # Prints and returns dict


if __name__ == "__main__":
    main()
    get_transaction_by_hash()

Installation and Development πŸš€

  • Via Git:
pip install  git+https://github.com/DevZ44d/Tonviewer.git
  • Via PyPi:
pip install Tonviewer -U

Tonviewer

  • Tonviewer is a Python library that allows you to fetch real-time data.

  • It enables users to view wallet balances and live coin information and get transactions of Wallet with ease, making it perfect for TON developers, analysts, and bot creators.

✨ Features

  • 🧾 Real-time TON wallet balance fetching.
  • πŸ”Ž Transaction by Hash β†’ Simply pass a transaction hash, it grabs the page via Selenium.
  • πŸ“„ Parse Raw HTML β†’ Already have the page source? Pass it directly.
  • 🟒 Successful TX β†’ Extracts Time, Action, From, To, Paid For, Price, Status, Comment.
  • πŸ”΄ Failed TX β†’ Extracts only the essentials (Time, Action, From, To, Comment, Status).
  • ⚠️ Invalid Hash β†’ Clean error message when the transaction address is not valid.
  • 🧾 Auto JSON Print β†’ Prints a formatted JSON result and returns it as a Python dict.

Using in Terminal πŸš€

Tonviewer -[OPTIONS] "[Wallet]"

Usage πŸ“š

Tonviewer -[OPTIONS] "[FOR-OPTION]"

Options
    -w, --wallet                    Prints balance of wallet .
    -i, --info                      Get wallet info
    -t, --transactions              Get transactions of Wallet . 
    -l, --limit                     Number of times to get transactions .
    -H, --hashtx                    Pass a transaction hash
    -h, --help                      Display help message .
    -v, --version                   Show Version Of Libarary and info .

πŸš€ Usage (Class Terminal)

  • πŸ”ΉGet wallet info:
Tonviewer -w "UQBaCsVw45KDyL8a_JIJeu2VlJazKnz9KBqBirRjKbnuZobG" -i
  • πŸ”ΉGet transactions of Wallet:
Tonviewer -t "UQBaCsVw45KDyL8a_JIJeu2VlJazKnz9KBqBirRjKbnuZobG" -l 3
  • πŸ“¦ Pass a transaction hash:
Tonviewer -H "d04cf57cf372e51704c8c34f8008df397c0a4f1b33bb4008b95e95ce0ba3fbdc"

πŸ“¦ Example format response of Wallet Method:

{
  "Balance": "0.73280244 TON β‰ˆ $0.949",
  "Status": "active",
  "Is Wallet": true,
  "Last Activity": "2026-02-20 01:34:21 AM",
  "NFT Count": 344,
  "Name": "ddddi.t.me",
  "Icon": "https://cache.tonapi.io/imgproxy/wVVaalJBHOeiyU0Tf_bqX1QQjbvEl5oFOS8OvwIV5Do/rs:fill:200:200:1/g:no/aHR0cHM6Ly90Lm1lL2kvdXNlcnBpYy8zMjAvZGRkZGkuanBn.webp"
}

πŸ“¦ Example format response of Transactions Method ,

{
  "transactions": [
    {
      "Time": "24 Jan 01:14 AM",
      "Action": "Sent TON",
      "From": "UQBAZ3qWaaoIC8Pq5ELnz2ofYoGN_E3mhzxhE-8EWTpMYgyc",
      "To": "UQCFJEP4WZ_mpdo0_kMEmsTgvrMHG7K_tWY16pQhKHwoOtFz",
      "Paid For": "245 Telegram Stars",
      "Price": "-2.401 TON β‰ˆ 2.98432 $",
      "Limit": "1"
    }
  ],
  "skipped": "Skipped 0 NFT Transactions"
}

πŸ“¦ Example Output of HashTx Method (NFT,BID,TON,AUCTION) .

βœ… Successful Transaction :

{
  "actions": [
    {
      "Time": "2024-01-28 08:37:32 PM",
      "Action": "SUCCESSFUL TON TRANSFER",
      "From": "UQC7Ptcp7G1IhS2t__alZVlPQF7TtXk7XgsLf-wCBbHMboYF",
      "To": "UQAh_cfG6nAD8EazS3dED8mtQo3bmeGn6nMM8TAZ-9h50k1D",
      "Price": "βˆ’19.994 TON β‰ˆ 24.95213 $",
      "Status": "SUCCESS"
    }
  ]
}

❌ Failed Transaction:

{
  "actions": [
    {
      "Time": "2024-01-28 08:37:32 PM",
      "Action": "FAILED AUCTION BID",
      "From": "UQAh_cfG6nAD8EazS3dED8mtQo3bmeGn6nMM8TAZ-9h50k1D",
      "To": "UQC7Ptcp7G1IhS2t__alZVlPQF7TtXk7XgsLf-wCBbHMboYF",
      "Price": "20.000 TON β‰ˆ 24.96000 $",
      "Status": "FAILED"
    }
  ]
}

⚠️ Invalid Hash:

{
  "Error": "This doesn't look like a valid transaction address. Where'd you get that?"
}

πŸ’¬ Help & Support .

About

Tonviewer is a Python library that allows you to fetch real-time data.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages