gas

Get list of all available gas prices

Changed on

Returns real-time gas prices for every supported chain, at each speed tier. Gas prices move with demand on each chain, so read them shortly before building a transaction instead of caching them.

get/v1/gas-prices/

Request

  • Base URL
    https://api.zerion.io
  • URL
    https://api.zerion.io/v1/gas-prices/
  • Auth
    HTTP basic

Query parameters

filter[chain_ids]string[]

Return only gas prices for these chains (comma-separated list). Get chain IDs from GET /v1/chains/.

[
  "polygon"
]
filter[gas_types]Type2[]

Return only gas prices of these gas types (comma-separated list).

[
  "classic"
]

Response

List of gas prices

Example response

{
  "data": [
    {
      "type": "gas-prices",
      "id": "gas-polygon-classic",
      "attributes": {
        "updated_at": "2023-02-28T19:24:39.000Z",
        "gas_type": "classic",
        "info": {
          "slow": 48000000000,
          "standard": 48000000000,
          "fast": 51000000000
        }
      },
      "relationships": {
        "chain": {
          "links": {
            "related": "https://api.zerion.io/v1/chains/polygon"
          },
          "data": {
            "type": "chains",
            "id": "polygon"
          }
        }
      }
    }
  ],
  "links": {
    "self": "https://api.zerion.io/v1/gas-prices"
  }
}

Changes

    • breaking

      added subschema #2 subschema #3 to the /// response property oneOf list for the response status

    • info

      removed subschema #2 subschema #3 from the /// response property oneOf list for the response status