Skip to content

[new-plugin] hl-grid-batch v1.0.0#392

Open
JarviYin wants to merge 2 commits intookx:mainfrom
JarviYin:submit/hl-grid-batch
Open

[new-plugin] hl-grid-batch v1.0.0#392
JarviYin wants to merge 2 commits intookx:mainfrom
JarviYin:submit/hl-grid-batch

Conversation

@JarviYin
Copy link
Copy Markdown

Plugin Submission

Plugin name: hl-grid-batch
Version: 1.0.0
Type: new-plugin

Checklist

  • My plugin does NOT use reserved prefixes (okx-, official-, plugin-store-)
  • LICENSE file is included (MIT)
  • SKILL.md has YAML frontmatter with name and description
  • I have read the Development Guide
  • plugin-store lint passes locally — Cargo not available in dev environment, relying on CI lint. File-size, frontmatter, schema, and --strategy-id coverage manually verified.

What does this plugin do?

Turns one natural-language trading plan into an atomic batch of up to 50 limit orders on Hyperliquid. The AI agent parses the user's intent — uniform grid, staged dca, or staged staged-exit ladder — generates the order array, shows the full ladder, and on explicit user confirmation submits the batch through hyperliquid order-batch with one EIP-712 signature.

Per hyperliquid-plugin v0.3.9 semantics, every order in the batch that produces an oid (filled or resting) generates its own report-plugin-info call under --strategy-id hl-grid-batch, so each level on the ladder is individually attributed for the Plugin Store leaderboard.

Which onchainos commands does it use?

Read-only:

  • onchainos wallet status

Through hyperliquid-plugin (declared as dependent_plugin):

  • hyperliquid prices (read, for mid-price reference)
  • hyperliquid positions (read, required for staged-exit mode validation)
  • hyperliquid quickstart (read, for withdrawable balance)
  • hyperliquid register (one-time setup)
  • hyperliquid order-batch — write, always with --strategy-id hl-grid-batch and user --confirm

Security Considerations

  • Risk level: standard. Each batch is composed, previewed, and explicitly user-confirmed before submission. No background loop, no auto-replenishment, no autonomous re-gridding.
  • Hard cap of 50 orders per batch (matches HL order-batch API limit).
  • Per-entry pre-validation before the binary is invoked: $10 min notional, side-of-mid for dca, position-existence + size check for staged-exit, total entry margin ≤ withdrawable.
  • No private keys handled — all signing routes through OnchainOS Agentic Wallet TEE.
  • reduce_only: true enforced on every entry of staged-exit mode to prevent accidentally opening a new opposing position.
  • Risk disclaimer + data trust boundary documented in SKILL.md.
  • Strategy-id mandatory in every write-op example (7 occurrences across 5 examples).

Testing

  • File structure, schema, and frontmatter validated against the dev-guide template and existing trading-strategy plugins in this repo.
  • JSON schema for --orders-json matches hyperliquid-plugin v0.3.9 order-batch spec exactly (coin, side, size, type, price, tif, reduce_only).
  • File sizes well under the 200KB / 5MB limits (largest file: SKILL.md at 15.4KB).
  • dependent_plugin: hyperliquid-plugin ^0.3.9 resolves against the current registry.json.
  • Live execution against the OnchainOS Agentic Wallet on Hyperliquid pending — will verify a 5-level grid round-trip with small real-funds size after merge.

Notes

This plugin and the companion hl-instant-order (separate PR) are submissions for the Plugin Store Season 1 Developer Challenge (Apr 23 – May 7, 2026).

Place up to 50 limit orders atomically on Hyperliquid via OnchainOS
Agentic Wallet — grid, staged DCA, or staged take-profit from one
natural-language intent and one EIP-712 signature.

- depends on hyperliquid-plugin ^0.3.9 (order-batch atomic API)
- every batch is user-confirmed; no autonomous trading
- every example uses --strategy-id hl-grid-batch for attribution
The strategy attribution path depends on `onchainos wallet report-plugin-info`,
which only exists in onchainos >= 2.5.0. With an older CLI, hyperliquid-plugin
emits "Warning: report-plugin-info failed: unrecognized subcommand
'report-plugin-info'" for every order in the batch and none of them are
credited on the leaderboard even though they settle on Hyperliquid.

The impact is amplified here: for a 50-order batch, this is the difference
between 50 attributed counts and 0. Adds a preflight gate that probes
`report-plugin-info --help` and falls back to `onchainos upgrade` so the AI
agent never silently drops attribution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant