The Multi-DEX Perpetual Futures CLI
Trade perps across Pacifica, Hyperliquid, and Lighter from one command line.
Requires Node.js 18+. Works on macOS, Linux, and Windows.
What Does perp-cli Do?
perp-cli unifies perpetual futures trading across three decentralized exchanges. Instead of juggling different web UIs and APIs for each chain, you use one consistent set of commands.
Scan funding rate arbitrage
$ perp arb scan --min 5Symbol Long Short Spread APRETH Pacifica Hyperliquid 12.3bp 45.1%BTC Lighter Hyperliquid 8.7bp 31.9%SOL Pacifica Lighter 6.2bp 22.8%
Execute a trade
$ perp -e hl trade market ETH buy 0.5✓ Market buy 0.5 ETH on Hyperliquid — filled @ $3,787.50
View unified portfolio
$ perp portfolioExchange Equity Positions Margin RatioPacifica $12,340.50 3 0.08Hyperliquid $28,102.97 5 0.12Lighter $8,080.00 1 0.05─────────────────────────────────────────────Total $48,523.47 9 0.10
Bridge USDC cross-chain ($0 fee)
$ perp bridge 1000 solana arbitrum✓ Bridged 1,000 USDC from Solana → Arbitrum via CCTP V2Tx: 0x3f8a...c2d1 | Fee: $0.00
Three Exchanges, One Interface
perp-cli abstracts away chain differences. The same commands and output format work across every supported exchange.
Pacifica
SolanaNative SOL margin, sub-second finality, deep SOL/ETH/BTC liquidity, cross-margin support.
$ perp -e pac trade market ETH buy 0.1
Hyperliquid
HyperEVM150+ perpetual markets, sub-cent gas fees, native spot trading, vault and staking support.
$ perp -e hl trade market ETH buy 0.1
Lighter
EthereumCentral limit order book, ETH-native settlement, tight spreads on majors, API key management.
$ perp -e lig trade market ETH buy 0.1
Built for AI Agents
Every design decision is optimized for programmatic consumption. Structured output, runtime introspection, and MCP integration make perp-cli a first-class tool for AI agents.
Structured JSON output
$ perp --json --fields totalEquity,risk portfolio{"ok": true,"data": {"totalEquity": 48523.47,"risk": {"level": "low","marginRatio": 0.12,"liquidationDistance": 0.67}},"meta": { "timestamp": "2026-03-14T..." }}
MCP Server mode
$ perp agent mcp-server✓ MCP server listening — compatible with Claude, Cursor, and AI IDEs
--jsonTyped JSON envelope on every command--fieldsRequest only the fields you need--dry-runValidate trades before execution--ndjsonStream large result setsagent schemaRuntime command introspectionMCPModel Context Protocol server
Getting Started
Three commands to go from zero to your first trade.
$ npm install -g perp-cli$ perp wallet set hl <YOUR_EVM_KEY>Wallet saved for hyperliquid$ perp --json portfolio{ "ok": true, "data": { "totalEquity": 10000.00, ... } }
The same EVM key works for both Hyperliquid and Lighter. Keys are stored locally in ~/.perp/wallets.yaml.