Get chains
Fully supported EVM chains exposed by the Core REST API, with the chain id, network name, the protocols deployed on the chain, and the last block fully processed by all realtime service jobs for the chain.
Enterprise API access
For enterprise access, use https://private.api.morpho.org as the base URL and send your API key in the x-api-key header. Request an API key.
Response Body
application/json
const baseUrl = process.env.CORE_REST_BASE_URL ?? "https://api.morpho.org";const apiKey = process.env.MORPHO_API_KEY ?? "<MORPHO_API_KEY>";const url = new URL(`${baseUrl}/v0/chains`);const response = await fetch(url, { headers: { accept: "application/json", "x-api-key": apiKey, },});if (!response.ok) throw new Error(await response.text());const body = await response.json();{
"data": [
{
"chain_id": 1,
"name": "string",
"last_indexed_block": "string",
"supported_protocols": [
"blue"
]
}
]
}