> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tronrental.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取价格

> 获取当前能量和带宽价格

## 获取价格

返回当前能量和带宽的市场价格。

**此端点为公开接口 — 无需身份验证。**

### 响应

<ResponseField name="energy_trx" type="object">
  65,000 单位能量的 TRX 价格，按时长键名（`1h`）
</ResponseField>

<ResponseField name="energy_sun" type="object">
  每 1 单位能量的 SUN 价格，按时长键名（`1h`）
</ResponseField>

<ResponseField name="energy_usd" type="object">
  65,000 单位能量的 USD 价格，按时长键名（`1h`）
</ResponseField>

<ResponseField name="energy_volume" type="number">
  用于能量价格计算的数量（65,000）
</ResponseField>

<ResponseField name="bandwidth_trx" type="object">
  350 单位带宽的 TRX 价格，按时长键名（`1h`）
</ResponseField>

<ResponseField name="bandwidth_sun" type="object">
  每 1 单位带宽的 SUN 价格，按时长键名（`1h`）
</ResponseField>

<ResponseField name="bandwidth_usd" type="object">
  350 单位带宽的 USD 价格，按时长键名（`1h`）
</ResponseField>

<ResponseField name="bandwidth_volume" type="number">
  用于带宽价格计算的数量（350）
</ResponseField>

<ResponseField name="trx_usd_rate" type="string">
  当前 TRX/USD 汇率
</ResponseField>

<ResponseField name="burn_cost_trx" type="string">
  燃烧 65,000 能量所需的 TRX 成本（不租赁的情况下）
</ResponseField>

<ResponseField name="burn_cost_usd" type="string">
  相同的燃烧成本，以 USD 计
</ResponseField>

<ResponseField name="savings_percent" type="string">
  租赁与燃烧相比的节省百分比
</ResponseField>

### 示例

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.tronrental.com/v1/prices
  ```

  ```python Python theme={null}
  import requests
  resp = requests.get("https://api.tronrental.com/v1/prices")
  print(resp.json())
  ```

  ```javascript JavaScript theme={null}
  const resp = await fetch("https://api.tronrental.com/v1/prices");
  const data = await resp.json();
  console.log(data);
  ```
</CodeGroup>

<Info>
  以下响应值为示例。实际价格根据市场条件实时更新。
</Info>

```json Response theme={null}
{
  "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"
}
```
