Updated on 2023-12-06 GMT+08:00

Supported TRON APIs

Table 1 JSON-RPC APIs

API Method

Type

Description

Throughput (Time/s)

eth_accounts

POST

Return an array of addresses owned by the client. An empty list will be returned for tron.

1000

eth_blocknumber

POST

Return the latest block number.

1000

eth_call

POST

Execute a message call immediately without creating a transaction on the blockchain (triggerConstantContract).

1000

eth_chainId

POST

Return the chainId of the TRON network which is the last four bytes of the genesis block hash.

1000

eth_coinbase

POST

Return the witness address of the current node.

1000

eth_estimateGas

POST

Return the required energy using triggerConstantContract.

1000

eth_gasPrice

POST

Return the current energy price in sun.

1000

eth_getBalance

POST

Return the balance of the given account address.

1000

eth_getBlockByHash

POST

Return block information for the given block hash.

50

eth_getBlockByNumber

POST

Return block information for the given block number.

50

eth_getBlockTransactionCountByHash

POST

Return the number of transactions in a block by the given block hash.

1000

eth_getBlockTransactionCountByNumber

POST

Return the number of transactions in a block by the given block number.

1000

eth_getCode

POST

Return the runtime code of a given smart contract address.

400

eth_getStorageAt

POST

Return the value from a storage position at a given address. It can be used to get the value of a variable in a contract.

1000

eth_getTransactionByBlockHashAndIndex

POST

Return information about a transaction by block hash and transaction index position.

1000

eth_getTransactionByBlockNumberAndIndex

POST

Return information about a transaction by block number and transaction index position.

1000

eth_getTransactionByHash

POST

Return the information about a transaction by transaction hash.

1000

eth_getTransactionReceipt

POST

Return transaction information, including the transaction fee, block height, and VM logs.

1000

eth_getWork

POST

Return the hash of the current block.

1000

eth_protocolVersion

POST

Return the java-tron block version.

1000

eth_syncing

POST

Return the sync status of a node.

1000

eth_newFilter

POST

Create an event filter object to listen to events.

1000

eth_newBlockFilter

POST

Create a filter to notify when a new block arrives.

1000

eth_getFilterChanges

POST

Return an array of events that have occurred since the last poll.

1000

eth_getFilterLogs

POST

Return all logs matching a given filter object.

10

eth_uninstallFilter

POST

Uninstall a filter if monitoring is no longer required.

1000

eth_getLogs

POST

Return all logs matching a given filter object.

10

net_listening

POST

Return if the client is listening for network connections.

1000

net_peerCount

POST

Return the number of peers currently connected to the node.

1000

net_version

POST

Return the hash of the genesis block.

1000

web3_clientVersion

POST

Return the current version of the node.

1000

web3_sha3

POST

Return Keccak-256 (not the standardized SHA3-256) of the given data.

1000

buildTransaction

POST

Create a transaction. Different transaction types have different parameters.

1000

Table 2 JSON-RPC APIs

API Method

Description

Throughput (Time/s)

BroadcastTransaction

Broadcast the signed transaction.

1000

CreatetTansaction

Create a transaction. (Use CreateTransaction2.)

1000

CreateTransaction2

Create a transaction.

1000

CreateAccount

Activate an account. (Use CreateAccount2.)

1000

CreateAccount2

Activate an account.

1000

GetAccount

Query information about an account, including TRX balance, TRC-10 balances, stake information, vote information, and permissions.

600

UpdateAccount

Modify the account name. (Use UpdateAccount2.)

1000

UpdateAccount2

Modify the account name.

1000

VoteWitnessAccount

Vote for super representatives (SRs or witnesses). Return the transaction. The transaction needs to be broadcasted after signed. (Use VoteWitnessAccount2.)

1000

VoteWitnessAccount2

Vote for witnesses. Return the transaction. The transaction needs to be broadcasted after signed.

1000

UpdateSetting

Update the consume_user_resource_percent parameter of a smart contract. An unsigned transaction is returned and needs to be broadcasted after signed.

1000

UpdatEenergyLimit

Update the origin_energy_limit parameter of a smart contract. An unsigned transaction is returned and needs to be broadcasted after signed.

1000

CreateAssetIssue

Issue a TRC-10 token. (Use CreateAssetIssue2.)

1000

CreateAssetIssue2

Issue a TRC-10 token.

1000

UpdateWitness

Edit the URL of the witness's official website. The transaction needs to be broadcasted after signed. (Use UpdateWitness2.)

1000

UpdateWitness2

Edit the URL of the witness's official website. The transaction needs to be broadcasted after signed.

1000

CreateWitness

Apply to become a witness. Return the transaction. The transaction needs to be broadcasted after signed. (Use CreateWitness2.)

1000

CreateWitness2

Apply to become a witness. Return the transaction. The transaction needs to be broadcasted after signed.

1000

TransferAsset

Transfer TRC-10 tokens. (Use TransferAsset2.)

1000

TransferAsset2

Transfer TRC-10 tokens.

1000

ParticipateAssetIssue

Participate in issuing a TRC-10 token. (Use ParticipateAssetIssue2.)

1000

ParticipateAssetIssue2

Participate in issuing a TRC-10 token.

1000

FreezeBalance2

In Stake 2.0, stake an amount of TRX to obtain bandwidth or energy, and obtain equivalent TP according to the staked amount. (Discarded.)

1000

FreezeBalanceV2

In Stake 2.0, stake an amount of TRX to obtain bandwidth or energy, and obtain equivalent TP according to the staked amount.

1000

UnfreezeBalance

Unstake the TRX staked during Stake 1.0, release the obtained bandwidth or energy and TP, and automatically cancel all votes. (Use UnfreezeBalance2.)

1000

UnfreezeBalance2

Unstake the TRX staked during Stake 1.0, release the obtained bandwidth or energy and TP, and automatically cancel all votes.

1000

UnfreezeBalanceV2

Unstake some TRX staked in Stake 2.0, release the corresponding amount of bandwidth or energy, and voting rights (TRON Power, TP).

1000

UnfreezeAsset

Unstake a TRC-10 token that has passed the minimum freeze duration. (Use UnfreezeAsset2.)

1000

UnfreezeAsset2

Unstake a TRC-10 token that has passed the minimum freeze duration.

1000

WithdrawBalance

Withdraw rewards by witnesses or users, available every 24 hours. Witnesses can withdraw the balance from the account allowance into the account balance. Users can claim the voting rewards and deposit into their accounts. (Use WithdrawBalance2.)

1000

WithdrawBalance2

Withdraw rewards by witnesses or users, available every 24 hours. Witnesses can withdraw the balance from the account allowance into the account balance. Users can claim the voting rewards and deposit into their accounts.

1000

WithdrawExpireUnfreeze

Withdraw the funds after a waiting period.

1000

DelegateResource

Delegate bandwidth or energy resources to other accounts in Stake 2.0.

1000

CancelAllUnfreezeV2

Cancel unstakings. Unstaked funds still in the waiting period will be re-staked. Unstaked funds that exceeded the waiting period will be automatically withdrawn to the owner's account.

1000

UpdateAsset

Update the basic TRC-10 token information. (Use UpdateAsset2.)

1000

UpdateAsset2

Update the basic TRC-10 token information.

1000

ProposalCreate

Create a proposal transaction. An unsigned transaction is returned and needs to be broadcasted after signed.

1000

ProposalApprove

Approve a proposal transaction. An unsigned transaction is returned and needs to be broadcasted after signed.

1000

ProposalDelete

Delete a proposal transaction. An unsigned transaction is returned and needs to be broadcasted after signed.

1000

ExchangeCreate

Create a transaction pair. The transaction needs to be broadcasted after signed. Note that successful execution, signing, and broadcast of this API call will deduct 1024 TRX from the user's account.

1000

ExchangeInject

Inject capital into the transaction pair to prevent price fluctuation. The transaction needs to be broadcasted after signed.

1000

ExchangeWithdraw

Withdraw a transaction pair. The transaction needs to be broadcasted after signed.

1000

ExchangeTransaction

Participate in a transaction pair. The transaction needs to be broadcasted after signed.

1000

GetAssetIssueByAccount

Query the TRC-10 token information issued by an account.

1000

GetAccountNet

Query the bandwidth information of an account.

1000

GetAccountResource

Query the resource information of an account (bandwidth, energy, etc).

1000

GetAssetIssueByName

Query the TRC-10 token information by token name.

200

GetAssetIssueListByName

Query the list of all the TRC-10 tokens with a same name.

200

GetAssetIssueById

Query the TRC-10 token information by ID.

1000

GetNowBlock

Query the latest block information. (Use GetNowBlock2.)

1000

GetNowBlock2

Query the latest block information.

1000

GetBlockByNum

Query the block object corresponding to the block height. (Use GetBlockByNum2.)

15

GetBlockByNum2

Query the block object corresponding to the block height.

15

GetTransactionCountByBlockNum

Return the number of transactions in a specified block.

1000

GetBlockById

Query the block by ID (block hash).

15

GetBlockByLimitNext

Query the block objects in the range specified. (Use GetBlockByLimitNext2.)

10

GetBlockByLimitNext2

Query the block objects in the range specified.

10

GetBlockByLatestNum

Query the latest block objects. (Use GetBlockByLatestNum2.)

10

GetBlockByLatestNum2

Query the latest block objects.

10

GetTransactionById

Query transaction information by transaction hash.

1000

DeployContract

Return TransactionExtention, which contains an unsigned transaction.

1000

GetContract

Query the contract information from the blockchain, including the bytecode of the contract, ABI, configuration parameters, etc.

300

GetContractInfo

Query the contract information from the blockchain. It is different from the wallet/getcontract API. This API returns not only the bytecode but also the runtime bytecode of the contract. Compared with bytecode, runtime bytecode does not contain constructor and constructor parameter information.

200

TriggerContract

Return TransactionExtention. The transaction needs to be broadcasted after signed.

1000

TriggerConstantContract

Invoke the read-only function of a contract, invoke the non-read-only function of a contract (for predicting whether the transaction can be successfully executed and the estimate energy consumption), or estimate the energy consumption of contract deployment.

1000

EstimateEnergy

Estimate the energy required for the successful execution of smart contract transactions or deploying a contract.

1000

ClearContractAbi

Clear the ABI info of a smart contract. An unsigned transaction is returned and needs to be broadcasted after signed.

1000

ListWitnesses

List all witnesses.

250

GetDelegatedResource

Query all resources delegations during Stake 1.0 phase from an account to another account. (Use GetDelegatedResourceV2.)

1000

GetDelegatedResourceV2

Query all resources delegations during Stake 1.0 phase from an account to another account.

1000

GetDelegatedResourceAccountIndex

Query the resource delegation by an account during Stake 1.0 phase and list all addresses that have delegated resources to an account.

1000

GetDelegatedResourceAccountIndexV2

Query the resource delegation index in Stake 2.0.

1000

GetCanDelegatedMaxSize

Query the amount of delegatable resources share of the specified resource type for an address. The unit is sun.

1000

GetAvailableUnfreezeCount

Query the remaining times of executing unstake operations in Stake 2.0.

1000

GetCanWithdrawUnfreezeAmount

Query the withdrawable balance at the specified timestamp.

1000

ListProposals

List all proposals.

300

GetProposalById

Query a proposal based on the ID and return proposal details.

1000

ListExchanges

List all transaction pairs.

400

GetExchangeById

Query a transaction pair based on ID.

1000

GetChainParameters

Query all proposal parameters that the witnesses can set.

1000

GetAssetIssueList

Query the list of all the TRC-10 tokens.

5

GetPaginatedAssetIssueList

Query the list of all the TRC-10 tokens by page.

20

GetNextMaintenanceTime

Return the timestamp of the next voting time in milliseconds.

1000

GetTransactionInfoById

Return transaction information, including the transaction fee, block height, and VM logs.

1000

AccountPermissionUpdate

Update the account's permission.

1000

GetTransactionSignWeight

Query the total weight of a signed transaction.

1000

GetTransactionApprovedList

Query the account address list which signed the transaction, by the transaction content and signature information.

1000

GetNodeInfo

Query node information.

700

GetRewardInfo

Get the rewards that a witness or a user has not yet withdrawn.

1000

GetBrokerageInfo

Query the witness's brokerage ratio.

1000

UpdateBrokerage

Update the witness's brokerage setting. The transaction needs to be broadcasted after signed.

1000

GetTransactionInfoByBlockNum

Query transaction information in a block specified.

150

GetBurnTrx

Query the amount of TRX burned due to on-chain transaction fees since No. 54 Committee Proposal took effect.

1000

GetTransactionFromPending

Get transaction details from the pending pool.

1000

GetTransactionListFromPending

Get transaction list information from the pending pool.

1000

GetPendingSize

Get the size of the pending pool queue.

1000

GetBlock

Query block header information or entire block information according to block height or block hash.

50

UnDelegateResource

Cancel the delegation of bandwidth or energy resources to other accounts in Stake 2.0.

1000

Table 3 gRPC solidity APIs

API Method

Description

Throughput (Time/s)

GetAccount

Query information about an account, including TRX balance, TRC-10 balances, stake information, vote information, and permissions.

600

ListWitnesses

List all witnesses.

250

GetAssetIssueList

Query the list of all the TRC-10 tokens.

5

GetPaginatedAssetIssueList

Query the list of all the TRC-10 tokens by page.

20

GetAssetIssueByName

Query the TRC-10 token information by token name.

200

GetAssetIssueListByName

Query the list of all the TRC-10 tokens with a same name.

200

GetAssetIssueById

Query the TRC-10 token information by ID.

1000

GetNowBlock

Query the latest block information. (Use GetNowBlock2.)

1000

GetNowBlock2

Query the latest block information.

1000

GetBlockByNum

Query the block object corresponding to the block height. (Use GetBlockByNum2.)

15

GetBlockByNum2

Query the block object corresponding to the block height.

15

GetTransactionCountByBlockNum

Return the number of transactions in a specified block.

1000

GetDelegatedResource

Query all resources delegations during Stake 1.0 phase from an account to another account. (Use GetDelegatedResourceV2.)

1000

GetDelegatedResourceV2

Query all resources delegations during Stake 1.0 phase from an account to another account.

1000

GetDelegatedResourceAccountIndex

Query the resource delegation by an account during Stake 1.0 phase and list all addresses that have delegated resources to an account.

1000

GetDelegatedResourceAccountIndexV2

Query the resource delegation index in Stake 2.0.

1000

GetCanDelegatedMaxSize

Query the amount of delegatable resources share of the specified resource type for an address. The unit is sun.

1000

GetAvailableUnfreezeCount

Query the remaining times of executing unstake operations in Stake 2.0.

1000

GetCanWithdrawUnfreezeAmount

Query the withdrawable balance at the specified timestamp.

1000

GetExchangeById

Query a transaction pair based on ID.

1000

ListExchanges

List all transaction pairs.

400

GetTransactionById

Query transaction information by transaction hash.

1000

GetTransactionInfoById

Return transaction information, including the transaction fee, block height, and VM logs.

1000

GetRewardInfo

Get the rewards that a witness or a user has not yet withdrawn.

1000

GetBrokerageInfo

Query the witness's brokerage ratio.

1000

TriggerConstantContract

Invoke the read-only function of a contract, invoke the non-read-only function of a contract (for predicting whether the transaction can be successfully executed and the estimate energy consumption), or estimate the energy consumption of contract deployment.

1000

EstimateEnergy

Estimate the energy required for the successful execution of smart contract transactions or deploying a contract.

1000

GetTransactionInfoByBlockNum

Query transaction information in a block specified.

150

GetBurnTrx

Query the amount of TRX burned due to on-chain transaction fees since No. 54 Committee Proposal took effect.

1000

GetBlock

Query block header information or entire block information according to block height or block hash.

50