Skip to content

java-tron HTTP API

This directory documents the FullNode HTTP endpoints under framework/src/main/java/org/tron/core/services/http/. One markdown file per endpoint, named after the last segment of the URL (e.g. /wallet/getnodeinfogetnodeinfo.md).

The following categories are intentionally not covered:

  • Exchange (DEX) endpoints
  • Market (order book) endpoints
  • Shielded (anonymous transaction) endpoints

Common conventions

  • Method: a few pure-query endpoints accept GET, but most POST endpoints only accept POST with a JSON body.
  • visible: when true, addresses are base58check strings and text fields (URL, descriptions, etc.) are UTF-8 strings; when false (default), they are hex strings.
  • Builder endpoints return an unsigned protocol.Transaction. The caller signs it locally and broadcasts it via /wallet/broadcasttransaction or /wallet/broadcasthex.
  • permission_id: optional on builder endpoints; selects which Permission to use for multi-sig accounts.
  • Amount unit: TRC10 amounts use the issuer-defined precision; every other amount is in sun (1 TRX = 1e6 sun).

Error responses

In the vast majority of cases the HTTP status is 200 — business errors are conveyed in the response body, so the client must parse the body to determine success or failure. Known exceptions:

  • When an endpoint is explicitly disabled via the node's disabledApiList, HttpApiAccessFilter returns HTTP 404 with body {"Error": "this API is unavailable due to config"}.
  • When the node runs in lite fullnode mode and openHistoryQueryWhenLiteFN is not enabled, LiteFnQueryHttpFilter returns HTTP 200 for ~24 historical-query endpoints (getblockbynum / gettransactionbyid / gettransactioninfobyid / gettransactioninfobyblocknum / getblockbyid / getblockbylatestnum / getblockbylimitnext / gettransactioncountbyblocknum, etc.) but the body is the bare string this API is closed because this node is a lite fullnode (not JSON) — a naive JSON.parse will throw, so clients must check the prefix as a string first.
  • Network-layer errors produced by the servlet container or a reverse proxy (502, 504, connection refused, etc.) are out of scope for this document.

Account

Endpoint Description
/wallet/getaccount Query an account by address
/wallet/getaccountbalance Query an account's balance at a specific block
/wallet/getaccountnet Query an account's bandwidth resources
/wallet/getaccountresource Query bandwidth + energy + TronPower
/wallet/createaccount Create an on-chain account (costs 1 TRX)
/wallet/updateaccount Update an account's name
/wallet/accountpermissionupdate Configure multi-sig permissions
/wallet/validateaddress Validate an address

Block / transaction query

Endpoint Description
/wallet/getnowblock Latest block
/wallet/getblock Generic block query (by num or hash)
/wallet/getblockbynum Block by height
/wallet/getblockbyid Block by hash
/wallet/getblockbylimitnext Blocks in a range
/wallet/getblockbylatestnum The most recent N blocks
/wallet/getblockbalance Per-account balance changes within a block
/wallet/gettransactioncountbyblocknum Transaction count in a block
/wallet/gettransactionbyid Transaction by txid
/wallet/gettransactioninfobyid Transaction receipt by txid
/wallet/gettransactioninfobyblocknum Transaction receipts by block
/wallet/getpendingsize Pending pool size
/wallet/gettransactionfrompending Single pending transaction
/wallet/gettransactionlistfrompending All pending transaction IDs

Transaction build / broadcast

Endpoint Description
/wallet/createtransaction Build a TRX transfer transaction
/wallet/getsignweight Current multi-sig weight
/wallet/getapprovedlist Addresses that have already signed
/wallet/broadcasttransaction Broadcast a signed transaction (JSON)
/wallet/broadcasthex Broadcast a signed transaction (hex)

TRC10 asset

Endpoint Description
/wallet/createassetissue Issue a TRC10 token
/wallet/updateasset Update a TRC10's description / URL / limits
/wallet/transferasset Transfer TRC10
/wallet/participateassetissue Participate in a TRC10 fundraising
/wallet/unfreezeasset Unfreeze TRC10 frozen by the issuer
/wallet/getassetissuebyid Look up a TRC10 by id (recommended)
/wallet/getassetissuebyname Look up a TRC10 by name (errors on duplicates)
/wallet/getassetissuelistbyname All TRC10s with a given name
/wallet/getassetissuebyaccount TRC10s issued by an account
/wallet/getassetissuelist All TRC10s on the network
/wallet/getpaginatedassetissuelist Paginated TRC10 list

Smart contract

Endpoint Description
/wallet/deploycontract Deploy a contract
/wallet/triggersmartcontract Trigger a contract (write)
/wallet/triggerconstantcontract Read-only contract call
/wallet/estimateenergy Estimate energy usage of a call
/wallet/getcontract Contract metadata
/wallet/getcontractinfo Full contract runtime info
/wallet/clearabi Clear a contract's ABI
/wallet/updatesetting Change the user-energy percentage
/wallet/updateenergylimit Change the deployer's energy limit

Witness / governance

Endpoint Description
/wallet/createwitness Apply to become an SR candidate
/wallet/updatewitness Update an SR's URL
/wallet/listwitnesses All SR candidates
/wallet/getpaginatednowwitnesslist Paginated SR list
/wallet/votewitnessaccount Vote for SRs
/wallet/getBrokerage An SR's current brokerage rate
/wallet/updateBrokerage Update an SR's brokerage
/wallet/getReward Claimable rewards for an account
/wallet/withdrawbalance Withdraw block production rewards / dividends
/wallet/proposalcreate Create a chain-parameter proposal
/wallet/proposalapprove Vote on a proposal as an SR
/wallet/proposaldelete Withdraw your own proposal
/wallet/listproposals List of proposals
/wallet/getproposalbyid Proposal by ID
/wallet/getpaginatedproposallist Paginated proposal list
/wallet/getchainparameters Current chain parameters
/wallet/getnextmaintenancetime Next maintenance period time

Stake 1.0 (unfreeze and query only)

After proposal #70 UNFREEZE_DELAY_DAYS was approved (already active on mainnet), new V1 freezes are rejected by the chain; the unfreeze and query endpoints are kept to handle outstanding positions.

Endpoint Description
/wallet/freezebalance Freeze TRX for resources (V1, chain rejects new requests)
/wallet/unfreezebalance Unfreeze matured resources (V1, still usable for legacy positions)
/wallet/getdelegatedresource Query delegation records (V1, read-only)
/wallet/getdelegatedresourceaccountindex Query delegation counterparty addresses (V1, read-only)

Stake 2.0

Endpoint Description
/wallet/freezebalancev2 Freeze TRX for resources
/wallet/unfreezebalancev2 Initiate unfreeze (14-day waiting period)
/wallet/withdrawexpireunfreeze Withdraw matured unfreezes
/wallet/cancelallunfreezev2 Cancel all unmatured unfreezes
/wallet/delegateresource Delegate resources to another account
/wallet/undelegateresource Undelegate resources from another account
/wallet/getdelegatedresourcev2 Query delegation records
/wallet/getdelegatedresourceaccountindexv2 Query delegation counterparty addresses
/wallet/getcandelegatedmaxsize Current maximum delegatable amount
/wallet/getavailableunfreezecount Remaining unfreeze count
/wallet/getcanwithdrawunfreezeamount Withdrawable unfreeze amount at a given time

Node / pricing / tools

Endpoint Description
/wallet/getnodeinfo Node status (also /monitor/getnodeinfo)
/wallet/listnodes Known peers (also /net/listnodes)
/wallet/getenergyprices Historical energy unit prices
/wallet/getbandwidthprices Historical bandwidth unit prices
/wallet/getburntrx Cumulative burned TRX