@waveking1314: Having dinner with my girlfriend's family, my mother-in-law suddenly asked what I do for work. All the elders at the table instantly stared at me. I said: "I'm building an automated trading system." She followed up: "So you're trading stocks?" I replied: "No, it's fully open-source. Anyone can see how it works at its core." She smiled: "That sounds a bit..."

X AI KOLs Timeline Tools

Summary

A person shares the open-source automated trading tools he built for Polymarket, including data scraping, a market-making bot, and a machine learning pattern recognition system.

Having dinner with my girlfriend's family, my mother-in-law suddenly asked what I do for work. All the elders at the table instantly stared at me. I answered: "I'm building an automated trading system." She pressed on: "So you're trading stocks?" I said: "No, it's fully open-source. Anyone can directly see how it works under the hood." She smiled: "That sounds a bit intangible, not very real." I didn't waste words and pulled out my phone. One wallet had returned 83% in 6 weeks. Another had racked up $7.1 million in trading volume. And another had turned $600 into $7,200. The noisy table instantly fell silent. My mother-in-law was stunned and said: "This... it's all real?" I smiled: "Every penny." Then I directly showed them the open-source codebase. First: http://github.com/warproxxx/poly_data… It has scraped over 86 million historical trades, covering every outcome on Polymarket. Anyone can download it for free. Second: http://github.com/warproxxx/poly-maker… This is a top-tier market-making bot that can place orders on both sides of the order book simultaneously, and can even be controlled via a web form. Third: http://github.com/pselamy/pattern-tracker… A machine learning pattern recognition system. That earlier opportunity of $600 turning into $7,200 was precisely caught by it before anyone else reacted. Upon hearing this, her mother put down her fork and asked seriously: "Can my sister's son get in on this? He's a programmer too." The truth is right here: http://polymarket.com/@xuanxuan008?r=waveking… In this field, you don't need a finance degree or a hedge fund background. All you need is code and a curious mind. Copy trade: https://t.me/KreoPolyBot?start=ref-waveking…
Original Article
View Cached Full Text

Cached at: 06/03/26, 01:40 AM

Dining with my girlfriend’s family, her mom suddenly asked what I do for work. At that moment, all the elders at the table turned to look at me.

I answered: “I’m building automated trading systems.”

She pressed further: “So you trade stocks?”

I said: “No, it’s fully open-source. Anyone can see exactly how the underlying system works.”

She smiled and said: “That sounds a bit vague and not very real.”

Without wasting words, I pulled out my phone.

One wallet had returned 83% in 6 weeks. Another wallet had generated $7.1 million in trading volume. And one more had turned $600 into $7,200.

The noisy dinner table fell completely silent.

Her mom paused and asked: “This… it’s all real?”

I smiled: “Every single cent.”

Then I showed them the open-source codebase right there.

First: http://github.com/warproxxx/poly_data…
With over 86 million historical trades collected, covering every market outcome on Polymarket. Anyone can download it for free.

Second: http://github.com/warproxxx/poly-maker…
A top-tier market-making bot that places orders on both sides of the book and can even be controlled directly via a web spreadsheet.

Third: http://github.com/pselamy/pattern-tracker…
A machine learning pattern recognition system. That 600-to-7,200 explosive opportunity? It caught it precisely before anyone else noticed.

Hearing this, her mother put down her fork and asked seriously: “Can my sister’s son join in? He’s a programmer too.”

The truth is right here: http://polymarket.com/@xuanxuan008?r=waveking…

In this field, you don’t need a finance degree or a hedge fund background. All you need is code and a curious mind.

Copy trade:
https://t.me/KreoPolyBot?start=ref-waveking…


warproxxx/poly_data

Source: https://github.com/warproxxx/poly_data

Polymarket Data (v2)

License: GPL-3.0 (https://opensource.org/licenses/GPL-3.0) GitHub stars (https://github.com/warproxxx/poly_data/stargazers) GitHub last commit (https://github.com/warproxxx/poly_data/commits/main) Python (https://www.python.org/)

A pipeline for fetching, processing, and analyzing Polymarket v2 trading data. Reads order events directly from the Polymarket CTF Exchange V2 contract on Polygon via JSON-RPC, joins them with market metadata from the Polymarket Gamma API, and writes structured trades to CSV.

⚠️ v1 → v2 migration

Polymarket migrated to a new set of CTF Exchange contracts on 2026-04-28 and stopped supporting their old subgraph indexer. The old pipeline in this repo (Goldsky subgraph + GraphQL polling) no longer returns complete data, so it has been removed.

The previous version is preserved at the v1-final (https://github.com/warproxxx/poly_data/tree/v1-final) tag if you need it for historical analysis. For any new work, use this v2 version.

The V1 retriever used goldsky’s very leniet stack for free data but now goldsky only gives data thru turbo pipeline. It is expensive and complex. Other third party options are also high dependency too. So I have decided to get the data directly onchain in this version

Configuration

All tuning is via environment variables.

VariableDefaultWhat it does
POLYGON_RPC_URLhttps://polygon-bor-rpc.publicnode.comPolygon JSON-RPC endpoint. Public default works but is slow and times out under sustained backfill. Free tier of QuickNode or Alchemy is much more reliable. Paid tier recommended if you’re doing it in a serious environment.
POLYGON_MAX_BLOCK_RANGE5Blocks per eth_getLogs query. Default is safe for free RPC tiers; if you have a paid plan, set it to 500 or 1000 to backfill much faster. If you set it higher than your RPC allows, the run stops with an error telling you to lower it.
PROCESS_CHUNK_SIZE0When >0, streams data/orderFilled.csv through chunks if your machine has limitations processing the data. Use 500000 if processing OOMs on your machine.

Set them in .env file:

bash export POLYGON_RPC_URL="https://your-endpoint-here" export POLYGON_MAX_BLOCK_RANGE=1000 # paid RPC plan? bump from 4 to 500 or 1000 export PROCESS_CHUNK_SIZE=500000 # only if RAM is tight

Table of Contents

Overview

update.py runs three stages:

  1. Markets — fetches all Polymarket markets (closed + active) via the Gamma keyset API (/markets/keyset). Resumable from a saved cursor; subsequent runs only fetch newly created markets.
  2. Chain — reads OrderFilled events from the CTF Exchange V2 contract (0xE111180000d2663C0091e4f400237545B87B996B) on Polygon via direct JSON-RPC. Resumable from the last scanned block.
  3. Process — joins order events with market metadata to produce labeled trades with price, USD amount, and BUY/SELL direction.

Stages 1 and 2 run in parallel (different APIs, zero contention), so total wall time is max(markets, chain) rather than the sum.

Installation

This project uses UV (https://docs.astral.sh/uv/) for fast package management.

``bash

macOS / Linux

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows

powershell -c “irm https://astral.sh/uv/install.ps1 | iex”

Or with pip

pip install uv ``

Then install dependencies:

bash uv sync

Polygon RPC setup

The V1 retriever used goldsky’s very leniet stack for free data but now goldsky only gives data thru turbo pipeline. It is expensive and high dependency. Other third party options are high dependency too. So I have decided to get the data directly onchain. For that it needs an RPC URL. If not set, it defaults to https://polygon-bor-rpc.publicnode.com

For faster retrieval get a node from Quicknode or Alchemy in their premier tiers. If you have no idea what that is, you can sign up here (https://quicknode.com/signup?via=daniel-s)

Quick Start

bash uv run python update.py

That’s it. Runs markets + chain in parallel, then processes trades. First run is the long one — initial markets fetch is ~hour, initial chain backfill from v2 genesis (~April 2026) is several hours on a free RPC. Subsequent runs are seconds.

To run any stage individually:

bash uv run python -m update_utils.update_markets uv run python -m update_utils.update_chain uv run python -m update_utils.process_live

Project Structure

poly_data/ ├── update.py # orchestrator: markets + chain in parallel, then process ├── update_utils/ │ ├── update_markets.py # Polymarket Gamma keyset API → markets.csv │ ├── update_chain.py # Polygon RPC OrderFilled events → data/orderFilled.csv │ └── process_live.py # join orders ↔ markets → processed/trades.csv ├── poly_utils/ │ └── utils.py # market loader, missing-token backfill ├── data/ # all generated data + resume state (gitignored) │ ├── markets.csv # all markets, all fields preserved │ ├── missing_markets.csv # markets backfilled per-token from trades │ ├── markets_*_part.csv # per-pass keyset output (closed/active) │ ├── markets_*_state.json # keyset cursor state for incremental resume │ ├── orderFilled.csv # raw order events from chain │ └── cursor_state.json # last scanned block └── processed/ # user-facing output (gitignored) └── trades.csv # labeled trades for analysis

Data Files

data/markets.csv

All markets returned by the Gamma keyset API. All API fields are preserved as-is; nested objects (outcomes, clobTokenIds, events, etc.) are stored as JSON strings. The exact column set is determined by the first batch the API returns and persisted in markets_*_state.json so resumed runs stay consistent.

Key fields used downstream: id, question, slug, conditionId, clobTokenIds (JSON array — first element = token1, second = token2), closedTime, volume.

data/orderFilled.csv

Raw OrderFilled events decoded from the chain. Schema:

ColumnNotes
timestampUnix seconds (from block timestamp)
makerMaker address, lowercase
makerAssetId"0" if maker is paying USDC; otherwise the CTF token ID
makerAmountFilledRaw integer (6 decimals — USDC and CTF tokens both use 6)
takerTaker address, lowercase
takerAssetId"0" if taker is paying USDC; otherwise the CTF token ID
takerAmountFilledRaw integer (6 decimals)
transactionHashPolygon transaction hash

The v2 OrderFilled event natively carries a single tokenId + side (BUY=0, SELL=1) referring to the maker’s order. The reader maps that back to the v1-compatible maker/taker/asset schema above so downstream code stays simple. The CTF Exchange contract address 0xe111180000d2663c0091e4f400237545b87b996b may appear as taker for some events — this is the contract acting as an intermediary for CTF mint/burn flows during cross-side matches; treat it as a sub-event rather than a counterparty.

processed/trades.csv

Labeled trades for analysis:

ColumnNotes
timestampdatetime
market_idfrom markets.csv (null if market wasn’t found)
maker, takeraddresses
nonusdc_side"token1" or "token2"
maker_direction, taker_direction"BUY" / "SELL"
priceUSDC per outcome token (0–1)
usd_amounttrade size in USD
token_amountoutcome tokens transferred
transactionHash

Pipeline Stages

1. update_markets — Polymarket Gamma keyset API

Pages through /markets/keyset with closed=true then closed=false. Saves a cursor per pass; on subsequent runs, resumes from the cursor and only pulls newly created markets.

Outputs markets_closed_part.csv + markets_active_part.csv (kept across runs as the source of truth) and merges them into markets.csv at the end of each run.

2. update_chain — Polygon RPC OrderFilled events

Calls eth_getLogs on the CTF Exchange V2 contract in 1000-block windows (auto-halves on errors). Decodes events with the ABI, looks up block timestamps (cached per chunk), and appends to data/orderFilled.csv. Saves the last scanned block to data/cursor_state.json.

3. process_live

Reads data/orderFilled.csv, finds the resume point in processed/trades.csv, joins new orders against get_markets() (which parses clobTokenIds into token1/token2), computes price/USD/direction, and appends to processed/trades.csv.

If any trade references a token ID not in markets.csv, it’s backfilled into missing_markets.csv via a per-token Gamma API call before the join. For memory-bounded processing on large datasets, set PROCESS_CHUNK_SIZE — see Configuration.

Analysis

``python import polars as pl from poly_utils.utils import get_markets

markets_df = get_markets() # parses clobTokenIds → token1/token2 trades_df = pl.read_csv(“processed/trades.csv”, try_parse_dates=True)

Filter trades for a specific user (filter on maker — see note below)

USERS = { ‘domah’: ‘0x9d84ce0306f8551e02efef1680475fc0f1dc1344’, ‘50pence’: ‘0x3cf3e8d5427aed066a7a5926980600f6c3cf87b3’, } trader_df = trades_df.filter(pl.col(“maker”) == USERS[‘domah’]) ``

Note on user filtering: Polymarket emits OrderFilled from the maker’s perspective at the contract level. When you want a user’s trades from their side, filter on maker, not taker.

License

GPL-3.0 — see LICENSE.

Similar Articles

@HuaXi46802: A Chinese developer recorded a 2-minute tutorial on setting up a Claude Code proxy. The screen shows three monitors, a messy desk, and cables everywhere. He thought it would get at most a few hundred views. The video went viral. But what really made it blow up wasn't the tutorial content. Pause the video at 0:47, skip...

X AI KOLs Timeline

A Chinese developer recorded a Claude Code proxy setup tutorial, accidentally revealing his Polymarket wallet running with a profit of $868,862. The video went viral; he deleted it, but the wallet is still running.

@qkl2058: I did something pretty insane last night: I unleashed Claude and gave it full control of my computer to trade autonomously on Polymarket. Starting capital: just $200. And guess what? In just 10 hours, it turned $200 into $3,000 — a 15x return.

X AI KOLs Timeline

A user claims to have given Claude AI full control of their computer to trade autonomously on the prediction market platform Polymarket, turning $200 into $3,000 in 10 hours — a 15x return — by copying the strategies of high-win-rate traders.

@QKBS2002: A junior student at Shanghai Jiao Tong University used Claude to build a trading bot and earned $193,000 on Polymarket. This bot specializes in BTC short-term up/down markets, executes with limit orders, and combines three strategies: arbitrage, market making, and hedging. Breaking it down simply: when it finds a pricing anomaly, it enters and then immediately buys...

X AI KOLs Timeline

A junior student at Shanghai Jiao Tong University used Claude to build a trading bot and earned $193,000 on Polymarket, employing arbitrage, market making, and hedging strategies.

@XAMTO_AI: Brothers and sisters, don't say it's hard to find information gaps anymore! This magical tool scans 10 platforms at once, and directly condenses what the whole internet has been talking about and betting on in the past 30 days into one report! last30days-skill has topped GitHub Trending #1! 7000+ stars in a week, 13k total stars! Not...

X AI KOLs Timeline

An AI agent-driven search engine that aggregates the latest content from platforms like Reddit, X, YouTube, etc., and automatically generates cross-validated reports. It has topped GitHub Trending #1.

@Huanusa: This is absolutely mind-blowing! Someone actually built an AI that can directly read candlestick trading, and its performance is through the roof! It's called Kronos — the world's first open-source foundational large model designed specifically for financial markets! Trained from scratch on 12 billion real candlestick data points from 45 exchanges, not a repurposed general AI. It can: price prediction + volatility prediction and more.

X AI KOLs Timeline

Kronos is the world's first open-source foundational large model for financial markets, trained from scratch on 12 billion real candlestick data points, supporting price prediction and volatility forecasting, far outperforming general models, and completely free and open-source.