Quant / Trading2 min read

Building on a prediction market: notes on the Polymarket API

Practical notes from wiring a paper bot to Polymarket — the Gamma search constraint, the CLOB price-history interval, and why prediction markets are an under-covered niche to build in.

#polymarket#prediction-markets#api#paper-trading
Prediction-market API constraints, illustrated (a concept diagram, not a chart).
The two constraints that cost me time, at a glance.

Paper-only experiment. Any performance figures are generalized; the diagram is conceptual; any real price chart would come from the CLOB API, never fabricated.

Prediction markets are a strangely under-covered thing to build against. Here are the practical notes I wish I'd had when I wired a paper bot to Polymarket.

Two API constraints that cost me time

  • Gamma search needs the tag. Searching Gamma for crypto markets requires the tag_slug=crypto filter — without it you don't get the market set you expect. The filter isn't optional flavor; it's how you scope the query correctly.
  • CLOB price history is hourly. The CLOB prices-history endpoint is what you want for a price series, at interval=1h. Knowing the available granularity up front saves you from designing around data you can't get.

Together those two are most of the "why isn't this returning what I expect" friction when you first integrate.

The structure

There's an umbrella project around the market integration, with the bot logic and a dashboard for current state. Keeping the dashboard separate from the trading logic means I can read what the bot is doing without touching what it does.

Market price history from the CLOB API (interval=1h) The two constraints that cost me time, at a glance.

The honest part

The reason prediction markets are worth a build log is that so few people write about the actual integration — most coverage is about betting, not building. The edge for a developer isn't a secret strategy; it's that the plumbing is under-documented, so the practical notes (the tag filter, the hourly interval, how to scope a market query) are genuinely scarce. As always here: it's paper, the methodology gates from the other posts apply, and any number I show comes from the API, not from optimism.

Related