npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tronscanteam/cli

v1.1.9

Published

TronScan API CLI tool - 86 query commands for TRON blockchain data

Readme

TronScan CLI

A CLI tool built on TronScan API. Besides the global setup command, it implements 86 ts <command> query subcommands: tokens, search, overview, blocks, accounts, governance, transactions, statistics, contracts, security, deep analysis, stablecoins, and raw api access.

Install

Install from npm

npm install -g @tronscanteam/cli

This registers the global command ts for use in any directory. Run ts setup to configure your API Key, and ts help to see all commands.

API Key:

Get your API Key: https://docs.tronscan.org/zh/api/api-keys

ts setup YOUR_API_KEY    # replace with your actual API Key

Upgrade and uninstall

npm update -g @tronscanteam/cli
npm uninstall -g @tronscanteam/cli

Quick Start

After installation, run queries with these commands:

ts --version
ts help
ts tps --raw
ts block --raw
ts token usdt --raw

Expected behavior:

  • ts --version prints the installed CLI version.
  • ts help lists available commands and global options.
  • Query commands return JSON data from TronScan API.
  • Use --raw or --json for one-line JSON that is easier to parse in scripts.

Usage

In the terminal

After installing ts globally, run commands directly:

ts help                         # list all subcommands
ts token-price trx              # token price by symbol
ts token usdt                   # token info
ts search usdt                  # search
ts block                        # latest block
ts tps                          # current TPS
ts account TXxx...              # account details
ts tx af949...                  # transaction by hash
ts transfer-trc20 TXxx...       # TRC20 transfers
ts security-account TXxx...     # account risk check

Machine-readable output

All query commands print JSON. By default, the JSON is formatted for reading. Use --raw or --json for compact one-line JSON:

ts tps --raw
ts account TXxx... --json

Notes for scripts and AI agents:

  • Prefer --raw or --json.
  • Do not parse colorized or human-facing error text from stderr.
  • Business fields come from TronScan API responses and can differ by endpoint.
  • Pagination options are --start N and --limit N; defaults are 0 and 20.

Exit codes

| Code | Meaning | Suggested handling | |---:|---|---| | 0 | Success | Continue. | | 1 | Unknown command or runtime error (including non-JSON API bodies) | Stop and show the error. | | 2 | Invalid argument or missing API Key | Fix command arguments or run ts setup. | | 3 | Network request failed | Check network connectivity and retry later. | | 4 | HTTP/API request failed | Check API Key, endpoint, parameters, or rate limits. |

Safety model

TronScan CLI is a read-only data query tool for TronScan API. It does not manage wallets, read private keys, sign messages, broadcast transactions, or submit transactions.

Troubleshooting

| Symptom | Fix | |---|---| | 未找到 API Key | Run ts setup YOUR_API_KEY or set TRONSCAN_API_KEY in the environment. | | HTTP 401/403 | Check whether the API Key is valid. | | HTTP 429 | Reduce request rate and retry later. | | HTTP 404 | Check the command arguments or API path. | | Network request failed | Check local network connectivity. |

Dependencies

Command Categories

| Category | Count | Commands | Scope | |----------|-------|----------|-------| | Token | 5 | tokentoken-holderstoken-pricetoken-listtoken-distribution | Token details, holders, prices, rankings, and position distribution. | | Search | 2 | searchhot-token | Keyword search and hot token rankings. | | Overview | 3 | tpsoverviewnodes | Network TPS, overview data, and node information. | | Block | 1 | block | Latest block or a block by number. | | Account | 10 | accountaccount-listaccount-tokensaccount-resourceaccount-resource-v1account-approveaccount-votesaccount-analysisaccount-assetaccount-projects | Account details, rankings, holdings, resources, approvals, votes, analysis, assets, and participated projects. | | Super Representative | 4 | srsr-votesparamsproposal | SR lists, voting details, chain parameters, and proposals. | | Transaction | 10 | txtx-listtx-statstransfertransfer-statstransfer-trc20transfer-trc20-contracttransfer-trc1155transfer-trc721internal-tx | Transaction details, lists, statistics, transfers, and internal transactions. | | Statistics | 20 | trx-supplytrx-turnoverprotocol-revenueburn-revenuestake-revenuetx-trendtx-totalactive-accountsnew-accountsdefi-tvltop10trx-priceenergy-dailyenergy-distenergy-costbandwidth-dailytrigger-statstoken-tvctoken-analysistoken-transfer-analysis | Supply, revenue, transactions, accounts, DeFi TVL, rankings, price, energy, bandwidth, contract triggers, and token analytics. | | Contract | 9 | contractcontract-listcontract-callerscontract-energycontract-daily-callerscontract-daily-callscontract-analysiscontract-all-callerscontract-triggers | Contract details, lists, callers, energy usage, daily activity, analysis, and trigger transactions. | | Security | 6 | security-accountsecurity-tokensecurity-urlsecurity-txsecurity-authsecurity-sign | Risk checks for accounts, tokens, URLs, transactions, approvals, and multisig settings. | | Deep Analysis | 4 | deep-relateddeep-flowdeep-big-txdeep-token-transfer | Related accounts, fund flow, large transactions, and token transfer counts. | | Stablecoin | 11 | stable-holdersstable-changestable-topstable-big-txstable-eventsstable-diststable-liquiditystable-poolstable-pool-trendstable-pool-changestable-tvl | Stablecoin holders, whale rankings, large transactions, events, distribution, liquidity, pools, and TVL. | | Other | 1 | api | Call a TronScan API path directly. |

API Reference

See api-reference.md for the complete API endpoint list.

License

MIT