跳转到主要内容
GET
/
api
/
v1
/
prices
获取价格
curl --request GET \
  --url https://api.example.com/api/v1/prices
{
  "energy_trx": {},
  "energy_sun": {},
  "energy_usd": {},
  "energy_volume": 123,
  "bandwidth_trx": {},
  "bandwidth_sun": {},
  "bandwidth_usd": {},
  "bandwidth_volume": 123,
  "trx_usd_rate": "<string>",
  "burn_cost_trx": "<string>",
  "burn_cost_usd": "<string>",
  "savings_percent": "<string>"
}

获取价格

返回当前能量和带宽的市场价格。 此端点为公开接口 — 无需身份验证。

响应

energy_trx
object
65,000 单位能量的 TRX 价格,按时长键名(1h
energy_sun
object
每 1 单位能量的 SUN 价格,按时长键名(1h
energy_usd
object
65,000 单位能量的 USD 价格,按时长键名(1h
energy_volume
number
用于能量价格计算的数量(65,000)
bandwidth_trx
object
350 单位带宽的 TRX 价格,按时长键名(1h
bandwidth_sun
object
每 1 单位带宽的 SUN 价格,按时长键名(1h
bandwidth_usd
object
350 单位带宽的 USD 价格,按时长键名(1h
bandwidth_volume
number
用于带宽价格计算的数量(350)
trx_usd_rate
string
当前 TRX/USD 汇率
burn_cost_trx
string
燃烧 65,000 能量所需的 TRX 成本(不租赁的情况下)
burn_cost_usd
string
相同的燃烧成本,以 USD 计
savings_percent
string
租赁与燃烧相比的节省百分比

示例

curl https://api.tronrental.com/v1/prices
以下响应值为示例。实际价格根据市场条件实时更新。
Response
{
  "energy_trx": {"1h": "2.32"},
  "energy_sun": {"1h": "35.68"},
  "energy_usd": {"1h": "0.69"},
  "energy_volume": 65000,
  "bandwidth_trx": {"1h": "0.14"},
  "bandwidth_sun": {"1h": "400.00"},
  "bandwidth_usd": {"1h": "0.04"},
  "bandwidth_volume": 350,
  "trx_usd_rate": "0.297",
  "burn_cost_trx": "6.5",
  "burn_cost_usd": "1.93",
  "savings_percent": "64.3",
  "note": "Energy price is for 65,000 units in TRX"
}