{
  "schemaVersion": "1.0",
  "item": {
    "slug": "hyperliquid-prime",
    "name": "Hyperliquid Prime",
    "source": "tencent",
    "type": "skill",
    "category": "金融交易",
    "sourceUrl": "https://clawhub.ai/mehranhydary/hyperliquid-prime",
    "canonicalUrl": "https://clawhub.ai/mehranhydary/hyperliquid-prime",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/hyperliquid-prime",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=hyperliquid-prime",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "openclaw.plugin.json"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/hyperliquid-prime"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/hyperliquid-prime",
    "agentPageUrl": "https://openagent3.xyz/skills/hyperliquid-prime/agent",
    "manifestUrl": "https://openagent3.xyz/skills/hyperliquid-prime/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/hyperliquid-prime/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Hyperliquid Prime",
        "body": "A TypeScript SDK that acts as a prime broker layer on top of Hyperliquid's perp markets — both native (ETH, BTC) and HIP-3 deployer markets. Automatically discovers all markets for an asset, compares liquidity/funding/cost, and routes to the best execution — or splits across multiple venues for optimal fills with automatic collateral swaps."
      },
      {
        "title": "When to Use This Skill",
        "body": "Trading crypto, stocks (AAPL, NVDA, TSLA), indexes, or commodities (GOLD, SILVER) on Hyperliquid\nNeed best execution across multiple perp markets (native + HIP-3) for the same asset\nSplitting large orders across venues for better fills and lower price impact\nComparing funding rates across different collateral types\nAggregated orderbook view across fragmented markets\nManaging positions that may be spread across multiple collateral types\nAutomatic collateral swaps (USDC → USDH, USDT0) when non-USDC markets offer better prices"
      },
      {
        "title": "Installation",
        "body": "npm install hyperliquid-prime"
      },
      {
        "title": "Read-Only Usage (no wallet needed)",
        "body": "import { HyperliquidPrime } from 'hyperliquid-prime'\n\nconst hp = new HyperliquidPrime({ testnet: true })\nawait hp.connect()\n\n// Get all perp markets for an asset (native + HIP-3)\nconst markets = hp.getMarkets('ETH') // or 'TSLA', 'BTC', etc.\n\n// Get routing quote for best execution\nconst quote = await hp.quote('TSLA', 'buy', 50)\nconst quoteWithLev = await hp.quote('TSLA', 'buy', 50, { leverage: 5, isCross: true })\n\n// Aggregated orderbook\nconst book = await hp.getAggregatedBook('TSLA')\n\n// Funding rate comparison\nconst funding = await hp.getFundingComparison('TSLA')\n\nawait hp.disconnect()"
      },
      {
        "title": "Trading (wallet required)",
        "body": "const hp = new HyperliquidPrime({\n  privateKey: '0x...',\n  testnet: true,\n})\nawait hp.connect()\n\n// Quote then execute (recommended)\nconst quote = await hp.quote('TSLA', 'buy', 50, { leverage: 5, isCross: true })\nconst receipt = await hp.execute(quote.plan)\n\n// One-step convenience\nconst receipt2 = await hp.long('TSLA', 50, { leverage: 5 })\nconst receipt3 = await hp.short('TSLA', 25, { leverage: 3, isCross: false })\n\n// Split across multiple markets for better fills\nconst splitQuote = await hp.quoteSplit('TSLA', 'buy', 200, { leverage: 4 })\nconst splitReceipt = await hp.executeSplit(splitQuote.splitPlan)\n// Or one-step: await hp.longSplit('TSLA', 200)\n\n// Unified position view\nconst positions = await hp.getGroupedPositions()\n\nawait hp.disconnect()"
      },
      {
        "title": "CLI",
        "body": "# Show all perp markets for an asset (native + HIP-3)\nhp markets ETH\nhp markets TSLA\n\n# Aggregated orderbook\nhp book TSLA\n\n# Compare funding rates\nhp funding TSLA\n\n# Get routing quote\nhp quote TSLA buy 50\nhp quote TSLA buy 50 --leverage 5\nhp quote TSLA buy 50 --leverage 3 --isolated\n\n# Execute trades\nHP_PRIVATE_KEY=0x... hp long TSLA 50\nHP_PRIVATE_KEY=0x... hp short TSLA 25\nHP_PRIVATE_KEY=0x... hp long TSLA 50 --leverage 5\nHP_PRIVATE_KEY=0x... hp short TSLA 25 --leverage 3 --isolated\n\n# View positions and balance\nHP_PRIVATE_KEY=0x... hp positions\nHP_PRIVATE_KEY=0x... hp balance\n\n# Use testnet\nhp markets TSLA --testnet"
      },
      {
        "title": "Important: Fees & Automatic Actions",
        "body": "Builder Fee: A 1 basis point (0.01%) builder fee is charged by default on all SDK-executed orders via Hyperliquid's native builder fee mechanism. On the first trading order from a wallet, the SDK sends an on-chain approval transaction to authorize this fee. To disable entirely, set builder: null in the config.\n\nCollateral Swaps (Split Orders Only): When executeSplit() routes orders to non-USDC collateral markets, the SDK automatically:\n\nEnables DEX abstraction on the user's account\nTransfers USDC from the perp account to the spot account\nPlaces a spot order to swap USDC into the required collateral token (e.g., USDH, USDT0)\nA 1% buffer is added to swap amounts to account for slippage\n\nThese actions only occur during split order execution and only when the best liquidity requires non-USDC collateral.\n\nRead-Only Operations: Quotes, orderbooks, funding comparisons, and market discovery require no wallet, no fees, and perform no on-chain actions.\n\nCredentials: Trading operations require a private key via HP_PRIVATE_KEY environment variable or the privateKey config option. The key is used to sign transactions sent to the Hyperliquid API. Source code is available for audit at https://github.com/mehranhydary/hl-prime.\n\nUser Confirmation Flow: The SDK uses a quote-then-execute pattern as the confirmation mechanism:\n\nquote() / quoteSplit() are read-only — they return an execution plan with estimated prices, markets, and costs. No on-chain actions are taken.\nThe caller reviews the plan (programmatically or via CLI output).\nexecute() / executeSplit() must be explicitly called to perform on-chain actions (place orders, approve fees, swap collateral).\nOne-step convenience methods (long(), short(), longSplit(), shortSplit()) combine both steps — use quote-then-execute for explicit control.\n\nImplementation Note: This skill bundle contains instructions only (SKILL.md). The SDK implementation must be installed separately via npm install hyperliquid-prime. The source code is open-source and available for audit at the GitHub repository before installation."
      },
      {
        "title": "How Routing Works",
        "body": "When you call hp.quote(\"TSLA\", \"buy\", 50), the router:\n\nFetches the orderbook for every TSLA market\nSimulates walking each book to estimate average fill price and price impact\nScores each market using:\n\nPrice impact (dominant) — cost in basis points to fill\nFunding rate (secondary) — prefers favorable funding direction\nCollateral swap cost (penalty) — estimated cost to swap into the required collateral\n\n\nSelects the lowest-score market and builds an execution plan\n\nFor split orders (quoteSplit), the router merges all orderbooks, walks the combined book greedily to consume the cheapest liquidity first across all venues, and builds split execution legs. Collateral requirements and swaps are estimated and executed at executeSplit(...) time using live balances. If leverage is included in the quote options, execution applies that leverage per market leg before order placement.\n\nFor single-market orders, leverage included in quote(...) is carried into the execution plan and applied before the order is sent."
      },
      {
        "title": "Configuration",
        "body": "interface HyperliquidPrimeConfig {\n  privateKey?: `0x${string}` // Required for trading\n  walletAddress?: string       // Derived from privateKey if not provided\n  testnet?: boolean            // Default: false\n  defaultSlippage?: number     // Default: 0.01 (1%)\n  logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent'\n  prettyLogs?: boolean         // Default: false\n  builder?: BuilderConfig | null // Builder fee (default: 1 bps, null to disable)\n}"
      },
      {
        "title": "Builder Fee",
        "body": "A 1 basis point (0.01%) builder fee is included by default on all SDK-executed orders via Hyperliquid's native builder fee mechanism. The fee is auto-approved on the trader's first order. Set builder: null to disable, or provide a custom { address, feeBps } to override."
      },
      {
        "title": "Read-Only",
        "body": "getMarkets(asset) — All perp markets for an asset (native + HIP-3)\ngetAggregatedMarkets() — Asset groups with multiple markets\ngetAggregatedBook(asset) — Merged orderbook across all markets\ngetFundingComparison(asset) — Funding rates compared across markets\nquote(asset, side, size, options?) — Routing quote for single best market\nquoteSplit(asset, side, size, options?) — Split quote across multiple markets"
      },
      {
        "title": "Trading (wallet required)",
        "body": "execute(plan) — Execute a single-market quote\nexecuteSplit(plan) — Execute a split quote (handles collateral swaps)\nlong(asset, size, options?) — Quote + execute a long on best market\nshort(asset, size, options?) — Quote + execute a short on best market\nlongSplit(asset, size, options?) — Split quote + execute a long across markets\nshortSplit(asset, size, options?) — Split quote + execute a short across markets\nclose(asset) — Close all positions for an asset"
      },
      {
        "title": "Trade Options",
        "body": "leverage?: number — Positive number, e.g. 5 for 5x.\nisCross?: boolean — Default true (cross); set false for isolated.\nisCross requires leverage. If leverage is omitted, no leverage-setting API call is made."
      },
      {
        "title": "Position & Balance",
        "body": "getPositions() — All positions with market metadata\ngetGroupedPositions() — Positions grouped by base asset\ngetBalance() — Account margin summary"
      },
      {
        "title": "Repository",
        "body": "https://github.com/mehranhydary/hl-prime"
      },
      {
        "title": "License",
        "body": "MIT"
      }
    ],
    "body": "Hyperliquid Prime\n\nA TypeScript SDK that acts as a prime broker layer on top of Hyperliquid's perp markets — both native (ETH, BTC) and HIP-3 deployer markets. Automatically discovers all markets for an asset, compares liquidity/funding/cost, and routes to the best execution — or splits across multiple venues for optimal fills with automatic collateral swaps.\n\nWhen to Use This Skill\nTrading crypto, stocks (AAPL, NVDA, TSLA), indexes, or commodities (GOLD, SILVER) on Hyperliquid\nNeed best execution across multiple perp markets (native + HIP-3) for the same asset\nSplitting large orders across venues for better fills and lower price impact\nComparing funding rates across different collateral types\nAggregated orderbook view across fragmented markets\nManaging positions that may be spread across multiple collateral types\nAutomatic collateral swaps (USDC → USDH, USDT0) when non-USDC markets offer better prices\nQuick Start\nInstallation\nnpm install hyperliquid-prime\n\nRead-Only Usage (no wallet needed)\nimport { HyperliquidPrime } from 'hyperliquid-prime'\n\nconst hp = new HyperliquidPrime({ testnet: true })\nawait hp.connect()\n\n// Get all perp markets for an asset (native + HIP-3)\nconst markets = hp.getMarkets('ETH') // or 'TSLA', 'BTC', etc.\n\n// Get routing quote for best execution\nconst quote = await hp.quote('TSLA', 'buy', 50)\nconst quoteWithLev = await hp.quote('TSLA', 'buy', 50, { leverage: 5, isCross: true })\n\n// Aggregated orderbook\nconst book = await hp.getAggregatedBook('TSLA')\n\n// Funding rate comparison\nconst funding = await hp.getFundingComparison('TSLA')\n\nawait hp.disconnect()\n\nTrading (wallet required)\nconst hp = new HyperliquidPrime({\n  privateKey: '0x...',\n  testnet: true,\n})\nawait hp.connect()\n\n// Quote then execute (recommended)\nconst quote = await hp.quote('TSLA', 'buy', 50, { leverage: 5, isCross: true })\nconst receipt = await hp.execute(quote.plan)\n\n// One-step convenience\nconst receipt2 = await hp.long('TSLA', 50, { leverage: 5 })\nconst receipt3 = await hp.short('TSLA', 25, { leverage: 3, isCross: false })\n\n// Split across multiple markets for better fills\nconst splitQuote = await hp.quoteSplit('TSLA', 'buy', 200, { leverage: 4 })\nconst splitReceipt = await hp.executeSplit(splitQuote.splitPlan)\n// Or one-step: await hp.longSplit('TSLA', 200)\n\n// Unified position view\nconst positions = await hp.getGroupedPositions()\n\nawait hp.disconnect()\n\nCLI\n# Show all perp markets for an asset (native + HIP-3)\nhp markets ETH\nhp markets TSLA\n\n# Aggregated orderbook\nhp book TSLA\n\n# Compare funding rates\nhp funding TSLA\n\n# Get routing quote\nhp quote TSLA buy 50\nhp quote TSLA buy 50 --leverage 5\nhp quote TSLA buy 50 --leverage 3 --isolated\n\n# Execute trades\nHP_PRIVATE_KEY=0x... hp long TSLA 50\nHP_PRIVATE_KEY=0x... hp short TSLA 25\nHP_PRIVATE_KEY=0x... hp long TSLA 50 --leverage 5\nHP_PRIVATE_KEY=0x... hp short TSLA 25 --leverage 3 --isolated\n\n# View positions and balance\nHP_PRIVATE_KEY=0x... hp positions\nHP_PRIVATE_KEY=0x... hp balance\n\n# Use testnet\nhp markets TSLA --testnet\n\nImportant: Fees & Automatic Actions\n\nBuilder Fee: A 1 basis point (0.01%) builder fee is charged by default on all SDK-executed orders via Hyperliquid's native builder fee mechanism. On the first trading order from a wallet, the SDK sends an on-chain approval transaction to authorize this fee. To disable entirely, set builder: null in the config.\n\nCollateral Swaps (Split Orders Only): When executeSplit() routes orders to non-USDC collateral markets, the SDK automatically:\n\nEnables DEX abstraction on the user's account\nTransfers USDC from the perp account to the spot account\nPlaces a spot order to swap USDC into the required collateral token (e.g., USDH, USDT0)\nA 1% buffer is added to swap amounts to account for slippage\n\nThese actions only occur during split order execution and only when the best liquidity requires non-USDC collateral.\n\nRead-Only Operations: Quotes, orderbooks, funding comparisons, and market discovery require no wallet, no fees, and perform no on-chain actions.\n\nCredentials: Trading operations require a private key via HP_PRIVATE_KEY environment variable or the privateKey config option. The key is used to sign transactions sent to the Hyperliquid API. Source code is available for audit at https://github.com/mehranhydary/hl-prime.\n\nUser Confirmation Flow: The SDK uses a quote-then-execute pattern as the confirmation mechanism:\n\nquote() / quoteSplit() are read-only — they return an execution plan with estimated prices, markets, and costs. No on-chain actions are taken.\nThe caller reviews the plan (programmatically or via CLI output).\nexecute() / executeSplit() must be explicitly called to perform on-chain actions (place orders, approve fees, swap collateral).\nOne-step convenience methods (long(), short(), longSplit(), shortSplit()) combine both steps — use quote-then-execute for explicit control.\n\nImplementation Note: This skill bundle contains instructions only (SKILL.md). The SDK implementation must be installed separately via npm install hyperliquid-prime. The source code is open-source and available for audit at the GitHub repository before installation.\n\nHow Routing Works\n\nWhen you call hp.quote(\"TSLA\", \"buy\", 50), the router:\n\nFetches the orderbook for every TSLA market\nSimulates walking each book to estimate average fill price and price impact\nScores each market using:\nPrice impact (dominant) — cost in basis points to fill\nFunding rate (secondary) — prefers favorable funding direction\nCollateral swap cost (penalty) — estimated cost to swap into the required collateral\nSelects the lowest-score market and builds an execution plan\n\nFor split orders (quoteSplit), the router merges all orderbooks, walks the combined book greedily to consume the cheapest liquidity first across all venues, and builds split execution legs. Collateral requirements and swaps are estimated and executed at executeSplit(...) time using live balances. If leverage is included in the quote options, execution applies that leverage per market leg before order placement.\n\nFor single-market orders, leverage included in quote(...) is carried into the execution plan and applied before the order is sent.\n\nConfiguration\ninterface HyperliquidPrimeConfig {\n  privateKey?: `0x${string}` // Required for trading\n  walletAddress?: string       // Derived from privateKey if not provided\n  testnet?: boolean            // Default: false\n  defaultSlippage?: number     // Default: 0.01 (1%)\n  logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent'\n  prettyLogs?: boolean         // Default: false\n  builder?: BuilderConfig | null // Builder fee (default: 1 bps, null to disable)\n}\n\nBuilder Fee\n\nA 1 basis point (0.01%) builder fee is included by default on all SDK-executed orders via Hyperliquid's native builder fee mechanism. The fee is auto-approved on the trader's first order. Set builder: null to disable, or provide a custom { address, feeBps } to override.\n\nKey Methods\nRead-Only\ngetMarkets(asset) — All perp markets for an asset (native + HIP-3)\ngetAggregatedMarkets() — Asset groups with multiple markets\ngetAggregatedBook(asset) — Merged orderbook across all markets\ngetFundingComparison(asset) — Funding rates compared across markets\nquote(asset, side, size, options?) — Routing quote for single best market\nquoteSplit(asset, side, size, options?) — Split quote across multiple markets\nTrading (wallet required)\nexecute(plan) — Execute a single-market quote\nexecuteSplit(plan) — Execute a split quote (handles collateral swaps)\nlong(asset, size, options?) — Quote + execute a long on best market\nshort(asset, size, options?) — Quote + execute a short on best market\nlongSplit(asset, size, options?) — Split quote + execute a long across markets\nshortSplit(asset, size, options?) — Split quote + execute a short across markets\nclose(asset) — Close all positions for an asset\nTrade Options\nleverage?: number — Positive number, e.g. 5 for 5x.\nisCross?: boolean — Default true (cross); set false for isolated.\nisCross requires leverage. If leverage is omitted, no leverage-setting API call is made.\nPosition & Balance\ngetPositions() — All positions with market metadata\ngetGroupedPositions() — Positions grouped by base asset\ngetBalance() — Account margin summary\nRepository\n\nhttps://github.com/mehranhydary/hl-prime\n\nLicense\n\nMIT"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/mehranhydary/hyperliquid-prime",
    "publisherUrl": "https://clawhub.ai/mehranhydary/hyperliquid-prime",
    "owner": "mehranhydary",
    "version": "0.1.4",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/hyperliquid-prime",
    "downloadUrl": "https://openagent3.xyz/downloads/hyperliquid-prime",
    "agentUrl": "https://openagent3.xyz/skills/hyperliquid-prime/agent",
    "manifestUrl": "https://openagent3.xyz/skills/hyperliquid-prime/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/hyperliquid-prime/agent.md"
  }
}