Skip to content

Add APY rate snapshots endpoint#129

Open
Sikkra wants to merge 1 commit into
Dgetsylver:mainfrom
Sikkra:bounty-30-rate-snapshots
Open

Add APY rate snapshots endpoint#129
Sikkra wants to merge 1 commit into
Dgetsylver:mainfrom
Sikkra:bounty-30-rate-snapshots

Conversation

@Sikkra
Copy link
Copy Markdown

@Sikkra Sikkra commented May 19, 2026

Resolves #30.

Summary:

  • Added a D1 rate_snapshots table with pool, asset, net/interest/BLND rate components, utilization, combined BLND eps, and capture time.
  • Cron now prunes snapshots older than 365 days and writes one snapshot for every fetched pool asset on each tick.
  • Added public GET /rate-snapshots with window, pool_id, asset_symbol, asset_id, and bounded limit parameters.
  • Documented the snapshot retention and endpoint contract in alerts/README.md.
  • Added Cloudflare Worker types and cleaned up a dead helper so npx tsc --noEmit passes.

Verification:

  • npm install
  • npx tsc --noEmit
  • git diff --check

Note: npm install reported 6 existing dev dependency audit findings in the alert package dependency tree.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

B3: Historical APY storage

1 participant