Hyperliquid Pair-Trade Template
This template runs a pair-trade strategy (Leg A + Leg B) on Hyperliquid.
It exposes a single tool that reads config from OPENTOOL_PUBLIC_HL_PAIR_TRADE_CONFIG and
opens/maintains a long spot leg and a short perp leg based on drift thresholds
and a rebalance cadence. legASide controls whether Leg A is long or short; Leg B
uses the opposite side. hedgeRatio sizes Leg B notional exposure as a positive
multiplier of Leg A notional, where 1 targets equal notional. perpLeverage
is margin leverage for the short side; it changes margin and liquidation buffer,
not the notional exposure ratio.
Notes
- Config is stored via the
templateConfigschema insrc/pair-trade.ts.
Development
opentool devopentool buildopentool validate