Bandwidth
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
volumemust 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
}API key for authentication
Amount of bandwidth to buy
1000Preliminary cost
Bad request error
Unauthorized error
POST /api/v1/precountBandwidth HTTP/1.1
Host: api.tronex.energy
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"days": "1h",
"volume": 1000
}{
"duration": "1h",
"volume": 1000,
"price": 975,
"summa": 1.27
}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, 3d, 7d, 14d)
Bandwidth volume
volumemust be at least 65K and no more than 2M.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"
} ```API key for authentication
Bandwidth rental period
1hExample: 1hPossible values: Amount of bandwidth to buy
1000Example: 1000Wallet address to receive bandwidth
TVVX6svz6vXGVACeH9jNMk5M3dH5SvcT71Order created successfully
Bad request error
Unauthorized error
Insufficient funds error
POST /api/v1/buybandwidth HTTP/1.1
Host: api.tronex.energy
X-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 73
{
"days": "1h",
"volume": 1000,
"target": "TVVX6svz6vXGVACeH9jNMk5M3dH5SvcT71"
}{
"days": "1h",
"volume": 1000,
"price": 975,
"summa": 1.27,
"target": "TVVX6svz6vXGVACeH9jNMk5M3dH5SvcT71",
"order_id": 123456,
"status": "Pending",
"txid": "8a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7a8b9c0d1e2f3"
}Last updated