Skip to main content

Hyperliquid Account Strategy Reference

Runtime status

Two Hyperliquid lanes are live and dispatchable: exec.hyperliquid.topup and exec.hyperliquid.withdraw, seeded as the hl.topup and hl.drain templates. Both submit signed /exchange actions and move funds. They register only when MG_HL_MASTER_ADDRESS and a local signer are configured — leave either unset to keep the lanes off. hyperliquid_withdraw and hyperliquid_topup are not routed through the central ONCHAIN_ACTION_TYPES address guard. The withdraw executor checks its own EVM destination against the allowlist at the fund-outflow point; top-up is owner-pinned. Also implemented: one master-account registry, one strategy subaccount binding per strategy, a trading-only agent-wallet metadata registry, HMAC-protected operator/read routes under /v3/hyperliquid/*, and read-only Info API parsers.

Account model

  • One Hyperliquid master account.
  • Master signer is KMS/HSM/control-plane by default.
  • One Hyperliquid subaccount per strategy is the baseline isolation unit.
  • QTG treasury pool is an internal accounting/control abstraction, not a Hyperliquid-native vault.
  • Strategy API/agent wallets are treated as trading-only.
  • QTG allowed_actions is an internal fail-closed policy, not a proven Hyperliquid-native agent-wallet action-scope claim.

Operator API

Admin-purpose HMAC routes:
  • POST /v3/hyperliquid/master-account
  • POST /v3/hyperliquid/strategy-bindings
  • POST /v3/hyperliquid/strategy-bindings/{strategy_id}/agent-wallets
  • POST /v3/hyperliquid/strategy-bindings/{strategy_id}/pause
Read-purpose HMAC routes:
  • GET /v3/hyperliquid/strategy-bindings/{strategy_id}
  • GET /v3/hyperliquid/strategy-bindings/{strategy_id}/agent-wallets
  • GET /v3/hyperliquid/strategy-bindings/{strategy_id}/emergency-state

Read-only Info probes

The read-only client posts to Hyperliquid /info with fixture-backed parsers for:
  • subAccounts
  • userRole
  • portfolio
  • userNonFundingLedgerUpdates
Fixtures are synthetic official-shape examples with fake addresses; they are not live captures.