⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v1.7.2

desk-execution-protocol

galleonlabs@galleonlabs⭐ 502 stars· last commit 3d ago· 1 open issues

The Execution Trader's procedure for turning an approved ticket into one Hyperliquid action and reconciling it - the pre-send checklist, order construction rules, single-send discipline, unknown-result handling and the execution report. Use before and after every send, cancel, modify, leverage change or close.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐⭐⭐ 502 on GitHubGitHub ↗

Popular

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

HyperGrok gives your AI agents a shared process for Hyperliquid research, risk, execution and review. It includes seven role profiles, seventeen skills and read-only Python tools. Start with public market data, then set up the desk in Grok Bot or your preferred agent tool. Trading requires your own API wallet, verified approval controls and an exact ticket you approve.

Try it now, no keys

git clone --depth 1 --branch v1.7.2 https://github.com/galleonlabs/hypergrok-trading-desk.git
cd hypergrok-trading-desk
python3 scripts/opening_bell.py --coin ETH

A live ETH snapshot from Hyperliquid's public /info endpoint: price, funding, open interest, spread and depth. It needs no wallet, account or key, and runs on Python 3's standard library.

Recorded from the command above on 25 October 2026 at 13:09 UTC. The figures are a historical snapshot; run it yourself for current data.

Start

For the seven-Bot desk with a shared Trading Floor, open Grok Bot and paste:

Set up the HyperGrok trading desk from https://github.com/galleonlabs/hypergrok-trading-desk/blob/v1.7.2/skills/hypergrok-bootstrap/SKILL.md. Follow the bootstrap skill, use https://github.com/galleonlabs/hypergrok-trading-desk/blob/v1.7.2/SETUP.md for the complete runbook, and finish with its evidence receipt.

Or add the public HyperGrok Desk Lead template, then send Start the desk. Its 1.7.1 bootstrap installs the complete seventeen-skill release. See the publication and native content checks.

The Desk Lead runs Opening Bell, installs the shared skills, prepares the team and returns a setup receipt. The desk starts in research mode. Add a testnet API wallet when you want to practise with play money; mainnet uses the same ticket process after its approval controls are verified. See the full setup runbook for each step.

Opening Bell reports source and UTC time, mid/mark/oracle prices, 24-hour change and volume, hourly funding, open interest, spread and depth at 5/10/25 bps. It requests coarser book pages when twenty levels cannot cover a band, identifies each figure's source page and marks unreached depth as a floor. scripts/desk_doctor.py checks the release, roles, skill hashes, desk folders and public connectivity. Both use only Python's standard library.

For automation, inspect the offline --schema, then use --json. Failed reads, partial depth and doctor warnings remain explicit. Snapshots accept canonical mixed-case names and HIP-3 markets:

python3 scripts/opening_bell.py --schema
python3 scripts/opening_bell.py --coin xyz:TSLA --json
python3 scripts/desk_doctor.py --offline --json

--testnet explicitly selects testnet. A custom API origin is labelled custom. HIP-3 discovery stays read-only; execution remains opt-in under the desk's normal ticket rules.

Before a backtest, collect the exact period into a research bundle:

python3 scripts/research_dataset.py --coin ETH --interval 4h \
  --start 2026-09-01T00:00:00Z --end 2026-10-01T00:00:00Z \
  --with-funding --output ../hypergrok-data/eth-september --json
python3 scripts/research_dataset.py --verify ../hypergrok-data/eth-september --json

The bundle keeps requests, captured responses, observed CSV rows and a hashed manifest. Closed UTC windows, explicit missing ranges and bounded funding pagination distinguish complete, incomplete and unavailable history. Offline verification replays the saved responses; it checks consistency, not source authenticity or strategy quality. The tool needs no key and never fills a gap with synthetic data. See Research datasets for the supported intervals, market selection, exit codes and analyst handoff.

Meet the desk

You supply the ideas. Each role owns a stage and hands its evidence to the next.

BotWhat they do for you
Desk LeadYour main contact. Runs the floor, keeps every trade moving through the same clean process.
Market AnalystLive Hyperliquid data on demand: price, depth, funding, open interest, candles. Timestamped and sourced.
Research AnalystWhat is happening and what is scheduled: fundamentals, news, catalysts, onchain and social context.
StrategistTurns your idea into explicit rules, backtests it honestly on Hyperliquid history, paper-trades it on testnet.
Risk ManagerKeeps your written limits, sizes every trade from your live account, watches the book, and can say no.
Execution TraderThe one Bot with the keys. Sends the ticket you approved, once, and reconciles it from the exchange record.
Trade ReviewerKeeps the desk journal and grades every trade on process and outcome, separately.

Six sit together on the Trading Floor group chat; the Trade Reviewer works by DM. Every trade follows the same path:

A day on the desk

"Brief me on ETH." The Market Analyst pulls mid, mark, funding, open interest, 24h volume and depth at 5/10/25 bps from the exchange, and posts a brief with sources and UTC times.

"I want to long ETH at 3,000 with a stop at 2,900." In

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/desk-execution-protocol/SKILL.md7.8 KBupstream ↗
    ---
    name: desk-execution-protocol
    description: The Execution Trader's procedure for turning an approved ticket into one Hyperliquid action and reconciling it - the pre-send checklist, order construction rules, single-send discipline, unknown-result handling and the execution report. Use before and after every send, cancel, modify, leverage change or close.
    license: MIT
    metadata:
      version: "1.1.2"
      author: Galleon Labs
      category: desk
    ---
    
    # Execution protocol
    
    This is the only skill on the desk that ends with a request to Hyperliquid's `/exchange` endpoint, and only the Execution Trader uses it. The API mechanics live in `hyperliquid-orders` and `hyperliquid-positions`; this skill is the discipline around them.
    
    ## Inputs
    
    - The proposal file `/workspace/trading-desk/proposals/<id>.md` with a Risk Manager PASS and exact ticket fields.
    - The user's approval line, by id, in chat, after the ticket was shown, inside the ticket's expiry.
    - The desk computer configured per `hyperliquid-setup`: `HYPERLIQUID_NETWORK`, `HYPERLIQUID_ACCOUNT_ADDRESS`, and the API wallet key available to scripts from the environment (never printed).
    
    ## Pre-send checklist
    
    Run every item and write the result under `## execution` before sending. Any failure: do not send, name the item, hand back to the Desk Lead.
    
    1. **Ticket integrity and gate.** Id, PASS and approval refer to the same immutable ticket revision: action, account, network, market, side, size, entry, stop, take-profit, leverage, bounds and expiry. Append revisions; never overwrite the approved text. Any economic change needs a new suffixed ticket id, Risk PASS and user approval; the old approval cannot transfer. Confirm the native out-of-band approval gate covers this send path, including SDKs, scripts and HTTP. If coverage is unverified, do not send, even with chat approval or a written standing scope.
    2. **Network.** `HYPERLIQUID_NETWORK` equals the ticket's network. Mainnet is never assumed.
    3. **Account and wallet.** `HYPERLIQUID_ACCOUNT_ADDRESS` equals the ticket's account. Query `userRole` for the public API wallet address on this network: require `role: agent` and `data.user` equal to the ticket's account. Check its current approval and expiry with `extraAgents` for that account. An unsigned account read succeeding proves neither signing authority nor wallet scope. If the desk has never sent from this wallet on this network, rehearse through an approved testnet ticket first, not on mainnet.
    4. **Price still valid.** Fresh mid from `allMids` is within the ticket's slippage tolerance of the ticket price. For a stop or take-profit ticket, the trigger price is on the correct side of the current mark.
    5. **Formatting.** Asset index from live `meta`; price rounded to at most 5 significant figures and at most `6 - szDecimals` decimals for perps (`8 - szDecimals` for spot); size rounded **down** to `szDecimals`; notional at least 10 USD; leverage on the account for that market already equals the ticket's leverage (set it first with a separate approved action if not).
    6. **cloid and expiry.** Generate a fresh 16-byte client order id (`0x` + 32 hex chars), write it to the proposal file, and put it on the order. One cloid per order, never reused. Set `expiresAfter` on the send, no later than the ticket's expiry and normally a minute out (`hyperliquid-advanced`), and write that deadline beside the cloid. The cloid makes a duplicate detectable; `expiresAfter` is what later makes the original provably dead. A send with neither cannot be cleanly recovered from an unknown result.
    7. **One action.** Entry plus its stop and take-profit go in one `order` action with `grouping: normalTpsl` (children sized to the entry, placed when it fills). Protection for an existing position is a standalone reduce-only trigger. Anything else in the ticket that is a different action type (leverage change, cancel) is a separate, separately approved step.
    8. **Capacity and recovery.** Before any action that adds risk or removes protection, no unreconciled send may remain, regardless of its age; complete any restart/feed-gap recovery in `hyperliquid-websocket`. Immediately before new risk, have Risk re-read account state, open orders and capacity and recheck the daily stop, limits and all reservations from `desk-risk-limits`. Reserve the approved revision once. Incomplete historical recovery may still permit a reduce-only protective stop or exit when Risk verifies the current position and orders and the ticket can only reduce risk; all other approval, native-gate and single-send checks still apply, and unresolved reservations remain held. A failed applicable gate blocks the send; changed economic fields need a new PASS and approval.
    
    ## Send
    
    - Send exactly once. Do not wrap the send in a retry loop. Set a finite timeout (10-15 seconds is plenty).
    - Capture the raw response and the send timestamp to the millisecond.
    - Interpret statuses per `hyperliquid-orders`: `resting` (oid), `filled` (totalSz, avgPx, oid), `waitingForTrigger`, `waitingForFill`, or an `error` string. A top-level `status: err` is an action-level rejection: nothing was placed.
    
    ## Unknown results
    
    A timeout, connection reset, HTTP 5xx, or a client exception after the request left the machine is an **unknown result**. Treat it as possibly executed:
    
    1. Do not resend.
    2. Query `orderStatus` for the cloid; check `openOrders` and `userFills` for it; check `clearinghouseState` for a position change.
    3. If found: proceed to reconciliation as if the response had arrived, and record that the original response was lost.
    4. If not found: **a negative check is not proof.** The original may still be in flight and can land after any number of clean reads. Do not let two quiet checks authorise a replacement.
    5. The ticket is dead only when the original is *incapable of arriving*. That is the send's `expiresAfter` deadline passing (the exchange rejects it after that), confirmed by one more check once the deadline is behind you. If the send carried no `expiresAfter`, you cannot prove it: burn the nonce with a `noop` and confirm it landed, or stop and hand the decision to the user. Never assume elapsed time alone.
    6. Then report `unconfirmed, original expired at <UTC>` to the Desk Lead. A new send needs a fresh approval by id, because the user must know the first one may still appear.
    
    ## Reconciliation
    
    Immediately after the response, and again when fills arrive:
    
    - `orderStatus` by cloid or oid: the exchange's view of the order.
    - `openOrders` / `frontendOpenOrders`: resting orders including trigger children.
    - `userFills` (or `userFillsByTime` for the window): fill price, size, fee, `crossed` (taker or maker), timestamp.
    - `clearinghouseState`: position size, entry, leverage, liquidation price, margin used.
    
    Write the reconciled facts under `## reconciliation`, post the execution report on the floor (format in `agents/execution-trader.md`), and DM the Trade Reviewer with the id and the report.
    
    Update the risk reservation with those same facts. A resting remainder or unknown send retains its allocation; a cancellation response alone does not free it. Filled exposure moves into the position calculation, and only reconciled unused capacity is released. Record the change so a restarted desk can reconstruct it from proposals and the exchange.
    
    ## Cancels, modifies, leverage, closes
    
    Each is its own ticket (suffix `-B`, `-C`...) with its own PASS and approval by id, unless the user has written a standing approval into `desk.md` for that exact class of action on that network.
    
    - **Cancel:** by cloid where you have it, else by oid from `openOrders`. Confirm removal from `openOrders`.
    - **Modify:** Hyperliquid's `modify`/`batchModify` cancels a resting limit order and places the replacement in one action (new oid, fresh cloid); the replacement must itself rest (`Alo`, or a non-executable `Gtc`). Stops and take-profits cannot be modified: place the new trigger order, confirm it is resting, then c
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/galleonlabs-hypergrok-trading-desk-skills-desk-execution-protocol.md

// REPO STATS

502 stars
1 open issues
Last commit: 3d ago