POSTEstimate fee

TON Mainnethttps://ton-mainnet.nodit.io/api/v2/estimateFee
CU60

Calculates the fees required to send a message. Provide the destination address and message body. For new contract deployments, also include init_code and init_data. Set ignore_chksig to true when estimating before signing. Returns a breakdown of storage, gas, and forwarding fees.

Request Body
addressstringrequired

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

bodystringrequired

Message body in BoC format, base64 encoded.

init_codestring

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

init_datastring

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

ignore_chksigboolean

Set to true to skip signature verification during fee estimation; otherwise false. Useful when a real signature is not yet available.

Responses
okbooleanrequired

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

@typestring (enum)required

TonLib type identifier for fee estimation results. Refer to the TonLib type reference for a full list.

source_feesobjectrequired

Fees charged on the sending account.

@typestring (enum)required

TonLib type identifier for fee breakdown objects. Refer to the TonLib type reference for a full list.

in_fwd_feeinteger (int64)required

Fee for importing this inbound message, in nanograms.

storage_feeinteger (int64)required

Storage fee charged for keeping the contract state on-chain, in nanograms.

gas_feeinteger (int64)required

Computation gas fee for executing contract code, in nanograms.

fwd_feeinteger (int64)required

Fee for forwarding outbound messages created by this transaction, in nanograms.

destination_feesobject[]required

Array of fee breakdowns charged on the receiving account(s). One entry per destination in multi-hop transactions.

@typestring (enum)required

TonLib type identifier for fee breakdown objects. Refer to the TonLib type reference for a full list.

in_fwd_feeinteger (int64)required

Fee for importing this inbound message, in nanograms.

storage_feeinteger (int64)required

Storage fee charged for keeping the contract state on-chain, in nanograms.

gas_feeinteger (int64)required

Computation gas fee for executing contract code, in nanograms.

fwd_feeinteger (int64)required

Fee for forwarding outbound messages created by this transaction, in nanograms.

@extrastring

Optional request ID that can be passed in the request and received back in the response. Useful for matching async responses.

X-API-KEY
Request
cURL
curl -X POST "https://ton-mainnet.nodit.io/api/v2/estimateFee" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "EQC5QeYg31ggWlkLDW6-kZxmubzqf8_TT3VjPSIbf6QwqFtN",
    "body": "te6cckEBAQEAAgAAAEysuc0=",
    "ignore_chksig": true
  }'
Response
Example · 200
{
  "ok": true,
  "result": {
    "@type": "query.fees",
    "source_fees": {
      "@type": "fees",
      "in_fwd_fee": 66667,
      "storage_fee": 8,
      "gas_fee": 0,
      "fwd_fee": 0
    },
    "destination_fees": []
  },
  "@extra": "1795684555:10:26.576"
}