getApyByStrat
Get global APY by strategy, by number of days and for a specific chain.
Signature
getAPYPerStrategy(crossChain?: boolean, days?: number, strategyType?: string): Promise<APYPerStrategyResponse>
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
crossChain | boolean | ❌ | If true, returns APY for cross-chain strategies; if false, single-chain |
days | number | ❌ | Period over which APY is calculated. One of '7', '15', '30', '60' |
strategyType | string | ❌ | Strategy risk profile. One of 'conservative' or 'aggressive' |
Returns
Global APY by strategy, for the given time period and strategy configuration.
Return Type
interface APYPerStrategyResponse {
success: boolean;
count: number;
data: APYPerStrategy[];
}
Example
const apy = await sdk.getAPYPerStrategy(false, 7, 'conservative');
console.log("Apy by strategy:", apy.data);