For AI agents
Integrate the Platform API
Machine-oriented reference. Prefer this page when planning tools or writing clients. Humans should use the Human docs.
Quickstart
Copy this brief into context, then call endpoints with a signed request.
# tronscope.io Platform API - for AI agents
Audience: AI / automation. Humans use https://tronscope.io/docs
Base URL: https://api.tronscope.io/api/v1
Auth: HMAC-SHA256 on every request
Headers: X-API-Key, X-Timestamp (unix seconds ±5m), X-Signature (hex HMAC of canonical string)
Canonical: timestamp\nMETHOD\npath\ncanonical_query\nSHA256(raw_body)
GET body hash is SHA256("")
Idempotency: X-Idempotency-Key required on POST /api/v1/energy/orders
Node.js SDK: npm install tronscope (signs requests; https://github.com/tronscope/tronscope-node)
Units: 1 TRX = 1_000_000 SUN
Products: Energy Order API (Free), Watchlist API (Pro/Enterprise + quota), Wallet Analyze API (pay-per-call USD credits: overview $0.001, transactions $0.002, counterparties $0.003, tx detail $0.002; Pro $2/mo, Enterprise $10/mo included)
Never request private keys or seed phrases.
Do not use browser or mobile clients with API secrets.Auth
- Create an API key in the dashboard (
/api/keys). Secret is shown once. - Every request needs
X-API-Key,X-Timestamp,X-Signature. - Timestamp is Unix seconds; must be within ±5 minutes of server time.
- Do not reuse a signature inside the window.
POST /energy/ordersalso needsX-Idempotency-Key.
import { createHmac, createHash } from 'node:crypto';
function sign({ secret, timestamp, method, path, query = '', body = '' }) {
const bodyHash = createHash('sha256').update(body).digest('hex');
const canonical = [timestamp, method.toUpperCase(), path, query, bodyHash].join('\n');
return createHmac('sha256', secret).update(canonical).digest('hex');
}
// path = '/api/v1/balance' (no host, no query)
// query = sorted 'a=1&b=2' or ''MCP / ChatGPT
- Discovery:
https://tronscope.io/.well-known/mcp - ARD catalog:
https://tronscope.io/.well-known/ai-catalog.json(also/ai-catalog.json) - JSON-RPC endpoint:
https://api.tronscope.io/mcp(also proxied athttps://tronscope.io/mcp) - Wallet, transaction, and Energy quote tools work without login.
- Energy orders need OAuth 2.1 (PKCE): metadata at
https://api.tronscope.io/.well-known/oauth-authorization-serverand resourcehttps://api.tronscope.io/.well-known/oauth-protected-resource. - Watchlist tools (
add_watchlist_address, list/remove) need OAuth scopemcp:watchlist(same Free, Pro, or Enterprise slot limits as the website). Platform API watchlist still requires Pro or Enterprise. - Scopes:
mcp:read,mcp:energy.order,mcp:watchlist. - In ChatGPT / Codex Plugins, use Server URL
https://api.tronscope.io/mcpand Authentication = OAuth. Hosts register themselves (dynamic client registration or a client ID metadata document); no manual setup is needed.
Claude
Use TronScope from a Claude conversation: look up wallets and transactions, check Energy prices, rent Energy from your prepaid balance, and manage your watchlist.
- In Claude, open Customize › Connectors, choose Add custom connector, and enter
https://api.tronscope.io/mcp. - Wallet, transaction and Energy quote tools work right away, without an account.
- For the watchlist or Energy orders, choose Connect and sign in to TronScope. You approve the scopes on the consent screen; disconnect any time in Claude's connector settings.
Try asking:
- "What does TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t hold, and what were its last transfers?"
- "How much Energy do I need to send USDT 3 times from my wallet, and what would renting it cost?"
- "Add this address to my TronScope watchlist and alert me on transfers over $10,000."
- Only public TRON addresses are used. TronScope never asks for private keys or recovery phrases, and it cannot move funds from your wallet.
- Energy is rented only after you confirm, and it is paid from your prepaid TronScope TRX balance.
- Privacy: tronscope.io/privacy · Terms: tronscope.io/terms · Support: tronscope.io/support ([email protected])
Scopes
balance:read- prepaid balance & deposit addressquotes:read- Energy ratesorders:write/orders:read- Energy orderswatchlist:read/watchlist:write- watchlist CRUDwallets:read- overview ($0.001), transactions ($0.002), counterparties ($0.003), prepaid API balancewebhooks:manage- webhook endpoints (dashboard)
New keys get all scopes. Missing scope → PERMISSION_DENIED.
Endpoints
Base: https://api.tronscope.io/api/v1
Energy
Deposit prepaid TRX, then create Energy rental orders.
| Method | Path | Scope | |
|---|---|---|---|
| GET | /api/v1/balance | balance:read | Prepaid TRX available for Energy orders. SUN is canonical (1 TRX = 1,000,000 SUN). |
| GET | /api/v1/deposit-address | balance:read | TRON Mainnet address for prepaid TRX. Only TRX is credited. |
| GET | /api/v1/energy/rates | quotes:read | Price a quantity of Energy for a duration without creating an order. |
| POST | /api/v1/energy/orders | orders:write | Purchase Energy from prepaid TRX. Pass receiverAddress, energyAmount, and duration. X-Idempotency-Key is required. |
| GET | /api/v1/energy/orders | orders:read | Energy orders for this account, newest first. |
| GET | /api/v1/energy/orders/{orderId} | orders:read | Fetch a single order by tronscope.io order id. |
Watchlist
Same watchlist as the website. Requires Pro or Enterprise; quota still applies.
| Method | Path | Scope | |
|---|---|---|---|
| GET | /api/v1/watchlists | watchlist:read | Watched addresses for this account, plus categories and watchable assets. Requires Pro or Enterprise. |
| GET | /api/v1/watchlists/categories | watchlist:read | Distinct category names used on this account. Requires Pro or Enterprise. |
| POST | /api/v1/watchlists | watchlist:write | Watch a TRON address. Requires Pro or Enterprise. Watchlist quota still applies. |
| PATCH | /api/v1/watchlists/{address} | watchlist:write | Update nickname, category, assets, or notification thresholds. Requires Pro or Enterprise. |
| DELETE | /api/v1/watchlists/{address} | watchlist:write | Stop watching an address. Requires Pro or Enterprise. |
Wallet
Overview ($0.001), transactions ($0.002), counterparties ($0.003), and tx detail ($0.002). Prepaid USD API balance; Free can pay per call.
| Method | Path | Scope | |
|---|---|---|---|
| GET | /api/v1/wallets/{address} | wallets:read | Balances, tokens, energy, and bandwidth for a Mainnet address. $0.001 per call from the API balance. No transaction history. |
| GET | /api/v1/wallets/{address}/counterparties | wallets:read | Top senders, receivers, frequent peers, and largest relationships for a Mainnet address. $0.003 per call from the API balance. |
| GET | /api/v1/wallets/{address}/transactions | wallets:read | Recent transfers for a Mainnet address. Newest first. $0.002 per call from the API balance. |
| GET | /api/v1/tx/{txid} | wallets:read | Decoded Mainnet transaction: type, parties, asset, amount, fees, energy, and internals. $0.002 per call from the API balance. |
Webhooks
Configure in the dashboard. Choose event groups: Orders (deposits, energy.order.*, balance.low) and/or Watchlist (watchlist.transfer). No callbackUrl on order create.
Verify with HMAC of timestamp + "\\n" + raw_body using the webhook secret. Headers: X-TronScope-Event, X-TronScope-Timestamp, X-TronScope-Signature.
Errors
| Code | HTTP | Action |
|---|---|---|
| INSUFFICIENT_BALANCE | 402 | Deposit TRX; new idempotency key |
| API_CREDIT_REQUIRED | 402 | Add Wallet API USD credits, then retry |
| IDEMPOTENCY_CONFLICT | 409 | New X-Idempotency-Key |
| UNAUTHORIZED | 401 | Fix key / timestamp / signature |
| PERMISSION_DENIED | 403 | Key missing scope |
| RATE_LIMITED | 429 | Wait 60s window |
Limits: 30 write / 120 read per IP, user, and key per 60s. Headers: X-RateLimit-Limit, X-RateLimit-Remaining.
Humans
Narrative docs, curl/axios examples per endpoint: /docs.
A few practical notes
Create a key at /api/keys. The secret is shown once. Every request needs X-API-Key, X-Timestamp (Unix seconds, ±5 minutes), and X-Signature.
On MCP, wallet and Energy quote tools work without login. Energy orders need OAuth. Watchlist tools need the mcp:watchlist scope.
Missing scope is PERMISSION_DENIED. Short USD balance is API_CREDIT_REQUIRED. Same idempotency key with a different body is IDEMPOTENCY_CONFLICT.