Get V2 vault realized average APY
Realized average APY of a Morpho Vault V2 over a predefined lookback period, derived from share price evolution.
Vault selector example: 1:0x23f5E9c35820f4baB695Ac1F19c203cC3f8e1e11 (format: <chain_id>:<vault_address>; replace with the target vault).
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
vault-selector*string
Selector formatted as <chain_id>:<vault_address>. Example: 1:0x23f5E9c35820f4baB695Ac1F19c203cC3f8e1e11.
Format
<chain_id>:<vault_address>Query Parameters
lookback?string
Lookback period for the APY calculation. Defaults to six_hours.
Value in
"one_hour" | "six_hours" | "one_day" | "seven_days" | "thirty_days" | "ninety_days" | "one_year" | "inception"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 vaultSelector = "1:0x23f5E9c35820f4baB695Ac1F19c203cC3f8e1e11";const url = new URL(`${baseUrl}/v1/vaults-v2/${vaultSelector}/apy-averages`);url.searchParams.set("lookback", "six_hours");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,
"vault_address": "0x23f5E9c35820f4baB695Ac1F19c203cC3f8e1e11",
"last_indexed_block": "25475349",
"lookback": "six_hours",
"apy": 0.021513718810443165
}
}