Skip to main content
Ultra Feature. Requires an Ultra subscription. Get started at api.mathematicalcompany.com

Latency Arbitrage

Use a fast external feed (e.g., Binance WebSocket) to detect price moves before the prediction market book reprices. When the book is stale and a significant move has occurred, trade ahead of the expected repricing.

How It Works

  1. Monitor a fast reference feed (e.g., BTC price on Binance)
  2. Monitor the prediction market book feed (e.g., “Will BTC hit $100k?”)
  3. When the reference feed shows a move but the book hasn’t updated (stale):
  • Expected price = mid + (ref_change * sensitivity)
  • If expected > ask + fees: BUY (market will reprice up)
  • If expected < bid - fees: SELL (market will reprice down)

Rust Type: LatencyArbOpportunity

Engine Method: scan_latency_arb

Pipeline: latency_arb

Stores LatencyArbOpportunity in ctx.params["last_latency_arb"].

Safety Controls

  • max_daily_trades: Hard cap that resets at midnight. Prevents runaway execution.
  • min_staleness_ms: Only trades when the book is genuinely stale, not just slow.
  • cooldown: Minimum time between executions.
  • Ultra tier gate: Only available to Ultra subscribers.

Example

Latency arb is high-risk. Markets may reprice before your order fills, resulting in adverse selection. Always use conservative sizing and the max_daily_trades safety cap.