Skip to content

Order energy for 5 minutes​

POST
/order5m

Five-minute energy rental from the internal NETTS pools. External providers are not used here, unlike /order1h.

Because of that, a temporary refusal is possible under peak load: on a 503 wait 2–3 seconds and retry, or fall back to /order1h, which has external providers.

The price is lower than the hourly rate. An inactive receiver address is activated automatically and charged once per address; the activation hash arrives in a separate activationHash field.

Idempotency. By default the request is identified by the combination of the timestamp (a 2-second window), the amount, the receiver address and the API key. Send the X-Idempotency-Key header to decide that yourself — see the parameter below. Repeating the same request does not charge you twice: you get 208 with the cached response, or 409 if the first one is still running. Note the flip side: two orders you genuinely want, identical and sent inside the same window, are taken for one — the second is not placed and returns the first one's response. Leave more than two seconds between them, or send your own key.

Authorizations​

ApiKeyAuth

API key from the dashboard. Some Host Mode endpoints also accept the key as an api_key field in the request body — this is stated in the schema of the particular operation.

Type
API Key (header: X-API-KEY)

Parameters​

Header Parameters

X-Real-IP*

An IP address from the key's whitelist. A request from an address outside the whitelist is rejected with 401.

Type
string
Required
Example"203.0.113.10"
Format
"ipv4"
X-Idempotency-Key

Idempotency key you generate yourself: exactly 64 lowercase hexadecimal characters, i.e. a SHA-256 digest — the same rules as on /order1h. Note that this differs from /withdraw and /bandwidth, which take a base64 key. Build it from your API key so the value is unique to your account and reproducible on a retry: hmac_sha256(api_key, "receiveAddress:amount:period:nonce").hexdigest(), where nonce stays the same across retries of one order and differs between orders. Include the period: keys are shared with /order1h, so the same key sent to both returns the first order's response for the second request. If the header is omitted, the server derives a key itself from the API key, the receiver address, the amount, a 2-second time window and the client IP. The key lives 24 hours and is scoped to your account: the same value sent by another account never returns your result, though it is refused with 409 until your key expires.

Type
string
Example"7e5a4f3b2c1d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f"
Pattern
"^[a-f0-9]{64}$"

Request Body​

application/json
JSON
{
  
"amount": 65000,
  
"receiveAddress": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"
}

Responses​

The order was fulfilled.

application/json
JSON
{
  
"detail": {
  
  
"code": 10000,
  
  
"msg": "Successful, 1.430 TRX deducted",
  
  
"data": {
  
  
  
"orderId": "5Mb4ee11ef86",
  
  
  
"paidTRX": 1.43,
  
  
  
"hash": "3636f97dde244fca17cdc0b2cf7fd157a4b0de94d8fbd4c190d5378ba911dfae",
  
  
  
"delegateAddress": "TNp5gsJhBmZFXgCdgjMgr8pEZ8fHgXUHDq",
  
  
  
"energy": 65050
  
  
}
  
}
}

Playground​

Authorization
Headers
Body

Samples​

Powered by VitePress OpenAPI