Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Exchange.bulk_cancel_by_cloid (HL-compat)

Cancel multiple open orders by cloid in one batched native call.

Signature

def bulk_cancel_by_cloid(
    self,
    cancel_requests: Iterable[dict[str, Any]],
) -> dict[str, Any]

Example

from dango.hyperliquid_compatibility.exchange import Exchange
from dango.hyperliquid_compatibility.types import Cloid
 
ex = Exchange(wallet, base_url="...", account_address="0x...")
ex.bulk_cancel_by_cloid([
    {"coin": "ETH", "cloid": Cloid("0x12345678901234567890123456789012")},
    {"coin": "BTC", "cloid": Cloid("0xabcdef00abcdef00abcdef00abcdef00")},
])

Parameters

cancel_requestsIterable[dict[str, Any]]. Each entry has coin and cloid (must be a Cloid instance — TypeError otherwise). Empty iterables raise ValueError.

Returns

dict[str, Any] — HL status envelope with response.type="cancelByCloid".

Notes

See also