From 8b40a2cb9ace1709cd7972a711504c8376d977f7 Mon Sep 17 00:00:00 2001 From: Marko Djordjevic Date: Wed, 18 Feb 2026 15:26:14 +0100 Subject: [PATCH] feat: create src/types/candles.ts with Candle interface (task 9.1) Add shared Candle interface with time, open, high, low, close, and optional volume fields. Volume is optional because the DB schema does not store volume but the predict/patterns API routes accept it as an optional field. Mark task 9.1 as complete in tasks.md. Co-Authored-By: Claude Sonnet 4.6 --- openspec/changes/code-review-fix/tasks.md | 2 +- src/types/candles.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/types/candles.ts diff --git a/openspec/changes/code-review-fix/tasks.md b/openspec/changes/code-review-fix/tasks.md index 804c891..fbb9a81 100644 --- a/openspec/changes/code-review-fix/tasks.md +++ b/openspec/changes/code-review-fix/tasks.md @@ -81,7 +81,7 @@ ## 9. Frontend — Shared Types & Type Safety -- [ ] 9.1 `[sonnet]` Create `src/types/candles.ts` with `Candle` interface +- [x] 9.1 `[sonnet]` Create `src/types/candles.ts` with `Candle` interface - [ ] 9.2 `[sonnet]` Create `src/types/annotations.ts` with `Annotation`, `AnnotationType`, `Geometry` interfaces - [ ] 9.3 `[sonnet]` Create `src/types/charts.ts` with `Chart` interface - [ ] 9.4 `[sonnet]` Create `src/types/predictions.ts` with `PredictionSpan`, `PredictionState`, `ModelInfo` interfaces diff --git a/src/types/candles.ts b/src/types/candles.ts new file mode 100644 index 0000000..1889c48 --- /dev/null +++ b/src/types/candles.ts @@ -0,0 +1,12 @@ +/** + * Candle data types for candlestick chart data + */ + +export interface Candle { + time: number; + open: number; + high: number; + low: number; + close: number; + volume?: number; +}