Get chain by ID
curl --request GET \
--url https://api.zerion.io/v1/chains/{chain_id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.zerion.io/v1/chains/{chain_id}"
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/chains/{chain_id}', 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/chains/{chain_id}"
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))
}{
"links": {
"self": "https://api.zerion.io/v1/chains/polygon"
},
"data": {
"type": "chains",
"id": "polygon",
"attributes": {
"name": "polygon",
"external_id": "0x4e454152",
"icon": {
"url": "https://token-icons.s3.amazonaws.com/0x0391d2021f89dc339f60fff84546ea23e337750f.png"
},
"explorer": {
"name": "polygonScan",
"token_url_format": "https://explorer.mainnet.polygon.dev/token/{ADDRESS}",
"tx_url_format": "https://explorer.mainnet.polygon.dev/tx/{HASH}",
"home_url": "https://explorer.mainnet.polygon.dev"
},
"rpc": {
"internal_server_url_format": "https://mainnet.polygon.dev/{polygon_API_KEY}",
"public_servers_url": [
"https://mainnet.polygon.dev"
]
},
"flags": {
"supports_trading": true,
"supports_sending": true,
"supports_bridge": true
}
},
"relationships": {
"native_fungible": {
"links": {
"related": "https://api.zerion.io/v1/fungibles/0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
},
"data": {
"type": "fungibles",
"id": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
}
},
"wrapped_native_fungible": {
"links": {
"related": "https://api.zerion.io/v1/fungibles/0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
},
"data": {
"type": "fungibles",
"id": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
}
}
}
}
}{
"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": "Resource was not found",
"detail": "Requested resource was not found, try later"
}
]
}{
"errors": [
{
"title": "Too many requests",
"detail": "Your request had been throttled"
}
]
}chains
Get chain by ID
This endpoint returns chain by unique chain identifier.
This endpoint supports testnets. To get data for testnets use X-Env header.
GET
/
v1
/
chains
/
{chain_id}
Get chain by ID
curl --request GET \
--url https://api.zerion.io/v1/chains/{chain_id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.zerion.io/v1/chains/{chain_id}"
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/chains/{chain_id}', 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/chains/{chain_id}"
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))
}{
"links": {
"self": "https://api.zerion.io/v1/chains/polygon"
},
"data": {
"type": "chains",
"id": "polygon",
"attributes": {
"name": "polygon",
"external_id": "0x4e454152",
"icon": {
"url": "https://token-icons.s3.amazonaws.com/0x0391d2021f89dc339f60fff84546ea23e337750f.png"
},
"explorer": {
"name": "polygonScan",
"token_url_format": "https://explorer.mainnet.polygon.dev/token/{ADDRESS}",
"tx_url_format": "https://explorer.mainnet.polygon.dev/tx/{HASH}",
"home_url": "https://explorer.mainnet.polygon.dev"
},
"rpc": {
"internal_server_url_format": "https://mainnet.polygon.dev/{polygon_API_KEY}",
"public_servers_url": [
"https://mainnet.polygon.dev"
]
},
"flags": {
"supports_trading": true,
"supports_sending": true,
"supports_bridge": true
}
},
"relationships": {
"native_fungible": {
"links": {
"related": "https://api.zerion.io/v1/fungibles/0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
},
"data": {
"type": "fungibles",
"id": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
}
},
"wrapped_native_fungible": {
"links": {
"related": "https://api.zerion.io/v1/fungibles/0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
},
"data": {
"type": "fungibles",
"id": "0x2af1df3ab0ab157e1e2ad8f88a7d04fbea0c7dc6"
}
}
}
}
}{
"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": "Resource was not found",
"detail": "Requested resource was not found, try later"
}
]
}{
"errors": [
{
"title": "Too many requests",
"detail": "Your request had been throttled"
}
]
}Authorizations
Headers
Custom header that allows you to get data for testnets.
Available options:
testnet Path Parameters
Unique chain ID
Was this page helpful?
⌘I