API
This section contains the JSON-RPC API technical documentation for Tron wallets.
info
Click here to learn how to authenticate and send JSON-RPC requests.
Endpoint
The JSON-RPC API is exposed at https://api.coinrpc.com/tron
.
Transaction Object
Below describes a transaction object
returned by some API methods.
amount
: (string) The amount of tokens transacted.block_number
: (int) The number of the block containing the transaction.null
when transaction is not yet in a block.category
: (string) The type of transaction.SEND
orRECEIVE
.comment
: (string) Optional comment only visible to the wallet owner.confirmed_at
: (int) The unix timestamp of when the transaction was confirmed by the platform.null
when status isPENDING
.created_at
: (int) The unix timestamp of when the transaction was first seen by the platform.currency
: (string) Thecurrency_id
of tokens transacted.data
: (string) The hex encoded data on the blockchain.null
if not attached to the transaction.guid
: (string) The unique transaction ID on the platform.network_fee
: (string) The network fee paid for the transaction. Paid in ETH.recipient
: (string) The address of the receipient.sender
: (string) The address of the sender.service_fee
: (string) The service fee paid for the transaction. Paid incurrency
. IfSEND
, the service fee is paid in addition to theamount
. IfRECEIVE
, the service fee is paid from theamount
.status
: (string) The status of the transaction.PENDING
,SUCCESS
orFAILED
.tx_hash
: (string) The transaction hash on the blockchain.
{
"amount": "5",
"block_number": 51495541,
"category": "RECEIVE",
"comment": "my transaction",
"confirmed_at": 1698953511,
"created_at": 1698953511,
"currency": "trc20-USDT",
"data": null,
"guid": "ABCD1234ABCD",
"network_fee": "0.135",
"recipient": "TA7LC4LtwAmyYzZ8uNfBRm4UXFQBVhTQ61",
"sender": "TJx8C58Nm9YaWkTyXthkLWbEBUvnoqUp9T",
"service_fee": "0",
"status": "SUCCESS",
"tx_hash": "18b73479788448a851f1a36c28281c1524a8d1b723d96a18dc059de7f89d17bb",
}
Execution Object
Below describes a execution object
returned by some API methods.
block_number
: (int) The number of the block containing the execution.null
when execution is not yet in a block.confirmed_at
: (int) The unix timestamp of when the transaction was confirmed by the platform.null
when status isPENDING
.created_at
: (int) The unix timestamp of when the transaction was first seen by the platform.func_name
: (string) The name the execution function.constructor
,createAddresses
,sweepTRX
,sweepTRC10
, orsweepTRC20
.guid
: (string) The unique execution ID on the platform.network_fee
: (string) The network fee paid for the execution. Paid in ETH.notes
: (string) Description of the execution.status
: (string) The status of the execution.PENDING
,SUCCESS
orFAILED
.tx_hash
: (string) The transaction hash on the blockchain.
{
"block_number": 51495541,
"confirmed_at": 1700575680,
"created_at": 1700575618,
"func_name": "createAddresses",
"guid": "C43737E38CF4",
"network_fee": "14.912900",
"notes": "Create 2 addresses",
"status": "SUCCESS",
"tx_hash": "ca860a830b39196e2d05d6433e2870de758c2efc63f8df0db013b9821254a6e6",
}