⚡ Test Our Private Nodes of 40+ Blockchains just for $50!

coins coins coins coins

BNB Smart Chain (BSC)

BNB Smart Chain (BSC)

Method: POST eth_estimateGas


# eth_estimateGas example for BNB Smart Chain (BSC)

POST eth_estimateGas

Returns an estimate of the gas required for a transaction to complete. The estimation process does not use gas and the transaction is not added to the blockchain. The resulting estimate can be greater than the amount of gas the transaction ends up using, for reasons including EVM mechanics and node performance.

The eth_estimateGas call does not send a transaction. You must call eth_sendRawTransaction to execute the transaction.

If revert reason is enabled with --revert-reason-enabled, the eth_estimateGas error response will include the revert reason.


object - None

Transaction call object.


curl --location --request POST 'https://bsc.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_estimateGas",
"params": [{"from": "0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73", "to": "0x44Aa93095D6749A706051658B970b941c72c1D53", "value": "0x1"}],
"id": "getblock.io"}'


    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0x5208"