API Reference
TRON nodes expose HTTP API, gRPC API, and JSON-RPC API. Ecosystem services also provide TronGrid V1 API, Tronscan API, and other hosted or indexed interfaces.
TRON nodes expose three built-in API families: HTTP API, gRPC API, and JSON-RPC API. HTTP API and gRPC API are enabled by default, and their ports are configured in the node config.conf file. JSON-RPC API is implemented in java-tron but disabled by default; you must enable it manually in the node.jsonrpc configuration block.
Outside the standard node APIs, TronGrid provides TronGrid V1 API, and Tronscan provides Tronscan API. These APIs are developed and maintained by their respective project teams. They usually provide additional high-performance, practical extension APIs on top of standard node APIs, such as pre-indexed historical data, event search, account aggregation, and transaction aggregation, so that applications can better satisfy different query needs.
Prerequisites
API layers
| Layer | API | Provider | Default status | Typical entry | Best for |
|---|---|---|---|---|---|
| Node built-in | HTTP API | java-tron node | Enabled by default | FullNode: :8090; Solidity: :8091 | Standard read/write APIs, SDK backends, transaction construction and broadcast |
| Node built-in | gRPC API | java-tron node | Enabled by default | FullNode: :50051; Solidity: :50061 | High-performance server integrations, strongly typed clients, streaming capabilities |
| Node built-in | JSON-RPC API | java-tron node | Disabled by default | FullNode: :8545; Solidity: :8555 after manual enablement | Reusing Ethereum tooling |
| Ecosystem service | TronGrid V1 API | TronGrid | Hosted service | https://api.trongrid.io/v1/... | Account history, TRC-20 transfers, event logs, and other pre-indexed data |
| Ecosystem service | Tronscan API | Tronscan | Hosted service | Tronscan server APIs | Explorer data, aggregate statistics, display-oriented queries |
These APIs ultimately read data from the same TRON chain, but they differ in transport protocol, served height, coverage, and operator. Production systems often combine them: use node HTTP or gRPC for write paths, Solidity interfaces for finalized reads such as deposits and custody balances, and TronGrid V1 API or a self-hosted indexer for historical flows and event search.
Node HTTP API
HTTP API is the standard JSON-over-HTTP interface provided by java-tron nodes. It has two commonly used path families:
| Path prefix | Served height | Default port | Purpose |
|---|---|---|---|
/wallet/ | Latest block head | 8090 | Build transactions, broadcast transactions, query latest state |
/walletsolidity/ | Latest solidified block | 8091 | Query solidified accounts, blocks, transactions, and resource state |
FullNode HTTP and Solidity HTTP usually provide matching endpoint names. For example, query latest account state with POST /wallet/getaccount, and query solidified account state with POST /walletsolidity/getaccount.
For example, query latest account state through FullNode HTTP:
curl -X POST https://api.shasta.trongrid.io/wallet/getaccount \
-H "Content-Type: application/json" \
-d '{
"address": "TBRmnXKMEVfQ8XeQA2NroC9cGi77TvPbNb",
"visible": true
}'To query solidified state instead, change the path to /walletsolidity/getaccount.
Write operations use FullNode HTTP, for example:
POST /wallet/createtransaction
POST /wallet/triggersmartcontract
POST /wallet/broadcasttransactionSolidity HTTP is read-only and is suitable for exchanges, custodial wallets, bridges, and accounting systems that need final state. For deposit crediting, do not credit directly from the latest head state; wait for the transaction's block to be solidified, then query the receipt or block data through /walletsolidity/.
FullNode and SolidityNode selection guide
FullNode and SolidityNode read the same TRON chain, but they serve different heights and expose different capabilities. Choose the interface by first deciding whether the operation changes chain state, then deciding whether the read result must come from a solidified block.
| Task | Recommended interface | Reason |
|---|---|---|
| Build transfers, staking, voting, or contract-call transactions | FullNode HTTP or FullNode gRPC | Only FullNode services provide transaction construction and broadcast capabilities |
| Broadcast signed transactions | FullNode HTTP or FullNode gRPC | Broadcast APIs are provided by FullNode services |
| Display latest balances, latest blocks, or development/debug state | FullNode HTTP, FullNode gRPC, or JSON-RPC | Reads the latest head seen by the node; latency is low but the state may not be solidified |
| Confirm final transaction result | Solidity HTTP or Solidity gRPC | Returns transactions and receipts from solidified blocks, which is more suitable as a final-state basis |
| Reconcile accounts, resources, or block scanning results | Solidity HTTP or Solidity gRPC | Avoids writing latest-head state into final ledgers |
| Query account history, TRC-20 transfer history, Events, or internal transaction history | TronGrid V1 API or a self-hosted indexer | These are pre-indexed historical data queries; native node APIs usually return only current state or block-level data |
A broadcast response with result: true only means the node accepted the transaction. It does not mean the transaction has been included or executed successfully. For the complete confirmation path, see Sign and broadcast — the API workflow.
Node gRPC API
gRPC API is provided directly by java-tron nodes and is enabled by default. It exposes the same class of node capabilities as HTTP API, but uses Protocol Buffers and gRPC transport. It is suitable for backend systems that need higher throughput, lower latency, stronger typing, or stable server-side integration.
| gRPC service | Served height | Default port | Purpose |
|---|---|---|---|
| FullNode gRPC | Latest block head | 50051 | Latest-state reads, transaction construction and broadcast |
| Solidity gRPC | Latest solidified block | 50061 | Solidified-state reads |
Both HTTP API and gRPC API include FullNode and Solidity services. Choose the protocol based on your stack: web backends and scripts often start with HTTP; Java, Go, server-side indexers, and high-throughput jobs can use gRPC.
For Java and other JVM backends, you can usually use Trident directly. Trident is the Java SDK for TRON. It wraps node gRPC interfaces, transaction construction, signing, broadcasting, and smart-contract calls, and is suitable for exchanges, custodial wallets, indexers, and batch-processing services. For low-level API details, see the Trident upstream documentation.
Node JSON-RPC API
JSON-RPC API can be understood as a lightweight interface set for Ethereum-compatible scenarios. It covers part of the node's EVM-style query and call capabilities and makes it easier to reuse Web3.js, ethers, viem, and other Ethereum tooling. Because TRON and Ethereum differ in their underlying mechanisms, some Ethereum JSON-RPC methods do not have corresponding implementations on TRON, or behave differently.
JSON-RPC API is disabled by default. To use it on a self-hosted node, enable it in config.conf:
node {
jsonrpc {
httpFullNodeEnable = true
httpFullNodePort = 8545
httpSolidityEnable = true
httpSolidityPort = 8555
}
}A self-hosted node serves JSON-RPC at the root path of the configured port, for example http://<host>:8545/. TronGrid's JSON-RPC gateway uses https://api.trongrid.io/jsonrpc; /jsonrpc is a TronGrid gateway path, not the generic path for self-hosted java-tron nodes.
JSON-RPC is useful when migrating Ethereum tooling. It covers part of the EVM-style interface set and is not a full replacement for node HTTP API or gRPC API. Use HTTP API or gRPC API together with JSON-RPC when your application needs broader node capabilities.
Ecosystem APIs
TronGrid V1 API
TronGrid is a commonly used hosted node and indexing service in the TRON ecosystem. In addition to proxying standard node APIs, TronGrid V1 API provides pre-indexed data that native nodes do not directly expose, such as account transaction history, TRC-20 / TRC-721 transfer history, contract events, and internal transaction queries.
TronGrid V1 API usually starts with /v1/, for example:
GET /v1/accounts/{address}/transactions
GET /v1/accounts/{address}/transactions/trc20
GET /v1/contracts/{address}/eventsTronGrid is a hosted service. Calls usually require TRON-PRO-API-KEY, and rate limits and quota are configured per key.
→ TronGrid node service and extension APIs
Tronscan API
Tronscan API is maintained by Tronscan and is designed for block explorer data, aggregate statistics, account displays, transaction displays, and ecosystem queries. It is not a java-tron built-in API and should not be grouped with FullNode HTTP, gRPC, or JSON-RPC. When using Tronscan API, rely on Tronscan's current public documentation and service limits.
Choosing an API
Build and broadcast transactions
Use FullNode HTTP or FullNode gRPC. A typical HTTP flow is:
- Call
/wallet/createtransaction,/wallet/triggersmartcontract, or another construction endpoint to build an unsigned transaction. - Sign the transaction locally.
- Call
/wallet/broadcasttransactionto broadcast the signed transaction.
For the full transaction lifecycle, signing notes, and code examples, see Sign and broadcast — the API workflow.
Query solidified data
Use Solidity HTTP or Solidity gRPC. HTTP paths usually start with /walletsolidity/, for example:
POST /walletsolidity/getaccount
POST /walletsolidity/gettransactioninfobyid
POST /walletsolidity/getblockbynumSolidified blocks usually lag the latest head by about 1 minute. For deposit crediting, custody balances, accounting, and bridge monitoring, use solidified data as the basis for final state.
→ Consensus and DPoS § Block solidification
Reuse Ethereum tooling
Use JSON-RPC API. It is suitable for connecting Web3.js, ethers, viem, and similar tools to TRON, but its coverage is narrower than node HTTP and gRPC. For capabilities not covered by JSON-RPC, combine it with HTTP API or gRPC API.
Query account history and events
If you do not want to run your own indexer, use TronGrid V1 API. It is suitable for account history, TRC-20 transfers, event logs, and internal transactions. High-traffic production environments should plan for API keys, rate limits, pagination, and data latency.
Exchanges and custodial wallets can also scan solidified blocks from SolidityNode and maintain their own local index database.
→ Exchange and custodial wallet integration
Request and address formats
HTTP API and TronGrid V1 API use JSON requests and responses. Most node HTTP APIs support the visible parameter:
{
"address": "T...",
"visible": true
}visible: true: addresses use Base58Check format, usually starting withT.visible: falseor omitted: addresses use hex format, usually starting with41.
JSON-RPC API follows Ethereum JSON-RPC conventions. Values and byte data are usually represented as 0x hex strings. TRON addresses are also converted according to compatibility rules in JSON-RPC.
Resource budgeting
Every state-changing transaction consumes Bandwidth or Energy. Plain transfers mostly consume Bandwidth, while smart-contract calls mostly consume Energy. For contract calls, fee_limit caps the maximum Energy budget available to the transaction, including staked Energy and Energy that can be covered by burning TRX. It is not simply "the maximum TRX to burn". If the value is too low, the transaction may fail due to insufficient Energy.
Related resources
- API task map — choose docs and reference APIs by task
- Confirmation semantics — distinguish broadcast success, on-chain inclusion, receipt execution result, and solidified state
- Sign and broadcast — the API workflow — transaction construction, signing, and broadcast lifecycle with examples
- Address and data encoding — Base58 and hex addresses, the
visibleflag, and ABI encoding for contract calls - Errors and debugging — common error categories, hex error decoding, and retry strategy
- TronGrid — TronGrid node service and extension API introduction
- RPC and indexer providers — choosing hosted RPC, indexers, or self-hosted nodes
- Query balance and resources — query TRX, TRC-10, TRC-20 balances and resources
- Calling TRON via gRPC — call node APIs over gRPC
- Networks — Mainnet, Shasta, and Nile endpoint addresses
Updated 7 days ago