Skip to main content

getDailyApyHistory

Get daily APY history with weighted average for a wallet over a specified period.

Signature

getDailyApyHistory(walletAddress: string, days?: '7D' | '14D' | '30D'): Promise<DailyApyHistoryResponse>

Parameters

ParameterTypeRequiredDescription
walletAddressstringSmart wallet address
days`'7D''14D''30D'`

Returns

Daily APY history with weighted averages

Return Type

interface DailyApyHistoryResponse {
success: boolean;
walletAddress: string;
history: Record<string, DailyApyEntry>;
totalDays: number;
requestedDays?: string;
averageWeightedApy?: number;
}

Example

const apyHistory = await sdk.getDailyApyHistory("0x...", "30D");
console.log("Average APY:", apyHistory.averageWeightedApy);
console.log("History:", apyHistory.history);