Solidity HTTP API overview

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

ItemDescription
Default path prefix/walletsolidity/
Default port8091, configured by node.http.solidityPort in config.conf
Served heightLatest solidified block
Main purposeQuery solidified accounts, blocks, transactions, resources, and contract state
Write supportNo. 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

CategoryEntryMain purpose
TransactionsTransactionsQuery solidified transactions, receipts, and transaction statistics by block
BlocksBlocksQuery solidified blocks by height, ID, latest range, or block interval
Account resourcesAccount resourcesQuery solidified accounts, resources, delegated resources, and withdrawable resource state
Node and chainNode and chainQuery SolidityNode status and cumulative chain statistics
Smart contractsSmart contractsRun read-only contract calls and Energy estimation against solidified state
TRC-10 TokenTRC-10 TokenQuery solidified TRC-10 Token lists and asset details
Voting and SRVoting and SRQuery 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/getblockbynum

Reconcile 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

ItemFullNode HTTP APISolidity HTTP API
Path prefix/wallet//walletsolidity/
Default port80908091
Served heightLatest headLatest solidified block
Write operationsSupports transaction construction and broadcastNot supported
Best forTransaction construction, broadcast, latest-state displayDeposit 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/broadcasttransaction and /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:

visibleAddress formatExample
trueBase58CheckUsually starts with T
false or omittedHexUsually 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