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.Install Goldsky's CLI and log in
Install Goldsky's CLI and log in
-
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.
-
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>. Usegoldsky login --no-browserto print the login URL instead of opening a browser. -
Now that you are logged in, run
goldskyto 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.
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
polymarket.order_filled
polymarket.order_filled
polymarket.orders_matched
polymarket.orders_matched
polymarket.user_balances
polymarket.user_balances
polymarket.user_positions
polymarket.user_positions
Deploying Polymarket pipelines
Turbo pipelines are defined using YAML configuration files and deployed via the Goldsky CLI. Here’s the workflow:- Create a pipeline configuration file: define your sources, transforms, and sinks in a YAML file
- Validate your configuration: run
goldsky turbo validate polymarket-pipeline.yamlto check for errors - Deploy the pipeline: run
goldsky turbo apply polymarket-pipeline.yamlto deploy - Monitor your pipeline: use
goldsky turbo logs polymarket-pipeline.yamlto view logs andgoldsky turbo inspect polymarket-pipeline.yamlto see live data
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
- Streams Order Filled events from the v2 Polymarket dataset for a specific block range
- Filters for high-value orders (amount_usdc > 1000)
- Sends each order individually to your webhook endpoint with authentication
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.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 usepolymarket.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 withpolymarket., 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:
Position IDs in V2 markets
In V2 markets, theasset 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 readsmatic.raw_logs and filters on Polymarket contract addresses, add the V2 contracts to the filter. The two main ones are:
- Exchange:
0xe3333700cA9d93003F00f0F71f8515005F6c00Aa - PositionManager:
0x006F54F7f9A22e0000CC2AB60031000000ae9fEF