← 返回
效率工具 Key

Open-broker

Hyperliquid trading plugin with background position monitoring and custom automations. Execute market orders, limit orders, manage positions, view funding ra...
Hyperliquid 交易插件,提供后台仓位监控与自定义自动化,执行市价单、限价单,管理仓位,查看资金费率等
ya7ya
效率工具 clawhub v1.2.0 9 版本 99316.3 Key: 需要
★ 9
Stars
📥 3,597
下载
💾 156
安装
9
版本
#latest

概述

Open Broker - Hyperliquid Trading CLI

Execute trading operations on Hyperliquid DEX with builder fee support.

Installation

npm install -g openbroker

Quick Start

# 1. Setup (generates wallet, creates config, approves builder fee)
openbroker setup

# 2. Fund your wallet with USDC on Arbitrum, then deposit at https://app.hyperliquid.xyz/

# 3. Start trading
openbroker account
openbroker buy --coin ETH --size 0.1

Important: Finding Assets Before Trading

Always search before trading an unfamiliar asset. Hyperliquid has main perps (ETH, BTC, SOL...), HIP-3 perps (xyz:CL, xyz:GOLD, km:USOIL...), spot markets, and HIP-4 outcome markets. Use search to discover the correct ticker:

openbroker search --query GOLD              # Find all GOLD markets across all providers
openbroker search --query oil               # Find oil-related assets (CL, BRENTOIL, USOIL...)
openbroker search --query BTC --type perp   # BTC perps only
openbroker search --query NATGAS --type hip3  # HIP-3 only
openbroker search --query BTC --type outcome  # HIP-4 only
openbroker outcomes --query BTC             # Outcome-specific details

Or with the ob_search plugin tool: { "query": "gold" } or { "query": "oil", "type": "hip3" }

HIP-3 assets use dex:COIN format — e.g., xyz:CL not just CL. If you get an error like "No market data found", search for the asset to find the correct prefixed ticker. Common HIP-3 dexes: xyz, flx, km, hyna, vntl, cash.

Asset IDs (disambiguation)

Every info JSON output includes an assetId field — the canonical Hyperliquid asset index. Prefer it over the coin name when persisting references, because the same ticker can exist on multiple providers (e.g. HYPE perp, hyna:HYPE HIP-3, and HYPE/USDC spot all coexist).

ScopeFormulaExample
-------------------------
Main perpsuniverse indexHYPE159
HIP-3 perps100000 + dexIdx * 10000 + assetIdxhyna:HYPE140002
Spot10000 + pair.indexHYPE/USDC10107
HIP-4 outcomes100000000 + (10 * outcomeId + side)outcome 123 YES → 100001230
openbroker search HYPE --json | jq '.[] | {coin, assetId, type, provider}'

Trading commands still take --coin for perps/spot (including HIP-3 dex:COIN) — assetId is for queries, comparisons, and agent state, not order placement. HIP-4 outcome commands take --outcome plus --outcome-side yes|no when using a plain id.

Troubleshooting: CLI Fallback

If an ob_* plugin tool returns unexpected errors, empty results, or crashes, fall back to the equivalent CLI command via Bash. The CLI and plugin tools share the same core code, but the CLI has more mature error handling and output.

Every info command supports --json for structured output. The table below covers the commands with dedicated plugin tools; any other info command (e.g. spot, trades, fees, order-status, rate-limit, funding-history, all-markets) can be run as openbroker --json for the same effect.

Plugin ToolCLI Equivalent
----------------------------
ob_accountopenbroker account --json
ob_positionsopenbroker positions --json
ob_fundingopenbroker funding --json --include-hip3
ob_marketsopenbroker markets --json --include-hip3
ob_searchopenbroker search --query --json
ob_spotopenbroker spot --json (or --balances --json)
ob_outcomesopenbroker outcomes --json (or --query --json)
ob_fillsopenbroker fills --json
ob_ordersopenbroker orders --json
ob_order_statusopenbroker order-status --oid --json
ob_feesopenbroker fees --json
ob_candlesopenbroker candles --coin --json
ob_funding_historyopenbroker funding-history --coin --json
ob_tradesopenbroker trades --coin --json
ob_rate_limitopenbroker rate-limit --json
ob_funding_scanopenbroker funding-scan --json
ob_buyopenbroker buy --coin --size
ob_sellopenbroker sell --coin --size
ob_limitopenbroker limit --coin --side --size --price
ob_tpslopenbroker tpsl --coin --tp --sl
ob_cancelopenbroker cancel --all or --coin
ob_outcome_buyopenbroker outcome-buy --outcome --outcome-side yes --size
ob_outcome_sellopenbroker outcome-sell --outcome --outcome-side yes --size
ob_auto_runopenbroker auto run