Estimate fee for query
cURL
curl --request POST \ --url https://toncenter.com/api/v2/estimateFee \ --header 'Content-Type: application/json' \ --data ' { "address": "<string>", "body": "<string>", "init_code": "<string>", "init_data": "<string>", "ignore_chksig": true } '
200
Example
{ "ok": true, "result": { "@type": "query.fees", "source_fees": { "@type": "fees", "in_fwd_fee": 123, "storage_fee": 123, "gas_fee": 123, "fwd_fee": 123 }, "destination_fees": [ { "@type": "fees", "in_fwd_fee": 123, "storage_fee": 123, "gas_fee": 123, "fwd_fee": 123 } ] } }
import asyncio from toncenter.rest import ToncenterRestClient from toncenter.types import Network ADDRESS = "UQCDrgGaI6gWK-qlyw69xWZosurGxrpRgIgSkVsgahUtxZR0" BODY = "te6ccgEBAQEAAgAAAA==" async def main() -> None: async with ToncenterRestClient(network=Network.MAINNET) as client: result = await client.v2.send.estimate_fee( ADDRESS, BODY, ) print(result.model_dump_json(indent=4)) if __name__ == "__main__": asyncio.run(main())
OK
true
Show child attributes