Account Profiling
Build a comprehensive profile of any TRON account covering asset holdings, resource status, staking/voting behavior, transaction patterns, and investment preferences.
MCP Server
Instructions
Step 1: Validate the Address
Call validateAddress with the target address. If invalid, inform the user and ask for correction before proceeding.
Step 2: Fetch Account Fundamentals
Run these calls in parallel for speed:
- 1.
getAccount — TRX balance, TRC-10 holdings (assetV2), creation time, permissions, frozen balances (Stake 1.0 & 2.0), vote info - INLINECODE2 — Energy/bandwidth limits, usage, delegated resources, staked TRX amounts
- INLINECODE3 — Free and staked bandwidth details
Step 3: Fetch Token Holdings
- 1.
getTrc20Balance — All TRC-20 token balances - For significant holdings, call
getTrc20Info with contract addresses to resolve token names, symbols, and decimals - TRC-10 assets are already in the
getAccount response (assetV2 field)
Step 4: Analyze Staking & Voting
- 1.
getDelegatedResourceAccountIndexV2 — List of addresses this account delegates to / receives from - INLINECODE8 — Detailed delegation amounts for specific pairs
- INLINECODE9 — Unclaimed voting rewards
- Extract vote list from
getAccount response to show which SRs the account votes for
Step 5: Examine Transaction History
- 1.
getAccountTransactions — Recent transaction history (use limit and order_by params) - INLINECODE14 — TRC-20 transfer history
- INLINECODE15 — Contract-triggered internal transfers
Analyze patterns: frequency, common types (transfers/contract calls/staking), most-interacted addresses, average value.
Step 6: Identify DeFi Participation
From transaction history, identify interactions with known DeFi protocols (SunSwap, JustLend, SunIO, etc.) and categorize as DEX trades, liquidity provision, lending/borrowing, or yield farming.
Step 7: Compile Account Profile
Present findings in this format:
CODEBLOCK0
Error Handling
| Error | Cause | Resolution |
|---|
| Invalid address | Malformed TRON address | Ask user to verify the address format (T-prefix, 34 chars) |
| Empty account |
Address exists but never activated | Inform user this address has no on-chain activity |
| No TRC-20 data | Account has no TRC-20 tokens | Skip token section, note "No TRC-20 holdings found" |
| API timeout | TronGrid rate limit or network issue | Retry the specific failed call; partial results are still useful |
Examples
账户画像
构建任意TRON账户的全面画像,涵盖资产持有情况、资源状态、质押/投票行为、交易模式及投资偏好。
MCP服务器
操作说明
第1步:验证地址
使用目标地址调用validateAddress。若地址无效,通知用户并要求更正后再继续。
第2步:获取账户基础信息
为提高速度,并行执行以下调用:
- 1. getAccount — TRX余额、TRC-10持有量(assetV2)、创建时间、权限、冻结余额(Stake 1.0和2.0)、投票信息
- getAccountResource — 能量/带宽限额、使用量、委托资源、质押TRX数量
- getAccountNet — 免费和质押带宽详情
第3步:获取代币持有情况
- 1. getTrc20Balance — 所有TRC-20代币余额
- 对于大额持有,使用合约地址调用getTrc20Info解析代币名称、符号和小数位数
- TRC-10资产已在getAccount响应中(assetV2字段)
第4步:分析质押与投票
- 1. getDelegatedResourceAccountIndexV2 — 该账户委托/接收资源的地址列表
- getDelegatedResourceV2 — 特定配对的具体委托数量
- getReward — 未领取的投票奖励
- 从getAccount响应中提取投票列表,显示该账户投票支持的超级代表
第5步:检查交易历史
- 1. getAccountTransactions — 近期交易历史(使用limit和order_by参数)
- getAccountTrc20Transactions — TRC-20转账历史
- getInternalTransactions — 合约触发的内部转账
分析模式:频率、常见类型(转账/合约调用/质押)、最常交互地址、平均价值。
第6步:识别DeFi参与情况
从交易历史中识别与已知DeFi协议(SunSwap、JustLend、SunIO等)的交互,并分类为DEX交易、流动性提供、借贷或收益耕作。
第7步:编制账户画像
按以下格式呈现结果:
账户画像:[地址]
概览
- - 创建时间:[日期]
- 账户类型:[普通/合约/超级代表]
- 总资产价值:约$[预估美元价值]
TRX持有情况
- - 可用:[数量] TRX
- 质押(能量):[数量] TRX
- 质押(带宽):[数量] TRX
代币持有情况
| 代币 | 余额 | 价值(美元) |
|---|
| USDT | X,XXX | $X,XXX |
资源
- - 能量:[已用]/[总量]([X%]使用率)
- 带宽:[已用]/[总量]([X%]使用率)
投票与质押
- - 投票数:[总数]
- 投票支持:[超级代表列表]
- 未领取奖励:[数量] TRX
活动分析
- - 近期活动(30天):[数量]笔交易
- 主要活动:[转账/合约调用/质押]
- 最常交互合约:[列表]
账户分类
- - 类型:[巨鲸/活跃交易者/长期持有者/DeFi用户/开发者/不活跃]
- 活动趋势:[增长中/稳定/下降中]
错误处理
| 错误 | 原因 | 解决方案 |
|---|
| 无效地址 | TRON地址格式错误 | 要求用户验证地址格式(T开头,34个字符) |
| 空账户 |
地址存在但从未激活 | 告知用户该地址无链上活动 |
| 无TRC-20数据 | 账户无TRC-20代币 | 跳过代币部分,注明未发现TRC-20持有 |
| API超时 | TronGrid速率限制或网络问题 | 重试失败的特定调用;部分结果仍有参考价值 |
示例