Guide

Native vs derived TWAP on Polymarket

There are two ways to get a 60-second TWAP: take the provider's published stream, or average a spot series yourself. They are rarely identical. This page explains the difference and how the archive records which one a settlement used.

What this guide covers

  • The archive holds 209,181 native TWAP rows, all provider-published over a 60-second window (twap_kind = native)
  • Native TWAPs come from the provider's stream; derived TWAPs are computed from a spot series
  • Every reference row records twap_kind and window_seconds so the two are never confused
  • Spot rows carry window_seconds = 0; TWAP rows carry the window, currently 60

What 'native' means

A native TWAP is published by the price provider itself. Chainlink runs a 60-second TWAP stream per asset and emits the averaged value directly, so every consumer sees the same number. The archive records these with twap_kind = native and window_seconds = 60.

Because the provider computes it, a native TWAP is the ground truth for settlement. There is no ambiguity about the averaging method, the sampling cadence, or which prints were included - the provider decided all of that and published the result.

What 'derived' means

A derived TWAP is computed downstream from a series of spot prints. You pick a window, sample the spot feed, and average. The value depends on your sampling cadence and boundary handling, so two teams averaging the same minute can get slightly different numbers.

Derived TWAPs are useful for research - they let you build a TWAP over any window or asset the provider does not publish - but they are not settlement-grade. If you grade a market on a derived TWAP, a small methodology difference can flip a near-the-money contract.

How the archive keeps them apart

Every reference row carries twap_kind and window_seconds. A native row shows twap_kind = native with the provider's window; a derived row would carry its own kind. In this archive the measured TWAP set is entirely native at 60 seconds, but the schema supports the distinction so the field is always meaningful.

When you join reference rows to a market, filter on kind and window rather than assuming. A row with kind = spot is not a settlement input for a market that graded on TWAP, even though it is the same asset.

When to compute your own TWAP

Compute a derived TWAP when you need a window the provider does not publish - say a 15-second or 5-minute average - or when you are stress-testing how sensitive a result is to the smoothing choice. Compare it against the native 60-second value to see how much the methodology moves the answer.

For anything settlement-adjacent, use the native row. It is the number the exchange used, and it is archived with the provenance to prove it.

Code examples

import statistics
import requests

BASE = "https://api.polyorderbooks.com/v1"
HEADERS = {"X-API-Key": "your-key"}
START, END = 1787486640, 1787486700

def ref(kind):
    r = requests.get(
        f"{BASE}/reference-prices",
        headers=HEADERS,
        params={"asset": "sol", "kind": kind,
                "start_ts": START, "end_ts": END},
    )
    r.raise_for_status()
    return r.json()["data"]

native = ref("twap")[-1]["value"]
derived = statistics.mean(p["value"] for p in ref("spot"))
print("native 60s TWAP:", native)
print("derived from spot:", round(derived, 6))
print("difference:", round(native - derived, 6))

Free tier

The Starter plan is free, includes order books, prices, and metrics at 250ms resolution, with 3 days of history, 60 requests/min, 1,000/day, 1 free AI backtest, and 3 strategy backtests. No credit card required.

Paid data windows from $19/mo extend history to 30–120 days at higher throughput. Backtest AI add-on is +$19/mo or standalone at $29/mo.

FAQ

Are native and derived TWAPs the same number?

Usually close, but not guaranteed identical. Native is published by the provider; derived depends on your sampling cadence and boundary handling, so the two can differ at the margins.

Which one did Polymarket settle on?

The native provider TWAP. Every reference row records twap_kind and window_seconds so you can confirm the settlement input rather than guessing.

Does the archive contain derived TWAP rows?

Currently no. The measured TWAP set is entirely native over a 60-second window. The schema supports derived rows, so the field is present even when only one kind exists.

When should I build my own TWAP?

When you need a window the provider does not publish, or when you want to test how sensitive a result is to the smoothing choice. Use the native row for anything settlement-adjacent.