Solidity HTTP API is the read-only HTTP interface provided by java-tron nodes over solidified blocks. It is suitable for exchange deposits, custody balances, accounting, and indexer backfills.
Solidity HTTP API is the read-only JSON-over-HTTP interface provided by java-tron nodes over solidified blocks. Its paths usually start with /walletsolidity/. It returns data from the latest solidified block and is suitable for exchange deposit crediting, custodial balance confirmation, accounting, bridge monitoring, and indexer backfills.
Solidity HTTP API uses the same request and response shapes as FullNode HTTP API, but serves a different block height. FullNode HTTP serves the latest head, while Solidity HTTP serves solidified blocks.
Entry point and served height
| Item | Description |
|---|---|
| Default path prefix | /walletsolidity/ |
| Default port | 8091, configured by node.http.solidityPort in config.conf |
| Served height | Latest solidified block |
| Main purpose | Query solidified accounts, blocks, transactions, resources, and contract state |
| Write support | No. Solidity HTTP is read-only |
On TRON mainnet, a block usually becomes solidified in about 1 minute. The solid height only moves forward and never rolls back. For the mechanism, see Consensus and DPoS — Block solidification.
API categories
| Category | Entry | Main purpose |
|---|---|---|
| Transactions | Transactions | Query solidified transactions, receipts, and transaction statistics by block |
| Blocks | Blocks | Query solidified blocks by height, ID, latest range, or block interval |
| Account resources | Account resources | Query solidified accounts, resources, delegated resources, and withdrawable resource state |
| Node and chain | Node and chain | Query SolidityNode status and cumulative chain statistics |
| Smart contracts | Smart contracts | Run read-only contract calls and Energy estimation against solidified state |
| TRC-10 Token | TRC-10 Token | Query solidified TRC-10 Token lists and asset details |
| Voting and SR | Voting and SR | Query solidified SR lists, voting rewards, and Brokerage information |
Common use cases
Confirm deposits
Exchanges, custodial wallets, and payment systems should use Solidity HTTP to query transactions and receipts. A transaction is suitable for final crediting only after the block that contains it is solidified.
Common endpoints include:
POST /walletsolidity/gettransactionbyid
POST /walletsolidity/gettransactioninfobyid
POST /walletsolidity/getblockbynumReconcile balances and resources
Accounting systems, custody systems, and backend ledgers should prefer Solidity HTTP for account and resource state. This avoids writing unsolidified head state into final ledgers.
Read contract state
When you need read-only contract queries based on final state, use Solidity HTTP contract APIs. They are suitable for Token balances, contract settings, and business state. Contract calls that change on-chain state still need FullNode HTTP to construct, sign, and broadcast transactions.
Difference from FullNode HTTP API
| Item | FullNode HTTP API | Solidity HTTP API |
|---|---|---|
| Path prefix | /wallet/ | /walletsolidity/ |
| Default port | 8090 | 8091 |
| Served height | Latest head | Latest solidified block |
| Write operations | Supports transaction construction and broadcast | Not supported |
| Best for | Transaction construction, broadcast, latest-state display | Deposit confirmation, balance reconciliation, final-state reads |
Both interfaces read from the same TRON chain. The difference is served height and API capability, not a different data source.
What Solidity HTTP does not provide
Solidity HTTP is read-only and does not provide:
- Transaction construction that changes on-chain state, such as transfers, staking, voting, resource delegation, or contract triggers.
- Transaction broadcast, such as
/wallet/broadcasttransactionand/wallet/broadcasthex. - APIs that depend on temporary local-node state, such as pending pool queries.
Use FullNode HTTP API for all write operations.
Request and address formats
Solidity HTTP uses the same JSON request and response format as FullNode HTTP. Most endpoints support the visible parameter:
visible | Address format | Example |
|---|---|---|
true | Base58Check | Usually starts with T |
false or omitted | Hex | Usually starts with 41 |
Request example:
curl --request POST \
--url 'http://127.0.0.1:8091/walletsolidity/getaccount' \
--header 'Content-Type: application/json' \
--data '{
"address": "TXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"visible": true
}'Response format
Solidity HTTP returns the same protobuf-derived JSON shape as FullNode HTTP and follows the same proto3 default value omission behavior. A missing field usually means the field carries its default value, not that the node returned invalid data.
For the full rule and examples, see FullNode HTTP API overview.
XSS protection guidance
Although TRON APIs reduce XSS risk by setting the HTTP API Content-Type to application/json, developers should still be aware that certain API endpoints may not perform complete input validation.
To keep user data safe, escape data retrieved from APIs before rendering it in the user interface (UI), especially string fields returned when visible=true.
For complete XSS protection practices, see the OWASP XSS Prevention Cheat Sheet.
Related resources
- Confirmation semantics — distinguish broadcast success, block inclusion, receipt execution result, and solidified state
- FullNode HTTP API — standard TRON node HTTP read/write interface
- JSON-RPC API — Ethereum-compatible JSON-RPC interface
- TronGrid V1 API — account history, event logs, and aggregate data queries
- Consensus and DPoS — Block solidification — TRON block solidification mechanism