Trading¶
Buy, sell, and redeem Polymarket prediction market shares.
Prerequisites¶
Trading requires authentication via bullpen login. Credentials are resolved automatically from your stored session.
Buy¶
Buy shares on a prediction market outcome.
Example:
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.
Example:
Preview output:
Redeem¶
Redeem resolved prediction market positions. Collect winnings for markets that have settled.
| 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:
Limit Buy¶
Place a limit buy order at a specific price.
| Flag | Description |
|---|---|
--price |
Limit price between 0.01 and 0.99 (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.
| Flag | Description |
|---|---|
--price |
Limit price between 0.01 and 0.99 (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 USDC token approvals required for trading. Approvals are one-time per operator on Polygon and are submitted gaslessly via relayer (no MATIC needed).
# 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 |
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.
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).
| 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.
| 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.
| 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¶
Get deposit addresses for a specific Polymarket wallet.
This command returns bridge deposit routes for the provided address.
Withdraw¶
Withdraw funds from Polymarket to an external address.
| Flag | Description |
|---|---|
--to |
Destination address (required) |
--amount |
Amount to withdraw, e.g. "100.00" (required) |
--chain |
Destination chain (required) |
--yes |
Skip confirmation prompt |
Without --yes, the CLI shows a summary and prompts for confirmation.
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:
Current behavior caveat: some interactive/state-changing flows still print non-JSON prompt/status text even when --output json is set.