Skip to main content

Data plane overview

QuantDesk’s market data stack is split into three layers:
  1. Collectors ingest raw market, protocol, and article events.
  2. The data plane normalizes those events into a shared envelope and writes authoritative hub tables.
  3. Backend APIs and websockets expose the hub to frontend surfaces, Elena backtests, and external clients.

Core principles

  • Registry first: market identity comes from the market registry, not ticker guesses.
  • One envelope: Redis producers publish the same event shape before any downstream fanout.
  • Postgres hub: hub_market_stats, hub_candles, hub_trades, hub_news, hub_reference_perps, and hub_collector_status are the backend source of truth.
  • REST bootstrap, websocket freshness: clients load the latest snapshot over HTTP, then stay current with Socket.IO updates such as market_stats_update.

Services

ServicePortResponsibility
data-ingestion/3003Market marks, candles, protocol trades, reference perps, collector health
news-ingestion/3007RSS / API article ingestion and entity tagging
x-stream/3008X/Twitter posts, social alerts, symbol-linked context
backend/3002Public /api/v2/* routes and websocket fanout
Article news ownership lives in news-ingestion/ only; data-ingestion/ no longer acts as the first-class article collector in the standard dev fleet. For local end-to-end verification, the standard pnpm dev fleet is expected to bring up data-ingestion, news-ingestion, and x-stream alongside the backend/frontend services.

Public read paths

SurfaceRoute / channelNotes
Market statsGET /api/v2/market-stats24h stats, OI, last price, cash session badge
CandlesGET /api/v2/candlesHistorical OHLCV from the hub
NewsGET /api/v2/newsTagged articles from hub_news
X feedGET /api/v2/x/feedNormalized posts from x-stream
X alertsGET /api/v2/x/alertsStored social alert events
Reference perpsGET /api/v2/reference/perpsHyperliquid and Coinalyze context
Data healthGET /api/v2/data-healthCollector freshness and stale-market summary
Live statsmarket_stats_updateSocket.IO event for incremental UI updates after REST bootstrap

Why this exists

Epic 15 removes market-facing mock data from production surfaces and gives every consumer the same canonical input set. That keeps:
  • the Lite and Pro terminals aligned,
  • Elena dataset exports reproducible,
  • TradFi session handling explicit,
  • and collector health observable.