- name
SKILL.md
技能文件保留在发布者的仓库中。
在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add galleonlabs/hypergrok-trading-desk --skill desk-execution-protocol -a cursor -y在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add galleonlabs/hypergrok-trading-desk --skill desk-execution-protocol -a claude-code -y在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add galleonlabs/hypergrok-trading-desk --skill desk-execution-protocol -a codex -y在终端中粘贴复制的命令。它会把这个 SKILL.md 安装到对应的智能体中。
npx skills add galleonlabs/hypergrok-trading-desk --skill desk-execution-protocol -a grok -y在 Grok Bot 聊天中发送复制的消息。Bot 会从 GitHub 获取这个 SKILL.md,并添加到你所有 Bot 共享的技能中。
Install this skill: https://github.com/galleonlabs/hypergrok-trading-desk/tree/HEAD/skills/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.
/workspace/trading-desk/proposals/<id>.md with a Risk Manager PASS and exact ticket fields.authority: and mandate check: lines (Standing mandate).hyperliquid-setup: HYPERLIQUID_NETWORK, HYPERLIQUID_ACCOUNT_ADDRESS, and the API wallet key available to scripts from the environment (never printed).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.
scripts/standing_mandate.py for this network and account immediately before the send; require in_force: true, the fingerprint on the ticket's authority: line, and every mandate check: field still ok against live state. Anything else needs approval by id.HYPERLIQUID_NETWORK equals the ticket's network. Mainnet is never assumed.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; under a valid standing mandate the user has waived that, so recommend it without blocking.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.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).0x + 32 hex chars), write it to the proposal file, and put it on the order. One cloid per order, never reused. Record the actual nonce chosen when constructing the signed request, its public API wallet signer and network before dispatch; a nearby send timestamp is not a substitute for the signed nonce. 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 and nonce. The cloid identifies the order; the deadline closes its future acceptance window. Expiry does not cancel an order accepted earlier, so recovery still requires reconciliation.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.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.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.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:
orderStatus for the cloid; check openOrders and userFills for it; check clearinghouseState for a position change.expiresAfter deadline to pass, then reconcile once more. The original can no longer be accepted after that deadline, but it may have been accepted beforehand and left orders or fills. Never assume elapsed time without a signed deadline proves the outcome.noop using the original exact signed nonce, the same API wallet signer and the same network. It requires Risk PASS, user approval by id and native-gate coverage; the Execution Trader sends it once. A fresh higher nonce does not invalidate the original. Confirm that the noop was accepted, then reconcile the original and account; the original could have won the race. A nonce-reuse rejection does not confirm noop acceptance or identify what consumed the nonce. If the original nonce is missing or the noop result is unconfirmed, keep the unknown send reserved, pause new risk and escalate to the Desk Lead and user. Do not improvise another signed action.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.
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, or the action is inside a valid standing mandate. A mandate covers cancels, modifies, closes and setting a market's leverage to what the ticket needs; it never covers a margin-mode change the ticket does not need, a dead-man's switch or a TWAP.
openOrders. Confirm removal from openOrders.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 cancel the old one, so the position is never unprotected.updateLeverage before the entry, on a flat market or with the user aware of the effect on an existing position. Confirm from clearinghouseState.clearinghouseState again: if the position is gone, cancel the orphaned protective orders; if it only shrank (a partial fill on the close), the remainder is still open and still needs its stop, so resize protection before cancelling anything. Report which case it was.scheduleCancel only when the user asks for it, with the time written in the report; remember it cancels all of the account's open orders when it fires.Any action type the desk has not performed before (first TP/SL bracket, first modify, first close, first isolated-margin trade) is rehearsed on testnet with the same ticket format before it is done on mainnet. Record the rehearsal in the journal. A user who writes a standing mandate has chosen not to require this for actions inside it; the desk still recommends a rehearsal and does not block on it.
Post the block from agents/execution-trader.md on the floor: sent, response, reconciled, fees/funding, next. Keep the raw response in the proposal file, not in chat.
orderStatus read as proof that an unknown result did not execute; only an expired original proves that.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-resul
---name: desk-execution-protocoldescription: The Execution Trader's procedure for turning an approved ticket into one Hyperliquid action and reconciling it…---# skills/desk-execution-protocol/SKILL.md概览
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.
常见问题
从发布者处下载 skills/desk-execution-protocol/SKILL.md,或复制路径后打开仓库。PlugMCP 只收录该技能,不托管文件。
发布者将它存放在 https://github.com/galleonlabs/hypergrok-trading-desk。
Claude、Cursor、Codex 和 Grok Build 可以读取你从发布者仓库添加的 SKILL.md。在聊天中发送技能的 GitHub 文件夹链接,Grok Bot 就会安装它。