Live
A self-hosted warehouse for market data.
FX, metals, indices, commodities, crypto, OHLC bars and tick data, stored in DuckDB and served over a FastAPI layer with cursor-paginated queries, durable multi-timeframe derivation, and Parquet backups.
Current coverage
updated —
Architecture
Receive. Store. Serve.
Three components, clean boundaries, one VPS.
- 01
FastAPI
ingest · query · derive
Handles ingestion, durable derivation from M1 to D1, cursor-paginated queries, and API-key auth.
- 02
DuckDB + Postgres
market data · auth
DuckDB holds OHLC bars and ticks in an embedded columnar file. Postgres holds users and API keys.
- 03
Caddy
TLS · reverse proxy
Terminates TLS, proxies /api/* to FastAPI and / to this static site.
Stack
What it's built with.
- FastAPIREST API
- DuckDBOHLC + tick storage
- PostgreSQLusers + API keys
- CaddyTLS reverse proxy
- Docker Composecontainer orchestration
- HetznerVPS
API
Sample query.
Queries are cursor-paginated; timestamps are UTC; each row is tagged
raw or
derived.
{
"data": [
{
"instrument": "XAUUSD",
"timeframe": "D1",
"timestamp": "2026-10-01",
"open": 4155.76,
"high": 4192.94,
"low": 4139.32,
"close": 4181.95,
"source": "derived"
},
{
"instrument": "XAUUSD",
"timeframe": "D1",
"timestamp": "2026-10-02",
"open": 4181.88,
"high": 4226.26,
"low": 4125.27,
"close": 4140.49,
"source": "derived"
},
{
"instrument": "XAUUSD",
"timeframe": "D1",
"timestamp": "2026-10-04",
"open": 4140.35,
"high": 4148.29,
"low": 4133.02,
"close": 4142.64,
"source": "derived"
}
],
"pagination": {
"limit": 3,
"count": 3,
"has_more": true,
"next_cursor": "eyJ0cyI6ICIyMDI2LTEwLTA0IiwgImkiOiAiWEFVVVNEIiwgInRmIjogIkQxIn0="
}
} Row-level queries require an API key. The stats above come from an aggregate-only public endpoint — no row content is exposed without auth.