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

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

The account address in user-friendly format.

body
string
required

Message body in BOC format, base64 encoded.

init_code
string

Contract code for deployment, in BOC format.

init_data
string

Initial contract state for deployment, in BOC format.

ignore_chksig
boolean
default:true

Skip signature verification. Set to true when estimating fees before you have a real signature.

Response

OK

Response containing estimated transaction fees.

ok
boolean
default:true
required

Indicates if the request succeeded. If false, check the error field for details.

result
object
required

The response data. Only present 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.