RPC List¶
For the specific definition of API, please refer to the following link: api/api.proto
Note
SolidityNode is deprecated. Now a FullNode supports all RPCs of a SolidityNode. New developers should deploy FullNode only.
Get account information¶
rpc GetAccount (Account) returns (Account) {}
TRX transfer¶
rpc CreateTransaction (TransferContract) returns (Transaction) {}
Broadcast transaction¶
rpc BroadcastTransaction (Transaction) returns (Return) {}
Description: Transfer, vote, issuance of token, or participation in token offering. Sending signed transaction information to node, and broadcasting it to the entire network after super representatives verification.
Create an account¶
rpc CreateAccount (AccountCreateContract) returns (Transaction) {}
Account name update¶
rpc UpdateAccount (AccountUpdateContract) returns (Transaction) {}
Vote for super representative candidates¶
rpc VoteWitnessAccount (VoteWitnessContract) returns (Transaction) {}
Query the ratio of brokerage of the super representative¶
rpc GetBrokerageInfo (BytesMessage) returns (NumberMessage) {}
Query unclaimed reward¶
rpc GetRewardInfo (BytesMessage) returns (NumberMessage) {}
Update the ratio of brokerage¶
rpc UpdateBrokerage (UpdateBrokerageContract) returns (TransactionExtention) {}
Issue a token¶
rpc CreateAssetIssue (AssetIssueContract) returns (Transaction) {}
Query of list of super representative candidates¶
rpc ListWitnesses (EmptyMessage) returns (WitnessList) {}
Application for super representative¶
rpc CreateWitness (WitnessCreateContract) returns (Transaction) {}
Description: To apply to become TRON’s Super Representative candidate.
Information update of Super Representative candidates¶
rpc UpdateWitness (WitnessUpdateContract) returns (Transaction) {}
Description: Update the website url of the SR.
Token transfer¶
rpc TransferAsset (TransferAssetContract) returns (Transaction){}
Participate a token¶
rpc ParticipateAssetIssue (ParticipateAssetIssueContract) returns (Transaction) {}
Query the list of nodes connected to the ip of the api¶
rpc ListNodes (EmptyMessage) returns (NodeList) {}
Query the list of all issued tokens¶
rpc GetAssetIssueList (EmptyMessage) returns (AssetIssueList) {}
Query the token issued by a given account¶
rpc GetAssetIssueByAccount (Account) returns (AssetIssueList) {}
Query the token information by token name¶
rpc GetAssetIssueByName (BytesMessage) returns (AssetIssueContract) {}
Query the list of tokens by timestamp¶
rpc GetAssetIssueListByTimestamp (NumberMessage) returns (AssetIssueList){}
Get current block information¶
rpc GetNowBlock (EmptyMessage) returns (Block) {}
Get a block by block height¶
rpc GetBlockByNum (NumberMessage) returns (Block) {}
Get the total number of transactions¶
rpc TotalTransaction (EmptyMessage) returns (NumberMessage) {}
Query the transaction by transaction id¶
rpc getTransactionById (BytesMessage) returns (Transaction) {}
Query the transaction by timestamp¶
rpc getTransactionsByTimestamp (TimeMessage) returns (TransactionList) {}
Stake TRX¶
This interface has been deprecated, please use FreezeBalanceV2 to stake TRX to obtain resources.
rpc FreezeBalance (FreezeBalanceContract) returns (Transaction) {}
Unstake TRX¶
Unstake the TRX staked during Stake1.0.
rpc UnfreezeBalance (UnfreezeBalanceContract) returns (Transaction) {}
Block producing reward redemption¶
rpc WithdrawBalance (WithdrawBalanceContract) returns (Transaction) {}
Unstake token balance¶
rpc UnfreezeAsset (UnfreezeAssetContract) returns (Transaction) {}
Query the next maintenance time¶
rpc GetNextMaintenanceTime (EmptyMessage) returns (NumberMessage) {}
Query the transaction fee & block information¶
rpc GetTransactionInfoById (BytesMessage) returns (TransactionInfo) {}
Query block information by block id¶
rpc GetBlockById (BytesMessage) returns (Block) {}
Update token information¶
rpc UpdateAsset (UpdateAssetContract) returns (Transaction) {}
Description: Token update can only be initiated by the token issuer to update token description, url, maximum bandwidth consumption by each account and total bandwidth consumption.
Query the list of all the tokens by pagination¶
rpc GetPaginatedAssetIssueList (PaginatedMessage) returns (AssetIssueList) {}
Deploy a smart contract¶
rpc DeployContract (CreateSmartContract) returns (TransactionExtention) {}
Trigger a smart contract¶
rpc TriggerContract (TriggerSmartContract) returns (TransactionExtention) {}
Create an market order¶
rpc MarketSellAsset (MarketSellAssetContract) returns (TransactionExtention) {};
Cancel the order¶
rpc MarketCancelOrder (MarketCancelOrderContract) returns (TransactionExtention) {};
Get all orders for the account¶
rpc GetMarketOrderByAccount (BytesMessage) returns (MarketOrderList) {};
Get all trading pairs¶
rpc GetMarketPairList (EmptyMessage) returns (MarketOrderPairList) {};
Get all orders for the trading pair¶
rpc GetMarketOrderListByPair (MarketOrderPair) returns (MarketOrderList) {};
Get all prices for the trading pair¶
rpc GetMarketPriceByPair (MarketOrderPair) returns (MarketPriceList) {};
Get order by id¶
rpc GetMarketOrderById (BytesMessage) returns (MarketOrder) {};
perform a historical balance lookup¶
rpc GetAccountBalance (AccountBalanceRequest) returns (AccountBalanceResponse){};
fetch all balance-changing transactions in a block¶
rpc GetBlockBalanceTrace (BlockBalanceTrace.BlockIdentifier) returns (BlockBalanceTrace) {};
get the burn trx amount¶
rpc GetBurnTrx (EmptyMessage) returns (NumberMessage) {};
Freeze TRX¶
rpc FreezeBalanceV2 (FreezeBalanceV2Contract) returns (TransactionExtention) {}
UnFreeze TRX¶
rpc UnfreezeBalanceV2 (UnfreezeBalanceV2Contract) returns (TransactionExtention) {}
Withdraw Staked TRX¶
rpc WithdrawExpireUnfreeze (WithdrawExpireUnfreezeContract) returns (TransactionExtention) {}
Delegate Resource¶
rpc DelegateResource (DelegateResourceContract) returns (TransactionExtention) {}
UnDelegate Resource¶
rpc UnDelegateResource (UnDelegateResourceContract) returns (TransactionExtention) {}
Query transaction information in the pending pool¶
rpc GetTransactionFromPending (BytesMessage) returns (Transaction) {};
Query the pending pool transaction id list¶
rpc GetTransactionListFromPending (EmptyMessage) returns (TransactionIdList) {};
Query the size of the pending pool¶
rpc GetPendingSize (EmptyMessage) returns (NumberMessage) {};
Nodes: FullNode
Cancel UnFreeze¶
rpc CancelAllUnfreezeV2 (CancelAllUnfreezeV2Contract) returns (TransactionExtention) {}
Get bandwidth unit price¶
rpc GetBandwidthPrices (EmptyMessage) returns (PricesResponseMessage) {}
Get energy unit price¶
rpc GetEnergyPrices (EmptyMessage) returns (PricesResponseMessage) {}
Get transaction memo fee¶
rpc GetMemoFee (EmptyMessage) returns (PricesResponseMessage) {}