Place an order
POST
/api/v1/orders
const url = 'https://trongas.ai/api/v1/orders';const options = { method: 'POST', headers: {'X-Api-Key': '<X-Api-Key>', 'Content-Type': 'application/json'}, body: '{"resource":"example","targetAddress":"example","volume":1,"duration":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://trongas.ai/api/v1/orders \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: <X-Api-Key>' \ --data '{ "resource": "example", "targetAddress": "example", "volume": 1, "duration": "example" }'Required API-key scope: trade
Buy energy or bandwidth for an address, paid from your TRX balance.
Requires an Idempotency-Key header: retrying with the same key returns the original order instead of charging twice — always send one, and reuse it on retry.
The order settles asynchronously; it is Created on return and becomes Filled once the provider delivers. Subscribe to the order.filled / order.failed webhooks rather than polling.
402 wallet.insufficient_balance — not enough TRX. 502 — provider failed and your balance was refunded.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Idempotency-Key
string
Request Bodyrequired
Section titled “Request Bodyrequired”object
resource
null | string
targetAddress
required
string
volume
integer | string format: int64
duration
required
string
Examplegenerated
{ "resource": "example", "targetAddress": "example", "volume": 1, "duration": "example"}object
resource
null | string
targetAddress
required
string
volume
integer | string format: int64
duration
required
string
Examplegenerated
{ "resource": "example", "targetAddress": "example", "volume": 1, "duration": "example"}object
resource
null | string
targetAddress
required
string
volume
integer | string format: int64
duration
required
string
Examplegenerated
{ "resource": "example", "targetAddress": "example", "volume": 1, "duration": "example"}Responses
Section titled “Responses”OK
object
id
required
string format: uuid
resource
required
string
targetAddress
required
string
volume
required
integer | string format: int64
duration
required
string
priceTrx
required
string
activationTrx
required
string
totalTrx
required
string
status
required
string
feeSaverOrderId
required
null | integer | string format: int64
txId
required
null | string
createdAt
required
string format: date-time
object
id
required
string format: uuid
resource
required
string
targetAddress
required
string
volume
required
integer | string format: int64
duration
required
string
priceTrx
required
string
activationTrx
required
string
totalTrx
required
string
status
required
string
feeSaverOrderId
required
null | integer | string format: int64
txId
required
null | string
createdAt
required
string format: date-time
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "resource": "example", "targetAddress": "example", "volume": 1, "duration": "example", "priceTrx": "example", "activationTrx": "example", "totalTrx": "example", "status": "example", "feeSaverOrderId": 1, "txId": "example", "createdAt": "2026-04-15T12:00:00Z"}object
id
required
string format: uuid
resource
required
string
targetAddress
required
string
volume
required
integer | string format: int64
duration
required
string
priceTrx
required
string
activationTrx
required
string
totalTrx
required
string
status
required
string
feeSaverOrderId
required
null | integer | string format: int64
txId
required
null | string
createdAt
required
string format: date-time
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "resource": "example", "targetAddress": "example", "volume": 1, "duration": "example", "priceTrx": "example", "activationTrx": "example", "totalTrx": "example", "status": "example", "feeSaverOrderId": 1, "txId": "example", "createdAt": "2026-04-15T12:00:00Z"}Payment Required
object
type
null | string
title
null | string
status
null | integer | string format: int32
detail
null | string
instance
null | string
object
type
null | string
title
null | string
status
null | integer | string format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
type
null | string
title
null | string
status
null | integer | string format: int32
detail
null | string
instance
null | string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}