Energy

Get energy price

post

Request for preliminary calculation of energy purchase cost. The user provides an authentication token, as well as the parameters: energy usage period days and energy volume volume. A preliminary cost estimate is returned in the response.

Limits:

  • Energy duration period (Possible values: 1h, 1d, 3d, 7d, 14d)

  • Energy volume volume must be at least 65K and no more than 2M.

  • Energy cannot be transferred to inactive wallets.

Usage example:

  POST https://api.tronex.energy/api/v1/precountOrder
  Content-Type: application/json
  X-API-KEY: authentication_token

  {
    "days": "1d",
    "volume": 65000
  }
Authorizations
X-API-KEYstringRequired

API key for authentication

Body
daysstring · enumRequiredPossible values:
volumenumber · min: 65000 · max: 4000000RequiredExample: 65000
Responses
chevron-right
200

Default Response

application/json

Preliminary cost

durationstring · enumRequired

Energy rental period

Example: 1hPossible values:
volumenumberRequired
pricenumberRequired
summanumberRequired
post
/api/v1/precountOrder

Buy energy

post

Request to purchase energy with parameters: Energy duration period, Energy volume, and target address. The user provides an authentication token in the request header and sends a JSON payload. The response returns the status of the operation.

Limits:

  • Energy duration period (Possible values: 1h, 1d, 3d, 7d, 14d)

  • Energy volume volume must be at least 65K and no more than 2M.

  • Energy cannot be transferred to inactive wallets.

Usage example:

POST https://api.tronex.energy/api/v1/buyenergy
Content-Type: application/json
X-API-KEY: authentication_token

{
"days": "1d",
"volume": 65000,
"target": "TVVX6svz6vXGVACeH9jNMk5M3dH5SvcT71"
} ```
Authorizations
X-API-KEYstringRequired

API key for authentication

Body
daysstring · enumOptional

Energy rental period

Default: 1hExample: 1hPossible values:
volumenumber · min: 65000 · max: 4000000Optional

Amount of energy to buy

Default: 65000Example: 65000
targetstringRequired

Wallet address to receive energy

Example: TVVX6svz6vXGVACeH9jNMk5M3dH5SvcT71
Responses
chevron-right
200

Default Response

application/json

Order created successfully

daysstring · enumRequiredPossible values:
volumenumberRequired
pricenumberRequired
summanumberRequired
targetstringRequired
order_idnumberRequired
statusstring · enumRequiredPossible values:
txidstring · nullableRequired
post
/api/v1/buyenergy

Get amount of energy needed to send transaction

post

The method is used to get the amount of energy needed to send a transaction to the TRON network. The user must provide a valid authentication token in header and an array of TRON addresses in the request body.

Authorizations
X-API-KEYstringRequired

API key for authentication

Body

Array of TRON addresses to check energy cost

targetsstring[]Required
Responses
chevron-right
200

Default Response

application/json

Order created successfully

post
/api/v1/cost

Last updated