Block Info
Overview
| Tool | Function | Use Case |
|---|---|---|
| getLatestBlock | Latest block | Block number, hash, size, timestamp, witness, tx count |
| getBlocks | Block list | Pagination, sort, filter by producer/time |
| getBlockStatistic | Block statistics | 24h payment total, block count, burn total |
Use Cases
- Latest Block: Use
getLatestBlockfor current block number, hash, size, timestamp, witness, tx count. - Block Reward: Reward info can be derived from block data or chain params; block list gives block-level data.
- Block Time / Producer: Use
getLatestBlockorgetBlocksfor timestamp and witness (producer). - Burned TRX: Use
getBlockStatisticfor 24h burn total; per-block burn may be in block payload. - Resource Consumption: Block-level resource use is reflected in block size and tx count; use
getBlockStatisticfor aggregates. - Transaction Count: Use
getLatestBlockfor tx count in latest block; usegetBlocksfor multiple blocks. - Network Load: Combine
getLatestBlock,getBlocks, andgetBlockStatisticfor real-time load view.
MCP Server
- Prerequisite: TronScan MCP Guide
Tools
getLatestBlock
- API:
getLatestBlock— Calls/api/block/latest; returns latest solidified block (number, hash, size, timestamp, witness, tx count) - Use when: User asks for "latest block", "current block", or "block height".
- Response: number, hash, size, timestamp, witness, tx count, etc.
- Note:
/api/block/latestdoes not returnwitnessName,fee,energyUsage,blockReward,voteReward,confirmations,netUsage. These may appear as 0 or null in the response—ignore them. For witness name, block reward, fees, or resource usage, usegetBlocksinstead.
getBlocks
- API:
getBlocks— Get block list with pagination, sort, filter by producer/time range - Use when: User asks for "recent blocks", "blocks by producer", or "blocks in time range".
- Input: limit, sort (e.g.
-number), optional producer address, start/end time.
getBlockStatistic
- API:
getBlockStatistic— Get block statistics (24h payment total, block count, burn total) - Use when: User asks for "block stats", "24h blocks", or "burned TRX".
- Response: 24h payment, block count, burn total, and related aggregates.
Troubleshooting
- MCP connection failed: If you see "Connection refused", verify TronScan MCP is connected in Settings > Extensions.
- API rate limit / 429: TronScan API has call count and frequency limits when no API key is used. If you encounter rate limiting or 429 errors, go to TronScan Developer API to apply for an API key, then add it to your MCP configuration and retry.
Notes
- For "block reward", combine block data with
getChainParameters(Witness category) if reward rules are needed. - Real-time monitoring: poll
getLatestBlockand/orgetBlockStatisticfor load and burn. getLatestBlockmay return 0/null forwitnessName,blockReward,voteReward,fee,energyUsage,netUsage,confirmations(underlying/api/block/latestdoes not provide them); usegetBlockswhen these fields are needed.