Skip to content

Create historical APY fetch method in AnalyticsModule #10

Description

@Code-Paragon

Problem

The AnalyticsModule has a pending TODO to fetch historical APY data from an off-chain indexer, which is necessary for the dashboard charts.

Expected behavior

A new asynchronous method getHistoricalAPY(timeframe: string) is added to AnalyticsModule that accepts standard timeframes (e.g., "7d", "30d") and returns an array of APY data points.

Files to update

  • src/modules/analytics.ts
  • docs/api-reference.md

Project relevance

This provides the data necessary for the yieldstream-dashboard to render the APY charts mentioned in the project overview.

Acceptance criteria

  • Feature works as described
  • Tests are added or updated where needed
  • Documentation is updated where needed
  • Method returns an array of objects shaped as { timestamp: number, apy: string }
  • No TypeScript, lint, test, or build errors

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions