Webhook Events

Complete payload reference for each webhook event type. All payloads follow the same envelope structure with event, data, and timestamp fields.

order.filled

Sent when an energy order has been fully filled by one or more providers. The data object contains the complete order with fill details.

200order.filled payload
{
  "event": "order.filled",
  "data": {
    "id": "ord_abc123",
    "status": "FILLED",
    "resource_type": "ENERGY",
    "amount": 65000,
    "duration_sec": 86400,
    "target_address": "TTargetAddress123456789",
    "total_cost_sun": "5460000",
    "fills": [
      {
        "provider": "catfee",
        "amount": 65000,
        "price_sun": 84,
        "tx_id": "abc123def456..."
      }
    ],
    "created_at": "2026-03-29T10:00:00Z",
    "filled_at": "2026-03-29T10:00:03Z"
  },
  "timestamp": 1711700403
}

order.failed

Sent when an order could not be fulfilled. The data object includes a reason field explaining the failure.

200order.failed payload
{
  "event": "order.failed",
  "data": {
    "id": "ord_def456",
    "status": "FAILED",
    "resource_type": "ENERGY",
    "amount": 500000,
    "duration_sec": 86400,
    "target_address": "TTargetAddress123456789",
    "reason": "No providers available with sufficient capacity",
    "created_at": "2026-03-29T10:05:00Z",
    "failed_at": "2026-03-29T10:05:12Z"
  },
  "timestamp": 1711700712
}

deposit.received

Sent when a TRX deposit has been confirmed on-chain and credited to the account balance.

200deposit.received payload
{
  "event": "deposit.received",
  "data": {
    "id": "dep_ghi789",
    "amount_sun": "50000000",
    "from_address": "TSenderAddress987654321",
    "tx_id": "789abc012def345...",
    "confirmations": 19,
    "credited_at": "2026-03-29T09:30:00Z"
  },
  "timestamp": 1711698600
}

withdrawal.completed

Sent when a withdrawal has been broadcast to the TRON network and confirmed.

200withdrawal.completed payload
{
  "event": "withdrawal.completed",
  "data": {
    "id": "wth_jkl012",
    "amount_sun": "25000000",
    "to_address": "TRecipientAddress112233",
    "tx_id": "012ghi345jkl678...",
    "fee_sun": "100000",
    "completed_at": "2026-03-29T11:00:00Z"
  },
  "timestamp": 1711704000
}