跳转至主要内容

Get vault APY – Earn API

更新于
Jul 31, 2026

概述

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 来自 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.

参数

ParameterLocation类型Required描述
chainIdpath整数Chain id the vault lives on.
地址path字符串Vault (ERC-4626 share token) address.
来自querystring (date-time)Start instant (ISO-8601). Default the trailing 24h before `to`. Clamped forward to the 7-day retention floor.
querystring (date-time)End instant (ISO-8601). Defaults to now.
resolutionquery整数Downsample 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>'

回复

Field类型Required描述
chainId整数Numeric identifier of the chain where the vault is deployed.
vaultAddress字符串Lowercased vault address.
来自string (date-time)Effective start (after retention clamp).
string (date-time)Effective end of the requested interval as an ISO 8601 timestamp.
clamped布尔型True when the requested `from` was pulled forward to the retention floor.
retentionDays整数The snapshot retention horizon (7).
resolutionMinutesnumber | nullThe downsample bucket in minutes, or null for the full 5-minute series.
intervalApynumber | nullAnnualized 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>Vault snapshots in chronological order. Downsampling retains complete snapshots rather than averaging their values.
snapshots[].snapshotAtstring (date-time)ISO 8601 timestamp when the snapshot was recorded.
snapshots[].apy5mnumber | nullAPY percentage over the five-minute lookback window.
snapshots[].apy10mnumber | nullAPY percentage over the ten-minute lookback window.
snapshots[].apy30mnumber | nullAPY percentage over the 30-minute lookback window.
snapshots[].apy1hnumber | nullAPY percentage over the one-hour lookback window.
snapshots[].apy2hnumber | nullAPY percentage over the two-hour lookback window.
snapshots[].apy4hnumber | nullAPY percentage over the four-hour lookback window.
snapshots[].apy6hnumber | nullAPY percentage over the six-hour lookback window.
snapshots[].assetsPerSharenumber | nullOpaque 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 | nullVault TVL in whole US dollars, rounded to the nearest dollar.
snapshots[].availableLiquidityUsdinteger | nullWithdrawable 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

状态描述
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.