Skip to main content

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 or RECEIVE.
  • 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 is PENDING.
  • created_at: (int) The unix timestamp of when the transaction was first seen by the platform.
  • currency: (string) The currency_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 in currency. If SEND, the service fee is paid in addition to the amount. If RECEIVE, the service fee is paid from the amount.
  • status: (string) The status of the transaction. PENDING, SUCCESS or FAILED.
  • 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 is PENDING.
  • 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, or sweepTRC20.
  • 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 or FAILED.
  • 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",
}