Repository navigation
Build the Hyperliquid trading workspace - #1
Merged
Merged
Conversation
vincelwt
marked this pull request as ready for review
October 4, 2026 04:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds the private Hyperliquid workspace with
HLP [market]: live default/HIP-3 markets, candle/book/tape views, funding and OI analytics, account views, and self-custody trading. The plugin owns the board and rankings.PERPis reserved for the planned built-in per-market history/evidence view; the plugin registers no PERP alias.The native process owns API-wallet keys, signing, nonces and intent persistence. Mainnet orders include Gloom's 0.1% builder fee, approved by the main wallet; testnet skips it. Browser approval uses a tokenized loopback page with a configurable port for SSH tunnels. Native commands support protected-file/stdin import, scripted main-wallet approval, preview, placement, cancellation and closing. No secret input crosses the desktop bridge.
Orders include conditional and attached/position TP/SL, scale, reduce-only, leverage/margin management, modify/cancel, partial close/reverse/close-all, and TWAP. Mainnet TWAP executes local capped IOC slices with builder fees, pauses on restart or uncertain outcomes, and requires explicit resume. Testnet can use venue-native TWAP.
Close requests keep account tracking active until all pending signed operations settle, including when the last pane closes. This fixes the 15-second idle timeout invalidating a pending collateral read while retaining account-change and shutdown guards. Full and partial closes use exact decimal sizing, including the reduce-only percentage ticket, so a 0.00035 BTC full close cannot round down to 0.00034. Regression tests fail on the old behavior and pass with the fix. Testnet verification includes the original failure with a delayed collateral response, three full CLI closes, a 50% close, a resting limit close and cancellation, and close-all during pane removal.
CLI preview, order and close preserve catalog failures instead of reporting an unknown market when discovery is rate limited, incomplete or empty. Info reads make at most three HTTP 429 attempts with backoff and Retry-After support, then give an actionable retry message. Signed sends remain single-attempt. Offline regressions cover error propagation, retry recovery/exhaustion/cancellation, shared cooldowns and the signed-send boundary.
History and historical rankings use the platform PR #626 REST contract, preserve gaps and resolution/coverage metadata, and never record local history. Live Pro history remains blocked: routes were not deployed at verification, and this host version has no public authenticated Cloud request API for plugins. Those views degrade explicitly; direct live markets and venue-reported predictions remain available.
Validation: typecheck, 95 tests/483 assertions, plugin doctor and desktop browser build pass. Mainnet/testnet WebSocket soaks include forced reconnect. Funded throwaway testnet verified approvals, orders, TP/SL, position management, isolated margin, scale and native TWAP cancellation; the documented CLI passed import, scripted approval, placement, cancellation and closing. Local scheduled slices also filled on testnet across explicit pause/restart/resume and were closed. Final independent checks show zero positions, orders and active TWAPs. One testnet withdraw3 attempt was rejected by the bridge with no debit. All requested desktop screenshot sizes and terminal interactions were reviewed. Detailed evidence, limits and final cleanup are in
docs/verification.md; owner commands are indocs/headless-trading.md.Development sent no mainnet signed requests and used only throwaway testnet funds and credentials. The owner separately reported successful mainnet approval, builder-fee accrual, entry and cancellation checks; the owner also confirmed the corrected 100% mainnet close finishes flat. Host/backend source was not modified. Keep private and draft for review; no registry, tag or release. Remaining owner follow-ups: Cloud deployment/auth bridge and region-policy review.
Tracks GLO-217.