Documentation: gap_supplement + orderfilled_daily_utc (schema & usage)
This post documents two extensions hosted on this dataset (Polymarket_data_fixed, forked from the original Polymarket release):
gap_supplement/ — on-chain gap recovery and derived *_fix_gap Parquets.
orderfilled_daily_utc/ — UTC daily OrderFilled Parquets and an optional run report.
Root layout (same semantics as the upstream DATA_DESCRIPTION / card): the historical monolithic trades / quant / users / orderfilled Parquets at repo root remain the primary bulk tables; the two prefixes above are add-ons for continuity and operations.
1) Gap fix — how it works (gap_supplement/)
- Problem: A block-range gap in the main pipeline (e.g. missed
eth_getLogswindows) leaves missing trades relative to a trusted baseline. - Principle: Re-fetch only the missing ranges from Polygon using the same CTF exchange contract addresses and
OrderFilledlog topic as the main collectors. - Execution: Parallel workers + adaptive batching (widen on success, split by 5 on failure) + multi-RPC (first successful node wins; throttling / node lists are tunable). Unrecoverable ranges are audited in worker logs.
- Output: The recovered raw stream is reprocessed into
trades_fix_gap.parquet,quant_fix_gap.parquet,users_fix_gap.parquet(and related artifacts) undergap_supplement/, to be merged with the global tables using the same primary keys and transforms as the upstreammergedocs ((transaction_hash, log_index, …)style linkage). - Intent: Patch missing history without re-downloading the full chain; not a second independent schema.
Usage (research)
- Download the
gap_supplement/*.parquetyou need, left-join or union on the same keys as intrades/quant/usersfrom the base files, then deduplicate if a row already existed in the baseline. - Prefer
trades_fix_gapwhen you need the same semantics as roottradesfor the gap window only.
2) Daily OrderFilled — files & structure (orderfilled_daily_utc/)
- What it is: One Parquet per UTC calendar day of decoded
OrderFilledevents, keyed by the event’stimestamp(UTC day boundary). - Naming:
orderfilled_utc_{YYYY-MM-DD}.parquet - Deduplication: Logical row key is
(transaction_hash, log_index)after normalizingtransaction_hash(lowercased) andlog_indexto a consistent string form; duplicates in a run use last-wins when re-run or re-merged (aligned with the repo’smerge_orderfilledidea). - Relationship to
orderfilled_partN.parquet: The incremental job resumes from the last HForderfilled_part*block; daily files are the day-granular product for incremental fetch + smaller downloads and continuous sync. Schema aligns with raworderfilled-style fields (on-chainOrderFilledrow layout; see base dataset card for column meanings). incremental_run_report.json(optional): Per-run metadata (paths, date coverage, dedupe counters, etc.) for thejsonl → Parquetstage; safe to ignore for pure analytics.
Quality (operational, not a formal proof)
- Pipelines can run gap checks (block order / random RPC spot checks on suspicious jumps). A zero on spot checks does not replace a full chain audit.
3) How to use on Hugging Face (minimal)
pip install huggingface_hub pyarrow # and pandas or polars as you prefer
# Example: one daily file (use hf_hub_download or Datasets' data_files filter)
import pandas as pd
from huggingface_hub import hf_hub_download
path = hf_hub_download(
repo_id="wilsonwangwang/Polymarket_data_fixed",
filename="orderfilled_daily_utc/orderfilled_utc_2026-04-01.parquet",
repo_type="dataset",
)
df = pd.read_parquet(path)
# Example: gap supplement — same pattern, e.g. trades side
from huggingface_hub import hf_hub_download
path = hf_hub_download(
repo_id="wilsonwangwang/Polymarket_data_fixed",
filename="gap_supplement/trades_fix_gap.parquet",
repo_type="dataset",
)
For full mirror of a folder prefix, use the Hugging Face CLI:huggingface-cli download wilsonwangwang/Polymarket_data_fixed --include "orderfilled_daily_utc/*" --repo-type dataset
(Adjust --include for gap_supplement/*.)
4) License & credit
Upstream dataset and methodology follow the original Polymarket data release and MIT terms as stated in the dataset card. The fix/daily artifacts are derivative operational outputs; cite the dataset URL and, if applicable, the upstream paper / HF citation block from the card.