| API | Endpoint | Use it for |
|---|---|---|
| JSON-RPC | /jsonrpc | Ethereum-compatible read operations |
| Wallet | /wallet | TRON HTTP API — full node operations, including transactions |
| Solidity | /walletsolidity | TRON HTTP API — confirmed (solidified) data |
| gRPC | host on port 443 | High-performance binary protocol — see available services |
Tooling compatibility
TRON’s/jsonrpc endpoint provides limited Ethereum compatibility for read operations only — the methods required for transaction submission (eth_sendRawTransaction, eth_getTransactionCount) are not available. Ethereum-native tools like Foundry, Hardhat, and web3.py can read from a TRON node, but they cannot deploy contracts or send transactions directly. For writes, use TronWeb.js with the /wallet endpoint, or compile and test with Foundry or Hardhat and deploy through the hybrid workflow.
TRON nodes don’t support WebSocket connections for event subscriptions. To track that capability, follow the feature request for TRON event plugin support.
Historical data availability
TRON nodes on Chainstack run in archive mode. For TRON, archive means the complete block and transaction history — not historical state. Unlike EVM archive nodes, java-tron has no state-at-block queries; this is a protocol limitation (java-tron#6289), not a Chainstack one. Billing is independent of the node mode — every TRON request is billed as full (1 RU); see Request units. Available on your node:- Complete block and transaction history from genesis — block and transaction methods accept any historical block, for example
/wallet/getblockbynumandeth_getBlockByNumber - Historical TRX balances —
/wallet/getaccountbalanceand/wallet/getblockbalancewith ablock_identifier
- Historical contract or account state, beyond the TRX balance lookups above —
eth_getBalance,eth_call,eth_getCode, andeth_getStorageAtaccept only thelatestblock parameter and returnQUANTITY not supported, just support TAG as latestfor anything else;triggerconstantcontractalways runs against current state. java-tron tracks archive-node support in java-tron#6289.
gRPC API
TRON nodes on Chainstack support gRPC for high-performance access. gRPC uses HTTP/2 and Protocol Buffers for efficient binary serialization, making it ideal for high-throughput applications and data indexing.Endpoint format
Your TRON gRPC endpoints are available at:- Mainnet:
tron-mainnet.core.chainstack.com:443 - Nile Testnet:
tron-nile.core.chainstack.com:443
Authentication
gRPC endpoints use x-token authentication. Pass your token in the request metadata:- x-token — your authentication token from the Chainstack console
Available services
The TRON proto files define several gRPC services. Here’s what a Chainstack TRON node currently serves:| Service | Status on Chainstack |
|---|---|
protocol.Wallet | Available — the full node API: accounts, blocks, contracts, and transaction operations |
protocol.Database | Available — block metadata helpers |
protocol.WalletSolidity | Available — the solidity node API: read-only access to solidified (confirmed) data |
protocol.WalletExtension | Not available yet |
protocol.Monitor | Not available yet |
protocol.Wallet and protocol.WalletSolidity run on the same endpoint and port. Select the one you need by the service (stub) in your generated client, not by a different URL:
Wallet— the latest state and all write operationsWalletSolidity— solidified (confirmed), read-only data
50051 for the full node and 50061 for the solidity node); Chainstack routes both through the single :443 endpoint.
Calling a service that isn’t served — protocol.WalletExtension or protocol.Monitor — returns the gRPC UNIMPLEMENTED status (Method not found). The same solidified data is also available over the HTTP /walletsolidity API — see TRON methods.
The endpoint supports gRPC server reflection, but the reflection list includes every service in the TRON protos — including ones that aren’t served, such as
protocol.WalletExtension and protocol.Monitor. Don’t infer availability from reflection or the proto definitions; the table above reflects actual behavior.Proto files
The endpoint supports server reflection for discovery, but to generate typed clients you need the protocol buffer definitions. Get them from the official TRON protocol repository:api/api.proto— Wallet service with methods likeGetNowBlock,GetBlockByNum,GetAccountcore/Tron.proto— Core data types (blocks, transactions, accounts)
Generate client code
To use gRPC with TRON, generate client code from the proto files.- Python
- Node.js
- Go
Install dependencies and generate the Python stubs:
Usage examples
TronWeb.js
TronWeb is the official JavaScript library for TRON. It supports all TRON operations including contract deployment and transactions.Get balance
/jsonrpc, /wallet, or /walletsolidity postfixes.
Deploy a contract
- YOUR_CHAINSTACK_ENDPOINT — your TRON node base endpoint without the
/jsonrpc,/wallet, or/walletsoliditypostfixes - YOUR_PRIVATE_KEY — the private key of the account that you use to deploy the contract
web3.py
web3.py performs read operations on TRON through the/jsonrpc endpoint. For contract deployment and transactions, use TronWeb.js.
Build DApps using web3.py and TRON nodes deployed with Chainstack.
- Install web3.py.
- Connect over HTTP.
HTTP
Use theHTTPProvider to connect to your node endpoint and get the latest block number.
/jsonrpc postfix, protected either with the key or password.
See also node access details.
Hardhat
Hardhat performs read operations on TRON through the/jsonrpc endpoint. For contract deployment, use the hybrid workflow or TronWeb.js directly.
Configure Hardhat to compile contracts and perform read operations through your TRON nodes.
- Install Hardhat and create a project.
-
Create a new environment in
hardhat.config.js:where YOUR_CHAINSTACK_ENDPOINT is your node HTTPS endpoint with the/jsonrpcpostfix, protected either with the key or password. See node access details. -
Compile your contracts with
npx hardhat compile, then deploy using TronWeb.js.
Foundry
Foundry performs read operations on TRON through the/jsonrpc endpoint. For contract deployment, use the hybrid workflow below.
- Install Foundry.
-
Use
--rpc-urlto run read operations through your Chainstack node.
Cast
Usecast to query the network.
To get the latest block number:
/jsonrpc postfix, protected either with the key or password.
Hybrid workflow
Use Foundry for fast compilation and testing, then deploy to TRON with TronWeb.js.Set up the project
-
Initialize a Foundry project:
-
Write your contract in
src/: -
Compile with Foundry:
The compiled artifacts are in
out/MyContract.sol/MyContract.json.
Deploy with TronWeb.js
-
Install TronWeb:
-
Create a deployment script
deploy.js: -
Run the deployment:
- YOUR_CHAINSTACK_ENDPOINT — your TRON node base endpoint without the
/jsonrpc,/wallet, or/walletsoliditypostfixes - YOUR_PRIVATE_KEY — the private key of the account that you use to deploy the contract