TronGrid API Guide: TRON Node Access for Developers
TronGrid is the standard way developers access TRON blockchain data without operating a full node. It exposes REST endpoints for account balances, transaction history, contract triggers, and event logs — used directly via HTTP or through TronWeb.
This guide covers setup, authentication, common endpoints, and production best practices.
TronGrid vs self-hosted node
| Approach | Pros | Cons |
|---|---|---|
| TronGrid | Fast setup, maintained infra | Rate limits, dependency on provider |
| Own full node | No external limits | Ops burden, sync time, hardware |
Most applications start on TronGrid; high-volume exchanges often run private nodes.
Registration and API key
- Visit https://www.trongrid.io
- Create account → Dashboard → Create API Key
- Use key in header:
TRON-PRO-API-KEY: <your-key>
Without key, aggressive polling may hit throttling.
Endpoints
| Network | Base URL |
|---|---|
| Mainnet | https://api.trongrid.io |
| Shasta testnet | https://api.shasta.trongrid.io |
TronWeb config:
const tronWeb = new TronWeb({
fullHost: 'https://api.trongrid.io',
headers: { 'TRON-PRO-API-KEY': 'your-key' },
});
Common REST operations
Get account info
GET /v1/accounts/{address}
Returns TRX balance, resources (Energy/Bandwidth), and TRC-20 token balances.
Get transaction by ID
GET /v1/transactions/{txid}
Broadcast transaction
POST /wallet/broadcasttransaction
Body contains signed transaction JSON from TronWeb.
Trigger smart contract
POST /wallet/triggersmartcontract
Used for read/write contract calls — trigger smart contract.
Full reference: TRON HTTP API.
Rate limits and reliability
Production patterns:
- Cache immutable data (old blocks, confirmed txs)
- Exponential backoff on 429 responses
- Multiple API keys per service tier if allowed
- Webhook/polling hybrid for payment detection
Events and logs
TronGrid supports event plugin queries for contract events — useful for USDT deposit listeners. TronWeb wrapper: event listeners.
Security
- API keys are secrets — env vars, not frontend bundles
- Signing transactions server-side only with secured keys
- Validate addresses before broadcast
Shasta development workflow
- Shasta endpoint + test key
- Faucet TRX
- Deploy contracts via TronBox
- Promote to mainnet with new addresses
Production deployment tips
Run multiple API keys across services for quota isolation. Cache immutable data (contract ABIs, verified source). Use exponential backoff on 429 responses. For mission-critical payment detection, consider a dedicated full node or premium TronGrid tier.
Endpoint selection guide
Use /wallet/* for transaction building and broadcast. Use /v1/* for indexed history and events. Mixing them incorrectly — e.g., polling getaccount every second for payment detection instead of events API — wastes quota and adds latency. Map each product feature to the correct endpoint family during design review.
Related guides
FAQ
What is TronGrid?
TronGrid is TRON's hosted API service providing HTTP access to full node data — accounts, transactions, blocks, and smart contracts without running your own node.
Do I need an API key for TronGrid?
Free tier works with limits. Production apps should register for a TRON-PRO-API-KEY to increase rate limits and reliability.
Is TronGrid the same as TronScan API?
TronScan offers explorer APIs for human-readable data. TronGrid is node-oriented infrastructure from TRON Foundation ecosystem. Many apps use both.
Can TronGrid sign transactions?
No. You sign locally with TronWeb + private key or TronLink; TronGrid broadcasts signed txs.
What happens if TronGrid is down?
Implement retries, status page monitoring, and consider fallback full node for critical systems.
Thanks — your feedback helps us improve the docs.