Skip to content

Continuous-aggregate OHLC rollups #100

@Miracle656

Description

@Miracle656

Background

Computing candles on the fly is expensive. Materialized/continuous aggregates give fast OHLC queries at scale.

What to build

Add continuous aggregates (TimescaleDB hypertable + continuous aggregate, or scheduled materialized views) for 1m/1h/1d OHLC, with a refresh policy and a query endpoint that reads the rollup.

Key files

  • prisma/schema.prisma / sql/ migrations
  • src/api/candles.ts

Acceptance criteria

  • Rollups refresh incrementally
  • Candle endpoint reads the aggregate, not raw rows
  • Benchmark shows the speedup vs on-the-fly

Drips Wave · Complexity: Advanced · 200 points

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions