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?
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.
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.
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.
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.
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.
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:
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
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:
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).