Skip to content

swcstudiospace/hypergrok

v2.4.0MIT

Turn your agent into an autonomous Hyperliquid trading desk: seven specialist roles and twenty-four skills, a policy gate that replaces per-trade approval, one gated sender, a kill switch, and a Claude Code guard. Runs on Grok Bot and Claude Code.

desk-autonomous-loop

The unattended cycle the autonomous desk runs on a schedule - pre-flight, book and protection, reconciliation of open sends, market scan, idea generation from live strategies and discretionary judgement, sizing, policy gate, single send, reconciliation and journal - and how to run it as a Grok Bot routine or a headless Claude Code session. Use to start, schedule, run, debug or explain the loop.

desk-autonomy-policy

The written policy that replaces human trade approval on the autonomous desk - the autonomy.json schema, the ceilings it may only tighten, the drawdown risk ladder and the depth multiple, the JSON ticket the Risk Manager writes, what scripts/policy_gate.py checks and the signed approval it issues, the send ledger, the kill switch and who may change what. Use when setting up or changing autonomy, when a ticket is gated, when a gate fails, or when anyone asks "why did the desk (not) send that".

desk-claude-code-runtime

How the desk runs in Claude Code with no permission prompts and no human approval - the plugin layout, the settings.json template (bypassPermissions plus explicit allow and deny rules), the PreToolUse guard that still refuses unsafe writes, the slash commands, headless invocation with claude -p, scheduling, roles as subagents or labelled passes, and how to verify the setup is quiet before switching autonomy on. Use when installing or debugging the desk in Claude Code, when a prompt appears that should not, or when a send is refused.

desk-execution-protocol

The Execution Trader's procedure for turning a gate-approved ticket into one Hyperliquid action through scripts/desk_send.py and reconciling it - the pre-send checklist, what the sender checks for you, exit codes, single-send discipline, unknown-result handling and the execution report. Use before and after every send, cancel, modify, leverage change or close.

desk-incident-response

What the desk does when something goes wrong on Hyperliquid or in the autonomous loop - unknown send results, unexpected fills or positions, unprotected positions, stuck or orphaned orders, API outages, rate limiting, suspected API wallet compromise, a gate or guard refusing everything, and a runaway loop. Contain first, halt when in doubt, reconcile from the exchange record, act only through gated tickets, then review. Use the moment anything does not match the ticket.

desk-monitoring

How the desk watches markets and the account between trades using routines, cron and WebSocket or polling watches - the desk brief, book checks, funding and price watches, the autonomous cycle and heartbeat watch, alert conditions and what a watch may and may not do. Use when the user asks for briefings, alerts, "watch X" or scheduled checks.

desk-multi-runtime

How the autonomous desk runs on each of its four runtimes - Grok Bot, Grok Build (CLI), Claude Cowork and Claude Code (CLI) - what each one is responsible for (engine host, supervisor, or both), where the desk root lives, how the cycle is scheduled without prompts, which safety layer each runtime has, and what to check before switching on. Use when installing on a new runtime, when a runtime cannot see the desk files, when a prompt appears, or when deciding where the engine should live.

desk-operating-model

How the HyperGrok desk works as a team of roles - seats, shared workspace, evidence standard, the policy gate that replaces human trade approval, runtimes and handoff format. Use when setting up the desk, when a Bot or pass is unsure who owns something, or when a request does not fit the normal trade lifecycle.

desk-operations

Running the autonomous desk as a service rather than an experiment - where the API key comes from (environment, secrets-manager command, or a locked-down file, with recipes for 1Password, AWS, GCP, Azure, Vault and Doppler), maker-first execution with taker fallback and what it does and does not save, real fees from userFees and the execution-stats controller that tunes the maker offset and wait per market, the paper-record gate that stands between paper and live, the weekly walk-forward re-review with automatic demotion, the correlation report to read before raising a share, the drawdown risk ladder and the thin-book deferral, the read-only dashboard, alerts and metrics, and the operator checklist. Use when deploying, rotating a key, reading the dashboard, explaining why a strategy was demoted, why size fell after a drawdown or why an entry was deferred, or answering "is this production-ready".

desk-post-trade-review

The Trade Reviewer's procedure for journaling desk activity and reviewing trades from the exchange record - process graded separately from outcome, execution costs measured, one repeatable finding per review, plus the weekly desk review. Use after any send, when a trade closes, on the weekly routine, or when the user asks "how did that go".

desk-risk-limits

How the Risk Manager writes the desk's risk limits with the user, sizes every proposed trade from live account state and Hyperliquid's real constraints, checks the book, and issues a PASS or REJECT with exact ticket fields and the JSON ticket the policy gate reads. Use for setting up or changing limits, sizing any trade, and answering "how's the book".

desk-strategy-engine

The systematic strategy engine that trades the liquid Hyperliquid perp universe without an LLM in the loop per trade - the hg-systematic factor model (momentum, carry, reversion, breakout, open-interest change, BTC regime), the dynamic top-20 universe, the one-minute risk clock and four-hour decision clock, the drawdown risk ladder and the thin-book deferral, real fees from userFees, how tickets reach the gate and sender, the backtester on 1h, 4h and daily bars and its honest record, engine state files, and how the agent roles supervise it. Use when running, promoting, debugging, backtesting or explaining the engine, or when anyone asks what "high frequency" means on this desk.

desk-strategy-lab

How the Strategist works with the user to turn their own trading idea into explicit rules, backtest it honestly on Hyperliquid candle and funding history, paper-trade it on testnet through the desk cycle, and how a strategy is promoted from draft to paper to live so the autonomous cycle may trade it. Method only - the desk ships no strategies and makes no return claims. Use when the user wants to design, test, compare, paper-trade or promote an idea.

desk-strategy-research

How the agents author, test, review and promote their own strategies on the autonomous desk - the strategy folder contract (RULES.md, params.json, review.json), the shared factor engine and its parameter space, the research loop the Strategist runs each day, the deterministic strategy gate (scripts/strategy_review.py and template/strategy-criteria.json), the long-history and wide-universe checks, the correlation report that says whether two strategies are one bet, the shipped hg-carry and hg-breakout drafts, the promotion ladder draft to paper to live and who may move each rung, multi-strategy budgets, and the anti-overfitting rules. Use when the Strategist proposes, revises, reviews, retires or compares strategies, or when the user asks what the desk is running and why.

desk-trade-lifecycle

The end-to-end procedure for one trade on the HyperGrok desk - from an idea to a reviewed, journaled result - with the ticket format, the JSON ticket and policy gate that replace human approval, who owns each stage, and what "done" looks like. Use whenever the user or the cycle wants to open, adjust or close a position, or whenever any role is about to touch the exchange write path.

hypergrok-bootstrap

Build and verify a HyperGrok autonomous desk from the pinned public release. Use for first-run setup, repair, or a readiness check. Starts with a live zero-key Opening Bell, installs the seven role profiles and twenty-four shared skills, prepares the Trading Floor, and returns an evidence receipt. Read-only by default; never requests a wallet or places an order.

hyperliquid-account

Read a Hyperliquid account from the desk computer - positions and margin, spot balances, open orders including trigger details, fills, funding paid, ledger updates, order status by oid or cloid, historical orders, portfolio history, fee tier and rate-limit budget - with curl and Python SDK examples. Read-only, needs only the account address. Use for sizing inputs, book checks, reconciliation and reviews.

hyperliquid-advanced

Less common Hyperliquid actions and their rules - dead-man's switch (scheduleCancel), TWAP orders, spot orders, expiresAfter and nonces, API wallet approval from code, sub-account and vault addressing, HIP-3 dexs, and what the desk deliberately does not do (transfers, withdrawals, builder fees, staking). Write actions are Execution Trader only, through scripts/desk_send.py on a gate-approved ticket. Use when a ticket asks for one of these or when a user asks whether the desk can.

hyperliquid-api-reference

Compact reference for the Hyperliquid API as the desk uses it - endpoints and envelopes, every /info request type, every /exchange action with its signing scheme, order and status vocabularies, asset ids, tick and lot rules, rate limits, WebSocket subscription list, error strings, and where the official docs are. Use to look up an exact field, request type or limit before writing a call, and to map an error string to its cause.

hyperliquid-market-data

Read live Hyperliquid market data from the desk computer with curl or the Python SDK - mid, mark and oracle prices, order book depth, funding (current, predicted, historical), open interest, volume, candles, perp and spot metadata, margin tiers, and how to save datasets for the strategy lab. Read-only, no key. Use for any market brief, depth read, funding question or data pull.

hyperliquid-orders

Place, cancel and modify Hyperliquid orders correctly from the desk computer - limit and IOC (market-style) orders, take-profit and stop-loss trigger orders with grouping, client order ids, reduce-only, batch actions, price and size rounding, and how to read every response status. Write path - Execution Trader only, through scripts/desk_send.py on a gate-approved ticket. Use for any order action and for reconciling by cloid.

hyperliquid-positions

Manage Hyperliquid perp positions and margin from the desk computer - read positions and margin, set leverage and cross/isolated mode, add isolated margin, understand margin tiers and liquidation price, close a position with a reduce-only IOC, and clean up orphaned orders. Write actions are Execution Trader only, through scripts/desk_send.py on a gate-approved ticket. Use for leverage changes, closes, protection checks and margin questions.

hyperliquid-setup

Prepare the desk computer to work with Hyperliquid - install the SDKs, pick testnet or mainnet, verify connectivity, and (only when the user asks) provision a trade-only API wallet through the secure secret store and verify it is approved. Use during desk setup, when moving between research, testnet and mainnet levels, when a key is rotated, or when any Hyperliquid call fails with an environment problem.

hyperliquid-websocket

Subscribe to live Hyperliquid data over WebSocket from the desk computer - mids, order book, trades, candles, best bid/offer, and per-account fills, order updates and events - with raw JSON, Python SDK and TypeScript examples, plus how to run a supervised watch that logs to a file and alerts. Read-only. Use for monitoring, fill notifications and any watch that polling would make expensive.