# Gas Estimator Platform API

## Overview

Gas Estimator Platform provides access to:

* Get X% probability for next-block inclusion and choose your ideal balance between confirmation and gas savings. Unlock the power of precise gas predictions! With our Gas Price Predictor, you can choose 99% probability for quick confirmation or 70% probability to save gas over multiple blocks. Take control of your transactions now!

## Authentication

A valid Mempool Node API Key is required in the `Authorization` Header of every request.

Create an account and retrieve your API Key [here](https://dashboard.mempoolnode.com)

## API

To interact with our Gas Estimation Platform via API, you must utilise our API Endpoints:

## ethGasEstimator

<mark style="color:blue;">`GET`</mark> `https://gasapi.mempoolnode.com/ethGasEstimator`

Returns a range of confidence intervals for gas prices needed to qualify a transaction for inclusion in the next block. Order of confidence intervals is subject to change.

#### Headers

| Name                                     | Type   | Description |
| ---------------------------------------- | ------ | ----------- |
| apiKey<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200: OK Success" %}

{% endtab %}

{% tab title="401: Unauthorized Invalid or non-existent API Key" %}

{% endtab %}

{% tab title="429: Too Many Requests Rate limit exceeded" %}

{% endtab %}
{% endtabs %}

**Example Ethereum Gas Prediction request**

```
curl -X GET 'https://gasapi.mempoolnode.com/ethGasEstimator' -H 'Authorization: Bearer <your-api-key-here>'
```

**Example Ethereum Gas Prediction response payload**

```
{
  "unit": "gwei",
  "last_blocknumber": 17762404,
  "last_blocknumber_time": 1690194947,
  "pending_blocknumber": 17762405,
  "baseFeePerGas": 27557585893,
  "expected_gasprice": [
    {
      "block": "pending",
      "gasPrice": [
        {
          "percent": 70,
          "priorityFeePerGas": 513031648,
          "maxFeePerGas": 28070617541
        },
        {
          "percent": 80,
          "priorityFeePerGas": 732904128,
          "maxFeePerGas": 28290490021
        },
        {
          "percent": 90,
          "priorityFeePerGas": 795091584,
          "maxFeePerGas": 28352677477
        },
        {
          "percent": 95,
          "priorityFeePerGas": 1116344576,
          "maxFeePerGas": 28673930469
        },
        {
          "percent": 99,
          "priorityFeePerGas": 2454116864,
          "maxFeePerGas": 30011702757
        }
      ]
    },
    {
      "block": "pending+1",
      "gasPrice": [
        {
          "percent": 70,
          "priorityFeePerGas": 576127232,
          "maxFeePerGas": 28133713125
        },
        {
          "percent": 80,
          "priorityFeePerGas": 608016704,
          "maxFeePerGas": 28165602597
        },
        {
          "percent": 90,
          "priorityFeePerGas": 870244224,
          "maxFeePerGas": 28427830117
        },
        {
          "percent": 95,
          "priorityFeePerGas": 1013630464,
          "maxFeePerGas": 28571216357
        },
        {
          "percent": 99,
          "priorityFeePerGas": 2250716416,
          "maxFeePerGas": 29808302309
        }
      ]
    },
    {
      "block": "pending+2",
      "gasPrice": [
        {
          "percent": 70,
          "priorityFeePerGas": 507536544,
          "maxFeePerGas": 28065122437
        },
        {
          "percent": 80,
          "priorityFeePerGas": 619043264,
          "maxFeePerGas": 28176629157
        },
        {
          "percent": 90,
          "priorityFeePerGas": 824116608,
          "maxFeePerGas": 28381702501
        },
        {
          "percent": 95,
          "priorityFeePerGas": 1008242304,
          "maxFeePerGas": 28565828197
        },
        {
          "percent": 99,
          "priorityFeePerGas": 2249058816,
          "maxFeePerGas": 29806644709
        }
      ]
    },
    {
      "block": "pending+3",
      "gasPrice": [
        {
          "percent": 70,
          "priorityFeePerGas": 485718144,
          "maxFeePerGas": 28043304037
        },
        {
          "percent": 80,
          "priorityFeePerGas": 561420736,
          "maxFeePerGas": 28119006629
        },
        {
          "percent": 90,
          "priorityFeePerGas": 772132480,
          "maxFeePerGas": 28329718373
        },
        {
          "percent": 95,
          "priorityFeePerGas": 947171264,
          "maxFeePerGas": 28504757157
        },
        {
          "percent": 99,
          "priorityFeePerGas": 2189099776,
          "maxFeePerGas": 29746685669
        }
      ]
    },
    {
      "block": "pending+4",
      "gasPrice": [
        {
          "percent": 70,
          "priorityFeePerGas": 485143936,
          "maxFeePerGas": 28042729829
        },
        {
          "percent": 80,
          "priorityFeePerGas": 572721728,
          "maxFeePerGas": 28130307621
        },
        {
          "percent": 90,
          "priorityFeePerGas": 776616960,
          "maxFeePerGas": 28334202853
        },
        {
          "percent": 95,
          "priorityFeePerGas": 952743488,
          "maxFeePerGas": 28510329381
        },
        {
          "percent": 99,
          "priorityFeePerGas": 2187988992,
          "maxFeePerGas": 29745574885
        }
      ]
    }
  ]
}
```

## Key Description of Terms

**baseFeePerGas**

Base fee per gas in gwei

**last\_blocknumber**

Last block number at the time of prediction

**last\_blocknumber\_time**

Last Block creation timestamp

**pending\_blocknumber**

Current pending block number at the time of prediction

**expected\_gasprice**

An array of all prediction levels for future and currently pending blocks

**block**

The block order state "pending + n", for example "pending" refers to the current pending block, "pending + 1" refers to the pending block after the current pending block, and so on

**gasPrice**

An array of all gas price predictions in order of probability levels

**percent**

The probability percentage level

**priorityFeePerGas**

Predicted priority fee per gas in gwei also known as the "tip"

**maxFeePerGas**

Max fee per gas in gwei


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mempoolnode.com/gas-prediction-tools-suite/gas-estimator-platform-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
