Signature
Parameters
Returns
Daily earnings breakdownReturn Type
All earnings values are decimal strings. Parse them with
parseFloat() when doing arithmetic or display formatting.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
getDailyEarnings(walletAddress: string, startDate?: string, endDate?: string): Promise<DailyEarningsResponse>
| Parameter | Type | Required | Description |
|---|---|---|---|
walletAddress | string | ✅ | Smart wallet address |
startDate | string | ❌ | Start date (YYYY-MM-DD format) |
endDate | string | ❌ | End date (YYYY-MM-DD format) |
// Token-keyed earnings — amounts as decimal strings: { "USDC": "324.313028" }
type TokenEarnings = Record<string, string>;
interface DailyEarning {
wallet_address?: string;
snapshot_date: string;
total_earnings_by_token: TokenEarnings;
daily_total_delta_by_token: TokenEarnings;
created_at?: string;
}
interface DailyEarningsResponse {
success: boolean;
walletAddress: string;
data: DailyEarning[];
count: number;
filters: {
startDate: string | null;
endDate: string | null;
};
}
parseFloat() when doing arithmetic or display formatting.const daily = await sdk.getDailyEarnings(
"0x...",
"2024-01-01",
"2024-01-31"
);
daily.data.forEach(d => {
const totalUsdc = parseFloat(d.total_earnings_by_token["USDC"] ?? "0");
const dailyDelta = parseFloat(d.daily_total_delta_by_token["USDC"] ?? "0");
console.log(`Date: ${d.snapshot_date}`);
console.log(` Cumulative USDC: $${totalUsdc.toFixed(6)}`);
console.log(` Daily USDC delta: $${dailyDelta.toFixed(6)}`);
});