Get list of all available gas prices
curl --request GET \
--url https://api.zerion.io/v1/gas-prices/ \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.zerion.io/v1/gas-prices/"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.zerion.io/v1/gas-prices/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zerion.io/v1/gas-prices/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"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,
"rapid": null
}
},
"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"
}
}{
"errors": [
{
"title": "Parameter is malformed",
"detail": "Some validation errors will be described here"
}
]
}{
"errors": [
{
"title": "Unauthorized Error",
"detail": "The API key is invalid, please, make sure that you are using a valid key"
}
]
}{
"errors": [
{
"title": "Too many requests",
"detail": "Your request had been throttled"
}
]
}gas
Get list of all available gas prices
This endpoint provides real-time information on the current gas prices across all supported blockchain networks. Gas prices play a crucial role in the speed and cost of executing transactions on a blockchain, and fluctuate frequently based on network demand and usage. By using this endpoint, developers can stay up-to-date with the latest gas prices and adjust their application’s transaction parameters accordingly to ensure optimal speed and cost efficiency.
GET
/
v1
/
gas-prices
/
Get list of all available gas prices
curl --request GET \
--url https://api.zerion.io/v1/gas-prices/ \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.zerion.io/v1/gas-prices/"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.zerion.io/v1/gas-prices/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zerion.io/v1/gas-prices/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"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,
"rapid": null
}
},
"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"
}
}{
"errors": [
{
"title": "Parameter is malformed",
"detail": "Some validation errors will be described here"
}
]
}{
"errors": [
{
"title": "Unauthorized Error",
"detail": "The API key is invalid, please, make sure that you are using a valid key"
}
]
}{
"errors": [
{
"title": "Too many requests",
"detail": "Your request had been throttled"
}
]
}Authorizations
Query Parameters
Return only gas prices from specified chains (comma-separated list). You can find available chain ids in chain endpoints.
Return only gas prices with specified gas-type (comma-separated list).
Format of the gas.
Available options:
classic, eip1559, optimistic Was this page helpful?