# Phase E — Historical warehouse

**Status:** Complete (v0.4.0)  
**Rollback:** v0.3.0 Chart MVP unchanged at tag `v0.3.0`

## Delivered

- SQLite warehouse + schema v1
- OANDA historical downloader (batched, rate-limit delay)
- Validation, duplicate protection, metadata, import log
- Query layer `getWarehouseCandles`
- Incremental sync `incrementalSync`
- Gap detection report
- Backup/restore (file copy)
- API `GET /api/warehouse/candles`
- Chart **Data → Warehouse** proof (EUR/USD M15)
- CLI: `warehouse:import:test`, `warehouse:import:year`, `warehouse:backup`

## Not in scope

Indicators, backtest, auth, FXCM, deploy, Redis, Postgres cloud.

## Tests

21 unit/integration tests (`npm test`).

## Pre-audit note (2026-10-02)

Uncommitted before Phase E: `PROJECT-RULES.md` §11, `docs/communication/` — retained and committed with Phase E.
