CircuitGet started

Build a Polymarket trading bot with Claude

Updated by the Circuit team

Three ways to build it

You can get a working Polymarket bot out of an AI assistant in three ways on Circuit. All three end in the same place: a bot with readable code that trades Polymarket from a wallet in your Circuit account.

Route Who writes the code What you need Best for
Circuit Terminal Circuit's Builder A browser and a passkey Most people
Claude Code connected as an assistant Circuit's Builder, driven by Claude The Circuit CLI and a connected assistant login People who already work in Claude Code
Claude Code writing the bot directly Claude, against the Circuit SDK The Circuit CLI and the docs MCP server Developers who want to edit every line

The first route needs no setup. Open the Terminal at app.circuit.org, describe the strategy, and the Builder writes the bot, checks the code and lets you test it. The other two routes use Claude as the interface. The guide on trading with Claude and other assistants covers what a connected assistant can read and suggest.

What a Polymarket bot can do on Circuit

A bot reaches Polymarket through Circuit's SDK. Everything below comes from the Polymarket SDK reference.

Action What it does
Find events List events, search them by text, or retrieve one event with all its open markets
Screen markets Filter by time to end, price band, minimum liquidity, stake size and sports market type, then rank. Tags can include or exclude categories such as sports
Quote Price a buy by pUSD to spend or a sell by shares, with Polymarket's fees included
Buy and sell outcomes Send the order against the live book. A sell can use "max" to close the bot's whole holding of that outcome
Split Turn pUSD into equal shares of YES and NO in one binary market
Merge Turn equal YES and NO shares back into pUSD
Convert In a negative-risk event, turn NO shares of one question into YES shares of every other question plus pUSD
Redeem Claim a resolved market. Both outcomes redeem in one action, and losing shares pay nothing

Bots can also react to events instead of polling. A resolution trigger fires when a Polymarket outcome resolves, a position trigger fires on changes to a named outcome token, and a news trigger fires once for each news item that matches a sentence you write, such as "the Fed announces a rate decision". Circuit charges no builder fee on Polymarket orders.

Prompts that work

The Builder turns a plain-English spec into code, so the spec decides the bot. Name the market filter, the entry rule, the size, the exit and what to do when data is missing. Every number you write becomes a setting you can change later. Three prompts that produce testable bots:

Longshot fader. "Every hour, screen Polymarket markets that end within 7 days with at least $20,000 of liquidity, excluding sports. Find outcomes priced between $0.03 and $0.08. Buy NO in the three with the most 24-hour volume, spending $25 each. Never hold more than 10 positions. Redeem every resolved market."

Complete-set scanner. "Every 15 minutes, scan negative-risk events with at least four outcomes. When the asks for one YES share of every outcome sum below $0.97 after fees, buy one complete set sized at $50. Log the sum for every event checked, even when it doesn't trade."

News-driven entry. "When news says a named company has filed for an IPO, search Polymarket for that company's IPO market. If YES is below $0.70, spend $40 on YES. Sell half if YES reaches $0.90. Redeem at resolution."

Specific numbers make the bot predictable. "Buy undervalued markets" gives the Builder nothing to test. "Buy YES when the price is at least 8 cents below the odds feed" does. For more on writing specs, see building a trading bot without code.

A worked example: pricing an edge

A YES share pays $1 if the outcome happens and $0 if it doesn't. Its price reads as the market's probability. A bot has an edge when its own probability estimate beats the price by more than the costs.

Polymarket charges takers a fee of shares × feeRate × p × (1 − p), where p is the share price. Makers pay nothing. As of October 2026 its fee page lists a fee rate of 0.07 for crypto markets, 0.05 for sports, 0.04 for politics and finance, and 0 for geopolitics.

Say a politics market's YES ask is $0.40 and your bot estimates a 50% chance.

Step Math Result
Buy 200 YES at $0.40 200 × $0.40 $80.00
Taker fee 200 × 0.04 × 0.40 × 0.60 $1.92
Total cost $80.00 + $1.92 $81.92
Payout if YES 200 × $1 $200.00
Expected payout at 50% 0.50 × $200 $100.00
Expected profit $100.00 − $81.92 $18.08
Break-even probability $81.92 ÷ $200 40.96%

The bot needs the true chance to sit above 40.96% to profit over many such bets. That is the whole game. The estimate has to be better than the market's, and the gap has to survive fees.

Complete sets and the fee math

In a negative-risk event exactly one outcome resolves YES. One YES share of every outcome is a complete set, and it always pays $1. When the asks sum below $1, buying the set locks in the difference, minus fees.

Take a three-outcome event in the "Other" category (fee rate 0.05) with YES asks of $0.30, $0.33 and $0.32.

Outcome Ask Fee per share: 0.05 × p × (1 − p)
A $0.30 $0.0105
B $0.33 $0.011055
C $0.32 $0.01088
Total $0.95 $0.032435

One set costs $0.95 + $0.032435 = $0.982435 and pays $1.00, a profit of about 1.76 cents. A hundred sets make about $1.76. The edge is real but thin, and the asks move as soon as anyone else sees it. Circuit's market screen marks negative-risk groups and notes that a complete set costs less than its payout only when the asks sum below 1, so a bot can check every event in one pass.

Paper trade on the live book

Every bot starts in paper trading. Polymarket orders fill against the live order book with simulated funds, and redemptions pay each market's real resolution. Split, merge and convert settle against the same on-chain market terms. You see what the bot would have bought, at what price, and what it collected, without any money moving.

Backtests on Circuit replay recorded Hyperliquid and Lighter markets only, so a Polymarket bot is tested forward in paper trading. Give it enough time to see markets resolve. A bot that trades weekly markets needs weeks of paper results before they mean much. The paper trading guide lists what to check in a paper session.

Connect Claude Code

There are two separate connections, and they do different jobs.

Docs for writing code. Circuit publishes its documentation as an MCP server. Add it to Claude Code with claude mcp add circuit --transport http https://docs.circuit.org/mcp, and Claude reads the current SDK reference while it writes your bot. The full docs are also at docs.circuit.org/llms-full.txt for tools that take a single file. With the Circuit CLI installed, Claude can create a project with circuit new, check it with circuit check, run it against live markets with simulated funds using circuit run --paper, and upload it with circuit upload once you sign in. The TypeScript guide walks through the same loop for Hyperliquid.

Your account for building and suggesting. circuit auth login --assistant "Claude" connects Claude to your Circuit account through a browser handoff you approve with your passkey. You choose which wallets it may suggest changes for and whether it may build bots. A connected assistant builds new bots through the Builder with circuit terminal --build "<strategy>" --wait. Its permit can only read the account, so it cannot upload code, approve its own suggestions or sign anything. Starting the bot it built waits for you in the Terminal.

What the bot cannot do

Know the limits before you write the spec.

  • No resting Polymarket orders. Circuit sends Polymarket orders as fill-or-kill: the whole order fills against the book at once or nothing does. A bot can't post a bid and wait, so it can't market-make on Polymarket through Circuit, and it always pays the taker fee.
  • No historical backtest. Polymarket bots are tested in paper trading only.
  • Resolution takes time. Polymarket's resolution page describes a 2-hour challenge period after a proposal. A disputed market adds a 24 to 48 hour debate and about 48 hours of UMA voting. Capital sits in the position until then.
  • Minimums and ticks apply. Orders must meet the market's minimum shares and current tick size, including ticks as small as 0.005 and 0.0025.
  • Funding is separate. Polymarket settles in pUSD on Polygon. Circuit prepares any approval or USDC.e wrapping as its own operation with its own deadline, before the bot trades.

Risks

Prediction markets carry risks that perps don't.

  • Rules decide outcomes. The title describes the question, but the written rules decide how it resolves. A bot that reads only titles can be right about the world and wrong about the market.
  • Thin books. Many markets have little depth beyond the best price. A bot that sizes from the displayed price can walk the book and pay far more. Screening reports an estimated fill price for a given stake, so size from that.
  • Binary losses. A wrong bet loses the full stake. Diversify across uncorrelated markets and cap each one.
  • Correlated markets. Ten markets on the same election are one bet. Cap exposure per event as well as per market.
  • Code risk. The bot does exactly what its code says. Read the code the Builder writes, and run /review in the Terminal to have it report risks and gaps before you start.

Keys and permits

Bots run on a wallet you create in Circuit or import by private key. Circuit keeps the signing key in a hardware enclave, and bots never see it. A bot requests typed actions through Circuit's SDK, and Circuit signs only under the permit you sign with your passkey when you start the bot.

You can export the private key from Settings at any time. Pause, resume or stop any bot whenever you want. Stopping leaves your positions and resting orders in your account, and you close them from Terminal.

What it costs

Circuit charges no fees today and adds no builder fee to Hyperliquid or Polymarket orders. You pay the venue's trading fees, network gas and any bridge or routing fees, and each prepared action's review shows the costs it reports before you confirm. Today's terms make no commitment about future fees.

FAQ

Can Claude trade on Polymarket for me?

Claude can write a Polymarket bot, either through Circuit's Builder or directly against the Circuit SDK. The bot trades. A connected Claude assistant can only read your account and suggest actions, and you approve each suggestion with your passkey in the Circuit Terminal.

Do I need to know how to code to build a Polymarket bot?

No. Describe the strategy in Circuit's Terminal and the Builder writes and checks the code. You can read the code it writes, and developers can edit it directly with the Circuit CLI.

Is there an MCP server for Circuit?

Yes, for documentation. claude mcp add circuit --transport http https://docs.circuit.org/mcp gives Claude Code the current Circuit docs while it writes code. Account access for an assistant uses the Circuit CLI's assistant login, which you approve with your passkey.

Can I test a Polymarket bot without real money?

Yes. Every bot starts in paper trading, where Polymarket orders fill against the live order book with simulated funds and redemptions pay the market's real resolution.

What fees does a Polymarket bot pay?

Polymarket charges takers shares × feeRate × p × (1 − p), with rates by category such as 0.04 for politics and 0.07 for crypto as of October 2026. Circuit charges no builder fee. Funding a wallet can cost Polygon gas or bridge fees, which the review shows before you confirm.

Can a bot redeem winning Polymarket positions automatically?

Yes. A bot redeems one resolved market per call, and both outcomes redeem together. A resolution trigger can wake the bot when a market it holds resolves.

Start trading