Cross-exchange crypto arbitrage
Crypto · sample build
A real-time engine that watches order books across exchanges and acts only when the spread survives fees and transfer time.
| Venue | Bid | Ask | Taker fee |
|---|---|---|---|
| Binance | 68330.4 | 68340.7 | 0.10% |
| Coinbase · buy | 68331.4 | 68336.5 | 0.40% |
| Kraken · sell | 68366.0 | 68373.3 | 0.26% |
| Bybit | 68353.2 | 68360.3 | 0.10% |
| OKX | 68358.2 | 68371.8 | 0.08% |
The problem
Price gaps between exchanges look like free money until fees, slippage and withdrawal delays are counted. The client needed to know which gaps were real.
The approach
Streamed order books over WebSockets into one normalised view, modelled the full cost of each round trip and routed orders only when the net edge cleared a threshold.
How it was tested
The cost model was checked against real fills before any opportunity was trusted: fees at the client’s actual tier, order-book depth at the moment of the signal, and measured transfer times between exchanges. The engine then ran in observe-only mode, logging every spread it would have taken, before trading with small size.
What was handed over
Order-book aggregator, cost model, execution engine with per-exchange limits, and a dashboard of opportunities seen versus taken.
Stack
- TypeScript
- Node.js
- Redis
- WebSocket
- Docker