GET

查询速充订单

/api/v1/energy/flash_orders/:order_id

按 id 查询单个速充订单。轮询此接口以获知异步速充订单的结算结果。

路径参数

参数类型说明
order_idstring创建速充订单时返回的订单 id。

响应

{
  "data": {
    "order_id": "ord_9c2b7f0a",
    "status": "COMPLETED",
    "product": "TRON_ENERGY",
    "order_type": "FLASH",
    "amount": 64400,
    "duration_minutes": null,
    "target_address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE",
    "customer_price": "1.872",
    "order_total": "2.100",
    "actual_consumed": "1.872",
    "currency": "TRX",
    "created_at": "2026-09-22T12:00:00.000Z",
    "completed_at": "2026-09-22T12:00:35.000Z",
    "failure_reason": null,
    "tx_info": {
      "delegate_tx_hash": "…",
      "reclaim_tx_hash": "…",
      "delegate_time": "…",
      "reclaim_time": "…",
      "resource_address": "T…"
    }
  },
  "request_id": "…"
}

status 为 PENDING、COMPLETED、FAILED 或 RECONCILIATION_REQUIRED 之一。

字段类型说明
order_totalstring下单时约定的总金额(即估算价),单位 TRX(十进制字符串,非 SUN)。
actual_consumedstring | null结算后实际扣款金额,单位 TRX。可能小于 order_total(速充实际消耗的能量少于请求量)。结算前为 null。
customer_pricestringCOMPLETED 后为结算价(此前为估算价)。单位 TRX(十进制字符串,非 SUN;1 TRX = 10^6 SUN)。
currencystring恒为 TRX。
tx_infoobject | null公开的链上委托/回收详情。订单进行中可能为 null。

tx_info 对象只包含公开的链上事实:

字段类型说明
delegate_tx_hashstring | null委托交易哈希。
reclaim_tx_hashstring | null回收交易哈希。
delegate_timestring | null委托时间(链上上报)。
reclaim_timestring | null回收时间(链上上报)。
resource_addressstring | null实际委托资源方地址。

错误

  • ORDER_NOT_FOUND — 订单不存在或不属于你。