Skip to content
All library documents

Cross-Exchange Bitcoin Spread Hedging with Inventory Rebalancing

Article Strategy library · Author: Zero

Summary

This bot monitors Bitcoin order books on two exchanges and opens paired trades when the bid on one venue exceeds the opposing ask on the other by a configurable spread threshold. It sells on the higher-priced venue and buys on the lower-priced venue, limiting order size by displayed liquidity, available Bitcoin, available cash, and a maximum amount. After execution, it checks combined inventory and balances residual exposure when the net coin difference exceeds a minimum. Account snapshots and open orders are refreshed as part of that correction process.

The published setup names Binance and OKX with hourly bars over roughly one month, but includes no reported backtest results. The source depends on simultaneous fills, accurate account state, and sufficient depth at quoted prices; its displayed spread does not establish net profitability after fees, slippage, latency, or transfer and funding constraints. It is best understood as an execution-sensitive arbitrage framework with inventory controls, rather than evidence of a validated profitable strategy.

Key ideas

  • The bot seeks cross-exchange spreads by selling at the higher bid and buying at the lower ask.
  • Trade size is constrained by order book depth, account balances, and a configured maximum.
  • It monitors combined coin inventory and places corrective trades when exposure drifts beyond a threshold.
  • The document provides an exchange pair and test period but no performance metrics.
  • Profitability depends on execution quality and costs that the spread calculation does not establish.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.