hyperliquid-advanced
Hyperliquid advanced actions
Uses the same header as hyperliquid-orders (info, exchange, ACCOUNT, round_px, round_sz, new_cloid). Everything that signs is Execution Trader only, on a ticket.
Dead-man's switch (scheduleCancel)
Tells the exchange to cancel all of the account's open orders at a future time unless you push the time out or clear it. Useful when the desk runs a watch that could die while resting orders sit on the book. The user asks for it explicitly; the report states the time.
from hyperliquid.utils.signing import get_timestamp_ms
res = exchange.schedule_cancel(get_timestamp_ms() + 10 * 60 * 1000) # 10 minutes out; must be >= 5 s in the future
res = exchange.schedule_cancel(None) # clear it
TypeScript: await exchange.scheduleCancel({ time: Date.now() + 600_000 }); omit time to clear. Limits: at most 10 triggers per day per account (resets 00:00 UTC).
It cancels protective stops too, and it is not position-aware. If it fires while a position is open, that position is left naked on the exchange and nothing re-arms it automatically. So: it is for a desk with resting orders and no position, or for a user who has explicitly accepted that outcome for this account. Do not arm it as routine hygiene while a position is open. If it does fire with a position open, that is an unprotected position the moment it lands - declare it and run playbook D in desk-incident-response at priority, rather than treating re-arming as clean-up.