Skip to content

Trading

Buy, sell, and redeem Polymarket prediction market shares.

Prerequisites

Trading requires authentication via bullpen login. Credentials are resolved automatically from your stored session.

Your Polymarket account is either a Safe / Proxy wallet (older accounts) or a Deposit Wallet (newer accounts; default for new sign-ups). Every trading command — buy, sell, approve, revoke, wrap, unwrap, split, merge, redeem — works with both kinds and picks the right signing + relayer path automatically. Run bullpen status to see which kind your account uses; see Quickstart → Polymarket Wallet Kinds for details.

If you have a Safe wallet and are getting maker address not allowed or relayer 400 errors, see the Safe to Deposit Wallet migration guide.

When Polymarket rejects a CLOB order or gasless relayer batch while its status page reports degraded relevant components (CLOB API, Markets API, Polygon (RPC), or User auth), the CLI appends a Polymarket status advisory to the error. JSON error envelopes include a nested polymarket_status object only in that outage-shaped case; local auth, balance, market, and validation errors do not include it.

Buy

Buy shares on a prediction market outcome.

bullpen polymarket buy <MARKET_SLUG> <OUTCOME> <AMOUNT_USD> --yes

Example:

bullpen polymarket buy will-btc-reach-100k "Yes" 10.00 --yes

The command first shows a trade preview, then executes if --yes is set:

Buy Yes on "Will BTC reach $100K by March?"
Price: 65¢  |  Amount: $10.00
Est. shares: 15.38  |  Potential: $15.38
Spread: 1.2¢

Order submitted successfully (ID: abc123)
Filled: 15.38 @ 65¢

Without --yes, the preview is shown and you are prompted to confirm interactively (Confirm trade? [y/N]:). Entering anything other than y cancels the trade.

Sell

Sell shares on a prediction market outcome.

bullpen polymarket sell <MARKET_SLUG> <OUTCOME> <SHARES> --yes

Example:

bullpen polymarket sell will-btc-reach-100k "Yes" 15.38 --yes

Preview output:

Sell Yes on "Will BTC reach $100K by March?"
Price: 68¢  |  Amount: $10.46

Redeem

Redeem resolved prediction market positions. Collect winnings for markets that have settled.

bullpen polymarket redeem \
  --address 0xABC... \
  --condition-ids id1,id2,id3 \
  --yes
Flag Description
--address Wallet address (defaults to your own Polymarket address)
--condition-ids Comma-separated condition IDs to redeem (required)
--yes Skip confirmation prompt

Both standard binary markets and neg-risk markets are supported. The CLI auto-detects the market type and uses the appropriate redemption path (CTF contract for standard, NegRiskAdapter for neg-risk). All redemptions are gasless via relayer — no MATIC needed.

Without --yes, the CLI lists the condition IDs and prompts for confirmation (Confirm redeem? [y/N]:).

To find redeemable condition IDs, check your positions:

bullpen polymarket positions --redeemable --output json

Limit Buy

Place a limit buy order at a specific price.

bullpen polymarket limit-buy <MARKET_SLUG> <OUTCOME> \
  --price 0.45 --shares 20 --yes
Flag Description
--price Limit price that matches the market tick size (required)
--shares Number of shares (required)
--expiration Order expiration: gtc (default), gtd, fok, or fak
--post-only Reject if the order would fill immediately (maker-only)
--yes Skip confirmation prompt
--preview Show order preview without executing

Example:

bullpen polymarket limit-buy will-btc-reach-100k "Yes" \
  --price 0.55 --shares 50 --expiration gtc --yes

Limit Sell

Place a limit sell order at a specific price.

bullpen polymarket limit-sell <MARKET_SLUG> <OUTCOME> \
  --price 0.65 --shares 15 --yes
Flag Description
--price Limit price that matches the market tick size (required)
--shares Number of shares (required)
--expiration Order expiration: gtc (default), gtd, fok, or fak
--post-only Reject if the order would fill immediately (maker-only)
--yes Skip confirmation prompt
--preview Show order preview without executing

Example:

bullpen polymarket limit-sell will-btc-reach-100k "Yes" \
  --price 0.70 --shares 15 --expiration fok --yes

Trade Preview

Every buy, sell, limit-buy, and limit-sell command shows a preview before executing. The preview includes:

Field Description
Side Buy or Sell
Outcome The outcome being traded (e.g., "Yes")
Market The market question
Price Current price in cents
Amount USD value of the trade
Est. shares Estimated shares to receive (buy only)
Potential Potential payout if outcome wins (buy only)
Spread Bid-ask spread in cents (buy only)

Pre-Trade Setup

Approve

Check and set ERC-1155 and pUSD token approvals required for trading. Approvals are one-time per operator on Polygon and are submitted gaslessly via relayer (no MATIC needed). The CLI selects the correct approval set based on your wallet kind:

  • Safe / Proxy accounts: 4 ERC-1155 operators + 4 pUSD spenders + the Bullpen fee-collector pUSD allowance.
  • Deposit Wallet accounts: 4 ERC-1155 operators + 4 pUSD spenders. The Bullpen fee-collector is auto-skipped because Polymarket's WALLET-batch relayer enforces a spender allowlist that does not include it.
# Check approval status
bullpen polymarket approve --check

# Set all required approvals
bullpen polymarket approve --yes
Flag Description
--check Only check approval status, don't submit transactions
--yes Skip confirmation prompt

Revoke

Revoke all Polymarket trading approvals (ERC-1155 + pUSD) in a single gasless batch. Useful before account close or wallet-key rotation.

bullpen polymarket revoke --yes

After revoke, run bullpen polymarket approve --yes to re-establish approvals before trading again.

Preflight

Run pre-trade safety checks before placing orders. Checks server time sync, account status (close-only mode), USDC balance/allowance, and ERC-1155 approval status.

bullpen polymarket preflight

CTF Operations

All CTF operations (split, merge) are gasless — submitted via Polymarket's relayer. No MATIC is needed.

Split

Split USDC into YES and NO outcome tokens for a condition via the Conditional Token Framework (CTF).

bullpen polymarket split --condition 0xbd31dc8a... --amount 100.00 --yes
Flag Description
--condition Condition ID (required)
--amount Amount in USDC to split (required)
--partition Optional custom partition index set list
--parent-collection Optional parent collection ID
--yes Skip confirmation prompt

Merge

Merge YES and NO outcome tokens back into USDC sets.

bullpen polymarket merge --condition 0xbd31dc8a... --amount 50.00 --yes
Flag Description
--condition Condition ID (required)
--amount Number of USDC sets to merge (required)
--partition Optional custom partition index set list
--parent-collection Optional parent collection ID
--yes Skip confirmation prompt

Real-Time Data

Watch

Subscribe to real-time market data updates.

bullpen polymarket watch will-btc-reach-100k
Arg Description
MARKET_SLUG Market slug or URL (required)

The stream runs until Ctrl+C. Use --output json for line-delimited JSON events.

Bridge & Funds

Deposit

Use the bullpen deposit command to deposit funds. It opens the Bullpen web app, which guides you to the correct deposit address for your wallet kind and the asset/chain you choose:

bullpen deposit

The CLI does not display raw deposit addresses to prevent accidental wrong-chain or wrong-token deposits. The previous bullpen polymarket deposit --address … form is deprecated.

Withdraw

The CLI supports withdrawing USDC.e from a Polygon Deposit Wallet. Use the Bullpen web app for other withdrawal routes.

bullpen polymarket withdraw --to 0xABC... --amount 100.00 --chain polygon --token usdce --yes

The command refuses unsupported token or chain combinations instead of falling back to the retired Polymarket V1 bridge endpoint.

Bridge Utilities

Query supported assets and check deposit status for an address.

# List supported chains and tokens
bullpen polymarket bridge --supported

# Check status of deposits for an address (EVM, Solana, or Bitcoin)
bullpen polymarket bridge --status 0xYourWalletAddress
Flag Description
--supported List supported chains and tokens
--status Check status of deposits for a deposit address

Exit Codes

Code Meaning
0 Success
1 General error (invalid args, network, etc.)
3 Trade failed (order rejected by exchange)

JSON Output

Most trading commands accept --output json:

bullpen polymarket buy will-btc-reach-100k "Yes" 10.00 --yes --output json

Current behavior caveat: some interactive/state-changing flows still print non-JSON prompt/status text even when --output json is set.