API v1 · REST, JSON

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.

Base URL https://cryptosales.io

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

GET/api/v1/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.

GET/api/v1/price?energy=65000&duration=1h
ParameterTypeDescription
energyintegerEnergy amount. 65,000 for a USDT transfer, 131,000 for a transfer to an address without USDT.
durationstring15m, 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

POST/api/v1/orders
FieldTypeDescription
receiveAddressstringThe TRON address energy is delegated to. Required.
energyintegerEnergy amount. Required.
durationstringRental period, default 1h.
clientRefstringYour unique order ID (up to 128 characters). Recommended.
Idempotency. Repeating a request with the same 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

GET/api/v1/orders/{id}

For {id} you can pass our order ID or your clientRef. The response is the order object, the same as on creation.

List orders

GET/api/v1/orders?limit=20&offset=0
{ "orders": [ … ], "total": 128 }

Order statuses

StatusMeaning
processingThe order is accepted and being filled.
pendingWaiting for the network to confirm the delegation.
successEnergy has been delegated to the address.
failedThe order failed and the price was refunded to your balance (refunded: true).
refundedFunds were returned manually after a review.

Errors and limits

Errors are returned with an HTTP status code and the body {"error": "description"}.

CodeReason
400Invalid parameters: address, amount or period.
401Invalid API key.
402Insufficient balance.
403Partner access is suspended.
404Order not found.
429Rate limit exceeded — 300 requests per minute.
503No offers available, or the order failed (funds returned).
Need a key or custom terms? Get in touch.