Polymarket

Overview

Polymarket is a decentralized prediction market built on the Polygon blockchain where users trade shares in the outcomes of events. Each market has a binary outcome (e.g., "Team A wins the World Cup: Yes/No") priced between $0 and $1, reflecting the crowd's collective probability estimate. Polymarket has grown to become the largest prediction market by volume, offering markets across sports, politics, crypto, and world events.

The platform provides a public REST API for reading market data — current prices, volumes, liquidity, and historical price history. There is no official cost to access public market data via the API. Trading requires cryptocurrency (USDC on Polygon), but researchers can extract probability information without trading.

Key Concepts

  • Market: A question about a future event with a binary or categorical outcome
  • Share price: Probability of outcome (0.60 = 60% implied probability, $0.60 price)
  • Volume: Total amount traded — indicates market activity and confidence
  • Settlement: Markets resolve based on documented rules; prices pay out $1.00 if correct, $0.00 if wrong

API Overview

Public REST API at https://gamma-api.polymarket.com. No API key required for public read access.

Endpoint Purpose
GET /markets List active markets with prices, volumes, categories
GET /markets/{id} Single market detail including price history
GET /prices Current prices for all active markets

Python Integration

import requests
import json

url = "https://gamma-api.polymarket.com/markets"
params = {"category": "sports", "closed": "false", "limit": 50}
response = requests.get(url, params=params)
markets = response.json()

for m in markets:
    question = m["question"]
    outcome_prices = json.loads(m["outcomePrices"])
    print(f"{question}: {outcome_prices}")
    print(f"  Volume: ${float(m['volume']):,.0f}")
    print(f"  Liquidity: ${float(m['liquidity']):,.0f}")

def market_clv(model_prob, market_price):
    """Compare model probability to Polymarket implied probability."""
    return model_prob - float(market_price)

Notes

  • Polymarket prices reflect real-money trading — more credible than survey polls
  • Market liquidity varies widely; high-volume markets (World Cup winner) are very efficient; low-volume markets can be mispriced
  • Prices include the platform fee (spread built into the AMM); true probabilities are slightly different
  • Good for cross-validation: if the model strongly disagrees with Polymarket on a high-liquidity market, either the model or the market may be wrong
  • No historical data endpoint directly — price history can be scraped via third-party data aggregators