Hyperliquid Advanced Actions for Openclaw

A controlled Hyperliquid execution skill for advanced orders, account addressing, signing safeguards, and explicitly approved trading tickets.

galleonlabs
v1.0.0
Aug 17, 2026
0
137
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install hypergrok-hyperliquid-advanced

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install hypergrok-hyperliquid-advanced using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Hyperliquid Advanced Actions?

Hyperliquid Advanced Actions extends the standard Hyperliquid order workflow with less common capabilities, including dead-man's switches, TWAP orders, spot trading, expiration controls, nonce management, API wallet approval guidance, sub-account and vault addressing, and HIP-3 decentralized exchange support. It is designed for Execution Trader workflows where every write action requires an approved ticket.

This skill also defines operational boundaries: it does not transfer funds, withdraw assets, approve builder fees, change margin abstraction, or manage staking. Openclaw Skills users gain a precise, safety-focused reference for advanced Hyperliquid execution without confusing supported trading actions with excluded account operations.

Hyperliquid Advanced Actions Use Cases

  • Schedule or clear a Hyperliquid dead-man's switch that cancels all open orders after a specified future time.
  • Submit, monitor, and cancel TWAP orders with defined size, duration, randomization, and reduce-only settings.
  • Place spot orders using the correct asset identifier, base-token size decimals, price precision, and minimum order value.
  • Configure expiresAfter safeguards and understand nonce behavior when signed actions are delayed or retried.
  • Approve or rotate API wallets when the user explicitly needs programmatic agent management.
  • Route orders and reads for supported sub-accounts or vaults using a recorded vault address.
  • Evaluate HIP-3 perp dexs using their prefixed coin names, independent metadata, asset IDs, and margin rules.
  • Diagnose rate-limit exhaustion, stale signatures, invalid TWAP durations, spot precision errors, and parallel nonce collisions.
  • Decline transfers, withdrawals, staking, builder fees, margin-mode changes, and fund movements that are deliberately outside the desk's scope.

How Hyperliquid Advanced Actions Works

  1. Confirm that the request matches a supported advanced Hyperliquid action and that a ticket authorizes the write operation.
  2. Use the established Hyperliquid integration context: info, exchange, ACCOUNT, price and size rounding helpers, and client order ID generation.
  3. Resolve the target account, vault, sub-account, market, or HIP-3 dex from the request, using the appropriate metadata endpoint and address parameters.
  4. Validate action-specific constraints, such as dead-man's switch timing, TWAP duration and minimum notional, spot precision, minimum order value, margin mode, and reduce-only behavior.
  5. Sign and submit the action through the approved Execution Trader process, ensuring only one process signs with a given API wallet at a time.
  6. Apply nonce and expiration safeguards, keeping expiresAfter sufficiently generous to avoid unnecessary stale-action rejections.
  7. Read the response and classify the result correctly; TWAP errors may appear inside status, while successful submissions return a running TWAP ID or order result.
  8. Monitor ongoing activity through account, TWAP, or WebSocket subscriptions as appropriate, and record the requested timing, size, addressing, and execution outcome.
  9. Re-arm protective stops if a dead-man's switch fires, and explain any excluded operation through the desk's operating model.

Hyperliquid Advanced Actions Setup

Prerequisites

  • Use the same Hyperliquid SDK and integration header as the standard hyperliquid-orders workflow.
  • Run against the configured network; the skill metadata defaults to testnet.
  • Keep the main wallet private key off the desk computer. API wallet approval normally occurs in the Hyperliquid app and must be signed by the main wallet.
  • Use one Execution Trader process per API wallet to prevent nonce collisions.

Dead-man's switch

from hyperliquid.utils.signing import get_timestamp_ms

# Schedule cancellation at least 5 seconds in the future
res = exchange.schedule_cancel(get_timestamp_ms() + 10 * 60 * 1000)

# Clear the scheduled cancellation
res = exchange.schedule_cancel(None)

TypeScript uses exchange.scheduleCancel({ time: Date.now() + 600_000 }); omit time to clear it. The account is limited to 10 triggers per day, reset at 00:00 UTC.

TWAP

TWAP is not exposed through Python's high-level Exchange; use the TypeScript SDK or a raw action.

const twap = await exchange.twapOrder({
  twap: { a, b: true, s: "10", r: false, m: 30, t: true }
});

const twapId = (twap.response.data.status as {
  running: { twapId: number }
}).running.twapId;

await exchange.twapCancel({ a, t: twapId });

The raw action uses type: "twapOrder" with the a, b, s, r, m, and t parameters. TWAP duration is 5 minutes to 7 days in the documentation, while the TypeScript schema caps m at 1440 minutes; longer runs require the raw action.

Spot orders

Resolve the pair through spotMeta, calculate size precision from the base token's szDecimals, calculate price precision as 8 - szDecimals, and verify that order value is at least 10 quote tokens. Use spotClearinghouseState to read balances.

Expiration and addressing

In Python, configure a following-action expiration with exchange.set_expires_after(get_timestamp_ms() + 60_000). TypeScript supports per-call expiresAfter. For vault or sub-account execution, configure Python's vault_address, TypeScript's defaultVaultAddress, or a per-call vaultAddress only when the request explicitly authorizes it.

Hyperliquid Advanced Actions Data Schema & Taxonomy

Action and account fields

Area Data organization and metadata
Dead-man's switch A future millisecond timestamp; None or omitted time clears the switch. It cancels all open orders, including stops.
TWAP a asset ID, b buy/sell direction, s string size, r reduce-only flag, m duration in minutes, and t randomization flag. Successful responses contain status.running.twapId; failures contain status.error.
Spot markets Pair names come from spotMeta.universe; asset ID is 10000 + pair index; size precision comes from the base token's szDecimals; price precision is 8 - szDecimals.
Signed actions Every action includes a millisecond nonce per signer. Optional expiresAfter invalidates actions received after the specified time.
Account scope Reads use the relevant user address. Orders may include vaultAddress for a supported vault or sub-account, with the master API wallet signing.
HIP-3 dexs Coins use dex:COIN; asset IDs follow 100000 + 10000 × dex index + index in that dex's metadata; reads include a dex parameter.
Rate limits Address limits use a 10,000-action buffer plus 1 action per 1 USDC of cumulative volume. userRateLimit reports usage; IP exchange weight is 1 + floor(batch size / 40).

Generated records and operational metadata

  • Ticket records should state action type, account or vault address, asset or pair, size, price or duration, reduce-only status, randomization, and requested execution time.
  • TWAP monitoring records the returned twapId and slice fills from twapStates or userTwapSliceFills; TWAP fills carry a zero hash.
  • Spot calculations should retain the resolved pair metadata, base-token decimals, rounded size, rounded price, and notional validation.
  • API wallet records should identify the agent name and lifecycle status without exposing private keys. Named agents may include valid_until <ms> and expire for up to 180 days.
  • Desk configuration records any explicitly approved vault or sub-account address in desk.md.
  • Excluded actions are classified as transfers, withdrawals, balance-class transfers, vault or sub-account fund movements, builder fees, staking, or margin abstraction changes.

Hyperliquid Advanced Actions Advanced Features

  • Dead-man's switch support with explicit scheduling, clearing, daily trigger limits, and stop-order safety warnings.
  • TWAP execution with fixed intervals, 30-second minimum slices, 5-minute to 7-day documented durations, 3% maximum slice slippage, and optional 20% slice-size randomization.
  • Raw Hyperliquid action fallback for TWAP runs exceeding the TypeScript SDK's 24-hour schema limit.
  • WebSocket and read-based monitoring through twapStates and userTwapSliceFills.
  • Precise spot-market resolution using spotMeta, base-token decimals, significant-figure rounding, and minimum quote-token validation.
  • Signer isolation and nonce-collision prevention for concurrent processes using the same API wallet.
  • Expiration controls that protect against delayed duplicate actions after reconnects, while accounting for the higher cost of stale-action rejections.
  • API agent lifecycle guidance covering unnamed and named agents, expiry naming, replacement behavior, and revoked-key rotation.
  • Vault and sub-account order routing without enabling fund transfers or account creation.
  • HIP-3 dex awareness with prefixed symbols, dex-specific metadata, asset IDs, and isolated-margin considerations.
  • Rate-limit diagnostics using userRateLimit and guidance to mention, but not automatically purchase, reserveRequestWeight.
  • Deliberate policy enforcement that declines withdrawals, transfers, staking, builder fees, margin-mode changes, and other excluded operations.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*