Been doing quant stuff on Polymarket for a while and kept running into the same problem. Every API call gives you raw dicts you immediately have to parse: numeric strings, Unix timestamps in milliseconds, nested token arrays. Wrote the same boilerplate over and over before deciding to fix it properly.
So I built a wrapper that just returns pd.DataFrame directly, types already coerced:
from polymarket_pandas import PolymarketPandas
client = PolymarketPandas()
markets = client.get_markets(closed=False, limit=500)
markets[["slug", "volume24hr", "endDate"]].sort_values("volume24hr", ascending=False)
volume24hr is float64. endDate is datetime64[UTC]. Nested token arrays are already unnested. Straight into .groupby(), .merge(), .resample().
Covers the full API: REST, WebSocket, async, CTF on-chain ops (split/merge/redeem), and an MCP server with 74 tools if you use Claude Code or Claude Desktop.
command
pip install polymarket-pandas
Repo: https://github.com/sigma-quantiphi/polymarket-pandas
If you're working with prediction market data in Python, would love to know what your current setup looks like and whether this solves the same pain points. Drop a comment or open an issue if something's missing or broken.
Top comments (0)