Skip to main content
POST
/
api
/
v2
/
estimateFee
Estimate Fee
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
}
'
{
  "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
      }
    ]
  }
}

SDK Usage

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())

Body

application/json
address
string
required
body
string
required
init_code
string
init_data
string
ignore_chksig
boolean
default:true

Response

OK

ok
boolean
required
Example:

true

result
QueryFees · object
required