
Querying Polymarket with Pandas in 5 lines
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/sig
Continue reading on Dev.to
Opens in a new tab


