An open-source monorepo for collecting, transforming, analyzing, and
visualizing Polymarket data. The repository is organized as a uv workspace so
new event families and analytics pipelines can be added without creating a
separate repository for every runtime component.
The first pipeline processes Polymarket CLOB OrderFilled events:
| Component | Source | Runtime |
|---|---|---|
| Collector | pipelines/orderfilled/collector |
Daily Hugging Face Job on cpu-upgrade |
| Aggregator | pipelines/orderfilled/aggregator |
Daily Hugging Face Job on cpu-upgrade |
| Gamma Trade Aggregator | pipelines/gamma/aggregator |
Enriched market/event trade index |
| Dashboard | apps/dashboard |
Free Hugging Face Gradio Space |
The collector incrementally scans confirmed Polygon blocks and appends immutable V1/V2 Parquet shards to the public datasets. The aggregator streams those shards through DuckDB and writes compact daily and monthly metrics to the public Analytics Storage Bucket. The Dashboard reads only those aggregated files.
pipelines/onchain/collector is the next
collection pipeline. It scans all registered Polymarket event families once per
adaptive Polygon block window, then routes the returned logs to version-aware
decoders and immutable Dataset configurations. It independently covers V1/V2
OrderFilled events, CTF lifecycle events, ERC-1155 transfers, Neg Risk events,
collateral flows, and exchange audit events.
The existing production OrderFilled collector remains unchanged while the new collector runs against shadow outputs and an independent checkpoint.
.
├── apps/
│ └── dashboard/
├── docs/
├── pipelines/
│ ├── onchain/
│ │ └── collector/
│ ├── gamma/
│ │ ├── aggregator/
│ │ └── collector/
│ └── orderfilled/
│ ├── aggregator/
│ └── collector/
├── pyproject.toml
└── uv.lock
Future data families should be added under pipelines/<data-family>/ while
shared user-facing applications remain under apps/.
Install the complete workspace:
uv sync --all-packages --all-groupsRun the checks:
uv lock --check
uv run --all-packages --all-groups ruff check .
uv run --package polymarket-orderfilled-collector pytest pipelines/orderfilled/collector/tests
uv run --package polymarket-onchain-collector pytest pipelines/onchain/collector/tests
uv run --package polymarket-gamma-collector pytest pipelines/gamma/collector/tests
uv run --package polymarket-gamma-trade-aggregator pytest pipelines/gamma/aggregator/tests
uv run --package polymarket-orderfilled-aggregator pytest pipelines/orderfilled/aggregator/tests
uv run --package polymarket-analytics-dashboard pytest apps/dashboard/testsEach component keeps its own dependencies and documentation while sharing one Python version and one reproducible lockfile.
GitHub Actions independently publishes:
ghcr.io/wzsg/polymarket-analytics-orderfilled-collectorghcr.io/wzsg/polymarket-analytics-onchain-collectorghcr.io/wzsg/polymarket-analytics-gamma-collectorghcr.io/wzsg/polymarket-analytics-gamma-trade-aggregatorghcr.io/wzsg/polymarket-analytics-orderfilled-aggregator
Production Hugging Face Jobs use immutable full-commit SHA tags. Dashboard
changes are packaged from apps/dashboard and synchronized to the existing
Polymarket OrderFilled Analytics Space.
- Polymarket CLOB V1 OrderFilled Dataset
- Polymarket CLOB V2 OrderFilled Dataset
- OrderFilled Analytics Storage Bucket
- OrderFilled Analytics Dashboard
Licensed under the MIT License.