Tronergydocs

Operations

Get, list, count and cancel your relay operations.

Every accepted relay is an operation. You only see operations created by your own user and its API keys. Statuses: pending, reserved, executing, confirming, then one final status: completed, failed, voided or expired. See Track status.

Get an operation

Returns one operation with its status, fees and transaction hashes.

GET/api/chain_relayers/portal/operations/:id
curl "https://apiv2.tronergy.io/api/chain_relayers/portal/operations/8d0f6a52-6a3b-4a43-b1b0-7f9c2f0b3c11" \
  -H "x-api-key: $TRONERGY_API_KEY"
Parameters
idstringrequiredpath

Operation ID returned by Execute.

Response
{
  "ok": true,
  "operation": {
    "id": "8d0f6a52-6a3b-4a43-b1b0-7f9c2f0b3c11",
    "chain": "tron",
    "mode": "sponsored_broadcast",
    "status": "completed",
    "environment": "live",
    "estimatedFee": "2.950000",
    "estimatedFeeUsd": "0.840000",
    "actualFee": "2.950000",
    "actualFeeUsd": "0.840000",
    "feeUnit": "TRX",
    "errorCode": null,
    "errorMessage": null,
    "txHash": "c0ffee...",
    "txHashSecondary": null,
    "chainDetails": { "explorerUrl": "https://tronscan.org/#/transaction/c0ffee...", "blockNumber": 66543210 },
    "progress": { "phase": "completed", "updatedAt": "2026-10-21T10:01:07.000Z" },
    "createdAt": "2026-10-21T10:01:00.000Z",
    "updatedAt": "2026-10-21T10:01:07.000Z"
  }
}
  • actualFee is what you were charged, once finished.
  • txHash is your user's transaction. For token_pay and trx_fee_token_pay, txHashSecondary is the fee transaction.
  • errorCode and errorMessage are set when status is failed.
  • chainDetails and progress are optional detail for display. requestPayload and timing are diagnostic; do not depend on their shape.

Unknown IDs and other customers' operations return 404 Operation not found.

List operations

Returns your operations, newest first.

GET/api/chain_relayers/portal/operations
curl "https://apiv2.tronergy.io/api/chain_relayers/portal/operations?page=1&pageSize=50&status=failed&environment=live" \
  -H "x-api-key: $TRONERGY_API_KEY"
Parameters
pagenumberquery

Page number. Defaults to 1.

pageSizenumberquery

Items per page. Default 20, max 100.

status"pending" | "reserved" | "executing" | "confirming" | "completed" | "failed" | "voided" | "expired"query

Filter by status.

modestringquery

Filter by mode, for example token_pay.

chainstringquery

Filter by chain.

environment"sandbox" | "live"query

sandbox or live.

dateFromstringquery

From date, YYYY-MM-DD.

dateTostringquery

To date, YYYY-MM-DD. Includes the whole day (UTC).

format"json" | "csv"query

csv downloads a file of up to 10,000 rows and ignores paging. Defaults to json.

Response
{
  "ok": true,
  "operations": [
    {
      "id": "8d0f...",
      "chain": "tron",
      "mode": "sponsored_broadcast",
      "status": "failed",
      "environment": "live",
      "estimatedFee": "2.950000",
      "actualFee": null,
      "feeUnit": "TRX",
      "txHash": null,
      "createdAt": "2026-10-21T10:01:00.000Z",
      "updatedAt": "2026-10-21T10:01:30.000Z"
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 50,
  "totalPages": 1
}

List items are shorter than a single operation. Fetch one for errorCode, errorMessage and USD amounts.

Operation stats

Counts today's relays (since 00:00 UTC) and the average cost of completed relays this month.

GET/api/chain_relayers/portal/operations/stats
curl "https://apiv2.tronergy.io/api/chain_relayers/portal/operations/stats?environment=live" \
  -H "x-api-key: $TRONERGY_API_KEY"
Parameters
environment"sandbox" | "live"query

sandbox or live. Leave out to count both.

Response
{
  "ok": true,
  "relaysToday": 42,
  "completedToday": 40,
  "failedToday": 2,
  "avgCostNative": "2.91",
  "avgCostUsd": "0.83",
  "unit": "TRX"
}

Cancel an operation

Cancels an operation that has not started: its status must be pending or reserved. It becomes voided and the held cost is released. No body.

POST/api/chain_relayers/portal/operations/:id/cancel
curl -X POST "https://apiv2.tronergy.io/api/chain_relayers/portal/operations/8d0f6a52-6a3b-4a43-b1b0-7f9c2f0b3c11/cancel" \
  -H "x-api-key: $TRONERGY_API_KEY"
Parameters
idstringrequiredpath

Operation ID.

Response
{ "ok": true, "status": "voided" }

Once the status is executing or confirming, your user's transaction may already be on the network, so cancel returns 409 and the relay carries on.