Skip to main content

GET /v1/snapshots/

Returns paginated historical snapshots for a Polymarket market, including price probabilities and optional order book depth.

Minimum tier: Free | Credits: 50 base + 4 per row (without orderbook) | 50 base + 10 per row (with orderbook)

GET https://kwery-api.com/v1/snapshots/{id}?api-key=YOUR_KEY

The {id} path parameter accepts a condition_id, market_id, or slug — the API resolves it automatically.

Parameters

ParameterTypeRequiredDefaultDescription
api-keystringYesYour API key. Passed as a query parameter.
idstringYesPath parameter. A condition_id, market_id, or slug.
include_orderbookbooleanNofalseInclude full order book depth in each snapshot. Requires Pro or higher.
limitintegerNo100Number of snapshots to return. Range: 1–1000.
afterstringNoCursor for pagination. Pass the next_cursor value from a previous response.

The offset parameter is deprecated as of v1.6.0. Use after with the meta.next_cursor value for pagination.

Response fields

Each object in data contains the following fields:

FieldTypeDescription
timestringISO 8601 snapshot timestamp.
price_upnumberYES outcome probability (0–1).
price_downnumberNO outcome probability (0–1).
spreadnumberBid-ask spread on the YES side.
mid_pricenumberMidpoint price of the YES side.
btc_pricenumberBTC reference price at snapshot time.
orderbook_upobject | nullYES-side order book. Only present when include_orderbook=true.
orderbook_up.bids{price, size}[]Bid levels, descending by price.
orderbook_up.asks{price, size}[]Ask levels, ascending by price.
orderbook_downobject | nullNO-side order book. Only present when include_orderbook=true.
orderbook_down.bids{price, size}[]Bid levels, descending by price.
orderbook_down.asks{price, size}[]Ask levels, ascending by price.

Response headers

HeaderDescription
X-Credits-ChargedTotal credits consumed by this request.
X-RateLimit-RemainingRequests remaining in the current rate-limit window.
X-RateLimit-ResetISO 8601 timestamp when the rate-limit window resets.

Example request

cURL

curl "https://kwery-api.com/v1/snapshots/btc-above-100k-march-2026?api-key=YOUR_KEY&include_orderbook=true&limit=2"

Python

import requests

resp = requests.get(
    "https://kwery-api.com/v1/snapshots/btc-above-100k-march-2026",
    params={
        "api-key": "YOUR_KEY",
        "include_orderbook": True,
        "limit": 2,
    },
)
data = resp.json()
for snap in data["data"]:
    print(f"{snap['time']} YES={snap['price_up']} NO={snap['price_down']}")

TypeScript

const slug = "btc-above-100k-march-2026";
const params = new URLSearchParams({
  "api-key": "YOUR_KEY",
  include_orderbook: "true",
  limit: "2",
});

const res = await fetch(
  `https://kwery-api.com/v1/snapshots/${slug}?${params}`
);
const data = await res.json();

for (const snap of data.data) {
  console.log(`${snap.time} YES=${snap.price_up} NO=${snap.price_down}`);
}

Example response

{
  "data": [
    {
      "time": "2026-03-09T12:00:00Z",
      "price_up": 0.62,
      "price_down": 0.38,
      "spread": 0.02,
      "mid_price": 0.62,
      "btc_price": 94312.50,
      "orderbook_up": {
        "bids": [
          { "price": 0.61, "size": 1500.00 },
          { "price": 0.60, "size": 3200.00 }
        ],
        "asks": [
          { "price": 0.63, "size": 1200.00 },
          { "price": 0.64, "size": 2800.00 }
        ]
      },
      "orderbook_down": {
        "bids": [
          { "price": 0.37, "size": 1400.00 },
          { "price": 0.36, "size": 2900.00 }
        ],
        "asks": [
          { "price": 0.39, "size": 1100.00 },
          { "price": 0.40, "size": 2600.00 }
        ]
      }
    },
    {
      "time": "2026-03-09T12:05:00Z",
      "price_up": 0.63,
      "price_down": 0.37,
      "spread": 0.02,
      "mid_price": 0.63,
      "btc_price": 94480.25,
      "orderbook_up": {
        "bids": [
          { "price": 0.62, "size": 1600.00 },
          { "price": 0.61, "size": 3100.00 }
        ],
        "asks": [
          { "price": 0.64, "size": 1300.00 },
          { "price": 0.65, "size": 2700.00 }
        ]
      },
      "orderbook_down": {
        "bids": [
          { "price": 0.36, "size": 1350.00 },
          { "price": 0.35, "size": 2800.00 }
        ],
        "asks": [
          { "price": 0.38, "size": 1050.00 },
          { "price": 0.39, "size": 2500.00 }
        ]
      }
    }
  ],
  "meta": {
    "symbol": "BTC",
    "source": "polymarket",
    "interval": "5m",
    "count": 2,
    "next_cursor": "eyJ0IjoiMjAyNi0wMy0wOVQxMjoxMDowMFoifQ=="
  }
}

GET /v1/snapshots//at

Returns a single snapshot closest to the specified timestamp.

Minimum tier: Free | Credits: 50 flat

GET https://kwery-api.com/v1/snapshots/{id}/at?api-key=YOUR_KEY

Parameters

ParameterTypeRequiredDefaultDescription
api-keystringYesYour API key. Passed as a query parameter.
idstringYesPath parameter. A condition_id, market_id, or slug.
timestampstringYesISO 8601 target timestamp. The API returns the snapshot closest to this time.

Response fields

Same schema as GET /v1/snapshots/{id}. The data array contains exactly one snapshot. The orderbook_up and orderbook_down fields are null unless the snapshot was originally ingested with order book data.

Example request

cURL

curl "https://kwery-api.com/v1/snapshots/btc-above-100k-march-2026/at?api-key=YOUR_KEY&timestamp=2026-03-05T14:30:00Z"

Python

import requests

resp = requests.get(
    "https://kwery-api.com/v1/snapshots/btc-above-100k-march-2026/at",
    params={
        "api-key": "YOUR_KEY",
        "timestamp": "2026-03-05T14:30:00Z",
    },
)
snap = resp.json()["data"][0]
print(f"YES probability at {snap['time']}: {snap['price_up']}")

TypeScript

const slug = "btc-above-100k-march-2026";
const params = new URLSearchParams({
  "api-key": "YOUR_KEY",
  timestamp: "2026-03-05T14:30:00Z",
});

const res = await fetch(
  `https://kwery-api.com/v1/snapshots/${slug}/at?${params}`
);
const snap = (await res.json()).data[0];
console.log(`YES probability at ${snap.time}: ${snap.price_up}`);

Example response

{
  "data": [
    {
      "time": "2026-03-05T14:30:02Z",
      "price_up": 0.71,
      "price_down": 0.29,
      "spread": 0.015,
      "mid_price": 0.71,
      "btc_price": 96120.75,
      "orderbook_up": null,
      "orderbook_down": null
    }
  ],
  "meta": {
    "symbol": "BTC",
    "source": "polymarket",
    "interval": null,
    "count": 1,
    "next_cursor": null
  }
}

Source-specific behavior

price_up and price_down are independent probabilities. On Polymarket they should sum to approximately 1, but minor deviations occur due to spread. Order book depth varies by market liquidity — illiquid markets may return fewer levels or empty arrays.

Tier access

FeatureRequired plan
Basic snapshots (no orderbook)Free
Order book depth (include_orderbook=true)Pro or higher
500ms snapshot intervalsBusiness or higher

Requests for tier-restricted features on an insufficient plan return 403.

Errors

StatusCodeDescription
400invalid_identifierThe {id} could not be resolved to a known market.
400invalid_timestampThe timestamp parameter is not a valid ISO 8601 string.
401unauthorizedMissing or invalid api-key.
403tier_lockedYour plan does not have access to the requested feature (e.g. orderbook, 500ms intervals).
404market_not_foundNo market matches the provided identifier.
429rate_limit_exceededYou have exceeded your per-minute or per-hour request quota.