Market DVR — Record Every Pyth Pro Tick, Replay Any Market Moment Frame by Frame

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_time channel for crypto — maximum tick frequency
  • fixed_rate@200ms channel for commodities and forex
  • bestBidPrice / bestAskPrice on every tick — used to compute live spread (note: not available on fixed_rate@200ms, which is why commodities and forex show “—” for spread)
  • confidence interval — used to compute a market stress gauge and detect confidence drop events

Links


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)


Licensing

This project is licensed under Apache 2.0.


Eligibility Confirmation

:white_check_mark: I am 18+ years old
:white_check_mark:I am not located in an OFAC-sanctioned jurisdiction
:white_check_mark:I confirm this is an original work created during the hackathon period
:white_check_mark:I have read and agree to the Terms & Conditions

2 Likes

What exactly do you mean by this? Pyth Pro refers to Lazer while the Hermes endpoint is for Pyth Core (cannot be both)?

Based on all the other inputs, I am pretty sure you can remove the Hermes mention, and just say Pyth Pro (endpoint should ‘lazer’ in it and not ‘hermes’).

Anyway this is super cool already!

Have you investigated storing this on a ‘decentralized’ database like Filecoin or any of its competitors?

Thanks for the kind words, Marc, and for the sharp feedback.

You’re absolutely right, I’ve updated the submission to remove the Hermes mention. The backend uses PythLazerClient from @pythnetwork/pyth-lazer-sdk, connected to the Pyth Pro (Lazer) endpoint.

On decentralized storage Hadn’t thought of that honestly. PostgreSQL was the obvious choice for low-latency writes at tick frequency. But you’re right, the historical tick data is exactly the kind of thing that should live permanently somewhere like Filecoin. Will look into it!

1 Like