Documentation Index
Fetch the complete documentation index at: https://docs.predictiondata.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Individual trade executions captured from Polymarket’s websocket feed. Each row represents a single trade.
Columns
Column | Type | Description |
|---|
exchange_timestamp | integer | Exchange timestamp in milliseconds |
local_timestamp | integer | Local capture timestamp in milliseconds (UTC) |
side | string | Trade side: BUY or SELL |
size | decimal | Number of contracts traded |
price | decimal | Execution price |
Fetching Data
Using Market Slug + Outcome
import requests
def download_trades(market_slug, outcome, date_str, api_key):
url = f"https://datasets.predictiondata.dev/polymarket/trades/{market_slug}/{outcome}/{date_str}.csv.gz"
params = {'slug': 'true', 'apikey': api_key}
response = requests.get(url, params=params)
response.raise_for_status()
with open(f'{market_slug}_{outcome}_{date_str}_trades.csv.gz', 'wb') as f:
f.write(response.content)
print(f"Downloaded to {market_slug}_{outcome}_{date_str}_trades.csv.gz")
if __name__ == "__main__":
api_key = "YOUR_API_KEY"
market_slug = "ramp-ipo-in-2025"
outcome = "YES"
date_str = "2025-11-16"
download_trades(market_slug, outcome, date_str, api_key)
Using Token ID
import requests
def download_trades_by_token(token_id, date_str, api_key):
url = f"https://datasets.predictiondata.dev/polymarket/trades/{token_id}/{date_str}.csv.gz"
params = {'apikey': api_key}
response = requests.get(url, params=params)
response.raise_for_status()
with open(f'{token_id}_{date_str}_trades.csv.gz', 'wb') as f:
f.write(response.content)
print(f"Downloaded to {token_id}_{date_str}_trades.csv.gz")
if __name__ == "__main__":
api_key = "YOUR_API_KEY"
token_id = "6535996220481600525438454491949371553057652243233032166205012948847090204871"
date_str = "2025-11-16"
download_trades_by_token(token_id, date_str, api_key)
Notes
- Files are gzip compressed
- Date format:
YYYY-MM-DD
- Trades are deduplicated across multiple websockets
- Side is from the taker’s perspective