curl --request GET \
--url https://api.byzantine.fi/v1/query/apyimport requests
url = "https://api.byzantine.fi/v1/query/apy"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.byzantine.fi/v1/query/apy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"vault_address": "<string>",
"chain_id": 123,
"apy_12h": "123.456789",
"apy_24h": "123.456789",
"apy_3d": "123.456789",
"apy_7d": "123.456789",
"apy_31d": "123.456789",
"timestamp": "2023-11-07T05:31:56Z",
"block_number": 1
}{
"error": "Resource not found",
"status": 404
}Get single product APY
Returns the 12h, 24h, 3d, 7d and 31d trailing APYs of an active top vault, read from the latest hourly snapshot of the indexer. Public endpoint: no integrator authentication.
curl --request GET \
--url https://api.byzantine.fi/v1/query/apyimport requests
url = "https://api.byzantine.fi/v1/query/apy"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.byzantine.fi/v1/query/apy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"vault_address": "<string>",
"chain_id": 123,
"apy_12h": "123.456789",
"apy_24h": "123.456789",
"apy_3d": "123.456789",
"apy_7d": "123.456789",
"apy_31d": "123.456789",
"timestamp": "2023-11-07T05:31:56Z",
"block_number": 1
}{
"error": "Resource not found",
"status": 404
}Query Parameters
Address of the vault
Chain of the vault. Required only when the address is a top vault on several chains.
Response
APY data retrieved successfully
Trailing APYs of a top vault from its latest hourly indexer snapshot.
Each APY is the compounded annualization of the price-per-share change over the trailing
window, as a ratio (0.05 == 5%). The indexer accepts values in [0, 2]; outside that
range it reuses the previous valid APY for the same window, or zero if unavailable.
A fresh snapshot can therefore retain a positive APY after a price decline.
A vault younger than a window uses its oldest snapshot as the calculation boundary.
A high-precision decimal number represented as a string
"123.456789"
A high-precision decimal number represented as a string
"123.456789"
A high-precision decimal number represented as a string
"123.456789"
A high-precision decimal number represented as a string
"123.456789"
A high-precision decimal number represented as a string
"123.456789"
Block time of the snapshot the APYs were computed at
x >= 0
