Get market APY averages
Average supply and borrow APYs for a Morpho Blue market over fixed historical windows on the v0 REST API. Values exclude rewards.
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.
Path Parameters
market-selector*string
Selector formatted as <chain_id>:<market_id>. Example: 1:0xfff1970c0ffae288764186fbb38a9171a17e98676744a1e345809cb8b9e73342.
Format
<chain_id>:<market_id>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 marketSelector = "1:0xfff1970c0ffae288764186fbb38a9171a17e98676744a1e345809cb8b9e73342";const url = new URL(`${baseUrl}/v0/blue/markets/${marketSelector}/apy-averages`);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,
"market_id": "0xb1adceddb2941033a02dd819a3b9636a8c6f1cd1c2cd1add34e3c7b1f6c0fe25",
"last_indexed_block": "19847234",
"supply_apy_averages": {
"24h": 0.0421,
"7d": 0.0413,
"30d": 0.0405,
"90d": 0.0398,
"1y": 0.0324
},
"borrow_apy_averages": {
"24h": 0.0421,
"7d": 0.0413,
"30d": 0.0405,
"90d": 0.0398,
"1y": 0.0324
}
}
}