Transaction Info
Overview
| Tool | Function | Use Case |
|---|
| getTransactionDetail | Tx by hash | Type, confirmation, amount, energy/bandwidth |
| getTransactionList |
Tx list | List with filters, sort, pagination |
| getTrc20Transfers | TRC20/721 transfers | Token transfer records |
| getTrc20TransfersWithStatus | TRC20 with status | TRC20 transfers plus tx status |
| getTrc1155Transfers | TRC1155 transfers | Multi-token transfers |
| getTransferList | TRX/TRC10 transfers | Native TRX and TRC10 transfers |
| getInternalTransactions | Internal txs | Contract internal calls |
| getTransactionStatistics | Tx statistics | Aggregate tx and token volume |
| getTransferStatistics | Transfer statistics | Transfer activity by token type |
| getExchangeTransactions | Exchange txs | Exchange-type transactions |
Use Cases
- 1. Transaction Result: Use
getTransactionDetail for success/fail and confirmation. - Confirmation Status: Confirmation and block info are in
getTransactionDetail. - Sender / Receiver: Use
getTransactionDetail for from/to; use transfer tools for token flows. - Resource Consumption: Energy and bandwidth used are in
getTransactionDetail. - Token Transfers in Tx: Use
getTransactionDetail; its response includes trc20TransferInfo, transfersAllList, and other tx-level transfer info. - Internal Calls: Use
getInternalTransactions for contract internal txs.
MCP Server
Tools
getTransactionDetail
- - API:
getTransactionDetail — Get transaction detail by hash (type, confirmation, amount, energy/bandwidth) - Use when: User provides a tx hash or asks "transaction status", "tx result", or "token transfers in this tx".
- Input: Transaction hash (txid).
- Response: Type, confirmed, amount, energy, bandwidth, from, to, block,
trc20TransferInfo, transfersAllList, and other tx-level transfer info. - Units:
-
net_fee,
energy_fee,
fee_limit: in
sun (1 TRX = 10⁶ sun); divide by 1,000,000 to get TRX.
-
amount_str(TRC20): in
smallest unit; divide by 10^decimals to get human-readable amount.
-
contractData.amount (TRX transfer): in
sun (1 TRX = 10⁶ sun); divide by 1,000,000 to get TRX.
getTransactionList
- - API:
getTransactionList — Get transaction list with pagination, sort, and filters - Use when: User asks for "list of transactions" or "recent txs" for an address or globally.
getTrc20Transfers / getTrc20TransfersWithStatus
- - API:
getTrc20Transfers — Get TRC20/TRC721 transfer records; getTrc20TransfersWithStatus — Get TRC20 transfers with tx status - Use when: User asks for "token transfer" or "TRC20 transfer" by address, contract, or time range. For transfers within a single tx, use
getTransactionDetail.
getTrc1155Transfers
- - API:
getTrc1155Transfers — Get TRC1155 transfer records - Use when: User asks for TRC1155 transfers by address, contract, or time range. For transfers within a single tx, use
getTransactionDetail.
getTransferList
- - API:
getTransferList — Get TRX and TRC10 transfer records - Use when: User asks for "TRX transfer" or "TRC10 transfer" by address, contract, or time range. For transfers within a single tx, use
getTransactionDetail.
getInternalTransactions
- - API:
getInternalTransactions — Get smart contract internal transaction list - Use when: User asks for "internal tx" or "contract internal call".
getTransactionStatistics / getTransferStatistics
- - API:
getTransactionStatistics — Get transaction statistics (total tx, token tx volume, etc.); getTransferStatistics — Get transfer statistics by token type - Use when: User asks for "tx volume" or "transfer distribution".
getExchangeTransactions
- - API:
getExchangeTransactions — Get exchange-type transactions - Use when: User asks for "exchange transactions" or "DEX transactions".
- Response: Exchange-type transaction list.
Workflow: Transaction Investigation
User: "Why did this tx fail?" or "Who sent it, what did it do?"
- 1. tronscan-transaction-info — Use tx hash to call
getTransactionDetail → result, confirmation, from/to, amount, energy/bandwidth. - If asking about sender or receiver: tronscan-account-profiler —
getAccountDetail(from/to address) for balance and resources; if counterparty is a contract, tronscan-contract-analysis — getContractDetail(contract address). - If token transfers within the tx are needed:
getTransactionDetail response already includes trc20TransferInfo, transfersAllList, etc. — no need to call transfer list tools. If internal calls needed: getInternalTransactions (pass tx hash as parameter where supported).
Data handoff: User-provided tx hash is input for step 1. The from/to or contract address from step 1 feeds into step 2.
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.
Invalid tx hash
Ensure the hash is a valid TRON transaction ID (64 hex chars). If tx not found, it may be pending or on a different network.
Notes
- - Always use
getTransactionDetail first when user has a tx hash; token transfers within the tx are already in its response—no need to call getTrc20Transfers / getTrc1155Transfers / getTransferList. - INLINECODE39 ,
getTrc1155Transfers, getTransferList are for address, contract, or time-range investigation; they do not expose tx hash filter parameters. Do not fabricate tx-hash filter or claim filtering by tx hash. - Energy/bandwidth in response are in the same unit as chain (energy in units, bandwidth in bytes).
- Token entries in
trc20TransferInfo and transfersAllList may include risk fields such as tokenCanShow and tokenLevel. If the transacted token has tokenCanShow: false or tokenLevel of "3" / "4", warn the user that this transaction involves a potentially risky token. See tronscan-token-scanner for full field semantics.
交易信息
概览
| 工具 | 功能 | 使用场景 |
|---|
| getTransactionDetail | 根据哈希查询交易 | 类型、确认数、金额、能量/带宽 |
| getTransactionList |
交易列表 | 带筛选、排序、分页的列表 |
| getTrc20Transfers | TRC20/721转账 | 代币转账记录 |
| getTrc20TransfersWithStatus | 带状态的TRC20转账 | TRC20转账及交易状态 |
| getTrc1155Transfers | TRC1155转账 | 多代币转账 |
| getTransferList | TRX/TRC10转账 | 原生TRX和TRC10转账 |
| getInternalTransactions | 内部交易 | 合约内部调用 |
| getTransactionStatistics | 交易统计 | 聚合交易和代币量 |
| getTransferStatistics | 转账统计 | 按代币类型的转账活动 |
| getExchangeTransactions | 交易所交易 | 交易所类型交易 |
使用场景
- 1. 交易结果:使用 getTransactionDetail 获取成功/失败和确认信息。
- 确认状态:确认信息和区块信息在 getTransactionDetail 中。
- 发送方/接收方:使用 getTransactionDetail 获取from/to;使用转账工具获取代币流向。
- 资源消耗:使用的能量和带宽在 getTransactionDetail 中。
- 交易中的代币转账:使用 getTransactionDetail;其响应包含 trc20TransferInfo、transfersAllList 及其他交易级转账信息。
- 内部调用:使用 getInternalTransactions 获取合约内部交易。
MCP服务器
工具
getTransactionDetail
- - API:getTransactionDetail — 根据哈希获取交易详情(类型、确认数、金额、能量/带宽)
- 使用时机:用户提供交易哈希或询问交易状态、交易结果或此交易中的代币转账。
- 输入:交易哈希(txid)。
- 响应:类型、已确认、金额、能量、带宽、from、to、区块、trc20TransferInfo、transfersAllList 及其他交易级转账信息。
- 单位:
- net
fee、energyfee、fee_limit:单位为
sun(1 TRX = 10⁶ sun);除以 1,000,000 得到 TRX。
- amount_str(TRC20):单位为
最小单位;除以 10^小数位数 得到可读金额。
- contractData.amount(TRX转账):单位为
sun(1 TRX = 10⁶ sun);除以 1,000,000 得到 TRX。
getTransactionList
- - API:getTransactionList — 获取带分页、排序和筛选的交易列表
- 使用时机:用户询问某个地址或全局的交易列表或近期交易。
getTrc20Transfers / getTrc20TransfersWithStatus
- - API:getTrc20Transfers — 获取TRC20/TRC721转账记录;getTrc20TransfersWithStatus — 获取带交易状态的TRC20转账
- 使用时机:用户按地址、合约或时间范围询问代币转账或TRC20转账。对于单笔交易内的转账,使用 getTransactionDetail。
getTrc1155Transfers
- - API:getTrc1155Transfers — 获取TRC1155转账记录
- 使用时机:用户按地址、合约或时间范围询问TRC1155转账。对于单笔交易内的转账,使用 getTransactionDetail。
getTransferList
- - API:getTransferList — 获取TRX和TRC10转账记录
- 使用时机:用户按地址、合约或时间范围询问TRX转账或TRC10转账。对于单笔交易内的转账,使用 getTransactionDetail。
getInternalTransactions
- - API:getInternalTransactions — 获取智能合约内部交易列表
- 使用时机:用户询问内部交易或合约内部调用。
getTransactionStatistics / getTransferStatistics
- - API:getTransactionStatistics — 获取交易统计(总交易量、代币交易量等);getTransferStatistics — 按代币类型获取转账统计
- 使用时机:用户询问交易量或转账分布。
getExchangeTransactions
- - API:getExchangeTransactions — 获取交易所类型交易
- 使用时机:用户询问交易所交易或DEX交易。
- 响应:交易所类型交易列表。
工作流程:交易调查
用户:这笔交易为什么失败?或谁发送的,做了什么?
- 1. tronscan-transaction-info — 使用交易哈希调用 getTransactionDetail → 结果、确认数、from/to、金额、能量/带宽。
- 如果询问发送方或接收方:tronscan-account-profiler — getAccountDetail(from/to地址)获取余额和资源;如果对方是合约,tronscan-contract-analysis — getContractDetail(合约地址)。
- 如果需要交易内的代币转账:getTransactionDetail 响应已包含 trc20TransferInfo、transfersAllList 等 — 无需调用转账列表工具。如果需要内部调用:getInternalTransactions(在支持的情况下传入交易哈希作为参数)。
数据传递:用户提供的交易哈希是步骤1的输入。步骤1中的from/to或合约地址传递给步骤2。
故障排除
- - MCP连接失败:如果看到连接被拒绝,请验证TronScan MCP是否已在设置>扩展中连接。
- API速率限制/429:未使用API密钥时,TronScan API有调用次数和频率限制。如果遇到速率限制或429错误,请前往TronScan开发者API申请API密钥,然后将其添加到MCP配置中并重试。
无效的交易哈希
确保哈希是有效的TRON交易ID(64个十六进制字符)。如果未找到交易,可能处于待处理状态或在不同的网络上。
注意事项
- - 当用户有交易哈希时,始终优先使用 getTransactionDetail;交易内的代币转账已包含在其响应中 — 无需调用 getTrc20Transfers / getTrc1155Transfers / getTransferList。
- getTrc20Transfers、getTrc1155Transfers、getTransferList 用于地址、合约或时间范围调查;它们不暴露交易哈希筛选参数。请勿虚构交易哈希筛选或声称支持按交易哈希筛选。
- 响应中的能量/带宽单位与链上一致(能量以单位计,带宽以字节计)。
- trc20TransferInfo 和 transfersAllList 中的代币条目可能包含风险字段,如 tokenCanShow 和 tokenLevel。如果交易的代币具有 tokenCanShow: false 或 tokenLevel 为 3 / 4,请警告用户该交易涉及潜在风险代币。完整字段语义请参见 tronscan-token-scanner。