POST
创建报价
/api/v1/energy/quotes
创建代理能量或带宽的实时报价。报价会在短暂窗口后过期,凭该报价下单后生效。如果你不需要先锁定价格,请改用一键下单。
请求体
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
amount | integer | 是 | 要代理的资源数量——能量或带宽(≥ 1)。 |
duration_minutes | integer | 是 | 租用时长;必须是允许的时长之一。 |
target_address | string | 否 | 要代理到的 TRON 地址。省略则只做价格估算。 |
product | string | 否 | TRON_ENERGY(默认)或 TRON_BANDWIDTH。 |
{
"amount": 64400,
"duration_minutes": 60,
"target_address": "TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE"
}
响应
{
"data": {
"quote_id": "qte_1a2b3c4d5e6f7g8h",
"product": "TRON_ENERGY",
"amount": 64400,
"duration_minutes": 60,
"customer_price": "2.093",
"currency": "TRX",
"expires_at": "2026-09-22T12:01:00.000Z",
"target_activated": true
},
"request_id": "…"
}
| 字段 | 类型 | 说明 |
|---|---|---|
quote_id | string | 传给凭报价下单接口的报价 id。 |
customer_price | string | 你将支付的价格,单位 TRX(十进制字符串,非 SUN;1 TRX = 10^6 SUN)。 |
expires_at | string | ISO 8601 时间,此后报价不可再用。 |
target_activated | boolean | 目标地址在报价时刻是否已在链上激活(建议性)。 |
错误
INVALID_ADDRESS——target_address不是有效的 TRON 地址。INVALID_DURATION——duration_minutes不在允许的目录中。
