curl --request POST \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v3/estimateFee \
--header 'Content-Type: application/json' \
--data '{
"address": "EQBVbC7Hu-g3htYXzst8L5ucV76NMzeBK3URJKebN2Y1k55Q",
"body": "te6ccgEBBAEAwwABRYgAqthdj3fQbw2sL52W+F83OK99GmZvAlbqIklPNm7MayYMAQGcJRnEjp8cFJEdHYEy0LKHHYzifhXgDjogvM4i1RhNr6JL5bGaLxFWgLvL/9Q5K9CsRfVakAbG1JfXmJjD+54vAimpoxdm1XNnAAAAEwADAgFkQgA0XvoMzOTI+7LhqhMUCzQfZ6f1jWBzDLBT90cgmTz0fBE4gAAAAAAAAAAAAAAAAAEDACoAAAAAdGhpcyBpcyBhIHRlc3QgdHg=",
"ignore_chksig": false
}'
{
"source_fees": {
"in_fwd_fee": 123,
"storage_fee": 123,
"gas_fee": 123,
"fwd_fee": 123
},
"destination_fees": {
"in_fwd_fee": 123,
"storage_fee": 123,
"gas_fee": 123,
"fwd_fee": 123
}
}
Estimates the fee for a transaction on the TON blockchain
curl --request POST \
--url https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v3/estimateFee \
--header 'Content-Type: application/json' \
--data '{
"address": "EQBVbC7Hu-g3htYXzst8L5ucV76NMzeBK3URJKebN2Y1k55Q",
"body": "te6ccgEBBAEAwwABRYgAqthdj3fQbw2sL52W+F83OK99GmZvAlbqIklPNm7MayYMAQGcJRnEjp8cFJEdHYEy0LKHHYzifhXgDjogvM4i1RhNr6JL5bGaLxFWgLvL/9Q5K9CsRfVakAbG1JfXmJjD+54vAimpoxdm1XNnAAAAEwADAgFkQgA0XvoMzOTI+7LhqhMUCzQfZ6f1jWBzDLBT90cgmTz0fBE4gAAAAAAAAAAAAAAAAAEDACoAAAAAdGhpcyBpcyBhIHRlc3QgdHg=",
"ignore_chksig": false
}'
{
"source_fees": {
"in_fwd_fee": 123,
"storage_fee": 123,
"gas_fee": 123,
"fwd_fee": 123
},
"destination_fees": {
"in_fwd_fee": 123,
"storage_fee": 123,
"gas_fee": 123,
"fwd_fee": 123
}
}
estimateFee
endpoint estimates the fee for a transaction on the TON blockchain. This endpoint allows you to calculate the expected fees before actually sending a transaction.
address
(string, required) — The address of the smart contract.body
(string, required) — The body of the transaction in base64 format.ignore_chksig
(boolean, optional) — Whether to ignore the signature check. Default: false
.in_fwd_fee
(integer) — The incoming forward fee.storage_fee
(integer) — The storage fee.gas_fee
(integer) — The gas fee.fwd_fee
(integer) — The forward fee.in_fwd_fee
(integer) — The incoming forward fee.storage_fee
(integer) — The storage fee.gas_fee
(integer) — The gas fee.fwd_fee
(integer) — The forward fee.estimateFee
endpoint is useful for various applications that need to estimate transaction costs on the TON blockchain:
Successful response
The response is of type object
.
Was this page helpful?