Bandwidth

Get bandwidth price

post

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

Limits:

  • Bandwidth duration period (Possible values: 1h = 1 hour, 3d = 3 days, 7d = 7 days)

  • Bandwidth volume volume must be at least 1K and no more than 2M.

  • Bandwidth cannot be transferred to inactive wallets.

Usage example:

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

  {
    "days": "1h",
    "volume": 1000
  }
Authorizations
X-API-KEYstringRequired

API key for authentication

Body
daysstring · enumRequiredPossible values:
volumenumber · min: 1000 · max: 2000000Required

Amount of bandwidth to buy

Example: 1000
Responses
chevron-right
200

Default Response

application/json

Preliminary cost

durationstring · enumRequired

Bandwidth rental period

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

Buy bandwidth

post

Request to purchase bandwidth with parameters: Bandwidth duration period, Bandwidth 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:

  • Bandwidth duration period (Possible values: 1h, 1d)

  • Bandwidth volume volume must be at least 1K and no more than 30K.

  • Bandwidth cannot be transferred to inactive wallets.

Usage example:

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

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

API key for authentication

Body
daysstring · enumOptional

Bandwidth rental period

Default: 1hExample: 1hPossible values:
volumenumber · min: 1000 · max: 30000Optional

Amount of bandwidth to buy

Default: 1000Example: 1000
targetstringRequired

Wallet address to receive bandwidth

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/buybandwidth

Last updated