Skip to main content
A cross-exchange strategy that monitors the same event on both Polymarket and Kalshi, quoting tight when prices agree and wide when they diverge. Uses the multi-exchange engine with netting pairs.

Full Code

Key Features

Multi-Exchange Engine

Uses exchanges=[...] instead of exchange= to register both Polymarket and Kalshi:
The first exchange (Polymarket) becomes the primary. Orders are routed based on market.exchange.

Netting Pairs

The two markets represent the same underlying event on different exchanges. Registering them as a netting pair reduces the portfolio notional for hedged positions:
If you hold 50 contracts on Polymarket and 30 on Kalshi, 30 contracts are considered hedged.

Divergence-Based Spread

The spread widens proportionally to the price divergence between exchanges:
  • When prices agree (divergence ≈ 0): spread = 2 cents (aggressive)
  • When prices diverge by 10 cents: spread = 7 cents (conservative)

Dual Feeds

Both exchange orderbooks provide real-time price data:

Run It

Strategy Variants

Directional arb

Instead of market-making both sides, take directional positions when divergence exceeds a threshold:

Using the Arb Scanner

For automated scanning and execution, use hz.arb_scanner():
Or use hz.arb_sweep() for one-shot scanning:
See Arbitrage Executor for the full guide.