A database that argues with its sources
Market data vendors optimize for breadth and speed. StockQL optimizes for coherence: every ingest is checked against trading calendars, cross-provider evidence, and its own history before a row is trusted.
Architecture
StockQL ships as a Docker Compose stack: a PostgreSQL instance, an ingestion engine, a job scheduler, and a validation suite. You configure which exchanges you care about and provide your own provider keys; everything else is automatic.
┌─────────────┐ ┌─────────────┐
│ EODHD API │ │ FMP API │ your keys, your accounts
└──────┬──────┘ └──────┬──────┘
│ │
┌───▼─────────────────▼───┐
│ ingestion + validation │ calendars · completeness ·
│ (scheduled) │ liveness · corporate actions
└────────────┬────────────┘
│
┌───────▼────────┐
│ PostgreSQL │ documented schema, plain SQL,
│ your machine │ yours forever
└────────────────┘
Coverage
End-of-day OHLCV for 70+ exchanges worldwide, plus index and commodity series. Adjusted and unadjusted prices, splits, dividends, symbol metadata, delisting records.
Scheduler
Per-exchange jobs fire after each venue's close in its own timezone, with per-market enable switches and locks so nothing double-runs.
Plain SQL surface
No SDK required. Connect psql, Python, R, DuckDB, Grafana — anything with a Postgres driver — and query without limits. AI coding agents work the same way: connection string plus documented schema, no wrapper in between (or use the optional stockql-connect for guided, schema-aware agent access).
The error-checking machinery
Each of these guards exists because the raw feeds failed us in production. They run automatically; you read the audit log, not the vendor's changelog.
Completeness re-pass
Vendor bulk end-of-day files are mutable: fetched two hours after the US close, a file can be missing hundreds of symbols that appear later with no indicator. StockQL re-fetches recent date-addressed files on the following days and fills only what was missing — so a quiet vendor delay never becomes a permanent hole in your history.
Trading-calendar validation
Every exchange gets its own calendar cohort — 72 in total, including venues that don't trade Monday–Friday and asset classes that can't share a venue calendar at all. Rows on impossible dates and zero-volume placeholder padding are rejected instead of stored. Where vendor metadata is wrong (it happens — we've caught an exchange whose entire listed cohort belonged to a different country's calendar), StockQL's mapping wins.
Delisting and resurrection guards
Delisted symbols are retained with full history, so your universe is survivorship-bias-free. In the other direction, a symbol marked dead that starts printing real volume again is automatically revived and backfilled — vendors mis-flag both ways, and StockQL cross-checks a second provider daily to catch it.
Corporate-action coherence
Splits and dividends are applied consistently across the whole history, and adjusted series are recomputed rather than trusted, so a late-arriving corporate action can't leave half your history on one basis and half on another.
What's in the box
| Component | Details |
|---|---|
| Docker Compose stack | Postgres + ingestion + scheduler + validators, one command to start |
| Schema documentation | Every table, every column, with query examples |
| Backfill tooling | Full-history download for the exchanges you select, resumable |
| Audit log | Every correction, rejection, and revival the validators make is recorded |
| Updates | 12 months of product updates included; the database is yours regardless |