polymarket-pipeline: an event-driven Claude classifier for niche Polymarket markets
Event-driven AI pipeline that monitors breaking news in real time, classifies market impact with Claude, and trades niche Polymarket markets automatically.
At a glance
- What is it?
- polymarket-pipeline watches Twitter, Telegram and RSS, asks Claude whether a headline makes a market more or less likely to resolve YES, and sizes trades with quarter-Kelly. It is a research harness for sub-$500K markets, not a production trading system.
- Who is it for?
- Adopt polymarket-pipeline if you want to study whether an LLM can classify news direction against small prediction markets, and you are comfortable reading the modules yourself: the README documents no test suite, no rollback path and no licence. Do not adopt it if you need live execution you can trust unattended, or if you cannot read the executor and edge logic before pointing real keys at it.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Yes. The repository last received commits 165 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The problem polymarket-pipeline targets: slow news against thin markets
Prediction market bots tend to cluster where liquidity is. The README states the V1 design scraped RSS feeds with a 5 to 60 minute delay, asked Claude "what's the probability?", and competed on high-volume markets "where every bot already operates". V2 inverts all three choices: real-time Twitter and Telegram streams instead of RSS, a classification question instead of a probability estimate, and a hard volume ceiling of $500,000.
The audience is narrow by design. This is for someone who already understands Kelly sizing, has a Polymarket CLOB key, and wants to test whether an LLM's read on a breaking headline carries information that a thin market has not priced yet. It is not a consumer app and the README does not present it as one. The disclaimer calls the project "entertainment and educational purposes only" and warns that you can lose money. Take that framing seriously: the interesting artifact here is the measurement loop, not the order router.
How the event-driven pipeline moves a headline to an order
The architecture is a chain of small modules, each with one job. news_stream.py pulls from Twitter API v2, Telegram channels and an RSS fallback, deduplicates events and timestamps them with receive latency. market_watcher.py holds a Polymarket WebSocket connection for live prices, applies the niche filter and watches momentum. matcher.py routes each headline to markets by keyword overlap, and only matched markets proceed.
classifier.py is where the design decision lives. Claude is asked whether the news makes the market "MORE likely to resolve YES, MORE likely to resolve NO, or is it NOT RELEVANT", and separately rates materiality from 0 to 1. edge.py turns direction plus materiality into a signal when materiality clears the threshold and the price has room, then sizes the position with quarter-Kelly. executor.py places the order, dry-run by default. pipeline.py is an asyncio orchestrator, and logger.py writes trades, news events, calibration and latency into SQLite. calibrator.py and backtest.py close the loop by measuring classification accuracy against resolved markets.
The claim that a classification framing suits an LLM better than a probability estimate is the thesis of the project, and it is a defensible one. What the README does not document is how matcher.py weighs keyword overlap, or what happens when two headlines in the same second point at the same market. Those are exactly the places where a pipeline like this produces duplicate or contradictory orders.
Installing polymarket-pipeline and running a first dry-run watch
The README offers a one-command setup that clones the repository, enters it and runs setup.sh. That script is present at the top level of the repository, but the README does not list what it does step by step, so the manual path below is the one you can verify as you go.
git clone https://github.com/brodyautomates/polymarket-pipeline.git
cd polymarket-pipeline
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .envThe requirements file pins anthropic, feedparser, httpx, python-dotenv, rich, websockets, tweepy and aiohttp, and carries a commented line noting that py-clob-client "Requires Python >=3.9.10 - install separately for live trading". If you only intend to run in dry-run mode, you do not need it.
Then fill in .env. Only the Anthropic key is marked required; the Twitter, Telegram, Polymarket and NewsAPI entries are marked optional, with the Polymarket block reserved for live trading.
ANTHROPIC_API_KEY=sk-ant-...
TWITTER_BEARER_TOKEN=
TELEGRAM_BOT_TOKEN=
POLYMARKET_API_KEY=
DRY_RUN=true
MAX_BET_USD=25
DAILY_LOSS_LIMIT_USD=100
EDGE_THRESHOLD=0.10
MAX_VOLUME_USD=500000
MIN_VOLUME_USD=1000
MATERIALITY_THRESHOLD=0.6
SPEED_TARGET_SECONDS=5Before starting anything long-running, the README's verification step checks keys and connections:
python cli.py verifyIf that passes, start the event-driven pipeline without the live flag. The README says the watch command "runs indefinitely", connecting to configured news sources, matching headlines to niche markets, classifying with Claude and executing when it finds edge. In this state the executor should log intended trades rather than send them.
python cli.py watchTo see the niche universe the filter is selecting from, or to inspect what the pipeline recorded, the same CLI exposes two read-only commands:
python cli.py niche
python cli.py tradesThe live dashboard is a separate process, and the README describes it as a terminal dashboard:
python cli.py dashboardOne practical note on sources. With no Twitter bearer token and no Telegram bot token, the pipeline falls back to RSS, which is the slow path V2 was written to escape. A first session without those keys tells you almost nothing about the speed claim.
Where the design breaks: latency, thin markets and an unmeasured classifier
The $500,000 volume ceiling is the project's central bet and also its main fragility. Thin markets are thin for a reason: fewer participants means wider spreads and less depth, so a $25 order may still move the price against you, and an exit can be worse than the entry. The README sets MIN_VOLUME_USD at 1000 to skip dead markets, which acknowledges the problem without solving it.
The speed target is five seconds from news to trade, and the README states the V2 path moves from headline to match in under five seconds. Nothing in the repository shows a measured latency distribution, and the pipeline's own logger records latency, so the honest position is that the number is a target configured via SPEED_TARGET_SECONDS, not a result. Twitter's filtered stream, a Telegram channel post, an Anthropic API round trip and a CLOB order all sit inside that budget. Any one of them stalling blows it.
Calibration is the most interesting limitation because it is self-inflicted. The system only learns whether its classifications were right after markets resolve, which for many prediction markets is days or weeks later. Until then, calibrator.py is reporting on a partial sample, and the README's claim that accuracy "informs future confidence" describes a loop with a long delay. A strategy can look fine for weeks and be wrong.
Finally, the README does not document a rollback, a kill switch beyond the daily loss limit, or what happens to open positions when the process dies mid-trade. If you need unattended live execution, this is the wrong tool until you have read executor.py and pipeline.py yourself.
polymarket-pipeline versus a plain RSS scanner or a manual workflow
The obvious alternative is the V1 path that still ships in this same repository. python cli.py run scrapes RSS, scores markets and logs signals on a schedule, with flags for --max and --hours. The difference is not cosmetic: V1 polls on a cadence measured in minutes, so it is a screening tool, whereas V2 holds open streams and reacts. If your edge comes from reading a market carefully rather than from being early, V1 plus the dashboard is the cheaper and more legible choice, and it avoids the Anthropic call entirely on most cycles.
The other alternative is doing it by hand with the niche browser. python cli.py niche lists volume-filtered markets and python cli.py markets lists all active ones, which is enough to build a watchlist without any automation. The trade-off is throughput: a human cannot scan a live Twitter stream against a market list at five-second intervals, but a human also will not place a duplicate order because two headlines overlapped in the matcher. Choose V2 when the edge is genuinely speed, and choose manual screening when it is judgement.
Maintenance, licence and the cost of keeping it running
The repository is not archived, and the last push was on 2026-04-03. That is roughly five months before today, so the codebase is stable rather than moving, and you should plan on reading it rather than waiting for fixes. There are no retrieved releases, so there is no versioned artifact to pin against; you are tracking the main branch.
The licence is not stated in the repository. That matters more than usual here because the code places orders against a live exchange and bundles no explicit grant. If you intend to reuse any of it beyond local experimentation, establish the licence terms with the author first. Nothing here is legal advice.
Ongoing cost has two parts. The Anthropic API is called per matched headline, so spend scales with how noisy your news sources are, not with how many trades you make; the deduplication in news_stream.py is the main brake on that. The py-clob-client dependency is deliberately excluded from requirements.txt with a note that it needs Python >=3.9.10, which means your interpreter version is a real constraint if you enable live trading. Upgrades are manual: pull main, reinstall requirements, rerun python cli.py verify, then python cli.py backtest to see whether the calibration numbers still hold.
Editorial conclusion
Adopt polymarket-pipeline if you want to study whether an LLM can classify news direction against small prediction markets, and you are comfortable reading the modules yourself: the README documents no test suite, no rollback path and no licence. Do not adopt it if you need live execution you can trust unattended, or if you cannot read the executor and edge logic before pointing real keys at it. Verify two things first: that python cli.py verify passes with your .env populated, and that python cli.py backtest --limit 50 --category ai produces a calibration report you understand, because the whole strategy rests on classification accuracy the calibrator measures after the fact. The last push to the repository was on 2026-04-03, so treat the code as a snapshot rather than a moving target.
Frequently asked questions
What is polymarket-pipeline and who is it for?
It is a Python event-driven pipeline that monitors breaking news on Twitter, Telegram and RSS, classifies the market impact with Claude, and trades niche Polymarket markets under $500K volume. The README frames it for educational and entertainment use, and the default configuration is dry-run.
How does polymarket-pipeline decide to place a trade?
Claude classifies whether the news makes the market more likely to resolve YES or NO and rates materiality from 0 to 1. A trade signal requires a directional call, materiality above the default threshold of 0.6, and room for the price to move, after which quarter-Kelly sizing is applied.
Does polymarket-pipeline install py-clob-client automatically?
No. The requirements.txt line for py-clob-client is commented out with the note that it requires Python >=3.9.10 and must be installed separately for live trading. Dry-run mode does not need it.
How do Polymarket trades work in this pipeline?
Execution is dry-run by default, and the README states live mode places orders via the Polymarket CLOB API with a $25 maximum single bet and a $100 daily limit. The Polymarket API key, secret, passphrase and private key are read from .env.
How does Polymarket make any money?
The repository does not describe Polymarket's own revenue model, so this cannot be answered from it. What the README does document is the pipeline's side: it trades markets under $500K volume and logs every trade to SQLite.
Community notes