Skip to main content

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

ParameterTypeRequiredDescription
crossChainbooleanIf true, returns APY for cross-chain strategies; if false, single-chain
daysnumberPeriod over which APY is calculated. One of '7', '15', '30', '60'
strategyTypestringStrategy 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);