v1

latestOpenAPI 3.0.32026-07-1320201.0 MB
Tron Transactions

Send TRX

This method creates a new transaction. <br> If the transaction is successful, it will return the transaction hash. <br> If the transaction fails, it will return an error message. <br>

post/api/v2/tron/transactions

Headers

X-Network'testnet' | 'mainnet'

Specify "testnet" for test network or leave empty for main network. Defaults to "mainnet" if not provided.

Authorizationstring required

Bearer token for authorization. Required for authenticated endpoints.

Content-Type'application/json' | 'application/x-www-form-urlencoded' | 'multipart/form-data' required

The MIME type of the request body.

Request body

amountnumber required

The amount to send.

passwordstring

This field is required when <code>privatekey</code> is not present.

privatekeystring

The private key of the sender.

tostring required

The address to send the transaction to. Must match the regex /^T[a-zA-Z0-9]{33}$/.

fromstring required

The address to send the transaction from. Must match the regex /^T[a-zA-Z0-9]{33}$/.

Example request

{
  "amount": 1,
  "password": "|]|{+-",
  "privatekey": "708c419d1b9ae123047f70787a503b6ba51e048a27966e0220cc5feXXXXXXXXX",
  "to": "TUwmZghA7u2GxGxKaxM1mkCmsTF4wHs4vp",
  "from": "TLkkCeNdJKPNUwucdro84WjswkzM62LCTH"
}

Response

Succesfully created transaction

statusinteger
okboolean
messagestring

Example response

{
  "status": 201,
  "ok": true,
  "message": "Succesfully created transaction",
  "data": {
    "txid": "0x73344d178812d4919e9002c560781f288030edf72ece88823ef1c377dfb71f27"
  }
}