Market DVR — Record Every Pyth Pro Tick, Replay Any Market Moment Frame by Frame
Team: @masterwattsonmasterwattsonmasterwattsonmasterwattson on Discord
Submitted: March 10, 2026
Answer Capsule
Market DVR is a DVR for financial markets. It records every Pyth Pro tick. Price, bid, ask, spread, and confidence across 16 assets at millisecond resolution, then lets you replay any moment frame by frame. Built on Pyth Pro’s real-time and fixed-rate feeds, it turns fleeting market microstructure into a permanent, scrubbable archive.
What It Does
Most trading tools show you candles. Market DVR records the full microstructure — every bid, ask, spread, and confidence interval Pyth Pro emits and stores it permanently. When a flash crash or spread spike happens, you can rewind to the exact millisecond it started and scrub through it frame by frame, just like rewinding a DVR.
It also auto-detects market events (crashes, pumps, spread spikes, confidence drops, divergences) and builds a searchable archive. Over 83,000 events have been recorded since launch. Any event can be replayed instantly, exported as a video clip, or shared as a snapshot image.
Pyth Features Used
- Price Feeds (off-chai@pythnetwork) — Pyth Pro (Lazer) via @pythnetwork/pyth-lazer-sdk
Feeds used (16 total):
-
Crypto: BTC, ETH, SOL, BNB, BONK, WIF, DOGE, PYTH
-
Commodities: XAU/USD, XAG/USD
-
Forex: EUR/USD, GBP/USD, USD/JPY, USD/CHF, AUD/USD, USD/CAD
Pyth Pro features specifically used:
real_timechannel for crypto — maximum tick frequencyfixed_rate@200mschannel for commodities and forexbestBidPrice/bestAskPriceon every tick — used to compute live spread (note: not available onfixed_rate@200ms, which is why commodities and forex show “—” for spread)confidenceinterval — used to compute a market stress gauge and detect confidence drop events
Links
-
Live Demo: https://dvr.masterwattson.site
-
Source Code: https://github.com/bshuaibu1/market-dvr
-
Video Walkthrough:
Screenshots / Media
Replaying BTC/USD at 200ms resolution — price movement, spread width chart, and AI markers visible. “Pyth Pro Only” badge confirms sub-200ms data requires Pyth Pro access.
——————————————————————————————————————————-
Tech Stack
-
Framework/Language: React + Vite + TypeScript (frontend), Node.js + Express (backend)
-
Database: PostgreSQL — every tick and event stored with microsecond timestamps
-
Data Source: Pyth Pro (Lazer) — @pythnetwork/pyth-lazer-sdk
-
Deployment: Ubuntu VPS, Caddy reverse proxy, PM2
-
Key Libraries: Framer Motion, html-to-image, MediaRecorder API (WebM clip export)
-
Blockchain: N/A (off-chain feeds only)
-
Agent Framework: N/A
How It Works
The backend uses PythLazerClient from @pythnetwork/pyth-lazer-sdk to maintain a persistent connection to Pyth Pro (Lazer) and subscribes to two channels:
real_time → BTC, ETH, SOL, BNB, BONK, WIF, DOGE, PYTH
fixed_rate@200ms → XAU, XAG, EUR, GBP, JPY, CHF, AUD, CAD
Every tick is written to PostgreSQL with microsecond precision. An event detection loop scans every 500ms for:
-
Crash / Pump — price change > 0.3% in a single tick
-
Spread Spike — spread > 2× rolling baseline
-
Confidence Drop — confidence falls below threshold
-
Divergence — two correlated assets moving in opposite directions
Price values are converted from raw Pyth integers using:
price_usd = raw_price × 10^exponent
spread_usd = (best_ask − best_bid) × 10^exponent
conf_norm = 1 − (confidence × 10^exponent / price_usd)
The Replay page fetches historical ticks and lets users scrub frame by frame at resolutions from 50ms to 1 hour. The Share modal uses html-to-image for PNG snapshots and MediaRecorder + Canvas API to render animated .webm replay clips with a Pyth Pro watermark.
Content Contributions (Required)
-
Public Post (Dev.to): https://dev.to/master_wattson_6fe762787f/i-built-a-dvr-for-financial-markets-using-pyth-pro-2boh
-
Technical Contribution (GitHub Gist): https://gist.github.com/bshuaibu1/572cbb34a449103a1b5c97203a38d134
-
Bonus — X Post: https://x.com/MasterWattson/status/2031288402755125633?s=20
Licensing
This project is licensed under Apache 2.0.
Eligibility Confirmation
I am 18+ years old
I am not located in an OFAC-sanctioned jurisdiction
I confirm this is an original work created during the hackathon period
I have read and agree to the Terms & Conditions
