# Estimate TRX

## Get an estimate of TRX

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

Rate limi&#x74;***: 15** requests per **1** second*

#### Request params <a href="#request-params" id="request-params"></a>

<table><thead><tr><th width="174.33333333333331">Field</th><th width="94">Position</th><th width="92">Type</th><th width="100">Required</th><th>Description</th></tr></thead><tbody><tr><td>amount</td><td>body</td><td>number</td><td>true</td><td>The number of resources</td></tr><tr><td>buy_energy_type</td><td>body</td><td>string, number</td><td>true</td><td><p>"FAST", "MEDIUM", "SLOW" or number:</p><p><br>-"FAST": If market ready to fill = 100%,  FAST = MEDIUM. If the market ready to fill &#x3C; 100%,  FAST = MEDIUM + 10. If market ready to fill = 0%,  FAST = SLOW + 20.</p><p></p><p>-"MEDIUM":  The lowest price for the maximum market fill for this order. If market ready to fill = 0%,  MEDIUM = SLOW + 10.</p><p></p><p>-"SLOW": The lowest price that can be set for this order.</p><p></p><p>-If the price is a number, the price unit is equal to SUN</p></td></tr><tr><td>duration_millisec</td><td>body</td><td>number</td><td>true</td><td>The duration of the bought resource, time unit is equal to millisecond.</td></tr><tr><td>request_address</td><td>body</td><td>string</td><td>false</td><td>The address of requester.</td></tr><tr><td>target_address</td><td>body</td><td>string</td><td>false</td><td>The address of receiver resource.</td></tr><tr><td>is_partial</td><td>body</td><td>boolean</td><td>false</td><td>Allow the order to be filled partially or not.</td></tr></tbody></table>

#### Request params example <a href="#request-params-example" id="request-params-example"></a>

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

#### Responses <a href="#responses" id="responses"></a>

<table><thead><tr><th width="185">Field</th><th width="171">Type</th><th width="158">Required</th><th>Description</th></tr></thead><tbody><tr><td>unit_price</td><td>number</td><td>true</td><td>price in SUN of energy that fit with your <code>buy_energy_type</code></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>total amount available ernery on Tronsave market that match with <code>unit_price</code></td></tr><tr><td>estimate_trx</td><td>number</td><td>true</td><td>estimate total trx value will pay for buy all <code>available_energy</code> with price is <code>unit_price</code> in <code>duration_millisec</code></td></tr></tbody></table>

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