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' \
  --header 'X-API-Key: <api-key>' \
  --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
      }
    ]
  },
  "@extra": "<string>"
}

Authorizations

X-API-Key
string
header
required

API key header of the form X-API-Key: <token>, where <token> is your API key. Requests without a key are limited to 1 RPS. More info here.

Body

application/json

Request to estimate transaction fees. Include the target address, message body, and optionally init code/data for contract deployment.

address
string
required

Account address in raw format (e.g., 0:ca6e321c...) or user-friendly format (e.g., EQDKbjIcfM...). All formats are automatically detected.

body
string
required

Message body in BOC format, base64 encoded.

init_code
string

Contract code for deployment messages, BOC format, base64 encoded. Omit for regular transfers.

init_data
string

Initial contract storage for deployment, BOC format, base64 encoded. Omit for regular transfers.

ignore_chksig
boolean
default:true

Set to true to skip signature verification during fee estimation; otherwise false. Useful when you don't have a real signature yet.

Response

Returns the estimated fees (gas, storage, forwarding) for the specified message.

ok
boolean
default:true
required

Returns true if the request succeeded; otherwise false. See the error field for details.

result
object
required

Response data. Present only when ok is true.

@extra
string

Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses.