The Web Scraping Club

The Web Scraping Club

THE LAB #102: How Fast Can You Call Polymarket's APIs?

Three languages, four locations, 1,000 requests. The biggest speed gain has nothing to do with code.

Pierluigi Vinciguerra's avatar
Pierluigi Vinciguerra
Apr 16, 2026
∙ Paid

There is a platform name that has been bouncing in the news for over a year now. A new military action? Someone predicted it on Polymarket. An event that moves the price of oil or shakes a currency? Someone else, or maybe the same person, placed a bet a few hours before and walked away with a pile of money. Every time a headline breaks, Polymarket seems to have already priced it in, or worse, someone appears to have known in advance.
Even here on Substack, you can share the predictions coming from the platform.


But what is Polymarket, and how does it work?

Before proceeding, let me thank NetNut, the platinum partner of the month. They have prepared a juicy offer for you: up to 1 TB of web unblocker for free.

Claim your offer


What Polymarket is, and why it keeps making headlines

Polymarket is a prediction market, a platform where you buy and sell shares tied to the outcome of real-world events. If the event happens, your share pays $1. If it doesn’t, it pays $0. The trading price at any moment reflects what the market collectively believes the probability of that outcome is. You can bet on elections, geopolitics, sports, crypto prices, and increasingly anything else with a verifiable resolution.

It is the largest prediction market by volume, built on the Polygon blockchain. Its main competitor, Kalshi, operates as a CFTC-regulated exchange in the US. Both are attracting billions in volume, and Wall Street firms are now building dedicated trading desks around them.


For your scraping needs, having a reliable proxy provider like Decodo on your side improves the chances of success.

Try Decodo Now


The platform handled at least $7.5 billion in volume during 2025 (a conservative figure, since Polymarket volume is commonly double-counted due to how OrderFilled events are summed, and set a single-day record of $425 million in February 2026 when Iran-related markets resolved simultaneously. Those are not toy numbers. And with that kind of money flowing through, the headlines have followed.

In January 2026, a newly created Polymarket account invested $30,000 and walked away with $436,759 after correctly betting on Maduro’s removal from power. The account was created less than a week before the U.S. military operation, and the bulk of bids were placed hours before Trump’s announcement. In a separate case, an Israeli Air Force reservist was indicted for leaking classified details about a strike on Iran to guide Polymarket bets, netting roughly $244,000. A different trader has made nearly $1 million since 2024 from dozens of well-timed bets correctly predicting U.S. and Israeli military actions against Iran, winning 93% of five-figure wagers. These incidents triggered at least eight prediction market bills in Congress since January 2026, and federal prosecutors in Manhattan are actively exploring whether certain prediction market bets violate insider trading laws.

But insider trading is not the only way people make money on Polymarket. There is a quieter, more interesting story happening in parallel.


Start your scraping journey with Byteful: 10GB New Customer Trial | Use TWSC for 15% OFF | $1.75/GB Residential Data | ISP Proxies in 15+ Countries

Claim your 10GB here



The efficiency gap

The Efficient Market Hypothesis, formalized by Eugene Fama in the 1960s, states that asset prices reflect all available information, making it impossible to consistently beat the market. In traditional equity markets, this largely holds because massive institutional capital from hedge funds, pension funds, and proprietary trading firms constantly hunts for and eliminates mispricings. The S&P 500 trades roughly $500 billion daily. Any pricing error gets corrected in milliseconds by algorithms running in colocated data centers.

Polymarket’s individual markets often have only tens of thousands of dollars in liquidity. The ratio of “smart money” to “total market cap” is fundamentally different from equity markets, and that is why edges persist longer than they would on Wall Street. A 2025 study by IMDEA Networks Institute documented $40 million in arbitrage profits extracted from Polymarket alone between April 2024 and April 2025, analyzing 86 million bets. Arbitrage opportunities on the platform last an average of 4 seconds, with 73% of profits captured by bots, executing in under 100 milliseconds.

The institutional side is catching up. DRW is hiring dedicated prediction market traders at a $200,000 base salary. Susquehanna International Group became the first official market maker on Kalshi (a competing platform). Jump Trading is building specialized desks. But the market is not there yet. Liquidity is too thin for these firms to deploy serious capital without moving prices, leaving room for smaller, faster actors.


Check the TWSC YouTube Channel


Speed as edge: what people are building

I’ve been studying Polymarket for some months now, and I’ve probably ended up on a bubble on Instagram and other social media. I’m seeing a growing number of traders share systems designed to exploit exactly this kind of market inefficiency. The approaches vary, but the pattern is the same: faster information, faster execution, profit.

One notable case involves a trader who claims to use computer vision models processing live football match video feeds. His system watches the match in real time, detects events (goals, red cards, penalties) through frame analysis, and places bets on prediction markets seconds before the event registers on official data feeds and bookmaker odds adjust. He claims an 8-second advantage over other traders (unfortunately, I cannot find the post on Instagram about it anymore). Whether that specific claim holds up or not, this is nothing new: courtsiders have been doing this in tennis for years, attending live matches and transmitting scores faster than official data feeds reach bookmakers. In 2016, tennis umpires from Kazakhstan, Turkey, and Ukraine were banned for deliberately delaying score updates for courtside accomplices.

The same principle applies at a larger scale. Bill Benter built a multinomial logit model with over 120 variables per horse for Hong Kong racing and extracted over $1 billion between 1987 and 2001. Tony Bloom’s Starlizard syndicate employs 160 people to model Asian handicap football markets and reportedly generates 600 million GBP per year. On Polymarket itself, 14 of the top 20 most profitable wallets are bots. One bot turned $313 into $414,000 in a single month, exploiting temporal arbitrage in 15-minute crypto markets.

All of these systems share two requirements: data and speed. They need real-time access to market prices, order books, and event outcomes, and they need to act on that data faster than everyone else. All of this is possible because Polymarket provides a full set of APIs that can be used to operate programmatically on the platform.


Need help with your scraping project?


Polymarket’s API architecture

Polymarket exposes three distinct APIs, each serving a different purpose. Understanding which one to use and when is the first step toward building anything that trades or monitors this market.

Gamma API: market discovery

The Gamma API is the browsing layer. It returns human-readable market data: questions, descriptions, outcome prices, volume, liquidity, event metadata. No authentication required.

Base URL: https://gamma-api.polymarket.com

Key endpoints:

- GET /markets returns a paginated list of markets with filtering options (limit, offset, closed, tag_id)

- GET /markets/{id} returns a single market by ID or slug

- GET /events and GET /events/{id} return event-level data (events group related markets)

- GET /search?query=... performs keyword search across markets and events

A single call to /markets?limit=1&closed=false returns something like this:

{
  "id": "540816",
  "question": "Russia-Ukraine Ceasefire before GTA VI?",
  "conditionId": "0x9c1a953fe92c8357f1b646ba25d983aa83e90c525992db14fb726fa895cb5763",
  "outcomes": "[\"Yes\", \"No\"]",
  "outcomePrices": "[\"0.545\", \"0.455\"]",
  "volume": "1516211.89",
  "liquidity": "62104.61",
  "clobTokenIds": "[\"850149715...\", \"252731249...\"]"
}

The `clobTokenIds` field is the bridge to the trading layer. Each outcome (Yes/No) gets its own token ID, which is what you pass to the CLOB API to get real-time prices and order book data.

The Gamma API is rate-limited at roughly 60 requests per minute. It is useful for discovery and metadata, not for real-time price monitoring.

CLOB API: the order book

The CLOB (Central Limit Order Book) API is where trading happens. It has both public and authenticated endpoints.

Base URL: https://clob.polymarket.com

Public endpoints (no authentication):

- GET /price?token_id=X&side=BUY|SELL returns the current best price

- GET /midpoint?token_id=X returns the midpoint between best bid and ask

- GET /spread?token_id=X returns the current spread

- GET /book?token_id=X returns the full order book with all bids and asks

- GET /last-trade-price?token_id=X returns the last executed trade price

- GET /tick-size?token_id=X returns the minimum price increment

A call to /midpoint returns a minimal payload:

{"mid": "0.545"}

The /book endpoint returns the full depth:

{
  "market": "0x9c1a95...",
  "asset_id": "850149715...",
  "bids": [
    {"price": "0.54", "size": "15234.50"},
    {"price": "0.53", "size": "8920.00"}
  ],
  "asks": [
    {"price": "0.55", "size": "12100.00"},
    {"price": "0.56", "size": "6500.00"}
  ]
}

These public endpoints are what matters for price monitoring. They are lightweight, return small payloads, and have no authentication overhead.

Authenticated endpoints require a two-level authentication system:

Level 1 (L1) uses EIP-712 wallet signatures. You sign a structured message proving you control a specific Ethereum wallet address. This is a one-time operation that generates API credentials:

POST /auth/api-key
Headers: POLY_ADDRESS, POLY_SIGNATURE, POLY_TIMESTAMP, POLY_NONCE
Returns: { apiKey, secret, passphrase }

Level 2 (L2) uses HMAC-SHA256 signing on every request. Every authenticated call requires five headers: POLY_ADDRESS, POLY_SIGNATURE (computed HMAC of the request), POLY_TIMESTAMP, POLY_API_KEY, and POLY_PASSPHRASE.

Even with L2 auth, placing an order requires the user to sign the order payload locally with their private key. Three cryptographic operations total: key derivation (once), request signing (per call), order signing (per order).

The authenticated endpoints are:

- POST /order places a single order

- POST /orders places a batch of orders

- DELETE /order cancels an order

WebSocket feeds provide real-time streaming at wss://ws-subscriptions-clob.polymarket.com/ws/ for order book updates, price changes, and user-specific events.

Data API: analytics

The Data API at https://data-api.polymarket.com provides analytics-oriented data: user positions, trade history, leaderboards, and holder information. It is less documented and less stable than the other two. Some endpoints returned 404 or empty responses during our testing. Useful for research, not reliable for production.

The speed game: calling the APIs as fast as possible

If arbitrage opportunities on Polymarket last 4 seconds on average, and 73% of profits go to bots executing in under 100 milliseconds, then the speed at which you can read prices and place orders is a direct competitive advantage. We set up a benchmark to answer two questions: where should you run your code, and which language and HTTP strategy gets you there fastest?

We did our tests and chose the /midpoint endpoint for the benchmark because it requires no authentication, returns the smallest possible payload, and isolates HTTP client performance from payload parsing. Each benchmark runs 1,000 requests in two modes: sequential (one request at a time, measuring per-request latency) and concurrent (50 simultaneous workers, measuring throughput).

As always, the code can be found in our GitHub repository reserved to paying users, inside the folder 102.POLYMARKET.

User's avatar

Continue reading this post for free, courtesy of Pierluigi Vinciguerra.

Or purchase a paid subscription.
© 2026 The Web Scraping Club SRL · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture