curl --request POST \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/estimateFee \
--header 'Content-Type: application/json' \
--data '
{
"address": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
"body": "te6cckEBAQEAAgAAAEysuc0=",
"init_code": "<string>",
"init_data": "<string>",
"ignore_chksig": true
}
'{
"ok": true,
"result": {
"@type": "<string>",
"source_fees": {
"@type": "<string>",
"in_fwd_fee": 123,
"storage_fee": 123,
"gas_fee": 123,
"fwd_fee": 123
},
"destination_fees": [
{}
],
"@extra": "<string>"
}
}curl --request POST \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/estimateFee \
--header 'Content-Type: application/json' \
--data '
{
"address": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
"body": "te6cckEBAQEAAgAAAEysuc0=",
"init_code": "<string>",
"init_data": "<string>",
"ignore_chksig": true
}
'{
"ok": true,
"result": {
"@type": "<string>",
"source_fees": {
"@type": "<string>",
"in_fwd_fee": 123,
"storage_fee": 123,
"gas_fee": 123,
"fwd_fee": 123
},
"destination_fees": [
{}
],
"@extra": "<string>"
}
}estimateFee method estimates the fee required to send a message to the TON blockchain. This method allows you to calculate expected transaction costs before actually sending the transaction.
address (string, required) — The address to send the message from. Example: EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs.body (string, required) — The body of the message in base64 format.init_code (string, optional) — The init code in base64 format. Required when deploying a new contract.init_data (string, optional) — The init data in base64 format. Required when deploying a new contract.ignore_chksig (boolean, optional) — Whether to ignore the signature check. Set to true when estimating fees without a valid signature. Default: true.curl -X POST \
'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/jsonRPC' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "estimateFee",
"params": {
"address": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
"body": "te6cckEBAQEAAgAAAEysuc0=",
"ignore_chksig": true
}
}'
ok (boolean) — Whether the operation was successful.
result (object) — The result of the operation. Contains:
@type (string) — The type of the result, typically query.fees.source_fees (object) — The fees charged to the source account:
in_fwd_fee (integer) — The incoming forward fee in nanotons.storage_fee (integer) — The storage fee in nanotons.gas_fee (integer) — The gas fee in nanotons.fwd_fee (integer) — The forward fee in nanotons.destination_fees (array) — Array of fee objects for destination accounts (for multi-hop messages).@extra (string) — Extra information about the operation.estimateFee method is essential for applications that need to calculate transaction costs:
curl -X 'POST' \
'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/estimateFee' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"address": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
"body": "te6cckEBAQEAAgAAAEysuc0=",
"ignore_chksig": true
}'
in_fwd_fee, storage_fee, gas_fee, and fwd_fee. However, actual fees may vary slightly due to network conditions.The address to send the message from
The body of the message in base64 format
Optional init code in base64 format for contract deployment
Optional init data in base64 format for contract deployment
Whether to ignore the signature check
The estimated fee for the message
Whether the operation was successful
Show child attributes
The type of the result
Array of destination fees
Extra information
Was this page helpful?