About hypurrquant/perp-cli
hypurrquant/perp-cli is an MCP server published by hypurrquant in the RAG category: exchange comparison. Conduid read 31 tools from its source: arb_scan, explain_command, get_arb_compare, get_balance, get_balance_by_address, get_funding_analysis and 25 more. It is published to npm as perp-cli and starts with npx.
The repository has 45 stars and 10 forks, and its last commit was on 15 Nov 2026. Conduid has no tagged release on record for it. It passes all 1 static checks Conduid ran on the repository. Its topics include arbitrage, cli, defi, ethereum, funding-rate and hyperliquid.
Install
claude mcp add hypurrquant-perp-cli -- npx -y -p perp-cli perp-mcpnpx -y -p perp-cli perp-mcpgit clone https://github.com/hypurrquant/perp-cliTools (31)
arb_scanScan for funding rate arbitrage opportunities across exchanges. Finds symbols with the largest funding rate spreads| Parameter | Type | Description |
|---|---|---|
| minSpread | number | Minimum annualized spread % to show (default: 5) |
| symbols | array | Filter to specific symbols. Omit for all |
explain_commandExplain what a perp CLI command does, its parameters, and any risks. Helps the user understand a command before running it| Parameter | Type | Description |
|---|---|---|
| command * | string | The CLI command to explain, e.g. 'perp trade market BTC buy 0.1' or 'perp arb scan' |
get_arb_compareCompare active arbitrage positions side by side — ROI, funding income, price PnL, and annualized returns for each position| Parameter | Type | Description |
|---|---|---|
| period | string | Funding lookup period: 7d, 30d, 90d, or all |
get_balanceGet account balance (equity, available margin, margin used, unrealized PnL) on an exchange. ${HL_SCOPE_NOTE}| Parameter | Type | Description |
|---|---|---|
| exchange * | string | Exchange name: ${listVenues().map(v => v.id).join(", ")} (aliases accepted) |
get_balance_by_addressBalances of ANY account by its public address — keyless, read-only (public venue data; nothing is signed, no key is needed). Venues: ${listPublicBalanceVenues().map(v =>| Parameter | Type | Description |
|---|---|---|
| accountIndex | number | Lighter only: one account (sub-account) of the address |
| address * | string | Public account address (0x… for hyperliquid / lighter / lighter-rh / risex; base58 Solana for pacifica) |
| exchange | string | Exchange: ${listPublicBalanceVenues().map(v => v.id).join(", ")} (aliases accepted); omit for every one |
get_funding_analysisAnalyze funding income across exchanges — cumulative totals, annualized rates, and per-arb-position breakdown. Great for tracking funding arb profitability.| Parameter | Type | Description |
|---|---|---|
| exchange | string | Filter by exchange |
| period | string | Time period: 7d, 30d, 90d, or all |
| symbol | string | Filter by symbol |
get_funding_ratesCompare funding rates across every market-data venue whose funding rate is verified. Returns rates per symbol with spread analysis. includeUnverified also returns venues whose rate is unverified (QFEX; TxFlow — rate not checked against settled payments; Variational — a predicted rate not checked against settled payments; GRVT — indicative rate; Extended — not checked against settled payments), each row tagged fundingVerified / apiStatus — display only, never a basis for trading (mirrors the CLI `arb scan --include-unverified`).| Parameter | Type | Description |
|---|---|---|
| includeUnverified | boolean | Also include venues whose funding rate is unverified (default false); rows carry fundingVerified:false / apiStatus |
| minSpread | number | Minimum annualized spread % to include (default: 0) |
| symbols | array | Filter to specific symbols (e.g. ['BTC','ETH']). Omit for all available |
get_marketsGet all available perpetual futures markets on an exchange, including price, funding rate, volume, and max leverage. Works without API keys (public market data). ${HL_SCOPE_NOTE}| Parameter | Type | Description |
|---|---|---|
| exchange * | string | Exchange name: ${listVenues().map(v => v.id).join(", ")} (aliases accepted) |
get_open_ordersGet all open/pending orders on an exchange. ${HL_SCOPE_NOTE}| Parameter | Type | Description |
|---|---|---|
| exchange * | string | Exchange name: ${listVenues().map(v => v.id).join(", ")} (aliases accepted) |
get_option_chainOption chain for one expiry (Derive): rows per strike with call and put quotes — bid / ask (price + size; null = empty side), mark, index, forward, IV (mark / bid / ask; null = not computable), greeks (delta, gamma, theta, vega, rho), open interest, 24h volume — plus the ATM strike. Decimals are strings. One venue request per expiry. Public read.| Parameter | Type | Description |
|---|---|---|
| expiry | string | Expiry date YYYY-MM-DD (UTC); omit for the nearest active expiry (result expirySelection: "nearest") |
| strikes | number | Only the N strikes closest to the ATM reference (forward, else index); omit for all strikes |
| underlying * | string | Underlying, e.g. ETH, BTC |
get_option_expiriesList the active option expiries of an underlying on an options venue (Derive): per expiry the UTC date (YYYY-MM-DD), expiry ms, strike and instrument counts, soonest first. Public read — no API key needed.| Parameter | Type | Description |
|---|---|---|
| underlying * | string | Underlying, e.g. ETH, BTC |
get_option_quoteQuote one option instrument (Derive name, e.g. ETH-20261225-3500-P): bid / ask (price + size), mark, index, forward, IV, greeks, open interest, 24h stats. Unknown instrument → SYMBOL_NOT_FOUND. Public read.| Parameter | Type | Description |
|---|---|---|
| instrument * | string | Venue instrument name, e.g. ETH-20261225-3500-P |
get_orderbookGet the order book (bids and asks) for a symbol on an exchange. Works without API keys on every venue with an account API (configured credentials → the account adapter; none → the public endpoint / read-only adapter); market-data-only venues have no orderbook path. ${HL_SCOPE_NOTE}| Parameter | Type | Description |
|---|---|---|
| exchange * | string | Exchange name: ${listVenues().map(v => v.id).join(", ")} (aliases accepted) |
| symbol * | string | Trading pair symbol, e.g. BTC, ETH, SOL |
get_outcome_bookGet the orderbook for one outcome side. Public read — no API key needed.| Parameter | Type | Description |
|---|---|---|
| outcome * | number | Outcome id from outcomeMeta (e.g., 1 for the BTC binary daily) |
| side * | number | Side index within the outcome (0 = first sideSpecs entry like 'Yes', 1 = second like 'No') |
get_outcome_marketsList active Hyperliquid Outcome markets (HIP-4). Each market has parsed metadata (underlying asset, target price, expiry, period) and per-side info (Yes/No name, encoding, asset id, current mid). Public read — no API key needed.get_outcome_positionsGet the active account's open outcome positions (size, entry notional, mark price, unrealized PnL). Requires a configured Hyperliquid wallet or agent.get_outcome_viewGet a combined view of one outcome market: all sides' books in parallel + underlying mark price gap (vs targetPrice) + time to expiry + per-side implied probability (mid sum). For binary markets, the symmetric structure means Yes bid + No ask ≈ 1.0 — the view exposes both sides in a single round-trip and surfaces directional context (e.g., is BTC currently above the target). Public read.| Parameter | Type | Description |
|---|---|---|
| depth | number | Number of book levels per side |
| outcome * | number | Outcome id from outcomeMeta (e.g., 1 for the BTC binary daily) |
get_pnl_analysisP&L analysis combining trading fees and funding income — shows net profit/loss by exchange with daily breakdown| Parameter | Type | Description |
|---|---|---|
| exchange | string | Filter by exchange |
| period | string | Time period: 7d, 30d, 90d, or all |
get_positionsGet all open positions on an exchange, including size, entry price, PnL, leverage. ${HL_SCOPE_NOTE}| Parameter | Type | Description |
|---|---|---|
| exchange * | string | Exchange name: ${listVenues().map(v => v.id).join(", ")} (aliases accepted) |
get_positions_by_addressOpen positions of ANY account by its public address — keyless, read-only (public venue data; nothing is signed, no key is needed). Venues: ${listPublicPositionVenues().map(v =>| Parameter | Type | Description |
|---|---|---|
| accountIndex | number | Lighter only: one account (sub-account) of the address |
| address * | string | Public account address (0x… for hyperliquid / lighter / lighter-rh; base58 Solana for pacifica) |
| exchange * | string | Exchange: ${listPublicPositionVenues().map(v => v.id).join(", ")} (aliases accepted) |
| symbol | string | Only this market (plain asset, e.g. BTC) |
get_pricesGet cross-exchange prices for symbols. Fetches mark prices from every market-data venue for comparison; a venue appears in a row only when it lists that symbol (e.g. QFEX lists no BTC). Each row's unofficialApiVenues names the venues in it read through an undocumented API (none at present) — like get_markets' venueApi tag.| Parameter | Type | Description |
|---|---|---|
| symbols | array | Symbols to fetch prices for (e.g. ['BTC','ETH']). Omit for top assets |
health_checkPing every registered venue on the server's network and return connectivity status and latency. Pacifica / Hyperliquid / Lighter / Aster / QFEX: REST ping (status = HTTP status, 0 = no response); every other venue: its public market-data read (status null). A failure carries its error message.pacifica_print_positionsPacifica Print orders of an account (read-only): current orders, or with history=true every order (paginated: limit / cursor). Status printing | cancelling | filled | liquidated | cancelled | completed | ended.| Parameter | Type | Description |
|---|---|---|
| cursor | string | |
| history | boolean | true = every order (history_summary), default false = current orders |
| limit | number |
pacifica_print_productsPacifica Print products (read-only): game id (e.g. BTC_24H, BTC_7D, BTC_1M), cycle length in days, max leverage, deposit caps, allowed target distance from mark. Print = a strike order that earns a premium each cycle; while resting it fills / is liquidated only at a cycle checkpoint, after a fill it is an ordinary perp position (continuous liquidation).pacifica_print_quoteValidate a Pacifica Print order and preview it (read-only, nothing signed): notional, size on fill, docs-formula liquidation price (an outer bound — a liquidation was observed earlier in one live case; venue trigger unpublished), max loss (deposit + premiums), lock period. The premium is not quoted (the venue's preview is a signed request). Placing the order is CLI-only: perp -e pacifica print deposit … (supports --dry-run).| Parameter | Type | Description |
|---|---|---|
| cycles | number | Cycles 1 … 1000; omit = roll until cancelled |
| deposit * | string | USDC deposit, min 10 |
| direction * | string | long = target below mark, short = target above mark |
| game * | string | Print product, e.g. BTC_24H |
| leverage * | string | Whole-number leverage 1 … product max |
| strike * | string | Target price (on the market tick) |
pacifica_vaultsPacifica vaults (API: lakes), read-only. Without vault: every vault (TVL, NAV per share, fee, lock-up, withdrawal window, config); with account: plus that account's shares. With vault (address, or a nickname matching exactly one vault — an ambiguous nickname is INVALID_PARAMS listing the candidates): one vault plus live account equity, positions, deposit whitelist (unofficial endpoint, advisory) and whether withdrawals are open now. APY is not published (null). Deposits / withdrawals are CLI-only: perp -e pacifica vault deposit|withdraw (supports --dry-run).| Parameter | Type | Description |
|---|---|---|
| vault | string | Vault address or exact nickname |
portfolioCross-exchange portfolio summary: balances, positions, and risk metrics across all exchanges with configured credentialssuggest_commandGiven a natural language trading goal, suggest the exact perp CLI commands to run. Does NOT execute anything — only returns commands for the user to review and run manually| Parameter | Type | Description |
|---|---|---|
| exchange | string | Preferred exchange (default: settings.defaultExchange, else pacifica — the CLI's -e default). Options: ${listVenuesWithRole("trading").map(v => v.id).join(", ")} |
| goal * | string | Natural language goal, e.g. 'buy 0.1 BTC on pacifica', 'close all positions', 'check funding arb opportunities' |
trade_closeClose an existing position. IMPORTANT: Call trade_preview first with the opposite side to show impact, then get user confirmation. Verified close: `closedSize` is the measured / venue-final fill (one residual market close is attempted); a residual still open → ORDER_PARTIAL error (symbol quarantined). Includes the uniform OrderResult of the reduce-only market order. ${HL_SCOPE_NOTE}| Parameter | Type | Description |
|---|---|---|
| exchange * | string | Exchange: ${listVenues().filter(v => v.roles.includes("trading")).map(v => v.id).join(", ")} (aliases accepted) |
| symbol * | string | Symbol to close (e.g., BTC, ETH) |
trade_executeExecute a REAL trade on the server's network (meta.network; PERP_NETWORK, default mainnet). IMPORTANT: Always call trade_preview first and get explicit user confirmation before calling this tool. Refused with RISK_VIOLATION when the order breaches the local risk limits (perp risk set; there is no override over MCP) or when the symbol is quarantined (only reduce-only orders pass). Every order is written to the execution log. Supports market and limit orders. Returns the uniform OrderResult (status, finality, filledSize, execution: slippage / protection price / TIF sent) with the raw venue response under `legacy`, plus top-level filledSize / requestedSize / partial. Outcomes: an unknown outcome (transport failure after send, or a non-final venue ack) → ok:false, code ORDER_PENDING, executed:false, pending:true and a "do NOT resubmit" remediation — the symbol is quarantined for opening orders until a human clears it; a final rejection / cancel with nothing filled → ORDER_REJECTED, executed:false; a cancel after a partial fill → executed:true, partial:true with the real filledSize. ${HL_SCOPE_NOTE}| Parameter | Type | Description |
|---|---|---|
| exchange * | string | Exchange: ${listVenues().filter(v => v.roles.includes("trading")).map(v => v.id).join(", ")} (aliases accepted) |
| orderType | string | Order type |
| price | string | Limit price (required for limit orders) |
| reduceOnly | boolean | Reduce-only order (close position only) |
| side * | string | Order side |
| size * | string | Order size (base currency units) |
| slippageBps | number | Market orders: slippage bound in bps (default: settings defaultSlippageBps) |
| symbol * | string | Trading symbol (e.g., BTC, ETH, SOL) |
| tif | string | Limit orders: GTC (default) | IOC | FOK | ALO (post-only); venue aliases GTT / GTX / TOB accepted |
trade_previewPreview a trade WITHOUT executing. Runs trade_execute's pre-send checks read-only (size parse, order validation incl. TIF, quarantine, local risk limits — never forced) and reports any refusal as valid:false with its code + remediation; also returns the estimated fill price from the book, notional, margin impact, the builder fee the order would carry, and the existing position. Venue trading fees are NOT estimated. ALWAYS call this before trade_execute and show the result to the user for confirmation. ${HL_SCOPE_NOTE}| Parameter | Type | Description |
|---|---|---|
| exchange * | string | Exchange: ${listVenues().filter(v => v.roles.includes("trading")).map(v => v.id).join(", ")} (aliases accepted) |
| orderType | string | Order type |
| price | string | Limit price (required for limit orders) |
| reduceOnly | boolean | Reduce-only order (close position only) — checked like trade_execute (quarantine applies only to non-reduce-only orders) |
| side * | string | Order side |
| size * | string | Order size (base currency units, e.g., '0.1' for 0.1 BTC) |
| symbol * | string | Trading symbol (e.g., BTC, ETH, SOL) |
| tif | string | Limit orders: GTC (default) | IOC | FOK | ALO (post-only); venue aliases GTT / GTX / TOB accepted — checked like trade_execute |
Security checks
- ✓README presentThe repository's README runs to about 1.8K words.
5 checks have not been run yet.
README
The repository's README runs to about 1.8K words. The original in the repository is authoritative.
Read full README