bulk_cancel
Cancel multiple open orders by chain oid in one batched native call.
Signature
def bulk_cancel(self, cancel_requests: Iterable[dict[str, Any]]) -> dict[str, Any]Example
result = exchange.bulk_cancel([
{"coin": "BTC", "oid": 12345},
{"coin": "ETH", "oid": 67890},
])Parameters
cancel_requests — Iterable[dict[str, Any]]. Each dict must have coin (HL coin name) and oid (int order id). Empty input raises ValueError.
Returns
dict[str, Any] — Hyperliquid-shaped bulk-cancel envelope.
Notes
- Each
coinis verified viainfo.name_to_pairbefore dispatch — a typo fails loudly here rather than silently cancelling under an unknown pair.
See also
cancel— cancel a single orderbatch_update_orders— native equivalent