Skip to main content
Polymarket plans to launch new markets on its Protocol V2 contracts on November 9, 2026. See Polymarket Protocol V2 Migration for which datasets include V2 and what to do.

Overview

Goldsky provides high-performance data infrastructure for Polymarket, making it easy to extract, transform, and load on-chain data to power both application and analytics use cases via Turbo Pipelines (real-time data replication pipelines). To query Polymarket data over a REST API instead, with no pipeline or database to run, use the Prediction markets feeds. Polymarket is the world’s largest prediction market platform, enabling users to trade on the outcome of real-world events. Built on Polygon, Polymarket processes millions of trades and provides deep liquidity for markets spanning politics, sports, economics, and more.

Benefits

Goldsky’s Polymarket integration enables:
  • Real-time market monitoring: track order fills, matched orders, and position changes as they happen
  • Analytics and insights: build dashboards showing open interest, trading volume, and market trends
  • User position tracking: monitor individual user balances and positions with PnL data
  • Trading activity analysis: analyze granular order flow and market maker activity
  • Custom alerts: set up webhooks for specific market events or trading patterns

Getting started

To use Goldsky, you’ll need to create an account, install the CLI, and log in.
  1. Install the Goldsky CLI: For macOS/Linux:
    For Windows:
    Windows users need to have Node.js and npm installed first. Download from nodejs.org if not already installed.
  2. Log into your Project by running:
    This opens your browser to sign in (Google, GitHub, SSO, or email). Once you authenticate, the CLI is logged in automatically — there’s no API key to copy or paste.
    On a headless or remote machine (or in CI), create an API key on your Project Settings page and pass it directly with goldsky login --token <API_KEY>. Use goldsky login --no-browser to print the login URL instead of opening a browser.
  3. Now that you are logged in, run goldsky to get started:

Query Polymarket data with Feeds

The Feeds REST API serves Polymarket data from these datasets, so you can read it without deploying anything:
  • Activity: trade fills, splits, merges, and redeems, newest first.
  • Positions: a wallet’s positions, with average entry price and realized PnL.
  • Balances: the outcome tokens a wallet holds.
You need a Feeds API key, or you can pay per request with x402. Use a Turbo pipeline instead when you need the rows in your own database.

Turbo Pipelines

Turbo pipelines allow users to replicate data into their own infrastructure (any of the supported sinks) in real time. For a complete overview of how to deploy Turbo pipelines, including a video walkthrough, check the Quickstart guide.

Working with Polymarket datasets

Goldsky provides real-time streaming of Polymarket datasets, including all historical data. The following datasets are currently available: These datasets can be used as sources in your Turbo pipelines to stream Polymarket data to any of the supported sinks.

Dataset schemas

Deploying Polymarket pipelines

Turbo pipelines are defined using YAML configuration files and deployed via the Goldsky CLI. Here’s the workflow:
  1. Create a pipeline configuration file: define your sources, transforms, and sinks in a YAML file
  2. Validate your configuration: run goldsky turbo validate polymarket-pipeline.yaml to check for errors
  3. Deploy the pipeline: run goldsky turbo apply polymarket-pipeline.yaml to deploy
  4. Monitor your pipeline: use goldsky turbo logs polymarket-pipeline.yaml to view logs and goldsky turbo inspect polymarket-pipeline.yaml to see live data
For a complete walkthrough, see the Turbo Pipelines Quickstart.
Remember to first create a Secret in order for Turbo Pipelines to be able to write the data into the database of your choice. For webhook sinks, you can include authentication headers directly in the configuration.

Example pipeline configuration

Here’s an example configuration file for streaming Polymarket order fills to a webhook endpoint, using the v2 dataset and a block number range to backfill a specific period:
polymarket-orders-webhook.yaml
This pipeline:
  1. Streams Order Filled events from the v2 Polymarket dataset for a specific block range
  2. Filters for high-value orders (amount_usdc > 1000)
  3. Sends each order individually to your webhook endpoint with authentication
Deploy the pipeline by running:
Fast scan is supported on the v2 Polymarket datasets, so you can backfill a specific period using a block_number range filter as shown above. Filtering by timestamp is not supported for fast scan; use block_number instead.
Note: The datasets output large amounts of data. E.g. user positions may be up to 1.2B entities to backfill, and up to 150M entities monthly to maintain. For insights on costs for datasets, please refer to our pricing calculator.

Polymarket Protocol V2 Migration

Polymarket plans to launch new markets on its Protocol V2 contracts on November 9, 2026. Existing markets stay on the current contracts and keep working. Most Goldsky users don’t need to do anything. If you use polymarket.user_balances 2.0.0 and want to backfill, move to version 3.0.0. If you read Polymarket data with a Mirror pipeline, check its version against the tables below. Mirror pipelines on polymarket.order_filled 2.0.0 or polymarket.orders_matched 2.0.0 already get V2 data and don’t need to change. polymarket.user_positions 2.1.0 and 3.0.0 and polymarket.user_balances 3.0.0 run only on Turbo Pipelines. If you read an older version of polymarket.user_positions with a Mirror pipeline, you’ll need to move that pipeline to Turbo Pipelines. If you read polymarket.user_balances 2.0.0 with a Mirror pipeline, restart it to pick up V2, or move it to Turbo Pipelines on 3.0.0 to backfill. Message us and we’ll help.

What to do

Curated Datasets

Each dataset name in this table starts with polymarket., for example polymarket.order_filled. If you use an older version of any dataset in this table, move to the newest version listed here. Older versions won’t receive V2 data.

Feeds

Raw Datasets

V2 balances

polymarket.user_balances now includes both the current contract and the V2 PositionManager contract, 0x006F54F7f9A22e0000CC2AB60031000000ae9fEF. V2 balances start at block 87,620,369 (May 29, 2026), which has the first token transfer on the V2 PositionManager contract. To have every V2 balance, your pipeline needs the data from that block onward. We recommend moving to 3.0.0. It has the same columns as 2.0.0 and supports fast scan, so it can start at block 87,620,369 without reading earlier history. Change the version and add a block filter:
Each row is the latest balance for one wallet and token, so this rewrites the rows that changed since May 29 and leaves older rows in your table as they are. If you stay on 2.0.0 and only need V2 balances from now on, restart your pipeline. A restart picks up V2 and resumes from your last checkpoint, so it won’t load V2 balances that changed before the restart.

Position IDs in V2 markets

In V2 markets, the asset column (trades) and the token_id column (positions and balances) hold a V2 position ID. A V2 position ID isn’t a CTF token ID, so it won’t match an ID you calculated from a CTF condition ID. If you map these IDs to markets yourself, get the V2 position IDs from Polymarket’s API. To tell the two kinds of ID apart, read the top 8 bits of the ID. In a V2 position ID they give the market type: 1 = binary, 2 = neg-risk, 3 = combinatorial. Polymarket’s migration guide has the details.

V2 contracts in raw Polygon data

If your pipeline reads matic.raw_logs and filters on Polymarket contract addresses, add the V2 contracts to the filter. The two main ones are:
  • Exchange: 0xe3333700cA9d93003F00f0F71f8515005F6c00Aa
  • PositionManager: 0x006F54F7f9A22e0000CC2AB60031000000ae9fEF
In V2, the market modules emit split, merge and redeem events. The CTF contract doesn’t. Polymarket lists every V2 contract in its V2 repository.

Getting support

Can’t find what you’re looking for? Reach out to us at support@goldsky.com for help.