<?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: ekocam</title>
    <description>The latest articles on DEV Community by ekocam (@ekocam).</description>
    <link>https://dev.to/ekocam</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4009663%2Fcdbac57b-3cf5-408c-826b-309cd0dadd79.jpg</url>
      <title>DEV Community: ekocam</title>
      <link>https://dev.to/ekocam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ekocam"/>
    <language>en</language>
    <item>
      <title>A REST API for Polymarket Whale Data: A Developer Guide</title>
      <dc:creator>ekocam</dc:creator>
      <pubDate>Sun, 19 Jul 2026 12:34:32 +0000</pubDate>
      <link>https://dev.to/ekocam/a-rest-api-for-polymarket-whale-data-a-developer-guide-3obi</link>
      <guid>https://dev.to/ekocam/a-rest-api-for-polymarket-whale-data-a-developer-guide-3obi</guid>
      <description>&lt;p&gt;If you want Polymarket whale data in your own code, a dashboard, a trading model, or an AI agent, you need an API, not a website. Here is what the OrcaLayer REST API exposes and how to start.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do developers access a Polymarket REST API?
&lt;/h2&gt;

&lt;p&gt;Through the OrcaLayer API. It is a plain REST API over the same index the site runs on: over 1.2 billion trades read directly from the Polygon chain, farmer-filtered. Full access is on the Premium tier (19.99 dollars a month) at 600 requests per minute. Some read endpoints, wallet profiles, market search and the leaderboard, need no key at all, so you can prototype before paying anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quickstart
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Sign up and upgrade to Premium.&lt;/li&gt;
&lt;li&gt;Go to Settings, API Keys, and generate a key. It uses the &lt;code&gt;sk_orca_&lt;/code&gt; prefix and is shown once.&lt;/li&gt;
&lt;li&gt;Call the API:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer sk_orca_XXXXXX"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="s2"&gt;"https://orcalayer.com/api/public/v1/whales/leaderboard?limit=10"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Authentication works either as a Bearer token in the &lt;code&gt;Authorization&lt;/code&gt; header or as an &lt;code&gt;x-api-key&lt;/code&gt; header. Premium endpoints under &lt;code&gt;/api/v2&lt;/code&gt; expect &lt;code&gt;x-api-key&lt;/code&gt; specifically. A missing or invalid key returns 401, a non-Premium plan on a Premium endpoint returns 403, and passing the rate limit returns 429 with a &lt;code&gt;Retry-After&lt;/code&gt; header.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the API exposes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Whale leaderboards, farmer-filtered, with win rate, profit and profit factor&lt;/li&gt;
&lt;li&gt;Individual wallet profiles and full trade histories&lt;/li&gt;
&lt;li&gt;Recent whale trades and whale position flips&lt;/li&gt;
&lt;li&gt;Per-market whale activity&lt;/li&gt;
&lt;li&gt;Whale alerts data, the same stream that powers the alerts feed&lt;/li&gt;
&lt;li&gt;ISW Ukraine territory data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The numbers match what the site shows, because it is the same index and the same published methodology, including the farmer filter and NegRisk correction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Clients and tooling
&lt;/h2&gt;

&lt;p&gt;You do not have to start from raw REST:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python SDK: &lt;code&gt;pip install orcalayer&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;MCP server for AI agents: &lt;code&gt;uvx orcalayer-mcp&lt;/code&gt;, so Claude or any MCP-capable agent can query whale data directly&lt;/li&gt;
&lt;li&gt;Claude Code agent skill for terminal workflows&lt;/li&gt;
&lt;li&gt;A whale watchlist monitor and a backtest cookbook as ready-made starting points&lt;/li&gt;
&lt;li&gt;OpenAPI spec at &lt;code&gt;https://orcalayer.com/api/openapi.json&lt;/code&gt; for generating typed clients in any language&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of them are linked from the API docs at &lt;a href="https://orcalayer.com/docs/api" rel="noopener noreferrer"&gt;orcalayer.com/docs/api&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to build on it
&lt;/h2&gt;

&lt;p&gt;At 600 requests per minute you can poll a watchlist of wallets every few seconds and drive your own alerting, mirror the leaderboard into your own database, backtest wallet-following strategies against real resolved markets, or feed an AI agent live whale context through MCP.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is there a REST API for Polymarket whale analytics?&lt;/strong&gt;&lt;br&gt;
Yes. The OrcaLayer REST API serves whale leaderboards, wallet profiles and trades, whale alerts, market whale activity and ISW territory data over plain REST. Full access is on the Premium tier at 600 requests per minute; some read endpoints such as wallet profiles, market search and the leaderboard need no key at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I authenticate?&lt;/strong&gt;&lt;br&gt;
Generate a key in Settings, API Keys, then send it as a Bearer token in the &lt;code&gt;Authorization&lt;/code&gt; header or as an &lt;code&gt;x-api-key&lt;/code&gt; header. Keys use the &lt;code&gt;sk_orca_&lt;/code&gt; prefix and are shown only once at creation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is there a Python SDK?&lt;/strong&gt;&lt;br&gt;
Yes, &lt;code&gt;pip install orcalayer&lt;/code&gt;. There is also an MCP server for AI agents (&lt;code&gt;uvx orcalayer-mcp&lt;/code&gt;), a Claude Code agent skill, a whale watchlist monitor and a backtest cookbook.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are the rate limits?&lt;/strong&gt;&lt;br&gt;
Premium runs at 600 requests per minute. Exceeding the limit returns HTTP 429 with a &lt;code&gt;Retry-After&lt;/code&gt; header.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://orcalayer.com/blog/polymarket-rest-api-developers" rel="noopener noreferrer"&gt;orcalayer.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>python</category>
      <category>crypto</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Most "top traders" on Polymarket are farming win rate. I backtested it.</title>
      <dc:creator>ekocam</dc:creator>
      <pubDate>Tue, 30 Jun 2026 13:42:21 +0000</pubDate>
      <link>https://dev.to/ekocam/most-top-traders-on-polymarket-are-farming-win-rate-i-backtested-it-1b8j</link>
      <guid>https://dev.to/ekocam/most-top-traders-on-polymarket-are-farming-win-rate-i-backtested-it-1b8j</guid>
      <description>&lt;p&gt;If you've looked at a "top traders" leaderboard on Polymarket and thought about copy-trading the top wallets, I have some bad news: a lot of those flawless 95%+ win-rate records are farmed, not earned. I pulled the on-chain data and backtested it, and the raw leaderboard turns out to be a pretty bad signal to copy. Here's the breakdown, with reproducible notebooks at the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  The farming trick
&lt;/h2&gt;

&lt;p&gt;It's simple. You only ever buy outcomes that are already basically decided, priced around 95-99c.&lt;/p&gt;

&lt;p&gt;Think of a market like "Will X happen?" sitting at 99c the day before it resolves. You put up 99c to make 1c. You win almost every time. Do this across enough near-decided markets and you end up with a 95%+ win rate and a clean, green, very impressive-looking record.&lt;/p&gt;

&lt;p&gt;But the edge is basically zero, and more importantly for a copy-trader: it's &lt;strong&gt;unfollowable&lt;/strong&gt;. You can't get filled at 99c at any real size, and you're risking 99 to make 1. The win rate is real in the data and useless in practice.&lt;/p&gt;

&lt;p&gt;Raw P&amp;amp;L and win-rate leaderboards reward exactly this behavior. So the wallets that look best are often the ones you least want to copy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measuring it properly
&lt;/h2&gt;

&lt;p&gt;A few things matter when you compute this from raw on-chain data, or the numbers come out wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NegRisk consolidation.&lt;/strong&gt; Polymarket's multi-outcome markets settle through a NegRisk adapter. If you don't consolidate the legs, you double-count and P&amp;amp;L inflates. (The public data API's &lt;code&gt;cashPnl&lt;/code&gt; has this problem - I don't use it as cost-basis truth.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FIFO cost basis, per wallet per market.&lt;/strong&gt; Matching sells against buys in order, not averaging blindly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Win rate per resolved market, not per trade.&lt;/strong&gt; A wallet that makes 40 trades in one market that resolves in its favor didn't win 40 times.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With that in place, I split the leaderboard into two cohorts to copy:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Raw top 8&lt;/strong&gt; by cumulative P&amp;amp;L (farmers included).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filtered top 8&lt;/strong&gt; - same board with farmers and hedgers removed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then I backtested copying each one as an equal-weight equity curve across resolved markets.&lt;/p&gt;

&lt;h2&gt;
  
  
  The result
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgpm7b2dlxux0s0fr8s8j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgpm7b2dlxux0s0fr8s8j.png" alt=" " width="799" height="381"&gt;&lt;/a&gt;&lt;br&gt;
Honest read: for most of the window the two curves basically track each other. The filtered cohort only pulls ahead near the end, and not by a huge margin (~33M vs ~27M in this run). I'm not going to oversell "filtering wins on P&amp;amp;L" - that gap is small and probably sample-dependent. Both curves are lumpy too; a few big resolutions carry most of the move, which is kind of the point - these are near-decided markets resolving.&lt;/p&gt;

&lt;p&gt;What I'd actually stand behind: &lt;strong&gt;the raw leaderboard is built on those unfollowable ~99c fills, so copying it is a bad idea regardless of the cumulative number.&lt;/strong&gt; The win rate on those boards is mostly noise. If you're building a copy-trading strategy, "who has the highest win rate" is close to the worst possible wallet-selection signal.&lt;/p&gt;

&lt;p&gt;Small sample (8 per cohort), so take the exact numbers with a grain of salt. The interesting part isn't the dollar figure, it's the mechanism.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproduce it
&lt;/h2&gt;

&lt;p&gt;The notebooks are open source (MIT) so you can re-run this on a different set of wallets or a different time window and check whether the filtered edge holds out of sample - genuinely curious if it does:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/orcalayer/polymarket-backtest-cookbook" rel="noopener noreferrer"&gt;github.com/orcalayer/polymarket-backtest-cookbook&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Three notebooks: follow one wallet's resolved bets as an equity curve, follow a smart-money cohort by category, and the raw-vs-filtered comparison above.&lt;/p&gt;

&lt;p&gt;The data comes from OrcaLayer, which is a data layer I build over Polymarket (every trade read straight from the Polygon chain, then classified - farmer filtering, NegRisk-correct win rates, FIFO P&amp;amp;L). The leaderboard endpoint is keyless so the notebooks run free; per-wallet backtests use an API key.&lt;/p&gt;

&lt;p&gt;If you go deeper into prediction-market data, I'd love feedback on the methodology - especially the NegRisk and FIFO handling, which is where most of the subtlety lives.&lt;/p&gt;

</description>
      <category>python</category>
      <category>datascience</category>
      <category>api</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
