For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Trade prediction markets

Search markets, fund your predict deposit wallet, and place orders on Polymarket through mm predict.

Ask your agent

You (to your agent): "Bet 10 USDT on YES for BTC 5-min price up"
You (to your agent): "Show my open prediction market positions"

Your agent runs one-time setup if needed, shows current odds, confirms your bet, then places the order.

Prerequisites

  • Quickstart completed
  • Polygon USDC.e in your owner EOA for mm predict deposit (converts to pUSD in the predict deposit wallet)

First-time setup

  1. Run one-time setup:

    mm predict setup --wait

    If the command returns a job ID instead of completing immediately, track it with mm predict watch <JOB_ID> --wait.

  2. Fund the predict deposit wallet:

    mm predict deposit --amount <AMOUNT> --wait
  3. Confirm balance:

    mm predict balance --sync

Search and place an order

  1. Search markets:

    mm predict markets search "<QUERY>" --limit 5
  2. Preview a quote:

    mm predict quote --token-id <TOKEN_ID> --side buy --size <SIZE> [--limit-price <PRICE>]
  3. Inspect a market to get outcome token IDs:

    mm predict markets get <MARKET_SLUG_OR_ID>
  4. Place the order:

    mm predict place --token-id <TOKEN_ID> --side buy --size <SIZE> --price <PRICE> [--order-type GTC|GTD|FOK|FAK]

    --limit-price applies to mm predict quote only. mm predict place requires --price (worst fill price per share, between 0 and 1).

  5. View open orders and positions:

    mm predict orders
    mm predict positions

Common pitfalls

One-time setup is required

Polymarket trading routes through a dedicated predict deposit wallet. Run mm predict setup followed by mm predict deposit --amount <N> before placing your first order. Skipping setup can produce JsonRpcError: execution reverted on deposit.

See mm predict in the commands reference.