Realtime Network Data
Overview
| Tool | Function | Use Case |
|---|
| getLatestBlock | Latest solidified block | Solidified block height, hash, timestamp, witness, tx count |
| getCurrentTps |
TPS & height | Current TPS, latest block height, historical max TPS |
| getHomepageData | Homepage summary | TPS, node count, chain overview, TVL, frozen |
| getNodeMap | Node map | Real-time node info and geographic distribution |
| getWitnessGeneralInfo | Witness aggregate | Total vote count, block stats, witness count |
| getTransactionStatistics | Tx statistics | Total tx count, token tx volume aggregates |
Use Cases
- 1. Latest solidified block / confirmed block height: Use
getLatestBlock for solidified block (not chain-head latest); use getCurrentTps for latest block height. - Real-time TPS: Use
getCurrentTps for current TPS; use getHomepageData for overview TPS. - Real-time node count: Use
getHomepageData for node count; use getNodeMap for node list and distribution. - Latest TVL: Use
getHomepageData for latest TVL in homepage overview. - Total transaction count: Use
getTransactionStatistics for total tx count and token tx volume. - Real-time vote count: Use
getWitnessGeneralInfo for total vote count and witness stats.
MCP Server
Tools
getLatestBlock
- - API:
getLatestBlock — Calls /api/block/latest; returns latest solidified block (number, hash, size, timestamp, witness, tx count). Note: Returns solidified block, not the chain-head latest block. - Use when: User asks for "confirmed block", "solidified block height", or needs a stable block number. If user asks "latest block height" or "current block", clarify that the response is the solidified block and may lag behind the chain head.
- Response: number (block height), hash, size, timestamp, witness, tx count, etc.
- Note: Fields such as
witnessName, fee, energyUsage, blockReward, voteReward, confirmations, netUsage may be 0 or null (underlying API does not return them)—ignore them. Use tronscan-block-info getBlocks when these fields are needed.
getCurrentTps
- - API:
getCurrentTps — Get current TPS, latest block height, and historical max TPS - Use when: User asks for "real-time TPS", "current TPS", "throughput", or "latest block height".
- Response: currentTps, latest block height, historical max TPS.
getHomepageData
- - API:
getHomepageData — Get homepage data (TPS, node count, overview, frozen, TVL, etc.) - Use when: User asks for "network overview", "node count", "TVL", or "homepage stats".
- Response: TPS, node count, chain overview, frozen resources, TVL, etc.
getNodeMap
- - API:
getNodeMap — Get current node info and geographic distribution - Use when: User asks for "node count", "node distribution", or "node map".
- Response: Current node info and geographic distribution.
getWitnessGeneralInfo
- - API:
getWitnessGeneralInfo — Get witness aggregate stats (total votes, block stats, witness count) - Use when: User asks for "real-time vote count", "total votes", or "witness stats".
- Response: Total vote count, block stats, witness count.
getTransactionStatistics
- - API:
getTransactionStatistics — Get transaction statistics (total tx, token tx volume, etc.) - Use when: User asks for "total transaction count" or "tx volume".
- Response: Total tx count, token tx volume, and other 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 a single "real-time network" dashboard, prefer
getHomepageData first (covers TPS, nodes, TVL); then add getCurrentTps for precise TPS/height, getWitnessGeneralInfo for votes, and getTransactionStatistics for total tx count. - All tools are invoked via TronScan MCP
tools/call with the tool name and required arguments. - INLINECODE29 may return 0/null for
witnessName, blockReward, voteReward, fee, energyUsage, netUsage, confirmations; use tronscan-block-info getBlocks when these fields are needed.
实时网络数据
概述
| 工具 | 功能 | 使用场景 |
|---|
| getLatestBlock | 最新固化区块 | 固化区块高度、哈希、时间戳、见证人、交易数量 |
| getCurrentTps |
TPS与高度 | 当前TPS、最新区块高度、历史最高TPS |
| getHomepageData | 首页摘要 | TPS、节点数、链概览、TVL、冻结 |
| getNodeMap | 节点地图 | 实时节点信息与地理分布 |
| getWitnessGeneralInfo | 见证人汇总 | 总投票数、区块统计、见证人数量 |
| getTransactionStatistics | 交易统计 | 总交易数、代币交易量汇总 |
使用场景
- 1. 最新固化区块/已确认区块高度:使用getLatestBlock获取固化区块(非链头最新区块);使用getCurrentTps获取最新区块高度。
- 实时TPS:使用getCurrentTps获取当前TPS;使用getHomepageData获取概览TPS。
- 实时节点数:使用getHomepageData获取节点数;使用getNodeMap获取节点列表与分布。
- 最新TVL:使用getHomepageData获取首页概览中的最新TVL。
- 总交易数:使用getTransactionStatistics获取总交易数与代币交易量。
- 实时投票数:使用getWitnessGeneralInfo获取总投票数与见证人统计。
MCP服务器
工具
getLatestBlock
- - API:getLatestBlock — 调用/api/block/latest;返回最新固化区块(编号、哈希、大小、时间戳、见证人、交易数量)。注意:返回的是固化区块,而非链头最新区块。
- 使用时机:用户询问已确认区块、固化区块高度或需要稳定区块编号时。若用户询问最新区块高度或当前区块,需说明返回的是固化区块,可能落后于链头。
- 响应:编号(区块高度)、哈希、大小、时间戳、见证人、交易数量等。
- 注意:witnessName、fee、energyUsage、blockReward、voteReward、confirmations、netUsage等字段可能为0或null(底层API不返回)——忽略即可。需要这些字段时,请使用tronscan-block-info的getBlocks。
getCurrentTps
- - API:getCurrentTps — 获取当前TPS、最新区块高度和历史最高TPS
- 使用时机:用户询问实时TPS、当前TPS、吞吐量或最新区块高度。
- 响应:当前TPS、最新区块高度、历史最高TPS。
getHomepageData
- - API:getHomepageData — 获取首页数据(TPS、节点数、概览、冻结、TVL等)
- 使用时机:用户询问网络概览、节点数、TVL或首页统计。
- 响应:TPS、节点数、链概览、冻结资源、TVL等。
getNodeMap
- - API:getNodeMap — 获取当前节点信息与地理分布
- 使用时机:用户询问节点数、节点分布或节点地图。
- 响应:当前节点信息与地理分布。
getWitnessGeneralInfo
- - API:getWitnessGeneralInfo — 获取见证人汇总统计(总投票数、区块统计、见证人数量)
- 使用时机:用户询问实时投票数、总投票数或见证人统计。
- 响应:总投票数、区块统计、见证人数量。
getTransactionStatistics
- - API:getTransactionStatistics — 获取交易统计(总交易数、代币交易量等)
- 使用时机:用户询问总交易数或交易量。
- 响应:总交易数、代币交易量及其他汇总数据。
故障排除
- - MCP连接失败:若看到连接被拒绝,请检查设置>扩展中TronScan MCP是否已连接。
- API速率限制/429:未使用API密钥时,TronScan API有调用次数和频率限制。若遇到速率限制或429错误,请前往TronScan开发者API申请API密钥,然后添加到MCP配置中重试。
注意事项
- - 对于单个实时网络仪表盘,优先使用getHomepageData(涵盖TPS、节点、TVL);然后添加getCurrentTps获取精确TPS/高度,getWitnessGeneralInfo获取投票数,getTransactionStatistics获取总交易数。
- 所有工具均通过TronScan MCP的tools/call调用,需提供工具名称和必要参数。
- getLatestBlock可能返回0/null的witnessName、blockReward、voteReward、fee、energyUsage、netUsage、confirmations;需要这些字段时,请使用tronscan-block-info的getBlocks。