Skip to content
 
 

Repository files navigation

oggregator

Cross-venue crypto options aggregator. Real-time pricing, greeks, and IV across 5 exchanges.

oggregator demo showing chain overview and builder


What this is

oggregator connects to Deribit, OKX, Binance, Bybit, and Derive via WebSocket, normalizes option quotes to a canonical format, and serves a real-time cross-venue comparison dashboard. See the best price, IV, spread, and greeks for any strike across all venues simultaneously.

Live demo: oggregator.useheat.xyz

Venues

Venue Connection Settlement
Deribit WebSocket USDC
OKX WebSocket + REST USDC
Binance WebSocket USDT
Bybit WebSocket + REST USDC
Derive WebSocket USDC

Quick Start

pnpm install
pnpm dev          # server (:3100) + web (:5173)

Open localhost:5173. Data starts flowing within ~10 seconds as venue adapters connect.

Quality Gates

pnpm typecheck    # tsc --noEmit across all packages
pnpm test         # 293 tests across all workspaces
pnpm precommit    # typecheck + test (run before every commit)
pnpm build        # production build (server + web)

Architecture

packages/
  protocol/   Shared Zod schemas for WS protocol between server and web
  core/       Venue adapters, canonical types, normalization, enrichment
  server/     Fastify REST + WS API, readiness, SPA serving
  web/        React 19 + Vite dashboard (mobile-first responsive)
  db/         Optional Postgres trade store + SQL migrations
  ingest/     Optional worker that records live + institutional trades into Postgres

Live data path: Exchange WS/REST → Core Adapter → Normalizer → Enrichment → Server → Web Dashboard

Chain transport path: Exchange deltas → server quote store → coalesced WS /ws/chain snapshots → browser query cache

API

Endpoint Description
GET /api/health Service health
GET /api/venues Connected venues and status
GET /api/underlyings Available base assets per venue
GET /api/expiries?underlying=BTC Expiry dates with per-venue availability
GET /api/chains?underlying=BTC&expiry=2026-03-28 Cross-venue option chain with enriched stats
GET /api/surface?underlying=BTC IV surface (expiry × delta grid)
GET /api/stats?underlying=BTC DVOL, spot, IVR, 24h changes
GET /api/dvol-history?currency=BTC Historical DVOL candles
GET /api/ready Readiness for deploy health checks
GET /api/flow?underlying=BTC Recent options trades across venues
GET /api/block-flow?underlying=BTC Institutional RFQ / block trades
WS /ws/chain Real-time chain snapshot push to the browser

Dashboard

The web dashboard includes:

  • Chain — Cross-venue option chain with best-price highlighting, IV chips, spread pills, expandable per-venue detail, and quick trade
  • Builder — Multi-leg options builder with templates, custom legs, live repricing, payoff chart editing, and venue comparison
  • Surface — IV surface heatmap across delta levels and expiries with term structure indicator
  • Flow — Live options trade flow plus institutional RFQ / block trade mode
  • Analytics — OI by venue, call/put summary, put/call ratio by expiry, DVOL chart with HV overlay, OI by strike, and cross-expiry curves
  • GEX — Gamma exposure by strike with dealer positioning explanation

Mobile responsive with bottom navigation, shared toolbar, and full-screen settings drawer.

Deploy

Main app is a single service. The server serves the SPA in production:

pnpm build
pnpm start        # NODE_ENV=production, serves API + static SPA

Optional durable flow storage uses a separate worker + Postgres:

pnpm db:migrate   # run once with DATABASE_URL set
pnpm dev:ingest   # local worker

Production shape:

  • main app: Dockerfile
  • ingest worker: Dockerfile.ingest
  • Postgres: private/internal only

Coolify:

  • main app → Dockerfile
  • ingest worker → Dockerfile.ingest
  • run pnpm db:migrate once before starting ingest

Railway: Build command pnpm install && pnpm build, start command pnpm start.

License

MIT

About

Options data aggregator from Binance, Bybit, Deribit, Derive and OKX

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages