createtransaction - Tron

createtransaction. Creates an unsigned TRX transfer transaction between two addresses.

createtransaction - tron [Value: 20CU]
Creates an unsigned TRX transfer transaction between two addresses.
Use cases

Use cases

  • Build a plain TRX transfer transaction before signing and broadcasting
Constraints

Constraints

  • The returned transaction is unsigned and expires (default ~60s) if not broadcast in time
  • owner_address must have sufficient TRX balance and bandwidth
Get started
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --request POST \
     --url https://lb.drpc.live/tron/{API-KEY}/wallet/createtransaction \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{"owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "to_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "amount": 1, "visible": true}'
Copy
Response
200
{
  "visible": false,
  "txID": "6303c7639f591407ef9f34a7ac8c9c9a21151f5a6af21924502515734fc267ab",
  "raw_data": {
    "contract": [
      {
        "parameter": {
          "value": {
            "amount":        1000000,
            "owner_address": "41dd791d6b49e190062d650e6a23c575510d35f2f9",
            "to_address":    "4192ad11c1bf16b3b14b0bd6b5c7e2db73a0b5e83a"
          },
          "type_url": "type.googleapis.com/protocol.TransferContract"
        },
        "type": "TransferContract"
      }
    ],
    "ref_block_bytes": "2927",
    "ref_block_hash":  "939ece39d08a7abe",
    "expiration":      1777447527000,
    "timestamp":       1777447470038
  },
  "raw_data_hex": "0a0229272208939ece39d08a7abe40d8c483c1dd335a67080112630a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412320a1541dd791d6b49e190062d650e6a23c575510d35f2f912154192ad11c1bf16b3b14b0bd6b5c7e2db73a0b5e83a18c0843d70d68780c1dd33"
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersobject
object
owner_addressstring
[Required] The sending account's address
to_addressstring
[Required] The receiving account's address
amountinteger
[Required] Amount of TRX to send, in sun
Permission_idinteger
Permission ID used for multi-signature account operations. Defaults to the owner permission (0) if unspecified.
extra_datastring
Remarks or notes for the transaction, in Hex format.
visibleboolean
When true, addresses are base58check strings; when false (default), hex strings

Response

200
Creates an unsigned TRX transfer transaction between two addresses.

Response params

object
visibleboolean
Indicates whether addresses in this transaction are represented in base58 format (true) or hex format (false).
txIDstring
The unique transaction hash (transaction ID), computed as the SHA256 of raw_data.
raw_dataobject
The unsigned transaction body containing the contract instruction and blockchain reference data.
object
contractarray_of_objects
The list of contract instructions to be executed by this transaction.
object
parameterobject
The typed payload describing the specific contract call being made.
object
valueobject
The decoded fields of the contract — here, a plain TRX transfer.
object
amountinteger
The amount of TRX to transfer, in sun.
owner_addressstring
The address sending the TRX, in hex format.
to_addressstring
The address receiving the TRX, in hex format.
type_urlstring
The fully qualified protobuf type identifier describing which contract schema `value` should be decoded with.
typestring
The human-readable name of the contract type being executed (here, TransferContract).
ref_block_bytesstring
The last two bytes of the reference block number, used for transaction expiration and replay protection.
ref_block_hashstring
The last eight bytes of the reference block's hash, paired with ref_block_bytes for replay protection.
expirationinteger
Unix timestamp, in ms, after which this transaction is no longer valid and will be rejected by the network.
timestampinteger
Unix timestamp, in ms, marking when the transaction was created/signed by the client.
raw_data_hexstring
The hex-encoded serialized bytes of raw_data, used as the actual payload to sign and broadcast.