GET
/
api
/
mpc
/
tron
/
gas
/
estimate
curl -X GET \
'https://openapi.gasstation.ai/api/mpc/tron/gas/estimate?app_id=49e9c57da66788e5178c8fec2905067b&data=lgy/X0LwFTE/03yBGP0PIGgzZMY+KFzlOFAo0SZkChygmN8RnV+y1tTEbjTAR2SD04xSX+r9FKWqIaATxev6yQ=='
{
    "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"
    }
}

Request Parameters

receive_address
string
required

receive address

address_to
string
required

The transfer address for estimating miner fees.

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

Response Parameters

curl -X GET \
'https://openapi.gasstation.ai/api/mpc/tron/gas/estimate?app_id=49e9c57da66788e5178c8fec2905067b&data=lgy/X0LwFTE/03yBGP0PIGgzZMY+KFzlOFAo0SZkChygmN8RnV+y1tTEbjTAR2SD04xSX+r9FKWqIaATxev6yQ=='
{
    "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"
    }
}