<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lucas Jamar</title>
    <description>The latest articles on DEV Community by Lucas Jamar (@lucas_jamar_a95f9f9ade44c).</description>
    <link>https://dev.to/lucas_jamar_a95f9f9ade44c</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3871405%2Ffe42f7ad-5df0-4ac8-8bb7-42449a067fb3.png</url>
      <title>DEV Community: Lucas Jamar</title>
      <link>https://dev.to/lucas_jamar_a95f9f9ade44c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lucas_jamar_a95f9f9ade44c"/>
    <language>en</language>
    <item>
      <title>Querying Polymarket with Pandas in 5 lines</title>
      <dc:creator>Lucas Jamar</dc:creator>
      <pubDate>Fri, 10 Apr 2026 09:34:02 +0000</pubDate>
      <link>https://dev.to/lucas_jamar_a95f9f9ade44c/querying-polymarket-with-pandas-in-5-lines-2jcn</link>
      <guid>https://dev.to/lucas_jamar_a95f9f9ade44c/querying-polymarket-with-pandas-in-5-lines-2jcn</guid>
      <description>&lt;p&gt;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.&lt;br&gt;
So I built a wrapper that just returns pd.DataFrame directly, types already coerced:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;polymarket_pandas&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;PolymarketPandas&lt;/span&gt;
&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;PolymarketPandas&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;markets&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_markets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;closed&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;markets&lt;/span&gt;&lt;span class="p"&gt;[[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;slug&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;volume24hr&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;endDate&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]].&lt;/span&gt;&lt;span class="nf"&gt;sort_values&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;volume24hr&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ascending&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;volume24hr is float64. endDate is datetime64[UTC]. Nested token arrays are already unnested. Straight into .groupby(), .merge(), .resample().&lt;br&gt;
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.&lt;/p&gt;

&lt;p&gt;command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;polymarket-pandas
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/sigma-quantiphi/polymarket-pandas" rel="noopener noreferrer"&gt;https://github.com/sigma-quantiphi/polymarket-pandas&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

</description>
      <category>python</category>
      <category>pandas</category>
      <category>datascience</category>
      <category>websockets</category>
    </item>
  </channel>
</rss>
