Skip to main content

Get vault APY – Earn API

Updated on
Jul 31, 2026

Overview

The 5-minute snapshot series over [from, to], plus intervalApy: the annualized share-price return between the first and last snapshot in the range, (last/first)^(year/elapsed) - 1, in percent.

Retention is 7 days: an earlier from is pulled forward and clamped is set true. resolution downsamples by keeping the last snapshot per bucket (real snapshots, never averages) and never changes intervalApy.

Endpoint

GET https://earn-api.quicknode.dev/functions/v1/api/v1/vaults/{chainId}/{address}/apy

Authorization

Include the published apikey header. This read request is public and does not require a SIWE signature.

Parameters

ParameterLocationTypeRequiredDescription
chainIdpathintegerYesChain id the vault lives on.
addresspathstringYesVault (ERC-4626 share token) address.
fromquerystring (date-time)NoStart instant (ISO-8601). Default the trailing 24h before `to`. Clamped forward to the 7-day retention floor.
toquerystring (date-time)NoEnd instant (ISO-8601). Defaults to now.
resolutionqueryintegerNoDownsample bucket in minutes (5-1440). Omit for the full 5-minute series.

Example request

curl --location 'https://earn-api.quicknode.dev/functions/v1/api/v1/vaults/8453/0x1deefabee758aabdc29a542b24ca3b75afd56765/apy' \
--header 'Accept: application/json' \
--header 'apikey: <EARN_PUBLIC_API_KEY>'

Response

FieldTypeRequiredDescription
chainIdintegerYesNumeric identifier of the chain where the vault is deployed.
vaultAddressstringYesLowercased vault address.
fromstring (date-time)YesEffective start (after retention clamp).
tostring (date-time)YesEffective end of the requested interval as an ISO 8601 timestamp.
clampedbooleanYesTrue when the requested `from` was pulled forward to the retention floor.
retentionDaysintegerYesThe snapshot retention horizon (7).
resolutionMinutesnumber | nullYesThe downsample bucket in minutes, or null for the full 5-minute series.
intervalApynumber | nullYesAnnualized share-price return between the first and last snapshot in the FULL range (`(last/first)^(year/elapsed) - 1`, in percent, 4dp). Null when there are fewer than two usable share-price snapshots or the elapsed span is under one snapshot cadence. Unaffected by `resolution`.
snapshotsarray<object>YesVault snapshots in chronological order. Downsampling retains complete snapshots rather than averaging their values.
snapshots[].snapshotAtstring (date-time)YesISO 8601 timestamp when the snapshot was recorded.
snapshots[].apy5mnumber | nullYesAPY percentage over the five-minute lookback window.
snapshots[].apy10mnumber | nullYesAPY percentage over the ten-minute lookback window.
snapshots[].apy30mnumber | nullYesAPY percentage over the 30-minute lookback window.
snapshots[].apy1hnumber | nullYesAPY percentage over the one-hour lookback window.
snapshots[].apy2hnumber | nullYesAPY percentage over the two-hour lookback window.
snapshots[].apy4hnumber | nullYesAPY percentage over the four-hour lookback window.
snapshots[].apy6hnumber | nullYesAPY percentage over the six-hour lookback window.
snapshots[].assetsPerSharenumber | nullYesOpaque scaled share price with a constant 100x scale. Use it only as a ratio between snapshots, not as a per-share dollar value.
snapshots[].tvlUsdinteger | nullYesVault TVL in whole US dollars, rounded to the nearest dollar.
snapshots[].availableLiquidityUsdinteger | nullYesWithdrawable liquidity in whole US dollars, rounded to the nearest dollar.

Example response

The full response contains 289 snapshots for this interval. This example shows the exact top-level values and first snapshot from the response:

{
"chainId": 8453,
"vaultAddress": "0x1deefabee758aabdc29a542b24ca3b75afd56765",
"from": "2026-07-30T13:05:40.404Z",
"to": "2026-07-31T13:05:40.404Z",
"clamped": false,
"retentionDays": 7,
"resolutionMinutes": null,
"intervalApy": 5.4775,
"snapshots": [
{
"snapshotAt": "2026-07-30T13:05:43.351+00:00",
"apy5m": 5.25,
"apy10m": 5.25,
"apy30m": 5.27,
"apy1h": 5.41,
"apy2h": 5.46,
"apy4h": 5.4,
"apy6h": 5.4,
"assetsPerShare": 104032613,
"tvlUsd": 2963371,
"availableLiquidityUsd": 875071
}
]
}

HTTP responses

StatusDescription
200The (optionally downsampled) snapshot series and the interval APY.
400A malformed `from`/`to`, `from >= to`, a range entirely outside the 7-day retention, a bad `resolution`, or a bad path (`invalid_request`).
429Rate limit exceeded. `Retry-After` (seconds) tells you when to retry. Reads, feedback, and push writes are keyed per IP; create/update/delete are keyed per wallet+IP; deposit/withdraw/claim calldata is keyed per strategy+IP.
500Internal server error.
OpenAPI source

This page is based on operation getVaultApySeries in the Earn OpenAPI 3.1 specification.

Share this doc