Gas Tracker

Here is the documentation for the Ethereum gas price tracker endpoint based on the provided information:


API Endpoint: GET /api/ethereum/gas-tracker

Description:

This endpoint provides gas prices on the Ethereum blockchain, including low, average, and high gas fee estimates, as well as the gas fees for specific actions like swaps, NFT sales, bridging, and borrowing.

Base URL:

https://api.zelf.world

Request

  • Method: GET

  • URL: /api/ethereum/gas-tracker

Query Parameters:

None required.

Example Request:

GET https://api.zelf.world/api/ethereum/gas-tracker

Headers:

Header
Type
Required
Description

Authorization

String

Yes

Bearer token for authentication.

Example Header:

{
    "Authorization": "Bearer your_access_token_here"
}

const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://api.zelf.world/api/ethereum/gas-tracker',
  headers: { 
    'Authorization': 'Bearer eyJhbGciOiJIUzI1NI6IkpXVCJ9.eyJjbGllbnRJZCI6IjY2ZWEyMDUyYjBmN2UkMa37Zdw'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

Response

The response will contain information about gas price estimates in Gwei for low, average, and high gas fees. Additionally, it includes the cost of featured actions like swaps and NFT sales.

Fields in the Response:

  • data (Object): Contains the gas price details.

    • low (Object): Information about the low gas price estimate.

      • gwei (String): The gas price in Gwei.

      • base (String): The base gas price in Gwei.

      • Priority (String): Priority fee in Gwei (for miner tips).

      • cost (String): The total cost of the transaction in USD.

      • time (String): Estimated time for transaction confirmation.

    • average (Object): Information about the average gas price estimate.

      • gwei (String): The gas price in Gwei.

      • base (String): The base gas price in Gwei.

      • Priority (String): Priority fee in Gwei (for miner tips).

      • cost (String): The total cost of the transaction in USD.

      • time (String): Estimated time for transaction confirmation.

    • high (Object): Information about the high gas price estimate.

      • gwei (String): The gas price in Gwei.

      • base (String): The base gas price in Gwei.

      • Priority (String): Priority fee in Gwei (for miner tips).

      • cost (String): The total cost of the transaction in USD.

      • time (String): Estimated time for transaction confirmation.

    • featuredActions (Array of Objects): Gas price estimates for specific actions.

      • action (String): The name of the action (e.g., "Swap", "NFT Sale").

      • low (String): Low gas price estimate in Gwei.

      • average (String): Average gas price estimate in Gwei.

      • high (String): High gas price estimate in Gwei.


Example Response

{
    "data": {
        "low": {
            "gwei": "8.126",
            "base": "8.126",
            "Priority": "0",
            "cost": "0.44",
            "time": "1 min: 51 secs"
        },
        "average": {
            "gwei": "8.131",
            "base": "8.126",
            "Priority": "0.005",
            "cost": "0.44",
            "time": "1 min: 51 secs"
        },
        "high": {
            "gwei": "9.126",
            "base": "8.126",
            "Priority": "1",
            "cost": "0.49",
            "time": "30 secs"
        },
        "featuredActions": [
            {
                "action": "Swap",
                "low": "7.47",
                "average": "7.47",
                "high": "8.38"
            },
            {
                "action": "NFT Sale",
                "low": "12.62",
                "average": "12.63",
                "high": "14.17"
            },
            {
                "action": "Bridging",
                "low": "2.40",
                "average": "2.40",
                "high": "2.70"
            },
            {
                "action": "Borrowing",
                "low": "6.33",
                "average": "6.34",
                "high": "7.11"
            }
        ]
    }
}

Status Codes:

Status Code
Description

200

Successful retrieval of data

401

Unauthorized (invalid or missing token)

500

Internal server error

Notes:

  • The response includes gas price estimates for both general Ethereum transactions and specific actions such as swapping tokens or NFT sales.

  • The gas price data is in Gwei, and costs are provided in USD.

Last updated