Guide

Market data storage design

Boards, risk, and backtests need durable history. This guide covers writing TIQEX REST/WebSocket data into RDBMS or time-series stores.

OLTP vs time-series

Prefer TimescaleDB/ClickHouse for tick/second writes; partitioned PostgreSQL works for minute/daily bars. Key on (market, symbol, ts).

Writes and dedup

Align WS deltas with REST snapshots before upsert. Dedupe with event time + version; store UTC.

Backfill and versions

Cron kline backfills for gaps; store data_version and window. After long disconnects, REST-calibrate last price before resuming the stream.

Retention and compliance

Set TTLs by product need; split derived metrics from raw ticks. Respect redistribution and license terms.

API linkage

Log X-Request-Id and HTTP status beside writers for rate-limit debugging. See /guides/backtesting-data-setup.