v1

latestOpenAPI 3.1.02026-07-243035381.4 MB
Fee Estimation API

Estimate the fee for multiple Ethereum transactions

10 credits per API call + 10 credits per each gas estimation

Get an estimated gas price and the number of gas units needed for multiple Ethereum transactions. The gas price is obtained from multiple sources and calculated based on the latest N blocks and the current mempool state.

The estimations are returned in the same order as the transactions were submitted in the request.

The fast gas price is used by default.

NOTE: The estimated gas price is returned in wei. However, when making a transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.

post/v3/ethereum/gas/batch

Headers

x-testnet-type'ethereum-sepolia'

Type of Ethereum testnet. Defaults to ethereum-sepolia.

Request body

Example request

{
  "estimations": [
    {
      "from": "0xfb99f8ae9b70a0c8cd96ae665bbaf85a7e01a2ef",
      "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
      "contractAddress": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
      "amount": "100000",
      "data": "4d79206e6f746520746f2074686520726563697069656e74"
    }
  ]
}

Response

OK

errorboolean required

If all estimations succeeded.

Example response

{
  "error": true,
  "result": [
    {
      "error": true,
      "msg": "Provided address 0xt16360210b423d3a5205923d6e64a2d142d9f426 is invalid, the capitalization checksum test failed, or it's an indirect IBAN address which can't be converted."
    },
    {
      "error": false,
      "contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "data": {
        "gasLimit": "63185",
        "gasPrice": "119104833751",
        "estimations": {
          "safe": "100833333333",
          "standard": "104833333333",
          "fast": "119104833751",
          "baseFee": "119104833751"
        }
      }
    }
  ]
}