Skip to content

API & Node Access

Connect to the TRON network using native HTTP APIs, Ethereum-compatible JSON-RPC, or high-throughput gRPC endpoints. This guide details managed provider options like TronGrid and Alchemy, along with the specific interfaces required for contract interaction, indexing, and exchange integrations.

TronGrid is TRON’s official managed node service, managed by the TronGrid team. It is the fastest path to a working connection and the equivalent of Infura or Alchemy for Ethereum.

NetworkHTTP / JSON-RPC base URLgRPC
Mainnethttps://api.trongrid.iogrpc.trongrid.io:50051
Nile testnethttps://nile.trongrid.iogrpc.nile.trongrid.io:50051
Shasta testnethttps://api.shasta.trongrid.iogrpc.shasta.trongrid.io:50051

TronGrid serves the FullNode API, SolidityNode API, and Event Server from a single base URL.

TronGrid enforces rate limits on unauthenticated requests. For production use, register for a free API key at trongrid.io and pass it in your request headers:

init_pro.js
// Task: Configure the SDK with a TronGrid Pro API Key for higher rate limits.
const tronWeb = new TronWeb({
fullHost: 'https://api.trongrid.io',
headers: { 'TRON-PRO-API-KEY': process.env.TRONGRID_API_KEY },
privateKey: process.env.PRIVATE_KEY,
});
Terminal
// Task: Make an authenticated HTTP request to the FullNode API.
curl -H "TRON-PRO-API-KEY: your_key_here" \
https://api.trongrid.io/wallet/getnowblock

The free tier is sufficient for development and low-volume production use.


Several major infrastructure providers offer TRON node access as a managed service, often with more generous rate limits or geographic distribution than TronGrid.

ProviderURL
Ankrankr.com/rpc/tron
Alchemyalchemy.com/docs/reference/tron-api-quickstart
QuickNodequicknode.com/chains/tron
GetBlockgetblock.io/nodes/trx
Chainstackchainstack.com/build-better-with-tron
Tatumtatum.io/chains/tron
TronQLtronql.com
NOWNodesnownodes.io/nodes/tron-trx

All providers expose the same TRON HTTP API surface — swap the fullHost URL in tronweb and your code needs no other changes.


The TRON HTTP API follows a REST-like structure. Every endpoint is a POST request with a JSON body.

Common Endpoints
# Task: Interact with account and transaction endpoints via curl.
# Get latest block
curl -X POST https://api.trongrid.io/wallet/getnowblock
# Get account info
curl -X POST https://api.trongrid.io/wallet/getaccount \
-d '{ "address": "TN3W4H6rK2ce4vX9YnFQHwKENnHjoxb2Jq", "visible": true }'
# Get account resources (Energy, Bandwidth)
curl -X POST https://api.trongrid.io/wallet/getaccountresource \
-d '{ "address": "TN3W4H6rK2ce4vX9YnFQHwKENnHjoxb2Jq", "visible": true }'
# Broadcast a signed transaction
curl -X POST https://api.trongrid.io/wallet/broadcasttransaction \
-d '{ "transaction": {...} }'
# Get transaction by hash
curl -X POST https://api.trongrid.io/wallet/gettransactionbyid \
-d '{ "value": "transaction_hash_hex" }'
# Get transaction receipt
curl -X POST https://api.trongrid.io/wallet/gettransactioninfobyid \
-d '{ "value": "transaction_hash_hex" }'

TronGrid adds developer-friendly endpoints beyond the base FullNode API:

TronGrid v1 API
# Task: Query indexed history via the TronGrid v1 API.
# Get TRC-20 token transfers for an address
curl https://api.trongrid.io/v1/accounts/{address}/transactions/trc20
# Get contract events
curl https://api.trongrid.io/v1/contracts/{contractAddress}/events
# Get account transactions
curl https://api.trongrid.io/v1/accounts/{address}/transactions

These support pagination via limit, min_timestamp, and max_timestamp query parameters.


TRON exposes a JSON-RPC endpoint compatible with Ethereum’s eth_* namespace. This allows EVM tooling — MetaMask, ethers.js, Hardhat — to interact with TRON directly without rewriting for the native API.

Terminal window
# JSON-RPC endpoint
POST https://api.trongrid.io/jsonrpc
ethers_rpc.js
// Task: Use standard EVM libraries (Ethers.js) to query TRON via JSON-RPC.
import { JsonRpcProvider } from "ethers"
const provider = new JsonRpcProvider('https://api.trongrid.io/jsonrpc');
const blockNumber = await provider.getBlockNumber();

For high-throughput applications — indexers, exchange backends, real-time data pipelines — TRON’s gRPC interface is significantly more efficient than HTTP.

Terminal window
# Mainnet gRPC
grpc.trongrid.io:50051 # FullNode
grpc.trongrid.io:50052 # SolidityNode (finalized state only)
# Nile testnet gRPC
grpc.nile.trongrid.io:50051
grpc.nile.trongrid.io:50061

The protocol buffer definitions are published at github.com/tronprotocol/protocol. The Trident-java SDK wraps the gRPC interface for Java applications.


Use caseRecommended interface
DApp frontend, scripts, general usetronweb over HTTP
Migration from Ethereum EVM toolingJSON-RPC
Java backend applicationsTrident-java over gRPC
Go backend applicationsgotron-sdk
High-volume indexinggRPC directly
Contract event monitoringTronGrid extended API (/v1/contracts/...)