CoolFace
Datasetpublic

wzsg/polymarket-orderfilled-v1

Polymarket CLOB V1 OrderFilled (Polygon) 中文说明 · CLOB V2 dataset This dataset contains OrderFilled events emitted by Polymarket CLOB V1 Exchange contracts on Polygon mainnet. It covers both standard CTF markets and Neg Risk markets, is partitioned by UTC month, and excludes CLOB V2 contract events. Explore V1 and V2 activity, trends, and summary metrics in the interactive live analytics dashboard. The collection, processing, and dashboard source code is available in the… See the full description on the dataset page: https://huggingface.co/datasets/wzsg/polymarket-orderfilled-v1.

sourceHugging Faceupdated 2mo agoView on Hugging Face
1likes2kdownloads
Dataset Card

Polymarket CLOB V1 OrderFilled (Polygon)

中文说明 · CLOB V2 dataset

![Live analytics](https://huggingface.co/spaces/wzsg/polymarket-orderfilled-analytics) ![Open-source project](https://github.com/wzsg/polymarket-analytics) Polygon Format Status

This dataset contains OrderFilled events emitted by Polymarket CLOB V1 Exchange contracts on Polygon mainnet. It covers both standard CTF markets and Neg Risk markets, is partitioned by UTC month, and excludes CLOB V2 contract events.

Explore V1 and V2 activity, trends, and summary metrics in the interactive live analytics dashboard.

The collection, processing, and dashboard source code is available in the open-source GitHub repository.

Dataset overview

ItemValue
Total rows1,206,105,187
Standard CTF Exchange rows952,931,413
Neg Risk CTF Exchange rows253,173,774
UTC time range2022-11-21 19:49:29 to 2026-04-28 11:00:40
Polygon block range35,896,869 to 86,126,998
Monthly partitions42
Parquet files289
Parquet data size71,056,349,682 bytes (about 66.18 GiB)

Polymarket moved its production trading system from CLOB V1 to CLOB V2 on April 28, 2026 at approximately 11:00 UTC. See the official CLOB V2 migration guide for the upgrade background and contract changes.

V1 contracts and event

ContractPolygon addressDataset `contract` value
CTF Exchange V10x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982ECTF_EXCHANGE
Neg Risk CTF Exchange V10xC5d563A36AE78145C45a50134d48A1215220f80aNEGRISK_CTF_EXCHANGE

V1 OrderFilled event:

solidity
event OrderFilled(
    bytes32 indexed orderHash,
    address indexed maker,
    address indexed taker,
    uint256 makerAssetId,
    uint256 takerAssetId,
    uint256 makerAmountFilled,
    uint256 takerAmountFilled,
    uint256 fee
);

Event topic0:

text
0xd0a08e8c493f9c94f29311604c9de1b4e8c8d4c06bd0c789af57f2d65bfec0f6

The event definition is available in the official Polymarket CTF Exchange V1 source.

Schema

Each Parquet file contains 14 physical columns:

ColumnParquet / DuckDB typeDescription
timestampuint64 / UBIGINTUnix timestamp in seconds
datetimetimestamp[us, UTC]Event time in UTC
block_numberuint64 / UBIGINTPolygon block number
transaction_hashstringTransaction hash
log_indexuint32 / UINTEGERLog index
contractstringCTF_EXCHANGE or NEGRISK_CTF_EXCHANGE
order_hashstringV1 order hash
makerstringMaker of the filled order
takerstringCounterparty or Exchange execution address
maker_asset_idstringAsset paid by the maker
taker_asset_idstringAsset received by the maker
maker_amount_filledstringRaw integer amount paid by the maker
taker_amount_filledstringRaw integer amount received by the maker
feestringRaw V1 OrderFilled.fee value

event_month is a Hive partition column derived from the directory name and is not stored inside each Parquet file:

text
event_month=2026-04/data_0.parquet

Asset and price semantics

  • —asset_id = 0 normally represents the V1 collateral asset, USDC.e.
  • —A non-zero asset_id is a Conditional Tokens ERC-1155 outcome token ID.
  • —Amounts and fees are stored as decimal strings to preserve full uint256 precision.
  • —USDC.e and outcome token amounts normally use six raw decimal places.

When exactly one asset ID is zero, execution price can be calculated as:

sql
CASE
    WHEN maker_asset_id = '0' THEN
        TRY_CAST(maker_amount_filled AS DECIMAL(38, 0)) /
        NULLIF(TRY_CAST(taker_amount_filled AS DECIMAL(38, 0)), 0)
    WHEN taker_asset_id = '0' THEN
        TRY_CAST(taker_amount_filled AS DECIMAL(38, 0)) /
        NULLIF(TRY_CAST(maker_amount_filled AS DECIMAL(38, 0)), 0)
END AS price

Do not assume that taker is always an end user. During matching, minting, or merging flows, the Exchange contract itself may be emitted as the taker.

Partition layout

text
.
├── event_month=2022-11/
│   └── data_0.parquet
├── ...
├── event_month=2026-04/
│   ├── data_0.parquet
│   └── ...
├── manifest.json
├── README.md
└── README.zh-CN.md

Storage settings:

  • —Parquet
  • —ZSTD compression
  • —UTC monthly partitions
  • —1,048,576-row row groups
  • —Approximately 1 GiB target file size

DuckDB example

python
import duckdb

dataset = "event_month=*/data_*.parquet"

con = duckdb.connect()
con.execute("SET TimeZone='UTC'")

result = con.sql(f"""
    SELECT
        contract,
        count(*) AS fills,
        min(datetime) AS first_fill,
        max(datetime) AS last_fill
    FROM read_parquet(
        '{dataset}',
        hive_partitioning=true,
        union_by_name=false
    )
    WHERE event_month = '2026-04'
    GROUP BY contract
    ORDER BY contract
""")

print(result)

The dataset contains more than 1.2 billion rows. Filter by event_month, datetime, block_number, or contract as early as possible to avoid unnecessary full scans.

V1 filtering and processing

The dataset was selected from a combined V1/V2 archive using:

sql
WHERE contract IN ('CTF_EXCHANGE', 'NEGRISK_CTF_EXCHANGE')

For V1 records, the source archive's maker_fee column corresponds to the on-chain OrderFilled.fee value and has therefore been renamed to fee. The always-zero taker_fee and protocol_fee columns were removed because they are not part of the V1 event ABI.

No additional normalization was applied to hash prefixes, address casing, amounts, fees, or timestamps.

Validation

The export was validated per month and across the complete dataset:

  • —Total rows: 1,206,105,187
  • —CTF_EXCHANGE: 952,931,413
  • —NEGRISK_CTF_EXCHANGE: 253,173,774
  • —V2 contract rows: 0
  • —Non-zero fee rows: 646,687,135
  • —NULL fee rows: 0
  • —All 289 Parquet files share one schema

See manifest.json for per-month row counts, time ranges, block ranges, file counts, and byte sizes.

Known limitations

  1. 1.timestamp and datetime are preserved from the upstream archive. Spot checks found that some early block timestamps differ by several seconds from values currently returned by Polygon RPC providers. This dataset does not re-fetch every block timestamp.
  2. 2.The dataset contains on-chain fills only. It does not include market questions, outcome labels, categories, or Gamma API metadata. Join the non-zero asset ID to Polymarket market/token metadata when those fields are needed.
  3. 3.A single on-chain matching transaction can emit multiple OrderFilled events. A row should not automatically be interpreted as an independent user-to-user trade.
  4. 4.The data is derived from public blockchain events. This dataset description does not grant additional rights to underlying contract source code, platform trademarks, or third-party material. Users are responsible for determining applicable terms.

Sources