Partner API
Buy TRON energy for your users automatically: check the price, order for an address, track the status. The price is locked in at order time and charged to your prepaid balance.
Authentication
Send your partner API key with every request in the header X-API-Key (or Authorization: Bearer …). Keys are issued in your account or in the Telegram bot; keep it on your server and never expose it in client-side code.
curl https://cryptosales.io/api/v1/balance \ -H "X-API-Key: cs_live_…"
Amounts and balance
All amounts are strings in TRX with 6 decimal places, for example "3.640000". Orders are paid from your prepaid balance: the price is held when an order is created and, if the order fails, it is refunded automatically.
Balance
{ "balance": "96.360000", "name": "Your company" }
Price
The current price for your account. Handy to show your user before ordering; the final price is locked in when the order is created.
| Parameter | Type | Description |
|---|---|---|
| energy | integer | Energy amount. 65,000 for a USDT transfer, 131,000 for a transfer to an address without USDT. |
| duration | string | 15m, 1h, 3h, 6h, 1d, 3d, 7d, 14d, 30d. Default: 1h. |
{
"energy": 65000, "duration": "1h", "available": true,
"price": "3.640000", "priceUsd": 1.2,
"burn": "6.500000", "savingsPct": 44
}
GET /api/v1/prices?energy=65000 returns prices for all available periods at once: {"prices": [ … ]}.
Create an order
| Field | Type | Description |
|---|---|---|
| receiveAddress | string | The TRON address energy is delegated to. Required. |
| energy | integer | Energy amount. Required. |
| duration | string | Rental period, default 1h. |
| clientRef | string | Your unique order ID (up to 128 characters). Recommended. |
clientRef returns the order already created and never charges you twice. Always send clientRef and retry the request on network errors.curl -X POST https://cryptosales.io/api/v1/orders \ -H "X-API-Key: cs_live_…" \ -H "Content-Type: application/json" \ -d '{ "receiveAddress": "TXk8…", "energy": 65000, "duration": "1h", "clientRef": "withdraw-1842" }'
// 201 Created { "id": "cs_8f2a91c04be7d3a1e2f0", "clientRef": "withdraw-1842", "receiveAddress": "TXk8…", "energy": 65000, "duration": "1h", "price": "3.640000", "status": "success", "refunded": false, "createdAt": "2026-10-26T18:30:12Z" }
Energy usually arrives within seconds and the status is immediately success. If the status is pending — poll the order with the method below every 10–30 seconds.
Order status
For {id} you can pass our order ID or your clientRef. The response is the order object, the same as on creation.
List orders
{ "orders": [ … ], "total": 128 }
Order statuses
| Status | Meaning | |
|---|---|---|
| processing | The order is accepted and being filled. | |
| pending | Waiting for the network to confirm the delegation. | |
| success | Energy has been delegated to the address. | |
| failed | The order failed and the price was refunded to your balance (refunded: true). | |
| refunded | Funds were returned manually after a review. |
Errors and limits
Errors are returned with an HTTP status code and the body {"error": "description"}.
| Code | Reason | |
|---|---|---|
| 400 | Invalid parameters: address, amount or period. | |
| 401 | Invalid API key. | |
| 402 | Insufficient balance. | |
| 403 | Partner access is suspended. | |
| 404 | Order not found. | |
| 429 | Rate limit exceeded — 300 requests per minute. | |
| 503 | No offers available, or the order failed (funds returned). |

API