Lido statistics
APR
Methods
getLastApr
Output Parameters:
- Type: number
getSmaApr
Input Parameters:
props: { days }days(Type: number): The number of days back to return sma apr.
Output Parameters:
- Type: number
Examples
import { LidoSDK } from '@lidofinance/lido-ethereum-sdk';
import { http, createPublicClient } from 'viem';
const lidoSDK = new LidoSDK({
publicClient: createPublicClient({
chain: hoodi,
transport: http('<RPC_URL>'),
}),
});
const lastApr = await lidoSDK.statistics.apr.getLastApr();
const smaApr = await lidoSDK.statistics.apr.getSmaApr({ days: 7 });
console.log(lastApr, 'last apr');
console.log(smaApr, 'sma apr by 7 days');