Cross-Exchange Perpetual Futures Hedging with Spread Thresholds
Summary
This Chinese-language example describes an automated hedge between OKX and Binance perpetual futures. It reads signed position sizes and quotes from both venues, tracks progress toward a requested amount, and uses an opening spread threshold to trigger opposing orders across the exchanges. It also defines a closing spread threshold, order slice size, price and quantity precision, and an OKX contract multiplier.
Orders are placed in repeated slices, with prices offset from observed quotes, and the loop checks positions and market prices before deciding whether to submit another pair of orders. The stated goal is to complete the target quantity while managing exposure across venues. The document provides code and parameter descriptions, but no backtest, execution results, fee model, or risk analysis. Its position tracking and threshold branches are compact and venue-specific, so the example alone does not demonstrate that fills remain balanced during partial execution or changing market conditions.
Key ideas
- The example monitors perpetual futures positions and quotes on OKX and Binance.
- An opening spread condition initiates opposing trades intended to form a cross-exchange hedge.
- Order slicing and configurable precision control the submitted order quantities and prices.
- A separate spread condition governs the closing leg of the process.
- The source gives no evidence on profitability, fees, slippage, or how partial fills affect hedge balance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.