tronscope.io /Docs

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.

text
# 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

  1. Create an API key in the dashboard (/api/keys). Secret is shown once.
  2. Every request needs X-API-Key, X-Timestamp, X-Signature.
  3. Timestamp is Unix seconds; must be within ±5 minutes of server time.
  4. Do not reuse a signature inside the window.
  5. POST /energy/orders also needs X-Idempotency-Key.
JavaScript
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 at https://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-server and resource https://api.tronscope.io/.well-known/oauth-protected-resource.
  • Watchlist tools (add_watchlist_address, list/remove) need OAuth scope mcp: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/mcp and 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.

  1. In Claude, open Customize › Connectors, choose Add custom connector, and enter https://api.tronscope.io/mcp.
  2. Wallet, transaction and Energy quote tools work right away, without an account.
  3. 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."

Scopes

  • balance:read - prepaid balance & deposit address
  • quotes:read - Energy rates
  • orders:write / orders:read - Energy orders
  • watchlist:read / watchlist:write - watchlist CRUD
  • wallets:read - overview ($0.001), transactions ($0.002), counterparties ($0.003), prepaid API balance
  • webhooks: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.

MethodPathScope
GET/api/v1/balancebalance:readPrepaid TRX available for Energy orders. SUN is canonical (1 TRX = 1,000,000 SUN).
GET/api/v1/deposit-addressbalance:readTRON Mainnet address for prepaid TRX. Only TRX is credited.
GET/api/v1/energy/ratesquotes:readPrice a quantity of Energy for a duration without creating an order.
POST/api/v1/energy/ordersorders:writePurchase Energy from prepaid TRX. Pass receiverAddress, energyAmount, and duration. X-Idempotency-Key is required.
GET/api/v1/energy/ordersorders:readEnergy orders for this account, newest first.
GET/api/v1/energy/orders/{orderId}orders:readFetch a single order by tronscope.io order id.

Watchlist

Same watchlist as the website. Requires Pro or Enterprise; quota still applies.

MethodPathScope
GET/api/v1/watchlistswatchlist:readWatched addresses for this account, plus categories and watchable assets. Requires Pro or Enterprise.
GET/api/v1/watchlists/categorieswatchlist:readDistinct category names used on this account. Requires Pro or Enterprise.
POST/api/v1/watchlistswatchlist:writeWatch a TRON address. Requires Pro or Enterprise. Watchlist quota still applies.
PATCH/api/v1/watchlists/{address}watchlist:writeUpdate nickname, category, assets, or notification thresholds. Requires Pro or Enterprise.
DELETE/api/v1/watchlists/{address}watchlist:writeStop 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.

MethodPathScope
GET/api/v1/wallets/{address}wallets:readBalances, tokens, energy, and bandwidth for a Mainnet address. $0.001 per call from the API balance. No transaction history.
GET/api/v1/wallets/{address}/counterpartieswallets:readTop senders, receivers, frequent peers, and largest relationships for a Mainnet address. $0.003 per call from the API balance.
GET/api/v1/wallets/{address}/transactionswallets:readRecent transfers for a Mainnet address. Newest first. $0.002 per call from the API balance.
GET/api/v1/tx/{txid}wallets:readDecoded 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

CodeHTTPAction
INSUFFICIENT_BALANCE402Deposit TRX; new idempotency key
API_CREDIT_REQUIRED402Add Wallet API USD credits, then retry
IDEMPOTENCY_CONFLICT409New X-Idempotency-Key
UNAUTHORIZED401Fix key / timestamp / signature
PERMISSION_DENIED403Key missing scope
RATE_LIMITED429Wait 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.