ZELF
Zelf Documentation
Zelf Documentation
  • Welcome
  • Getting Started
    • How it works
    • WhitePaper
    • Zelf Proofs vs Others
    • Privacy Preserving
    • Use cases
    • Downloads
  • Functions
    • Authentication
    • Create a ZelfProof
    • Decrypt a ZelfProof
    • Preview ZelfProof
  • Zelf Name Service
    • Offline Version
      • Decryption
    • Online Version
      • Retrieve public key
      • Create a session
      • PGP Encryption
      • Lease a Zelf Name
      • Preview a ZelfName
      • Decrypt a ZelfName
    • Arweave ZNS Storage
    • Zelf Wallet Design
  • BlockChains
    • MINA
      • Get Balance
      • Get Token
      • Get Transactions
    • ETH
      • Adress Lookup
      • Transactions list
      • Transaction details
      • Gas Tracker
  • Integrations
  • Zelf Legal
    • Team Members
    • Terms of Use
    • Privacy Policy
  • Airdrop
    • Airdrop Rules
    • Reglas de Airdrop
    • Pricing per Domain
  • Verify our Partners
    • Acquisition Team
  • Roadmap
    • Q1 2025
    • Q2 2025
    • Q3 2025
    • Q4 2025
Powered by GitBook
On this page

Was this helpful?

  1. BlockChains
  2. ETH

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);
});
curl --location 'https://api.zelf.world/api/ethereum/gas-tracker' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb...U0UTDraRkMa37Zdw'
[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::builder()
        .build()?;

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("Authorization", "Bearer eyJhbGciOiJIUzI1NiI...6IkpXVCJ9.eyJjbGllbnRU0UTDraRkMa37Zdw".parse()?);

    let request = client.request(reqwest::Method::GET, "https://api.zelf.world/api/ethereum/gas-tracker")
        .headers(headers);

    let response = request.send().await?;
    let body = response.text().await?;

    println!("{}", body);

    Ok(())
}

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"
            }
        ]
    }
}
{
    "error": "Protected resource, use Authorization header to get access"
}

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.

PreviousTransaction detailsNextTeam Members

Last updated 7 months ago

Was this helpful?