Tronergy Docs
Order

Create Smart Order

POST
/api/orders/smart
Server
/api/orders/smart

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

Enter JWT token

In: header

Request Body

application/jsonRequired

address
Required
string

The Tron wallet address of the user placing the order. Must be a valid Tron address.

recipientAddress
Required
string

The Tron wallet address to which the TRC20 token will be sent. Must be a valid Tron address provided by the user as the recipient.

tokenContractstring

Optional TRC20 contract address indicating the token to be used for the transaction.

periodstring

The time period for which the energy will be valid.

Default: "1H"Value in: "1H"

activateWalletboolean

If true, the system will attempt to activate the TRON wallet associated with the provided address. TRON accounts must be explicitly activated before use, and this requires sending 1 TRX to the address. The total cost will be the specified energy cost plus 1 TRX for activation.

callbackstring

Optional callback URL where a notification will be sent upon order completion. This URL should be accessible by the API service.

curl -X POST "https://api.tronergy.io/api/orders/smart" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "THQbYWkPDChusW8gNSmrsHeM3Nd8NgrawJ",
    "recipientAddress": "THQbYWkPDChusW8gNSmrsHeM3Nd8NgrawJ",
    "tokenContract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
    "period": "1H",
    "activateWallet": true,
    "callback": "https://example.com/callback"
  }'

{
  "order": {
    "id": "12345-abcde",
    "status": "SUCCESS",
    "address": "TXY1kVZ74wLg4mPRPoK9o1RG99NY82MHEV",
    "energy": 66000,
    "cost": 6.5
  }
}