Call sequence
1
Trigger
Your liability feed crosses a threshold. Find the market with
List markets.
2
Price and place the hedge
Quote a market →
Preview an order →
Place an order. If the cash is on the other venue,
the same call moves it and buys.
3
Track and unwind
Confirm each hedge with Get an order and
List fills, and watch cash with
Get balances. When liability falls, unwind with a
sell through Place an order.
Starter
Guardrails
- Price protection.
limit_pricesets the worst price you pay for the hedge. - Fill or nothing.
time_in_force: iocwithall_or_noneplaces the hedge only if the books can fill the full size now. It is best effort: a book can move before the fill, so a partial hedge is still possible. See All or none. Polymarket takesiocbuys by dollar amount only, so a hedge sized withquantityfills on Hyperliquid. - One hedge per trigger. Derive
client_order_idfrom the match and trigger (for examplehedge-match123-1). If your hedger fires twice, the second call returns the first order. - Spending caps. The key’s per order and rolling 24 hour limits bound how much any hedger can spend.
- Kill switch. Pause order placement stops the hedger in one call.