> ## Documentation Index
> Fetch the complete documentation index at: https://gasdocs-en.gasstation.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Estimate Order Amount

> Estimate TRON Energy costs; supports resource estimation for standard token transfers and contract calls.

> [!NOTE]
>
> The current API estimates only TRON Energy costs; it does not include Net (bandwidth) costs.
>
> The following estimation scenarios are supported:
>
> * Standard token transfers: Do not provide `amount` or `data`.
> * Contract invocation transactions: Provide the ABI-encoded `data` (in hex format).

#### Request Parameters

**receive\_address** `string` *required*

receive addres
\[!NOTE] Please ensure that the received address holds the token corresponding to the contracted\_address, otherwise the miner fee estimation will fail

**address\_to** `string` *required*

The transfer address for estimating miner fees.

> [!NOTE]
>
> * Standard token transfer scenario: `address_to` is the actual recipient address.
> * Contract invocation transaction scenario: `address_to` is the contract address, and it must match `contract_address`.

**contract\_address** `string` *required*

Contract address for estimating miner fees.

**service\_charge\_type** `string` *required*

rent time code: Request the order/price interface to return the cost codes for
minutes, hours, days, and different times.
eg:10010 - 10 minutes, 20001 - 1 hour, 30001 - 1 day

**amount** `string`

Contract invocation amount

> [!NOTE]
>
> When used for contract estimation scenarios, `amount` represents the value associated with the contract invocation. This parameter is optional for standard transfer estimation scenarios.

**data** `string`

Contract invocation data; hexadecimal data constructed via ABI encoding.

> [!NOTE]
>
> If `data` is provided, the API treats the request as a contract transaction for resource estimation; this parameter is optional for standard transfer estimation scenarios.

#### Response Parameters

**object**

**contract\_address** `string`

contract address

**address\_to** `string`

transfer address

**receive\_address** `string`

receive address

**amount** `decimal`

order amount

**energy\_amount** `decimal`

energy amount

**active\_amount** `decimal`

active amount

**energy\_num** `integer`

energy num

**energy\_price** `decimal`

energy price

**service\_charge\_type** `string`

rent time code

```curl cURL theme={null}
curl -X GET \
'https://openapi.gasstation.ai/api/tron/gas/estimate?app_id=49e9c57da66788e5178c8fec2905067b&data=lgy/X0LwFTE/03yBGP0PIGgzZMY+KFzlOFAo0SZkChygmN8RnV+y1tTEbjTAR2SD04xSX+r9FKWqIaATxev6yQ=='
```

```json theme={null}
{
    "code": 0,
    "msg": "Success",
    "data": {
        "contract_address": "TED4rvM5VAG8kzKULTb7GXXY6ph9aTwjt3",
        "address_to": "TE4Smnqa4cWiKZdmjzD64peEqLFqk213HS",
        "receive_address": "TXxtczsXf1EYgWEbwSxwC85iMfdv6CGNRa",
        "amount": "1.216000",
        "energy_amount": "1.216000",
        "active_amount": "0",
        "energy_num": 32000,
        "energy_price": "38.00000001",
        "service_charge_type": "10010"
    }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.