Skip to main content

Command reference

Global flags

FlagDescription
--output jsonReturn machine-readable JSON instead of formatted text. Available on all commands.
JSON output is automatic when the CLI detects a non-TTY environment (e.g., when piped to another process). Shell navigation supports back and prev commands for paginated results.

Markets

Read-only commands. No authentication required.
context markets <subcommand> [options]
CommandDescription
listBrowse markets with filters
search <query>Search markets by keyword
get <id>Get a single market
link <id>Print a clickable market URL
quotes <id>Current bid/ask/last prices
orderbook <id>Visual color-coded orderbook (green bids, red asks, spread)
simulate <id>Preview trade execution
price-history <id>Historical price data
oracle <id>Oracle resolution info
oracle-quotes <id>Oracle probability estimates
request-oracle-quote <id>Request new oracle analysis
activity <id>Market event feed
global-activityActivity across all markets
markets list flags:
FlagDescription
--status <status>Filter by status (e.g., active)
--limit <n>Max results
--sort-by <field>Sort field (e.g., trending)
--sort <asc|desc>Sort direction
--category <slug>Filter by category
--creator <address>Filter by market creator
--cursor <token>Pagination cursor
markets search flags:
FlagDescription
--limit <n>Max results
--offset <n>Result offset for pagination
markets orderbook flags:
FlagDescription
--depth <n>Number of price levels
--outcome-index <n>Outcome index
markets simulate flags:
FlagDescription
--side <yes|no>Outcome side (required)
--amount <n>Trade amount (required)
--amount-type <usd|contracts>Amount denomination
--trader <address>Trader address
markets price-history flags:
FlagDescription
--timeframe <1h|6h|1d|1w|1M|all>Time range
markets activity / global-activity flags:
FlagDescription
--limit <n>Max results
--cursor <token>Pagination cursor

Orders

Trading commands require --private-key or CONTEXT_PRIVATE_KEY.
context orders <subcommand> [options]
CommandDescriptionAuth
listQuery orders with filtersRead-only
mineYour open ordersSigner
get <id>Single order by IDRead-only
recentOrders in a time windowSigner
simulatePreview order executionRead-only
createPlace a signed limit orderSigner
cancel <nonce>Cancel by nonceSigner
cancel-replace <nonce>Cancel and place new orderSigner
bulk-createCreate multiple ordersSigner
bulk-cancelCancel multiple ordersSigner
bulkMixed create + cancelSigner
orders create flags:
FlagDescription
--market <id>Market ID (required)
--outcome <yes|no>Outcome (required)
--side <buy|sell>Order side (required)
--price <1-99>Price in cents (required)
--size <n>Number of contracts (required)
--expiry-seconds <n>Order expiry
orders cancel-replace <nonce> flags: Same as create. orders list flags:
FlagDescription
--trader <address>Filter by trader
--market <id>Filter by market
--status <status>Filter by status
--limit <n>Max results
--cursor <token>Pagination cursor
orders mine flags:
FlagDescription
--market <id>Filter by market
orders recent flags:
FlagDescription
--trader <address>Filter by trader
--market <id>Filter by market
--status <status>Filter by status
--limit <n>Max results
--window-seconds <n>Time window
orders simulate flags:
FlagDescription
--market <id>Market ID (required)
--outcome <yes|no>Outcome
--side <bid|ask>Side
--price <n>Price
--size <n>Size
--trader <address>Trader address
orders bulk-create flags:
FlagDescription
--orders <json>JSON array of order objects (required)
orders bulk-cancel flags:
FlagDescription
--nonces <hex,hex,...>Comma-separated nonces (required)
orders bulk flags:
FlagDescription
--creates <json>JSON array of order objects
--cancels <hex,hex,...>Comma-separated nonces

Portfolio

context portfolio <subcommand> [options]
If --address is provided, uses read-only access. Otherwise uses your signer address.
CommandDescription
overviewCombined view of balance, stats, and active positions
getAll positions
claimableWinnings from resolved markets
statsPortfolio value and performance
balanceUSDC balance (wallet + settlement)
token-balance <address> <token>Balance of a specific token
portfolio get flags:
FlagDescription
--address <addr>Wallet address (optional)
--kind <all|active|won|lost|claimable>Position filter
--market <id>Filter by market
--cursor <token>Pagination cursor
--page-size <n>Results per page
portfolio claimable / stats / balance flags:
FlagDescription
--address <addr>Wallet address (optional)

Account

All account commands require a signer.
context account <subcommand> [options]
CommandDescription
statusCheck wallet balances (formatted ETH and USDC breakdown: total, settlement, wallet) and approvals
setupApprove contracts for trading
mint-test-usdcMint testnet USDC (default: 1000)
deposit <amount>Deposit USDC into the exchange
withdraw <amount>Withdraw USDC from the exchange
mint-complete-sets <market-id> <amount>Mint YES + NO token pairs
burn-complete-sets <market-id> <amount>Burn token pairs to recover USDC
account mint-test-usdc flags:
FlagDescription
--amount <n>Amount to mint (default: 1000)
account burn-complete-sets flags:
FlagDescription
--credit-internal <true|false>Credit internally (default: true)

Questions

Commands for submitting market drafts to the oracle for review.
context questions <subcommand> [options]
CommandDescription
agent-submitSubmit a fully-formed market draft for oracle review
agent-submit-and-waitSubmit a market draft and poll until processing completes
questions agent-submit / agent-submit-and-wait flags:
FlagDescription
--formatted-question <text>Full question text
--short-question <text>Short display title
--market-type <type>Market type
--evidence-mode <mode>Evidence collection mode
--resolution-criteria <text>Criteria for resolving the market
--end-time <timestamp>Market end time
--timezone <tz>Timezone for end time
--sources <urls>Sources for resolution evidence
--explanation <text>Explanation of the market

Onboarding

Top-level convenience commands for wallet setup.
CommandDescription
context setupGenerate new wallet or check status
context approveApprove operator for trading
context deposit <amount>Deposit USDC
context gasless-approveGasless operator approval via relayer
context gasless-deposit <amount>Gasless USDC deposit via permit
Running context setup without a CONTEXT_PRIVATE_KEY generates a new wallet and displays the private key.