# 估算TRX

## 获取估算 TRX (Get estimate TRX)

### [Buy API (Postman)](https://www.postman.com/tronsave/tronsave/request/gbce3kc/1-trx)

#### <mark style="color:orange;">`POST`</mark>  `https://api.tronsave.io/v0/estimate-trx` <a href="#api-method" id="api-method"></a>

速率限制 (Rate limit): 每1秒15个请求。

**请求参数 (Request params):**

<table><thead><tr><th width="174.33333333333331">域</th><th width="83">地点</th><th width="102">类型</th><th width="79">必需</th><th>描述</th></tr></thead><tbody><tr><td>amount</td><td>body</td><td>number</td><td>true</td><td>资源数量</td></tr><tr><td>buy_energy_type</td><td>body</td><td>string, number</td><td>true</td><td>"FAST", "MEDIUM", "SLOW" 等于快速，中等，慢速 或者按Sun单位填写想购买的价格:<br>-"FAST"：如果市场准备填满 = 100%，则 "FAST" = "MEDIUM"。如果市场准备填满 &#x3C; 100%，则 "FAST" = "MEDIUM" + 10。如果市场准备填满 = 0%，则 "FAST" = "SLOW" + 20。<br><br>-"MEDIUM"：这个订单的最大市场填充的最低价格。如果市场准备填满 = 0%，"MEDIUM" = "SLOW" + 10。<br><br>-"SLOW"：此订单可以设置的最低价格。<br><br>-如果价格是数字，则价格单位等于SUN。</td></tr><tr><td>duration_millisec</td><td>body</td><td>number</td><td>true</td><td>购买资源的持续时间，时间单位为毫秒</td></tr><tr><td>request_address</td><td>body</td><td>string</td><td>false</td><td>请求者的地址</td></tr><tr><td>target_address</td><td>body</td><td>string</td><td>false</td><td>接收资源的地址</td></tr><tr><td>is_partial</td><td>body</td><td>boolean</td><td>false</td><td>允许订单部分匹配或整体匹配。</td></tr></tbody></table>

**请求参数示例 (Request params example):**

```
{
      "amount": 100000,
      "buy_energy_type": "MEDIUM",
      "duration_millisec": 259200000
 }
```

**回应 (Responses):**

<table><thead><tr><th width="185">Field</th><th width="171">Type</th><th width="98">Required</th><th>Description</th></tr></thead><tbody><tr><td>unit_price</td><td>number</td><td>true</td><td>适合您<code>buy_energy_type</code> 的能源价格（以SUN计）</td></tr><tr><td>duration_millisec</td><td>number</td><td>true</td><td></td></tr><tr><td>available_energy</td><td>number</td><td>true</td><td>与<code>unit_price</code>相匹配的 Tronsave 市场上的总可用能源量</td></tr><tr><td>estimate_trx</td><td>number</td><td>true</td><td>预计将支付的总 TRX 价值，以 <code>unit_price</code> 在 <code>duration_millisec</code>内购买所有 <code>available_energy</code> </td></tr></tbody></table>

```
{
    "unit_price": 45,
    "duration_millisec": 259200000,
    "available_energy": 4298470,
     "estimate_trx": 13500000,
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tronsave.io/chinese/developer/rest-api-v0/buy-on-rest-api/use-signed-transaction/estimate-trx.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
