| name | Hyperliquid Pipeline |
|---|---|
| description | Standardized Pipeline for Hyperliquid DEX Connection and Trading |
This pipeline provides the structure for connecting User Accounts to Hyperliquid DEX for High-Frequency Trading. It follows the standard Moltbot/OpenClaw architecture.
The pipeline abstracts the complexity of the Hyperliquid API into simple standardized commands.
- Private Key: Required for signing transactions (stored securely by the user).
- Wallet Address: For fetching position data.
Executes a Market or Limit order on Hyperliquid.
Command Structure:
node pipelines/hyperliquid/scripts/trade.mjs \
--symbol="BTC" \
--side="buy" \
--amount="1000" \
--leverage="20" \
--private_key="[USER_PRIVATE_KEY]"Pipeline Logic:
- Validate: Checks input parameters.
- Connect: Establishes connection to
api.hyperliquid.xyz. - Construct: Builds the specific L1 order payload (asset index, limit price, etc.).
- Sign: (Integration Point) Signs the payload with the connect wallet.
- Execute: Posts the transaction to the matching engine.
Closes existing positions to secure profit or stop loss.
Command Structure:
node pipelines/hyperliquid/scripts/close.mjs \
--symbol="BTC" \
--direction="long" \
--private_key="[USER_PRIVATE_KEY]"This pipeline is designed to be modular. Users can plug in their specific signing provider (e.g., Ethers.js wallet, Hardware Wallet bridge) into the trade.mjs execution block.
Path: pipelines/hyperliquid/