API Reference

Integrate Gas Fee Predictor data into your applications with our REST API

Getting Started

The Gas Fee Predictor API provides programmatic access to gas fee data across multiple blockchain networks. This reference contains all the information you need to integrate with our API.

Authentication

All API requests require authentication using an API key. You can obtain an API key by subscribing to our Pro plan.

Base URL

https://api.gasfeepredictor.com/v1

Endpoints

Current Gas Prices

GET
/gas/current

Retrieves the current gas prices for all supported networks.

Query Parameters

ParameterTypeDescription
networkstringOptional. Filter results by network (eth, polygon, arbitrum)

Example Response

{
  "success": true,
  "data": {
    "ethereum": {
      "slow": 25,
      "standard": 32,
      "fast": 45,
      "timestamp": "2025-04-23T15:30:00Z"
    },
    "polygon": {
      "slow": 80,
      "standard": 100,
      "fast": 150,
      "timestamp": "2025-04-23T15:30:00Z"
    },
    "arbitrum": {
      "slow": 0.1,
      "standard": 0.15,
      "fast": 0.25,
      "timestamp": "2025-04-23T15:30:00Z"
    }
  }
}

Gas Price Predictions

GET
/gas/predictions

Retrieves gas price predictions for upcoming timeframes.

Query Parameters

ParameterTypeDescription
networkstringRequired. Specify network (eth, polygon, arbitrum)
hoursnumberOptional. How many hours to predict (default: 24, max: 72)

Example Response

{
  "success": true,
  "data": {
    "network": "ethereum",
    "predictions": [
      {
        "timestamp": "2025-04-23T16:00:00Z",
        "predicted_price": 28.5,
        "confidence": 0.85
      },
      {
        "timestamp": "2025-04-23T17:00:00Z",
        "predicted_price": 32.1,
        "confidence": 0.82
      },
      {
        "timestamp": "2025-04-23T18:00:00Z",
        "predicted_price": 35.8,
        "confidence": 0.79
      }
      // Additional hourly predictions...
    ]
  }
}

Historical Gas Data

GET
/gas/historical

Retrieves historical gas price data for analysis.

Query Parameters

ParameterTypeDescription
networkstringRequired. Specify network (eth, polygon, arbitrum)
start_datestringRequired. Start date in ISO format (YYYY-MM-DD)
end_datestringRequired. End date in ISO format (YYYY-MM-DD)
intervalstringOptional. Data interval (hourly, daily). Default: daily

Need more information?

Check out our other resources or contact our support team for help with API integration.