Skip to main content

SupaGamma for Developers

What is SupaGamma?

SupaGamma is a historical data platform for Polymarket prediction markets. We continuously archive orderbook snapshots (every 60 seconds across 1,000+ markets) and on-chain trade history (every fill from the Polygon blockchain). Access it all through a simple REST API.

Available Data

  • Orderbook Snapshots — Full depth-of-book at every price level. Captured every 60 seconds.
  • Trade History — Every on-chain fill from the CTF Exchange. Includes price, size, side, maker, taker.
  • OHLCV Candles — Pre-aggregated candlestick data in 1m, 5m, 15m, 1h, 4h, and 1d timeframes.
  • Market Metadata — Questions, outcomes, status, and resolution data for all markets.

Getting Started

  1. Sign up at supagamma.com/signup
  2. Create an API key in your dashboard
  3. Make requests with your key in the X-API-Key header

Pricing

Your first 1 MB of data is free. After that, it's $0.45 per MB — pay-as-you-go with no subscriptions or commitments.

API Overview

Base URL: https://api-production-0929c.up.railway.app/v1

MethodEndpointDescription
GET/marketsList prediction markets
GET/tradesQuery trade history
GET/trades/ohlcvOHLCV candlestick data
GET/download/tradesDownload trades as CSV/Parquet/JSON
GET/download/ohlcvDownload OHLCV as CSV/Parquet/JSON

Example: Python

import requests

API_KEY = "sg_live_your_key_here"
BASE = "https://api-production-0929c.up.railway.app/v1"

# List active markets
markets = requests.get(
    f"{BASE}/markets",
    headers={"X-API-Key": API_KEY},
    params={"active": True, "limit": 10}
).json()

# Get OHLCV candles for a market
ohlcv = requests.get(
    f"{BASE}/trades/ohlcv",
    headers={"X-API-Key": API_KEY},
    params={"market_id": "MARKET_ID", "timeframe": "1h"}
).json()

# Download trades as CSV
resp = requests.get(
    f"{BASE}/download/trades",
    headers={"X-API-Key": API_KEY},
    params={"market_id": "MARKET_ID", "format": "csv"}
)
with open("trades.csv", "wb") as f:
    f.write(resp.content)

Example: curl

# List markets
curl -H "X-API-Key: sg_live_your_key_here" \
  "https://api-production-0929c.up.railway.app/v1/markets?limit=10"

# Get OHLCV data
curl -H "X-API-Key: sg_live_your_key_here" \
  "https://api-production-0929c.up.railway.app/v1/trades/ohlcv?market_id=MARKET_ID&timeframe=1h"

Resources