Execute trading operations on Hyperliquid DEX with builder fee support.
npm install -g openbroker
# 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
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.
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).
| Scope | Formula | Example |
|---|---|---|
| ------- | --------- | --------- |
| Main perps | universe index | HYPE → 159 |
| HIP-3 perps | 100000 + dexIdx * 10000 + assetIdx | hyna:HYPE → 140002 |
| Spot | 10000 + pair.index | HYPE/USDC → 10107 |
| HIP-4 outcomes | 100000000 + (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.
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 for the same effect.
| Plugin Tool | CLI Equivalent |
|---|---|
| ------------- | --------------- |
ob_account | openbroker account --json |
ob_positions | openbroker positions --json |
ob_funding | openbroker funding --json --include-hip3 |
ob_markets | openbroker markets --json --include-hip3 |
ob_search | openbroker search --query |
ob_spot | openbroker spot --json (or --balances --json) |
ob_outcomes | openbroker outcomes --json (or --query ) |
ob_fills | openbroker fills --json |
ob_orders | openbroker orders --json |
ob_order_status | openbroker order-status --oid |
ob_fees | openbroker fees --json |
ob_candles | openbroker candles --coin |
ob_funding_history | openbroker funding-history --coin |
ob_trades | openbroker trades --coin |
ob_rate_limit | openbroker rate-limit --json |
ob_funding_scan | openbroker funding-scan --json |
ob_buy | openbroker buy --coin |
ob_sell | openbroker sell --coin |
ob_limit | openbroker limit --coin |
ob_tpsl | openbroker tpsl --coin |
ob_cancel | openbroker cancel --all or --coin |
ob_outcome_buy | openbroker outcome-buy --outcome |
ob_outcome_sell | openbroker outcome-sell --outcome |
ob_auto_run | openbroker auto run
|