Skip to content

Terminal toolkit

SolPredict CLI

Trade, inspect, and automate SolPredict from your terminal.

Install the command line interface, connect the Claude plugin, or paste a purpose-built instruction prompt into any AI assistant.

Install

Install the CLI

Use your preferred JavaScript package manager, then verify the binary.

Current CLI package: v0.3.0
npm install -g @solpredict/cli

Verify

solpredict --version
What it is

Built for terminal and agent workflows

The CLI exposes the same market, trading, funding, margin, and resolution flows used by the web app.

Terminal-first CLI

Run market, order, funding, margin, and resolution workflows from a shell with structured output for automation.

Claude and MCP plugin

Connect Claude Code or any MCP-capable client so an assistant can inspect markets and request confirmation before signing transactions.

Commands

Command catalog

Every command group the CLI exposes today.

AI / discovery

Bootstrap assistants and inspect the CLI.

instructionsPrint an LLM-ready system prompt.solpredict instructions
bannerPrint the SolPredict ASCII brand.solpredict banner
infoShow the command catalog.solpredict info

Get started

Bootstrap a fresh wallet for cash and margin trading.

setup statusWhat's done and what's pending for cash and margin.solpredict setup status
setup cashDeposit cash collateral and enable trading.solpredict setup cash --amount 10.0
setup marginInitialize the margin account and deposit margin collateral.solpredict setup margin --amount 25.0

Account

Inspect the wallet and move collateral in and out of the protocol.

wallet showShow address, network, and SOL balance.solpredict wallet show
wallet airdropRequest a devnet or testnet SOL airdrop.solpredict wallet airdrop --sol 1
balanceWallet SOL plus protocol collateral balance.solpredict balance
funding depositMove collateral into the protocol.solpredict funding deposit --amount 5.0
funding withdrawMove collateral out of the protocol.solpredict funding withdraw --amount 5.0
funding showRich-text view of available, reserved, and locked balances.solpredict funding show

Markets

Browse markets, fetch order books, and quote hypothetical trades.

markets listBrowse markets.solpredict markets list --limit 10
markets showInspect one market in detail.solpredict markets show 42
markets quoteEstimate cost or proceeds for a hypothetical order.solpredict markets quote 42 --side buy --outcome yes --size 100 --price 5500
markets orderbookAggregate bids and asks for a market.solpredict markets orderbook 42 --depth 10
markets tradesRecent fills from the off-chain API.solpredict markets trades 42 --limit 20
markets createActivate a certified market from a JSON params file.solpredict markets create --params-file ./market.json

Trading

Place, match, and cancel orders against a market's order book.

trade buyPlace a buy order (limit, market, IOC, or FOK; cash or margin).solpredict trade buy 42 --outcome yes --size 100 --price 5500
trade sellPlace a sell order.solpredict trade sell 42 --outcome yes --size 100 --price 5500
trade cancelCancel an open order.solpredict trade cancel 42 7
trade matchMatch crossable orders on a market's book.solpredict trade match 42 --yes-order 7 --no-order 8
orders listList orders on a market (defaults to yours).solpredict orders list --market 42
orders showShow one order by ID.solpredict orders show 42 7
orders cleanupClean up an expired order.solpredict orders cleanup 42 7
orders closeClose a settled or cancelled order.solpredict orders close 42 7

Positions and PnL

Inspect open positions and the global leaderboard.

positions listWallet positions across markets.solpredict positions list
positions showPosition in one market.solpredict positions show 42
positions closeClose a fully-settled position.solpredict positions close 42
leaderboard topTop traders by PnL, ROI, volume, or win rate.solpredict leaderboard top --sort pnl --limit 20

Liquidity

Provide, remove, and claim fees from market liquidity positions.

liquidity provideProvide cash liquidity to a market.solpredict liquidity provide 42 --amount 10.0
liquidity removeRemove LP shares.solpredict liquidity remove 42 --shares 5.0
liquidity claim-feesClaim accumulated LP fees.solpredict liquidity claim-fees 42
liquidity closeClose a fully-withdrawn LP position.solpredict liquidity close 42
liquidity showInspect your LP position.solpredict liquidity show 42

Margin

Manage the margin account and margin-backed trading or LPing.

margin initInitialize a margin account.solpredict margin init
margin statusInspect the margin account.solpredict margin status
margin depositDeposit margin collateral.solpredict margin deposit --amount 10.0
margin withdrawWithdraw margin collateral.solpredict margin withdraw --amount 5.0
margin provide-liquidityProvide margin LP.solpredict margin provide-liquidity --amount 10.0
margin remove-liquidityRemove margin LP.solpredict margin remove-liquidity --shares 5.0
margin close-positionClose a margin position.solpredict margin close-position 42 --outcome yes
margin close-orderPlace a resting order to reduce an open margin position.solpredict margin close-order 42 --outcome yes --price 5500 --size 1
margin cancel-close-orderCancel a resting margin close order.solpredict margin cancel-close-order 42 7 --outcome yes
margin close-liquidityClose a margin LP position.solpredict margin close-liquidity
margin close-accountClose the margin account itself.solpredict margin close-account

Resolution

Inspect, challenge, and settle market resolutions.

resolution showInspect resolution state.solpredict resolution show 42
resolution challengeOpen a resolution challenge.solpredict resolution challenge 42 --outcome no --evidence-url https://...
resolution claim-bondClaim an overturned challenge bond.solpredict resolution claim-bond 42 --challenge-index 0
resolution settle-batchSettle a chunk of users; loop with --limit.solpredict resolution settle-batch 42 --owner <pubkey> --limit 10
resolution claim-creatorClaim creator fees.solpredict resolution claim-creator 42

Protocol

Read-only protocol state: fees, authorities, and pause status.

protocol showFees, authorities, and pause state (read-only).solpredict protocol show
AI setup

Use with an AI agent

Give an assistant a safe, structured contract for operating the CLI.

Install the packaged plugin when your client supports Claude Code plugins. The plugin exposes SolPredict slash commands and MCP tools while signatures stay local.

Marketplace command (run once)

claude plugin marketplace add https://solpredict.io/cli/marketplace.json

Plugin install command

claude plugin install solpredict

After installing, ask Claude to use the SolPredict skill before trading or inspecting markets.