Tools/nahrek/polyledger

polyledger

Resumable Polymarket indexer: CLOB market metadata plus on-chain trades from Polygon, in one DuckDB file you can query with SQL

620nascentPythonMIT Licensenew this week

The Lens

By Erik Loyd, SaaS CEO and former COO/CFO of an AWS Premier Partner.

Updated Sep 2026

PolyLedger pulls Polymarket's whole trade history into one file you can query with SQL. It hits the CLOB API for market and token metadata, streams OrderFilled events off Polygon, joins them, and writes it all into a single DuckDB database. Markets, tokens, raw fills, and a joined trades view, exportable to Parquet.

The design choice worth noting is Envio HyperSync instead of a normal RPC node. No Alchemy or Infura key, no rate limit babysitting, and a free HyperSync token covers it. Python 3.11 or newer, pip install from a clone. It checkpoints as it goes, so an interrupted index resumes instead of restarting, and it indexes both the V1 and V2 exchange contracts so history does not stop at the contract migration.

Anyone doing prediction market analytics, backtests, or research gets a working dataset in an afternoon instead of writing an indexer. MIT, no paid tier, nothing to host.

The catch is that a free tier on somebody else's API is still a dependency. If HyperSync changes its limits or pricing, your pipeline changes with it, and there is no fallback path to a plain RPC node. Budget disk space too. Every fill on an active venue is not a small file.

Free vs Self-Hosted vs Paid

fully free

Free tier: The indexer is MIT and complete. Market metadata, both contract generations of fills, the joined trades view, checkpointing, and Parquet export are all in the repository.

Self-hosted: This is the only mode, and it is light. Python 3.11 or newer, a clone, and a pip install. Output is a single DuckDB file on local disk, so there is no database server to run. The real resources are disk for the index and time for the initial backfill.

Paid: Nothing from the project. It does require an Envio HyperSync API token, and the free tier is explicitly sufficient for this workload. Envio sells higher tiers if you index far more aggressively, but a normal Polymarket backfill does not get you there.

Free end to end, including the data source. Your only real budget line is disk.

What to do by team size

Solo
free
Small team
free
Medium team
free; get your own HyperSync token per environment
Large team
free; watch the HyperSync free tier limits if several people index in parallel
Self-hosting ops:trivial

Get tools like this every Wednesday

One featured tool, three on the radar. No fluff.

Score
64/100 · B
Adoption9/30
Maintenance25/25
Community5/20
License15/15
Analysis10/10

A low score is not a verdict on quality. Young and niche tools start low by design. How we calculate scores

License: MIT License

Use freely, including commercial. Just keep the license.

Commercial use: ✓ Yes

About

Owner
Joe (User)
Stars
620
Forks
109

Explore Further

More tools in the directory