Tronergydocs

API overview

Base URL, authentication, request and response format, pagination, idempotency and rate limits.

The Tronergy API is JSON over HTTPS. Call it from your backend with an API key.

Base URL

https://apiv2.tronergy.io

Every path in this reference starts with /api, for example POST https://apiv2.tronergy.io/api/chain_relayers/portal/execute.

Authentication

Send your API key in the x-api-key header:

curl https://apiv2.tronergy.io/api/chain_relayers/portal/operations \
  -H "x-api-key: omk_1a2b3c4d.5e6f..."

Authorization: ApiKey omk_... also works. Authorization: Bearer omk_... does not.

Keep API keys on your server. Never ship them in a browser or mobile app.

The Pricing endpoints are public: they need no key and can be called from a browser.

A key acts as the user who created it, with that user's permissions. A few actions need a signed-in dashboard session and answer 403 with code: "SESSION_REQUIRED" when called with an API key: creating an API key, withdrawing, changing balance alerts, creating a node link and changing node proxy settings. These endpoints are marked in the reference. See Authentication.

Environments

Relay and balance endpoints take an environment of sandbox or live. Your key works in both, and each has its own balance.

environment defaults to sandbox. Send "environment": "live" for real transactions. See Sandbox.

Requests and responses

Send JSON bodies with content-type: application/json. Every response has an ok field.

Success
{ "ok": true, "operationId": "8d0f6a52-6a3b-4a43-b1b0-7f9c2f0b3c11", "status": "pending" }
Error
{ "ok": false, "error": "TX_EXPIRED", "message": "Transaction expired", "hint": "Call POST /construct-tx to build a fresh transaction." }

Match on error. See Errors for every code.

Amounts:

  • Relay endpoints return TRX as decimal strings, for example "2.950000".
  • Balance endpoints return integer strings in sun, the smallest unit. "25000000" is 25 TRX.

Pagination

List endpoints take page (starts at 1) and pageSize (at most 100, default 20). They return total, and most also return totalPages. Newest items come first.

Idempotency

POST /api/chain_relayers/portal/execute requires an idempotencyKey field in the body: a UUID you generate once per relay.

  • The first request with a key creates an operation (202).
  • A repeat with the same key returns that operation (200) and creates nothing.
  • To try a failed relay again, use a new key.

Batches use batchIdempotencyKey. Withdrawals also take an idempotencyKey.

Rate limits

Limits count per dashboard user over a rolling minute. All API keys of one user share them.

EndpointLimit
POST /api/chain_relayers/portal/execute100 per minute
POST /api/chain_relayers/portal/estimate30 per minute
POST /api/chain_relayers/portal/construct-tx30 per minute
POST /api/chain_relayers/portal/batch10 per minute, and each item uses 1 of the 100 execute points
POST /api/gas_tank/portal/withdraw25 per hour
GET /api/relayer_tron/public/rate60 per minute per IP address (no key needed)

Over a limit you get 429. Execute, estimate and construct-tx also send Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Batch does not; wait up to a minute.

Resources