Skip to main content

Tonviewer is a Python library that allows you to fetch ( real-time balance of wallet , transactions , price ) data without needing any APIs.

Project description

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 .

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

tonviewer-1.1.5.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tonviewer-1.1.5-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file tonviewer-1.1.5.tar.gz.

File metadata

  • Download URL: tonviewer-1.1.5.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for tonviewer-1.1.5.tar.gz
Algorithm Hash digest
SHA256 66c1134a234331d8e6b312e64dbc9e0d6f1f2e4a1bbd943ee9271a9b11ca9d90
MD5 11983174c4495d867424f3e90afcf9e6
BLAKE2b-256 89023483c62f580534e58ea4f39550c3bc89e61fc5e52ec5b8d93d140d5e3b95

See more details on using hashes here.

File details

Details for the file tonviewer-1.1.5-py3-none-any.whl.

File metadata

  • Download URL: tonviewer-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for tonviewer-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d26879319d750d94cac435a26252d467bf7c212f7b77e4bac9d9886d89597363
MD5 2ac976139bef4bc645a7eef8f6d7be96
BLAKE2b-256 2b05013b757099231ad8d75872266420131d03fcf196cbb0f21468178eccd2e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page