APICrypto & DeFi

Polymarket — Get a token's price history

Retrieve a token's price history with the Polymarket API. The sample response includes prices. Build a market research view or track changes over time. The GET request schema also lists token_id, start, end. Use the data in market research, dashboard views, or scheduled data collection for the relevant markets.

Selected price
$0 / callPublished pricing
Sellers / APIs
1 / 1
Requests · 30d
—Loading...
Success rate · 30d
—Loading...
USE THIS API

Polymarket — Get a token's price history

Prepare your request, then continue with your agent.

Selected price

$0 / call

Provider
Pricing
Connect your agent
On this page

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
Outcome token id (the CLOB asset id the chart is keyed by). Required. `tokenId` is an accepted alias. This execution profile requires an explicit non-null value. The original optional/nullable OpenAPI declarations remain in officialOperation.
Optional parameters (7)
Window start, epoch seconds, INCLUSIVE. Alone it means "up to the present", and is capped at 15 days back from now. Pass `end` too when paging: a window that tracks the present keeps growing at the tip, and the 15-day cap is re-checked on every page, so a walk that starts near the cap can outlive it.
Window end, epoch seconds, EXCLUSIVE. Requires `start`; on its own it would ask for every point ever recorded up to `end`.
Relative window INSTEAD of `start`/`end`: `max`, `all`, `1m`, `1w`, `1d`, `6h`, `1h`, matched case-sensitively. An empty `interval=` is a malformed value, not an absent one. `max`/`all` serve the market's WHOLE life (back to 2022 for the oldest markets) at 12-hour buckets by default; at `bucket_seconds` of 10800 or 43200 the window is unbounded, while finer widths keep a 30-day window. The other intervals take a width sized to their own span when `bucket_seconds` is omitted (`1h`/`6h`/`1d` 60, `1w` 300, `1m` 1800), and each still floors an explicit value: 600 for `max`/`all`/`1m`, 300 for `1w`.
Bucket width in SECONDS (60…86400). `bucketSeconds` is an accepted alias. OMIT it and the server sizes the width to the window: the finest tier grain (60, 300, 1800, 10800, 43200) that keeps the series under ~2,500 points, except that an explicit window wider than 12 hours never defaults to the 60s grain (send `bucket_seconds=60` when you want second-by-minute detail over a longer window), and coarsened further if that grain no longer reaches the window's start. So a window up to 12 hours keeps 1-minute detail, half a day through a week defaults to 300, fifteen days to 1800; interval presets keep their own span-derived defaults (`1d` 60s, `1w` 300, `1m` 1800, and the unbounded `max`/`all` 43200). SEND it and it is served exactly as asked, which for a window older than that resolution's retention means an empty page rather than a silent substitution. An explicit value is also floored per interval: 600 for `max`/`all`/`1m`, 300 for `1w`.
Point-in-time read, epoch seconds, INCLUSIVE: the latest observation at or before this instant. Cannot be combined with a window. `asOf` is an accepted alias.
First-page size; defaults to the cap (10,000). Ignored when `cursor` is supplied (the cursor's size wins).
Opaque pagination cursor from a prior response's `next_cursor`.

Sample response

{
  "data": [
    {
      "price": 0.475,
      "resolution_seconds": 60,
      "timestamp": 1793196240
    },
    {
      "price": 0.475,
      "resolution_seconds": 60,
      "timestamp": 1793196300
    }
  ],
  "pagination": {
    "has_more": true,
    "limit": 2,
    "next_cursor": "eyJkYXRhIjp7InR5cGUiOiJwcmljZXNfaGlzdG9yeSIsInBhcmFtcyI6eyJsIjoyLCJ0cyI6MTc5MzE5NjMwMCwic3EiOiI2MCIsImQiOjJ9fSwic2lnIjoiYWRmNmQzMzBhN2Y3N2NjOTIyNDdkZjM2YjY4YzI3NjEifQ",
    "offset": 0
  }
}

Response result

Response structure

Inferred from examples
  • dataobject[]
    • pricenumber
    • resolution_secondsinteger
    • timestampinteger
  • paginationobject
    • has_moreboolean
    • limitinteger
    • next_cursorstring
    • offsetinteger

Sellers

SellerPricingRequests · 30dPerformanceAccess
PolymarketCurrent
Polymarket — Get a token's price history · GET · View API reference
$0 / call—
—successP50—
Loading...
Selected pricing · PolymarketUSD / call
Unit price
$0

Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 3. Price update time: not supplied.

calls

Total $0

API

Method
GET
Endpoint
https://api.openany.si/v1/agent-apis/polymarket/v2/prices-history
Content type
application/json
Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
  'https://api.openany.si/v1/agent-apis/polymarket/v2/prices-history?interval=1d&limit=2&token_id=20006732765674855733524007935991362439352594042415161039767275461950712817548' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
token_idURL query parametersquerystringYesOutcome token id (the CLOB asset id the chart is keyed by). Required. `tokenId` is an accepted alias. This execution profile requires an explicit non-null value. The original optional/nullable OpenAPI declarations remain in officialOperation.
startURL query parametersqueryinteger | nullNoWindow start, epoch seconds, INCLUSIVE. Alone it means "up to the present", and is capped at 15 days back from now. Pass `end` too when paging: a window that tracks the present keeps growing at the tip, and the 15-day cap is re-checked on every page, so a walk that starts near the cap can outlive it.
endURL query parametersqueryinteger | nullNoWindow end, epoch seconds, EXCLUSIVE. Requires `start`; on its own it would ask for every point ever recorded up to `end`.
intervalURL query parametersquerystring | nullNoRelative window INSTEAD of `start`/`end`: `max`, `all`, `1m`, `1w`, `1d`, `6h`, `1h`, matched case-sensitively. An empty `interval=` is a malformed value, not an absent one. `max`/`all` serve the market's WHOLE life (back to 2022 for the oldest markets) at 12-hour buckets by default; at `bucket_seconds` of 10800 or 43200 the window is unbounded, while finer widths keep a 30-day window. The other intervals take a width sized to their own span when `bucket_seconds` is omitted (`1h`/`6h`/`1d` 60, `1w` 300, `1m` 1800), and each still floors an explicit value: 600 for `max`/`all`/`1m`, 300 for `1w`.
bucket_secondsURL query parametersqueryinteger | nullNoBucket width in SECONDS (60…86400). `bucketSeconds` is an accepted alias. OMIT it and the server sizes the width to the window: the finest tier grain (60, 300, 1800, 10800, 43200) that keeps the series under ~2,500 points, except that an explicit window wider than 12 hours never defaults to the 60s grain (send `bucket_seconds=60` when you want second-by-minute detail over a longer window), and coarsened further if that grain no longer reaches the window's start. So a window up to 12 hours keeps 1-minute detail, half a day through a week defaults to 300, fifteen days to 1800; interval presets keep their own span-derived defaults (`1d` 60s, `1w` 300, `1m` 1800, and the unbounded `max`/`all` 43200). SEND it and it is served exactly as asked, which for a window older than that resolution's retention means an empty page rather than a silent substitution. An explicit value is also floored per interval: 600 for `max`/`all`/`1m`, 300 for `1w`.
as_ofURL query parametersqueryinteger | nullNoPoint-in-time read, epoch seconds, INCLUSIVE: the latest observation at or before this instant. Cannot be combined with a window. `asOf` is an accepted alias.
limitURL query parametersqueryinteger | nullNoFirst-page size; defaults to the cap (10,000). Ignored when `cursor` is supplied (the cursor's size wins).

minimum: 0 · maximum: 10000

cursorURL query parametersquerystring | nullNoOpaque pagination cursor from a prior response's `next_cursor`.

Required markers inside a nested object or variant apply when that object or variant is used.

Sample response

Sample response · Documented HTTP 200 Published documentation example. Verify the actual response after an approved call.

Documentation example
{
  "data": [
    {
      "price": 0.475,
      "resolution_seconds": 60,
      "timestamp": 1793196240
    },
    {
      "price": 0.475,
      "resolution_seconds": 60,
      "timestamp": 1793196300
    }
  ],
  "pagination": {
    "has_more": true,
    "limit": 2,
    "next_cursor": "eyJkYXRhIjp7InR5cGUiOiJwcmljZXNfaGlzdG9yeSIsInBhcmFtcyI6eyJsIjoyLCJ0cyI6MTc5MzE5NjMwMCwic3EiOiI2MCIsImQiOjJ9fSwic2lnIjoiYWRmNmQzMzBhN2Y3N2NjOTIyNDdkZjM2YjY4YzI3NjEifQ",
    "offset": 0
  }
}

Agent integration

Copy the resource contract without sharing an API key.

View API Markdown
API Markdown
# Polymarket — Get a token's price history

Retrieve a token's price history with the Polymarket API. The sample response includes prices. Build a market research view or track changes over time. The GET request schema also lists token_id, start, end. Use the data in market research, dashboard views, or scheduled data collection for the relevant markets.
## Available implementations
Polymarket · Polymarket — Get a token's price history: https://openany.si/markets/apis/capabilities/polymarket-get-a-token-s-price-history?offering=a8b5eda6-9dce-4a8d-b962-94ea3ed58930 · $0 / call

## Selected API contract
Documentation: https://openany.si/markets/apis/capabilities/polymarket-get-a-token-s-price-history
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/polymarket/v2/prices-history
Price: $0 / call
Provider: Polymarket
Contract revision: 3
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.

Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.

## Prepared request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/polymarket/v2/prices-history?interval=1d&limit=2&token_id=20006732765674855733524007935991362439352594042415161039767275461950712817548' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## API contract
```json
{
  "resource_type": "api",
  "name": "Polymarket — Get a token's price history",
  "endpoint": "https://api.openany.si/v1/agent-apis/polymarket/v2/prices-history",
  "method": "GET",
  "content_type": "none",
  "execution_mode": "sync",
  "authentication": {
    "type": "bearer",
    "environment_variable": "OPENANY_API_KEY"
  },
  "inputs": [
    {
      "description": "Outcome token id (the CLOB asset id the chart is keyed by). Required.\n`tokenId` is an accepted alias. This execution profile requires an explicit non-null value. The original optional/nullable OpenAPI declarations remain in officialOperation.",
      "location": "query",
      "name": "token_id",
      "nullable": false,
      "required": true,
      "type": "string"
    },
    {
      "description": "Window start, epoch seconds, INCLUSIVE. Alone it means \"up to the\npresent\", and is capped at 15 days back from now.\n\nPass `end` too when paging: a window that tracks the present keeps\ngrowing at the tip, and the 15-day cap is re-checked on every page, so a\nwalk that starts near the cap can outlive it.",
      "location": "query",
      "name": "start",
      "nullable": true,
      "required": false,
      "type": "integer"
    },
    {
      "description": "Window end, epoch seconds, EXCLUSIVE. Requires `start`; on its own it\nwould ask for every point ever recorded up to `end`.",
      "location": "query",
      "name": "end",
      "nullable": true,
      "required": false,
      "type": "integer"
    },
    {
      "description": "Relative window INSTEAD of `start`/`end`: `max`, `all`, `1m`, `1w`,\n`1d`, `6h`, `1h`, matched case-sensitively. An empty `interval=` is a\nmalformed value, not an absent one.\n\n`max`/`all` serve the market's WHOLE life (back to 2022 for the oldest\nmarkets) at 12-hour buckets by default; at `bucket_seconds` of 10800 or\n43200 the window is unbounded, while finer widths keep a 30-day window.\nThe other intervals take a width sized to their own span when\n`bucket_seconds` is omitted (`1h`/`6h`/`1d` 60, `1w` 300, `1m` 1800), and\neach still floors an explicit value: 600 for `max`/`all`/`1m`, 300 for\n`1w`.",
      "location": "query",
      "name": "interval",
      "nullable": true,
      "required": false,
      "type": "string"
    },
    {
      "description": "Bucket width in SECONDS (60…86400). `bucketSeconds` is an accepted alias.\n\nOMIT it and the server sizes the width to the window: the finest tier\ngrain (60, 300, 1800, 10800, 43200) that keeps the series under ~2,500\npoints, except that an explicit window wider than 12 hours never\ndefaults to the 60s grain (send `bucket_seconds=60` when you want\nsecond-by-minute detail over a longer window), and coarsened further if\nthat grain no longer reaches the window's start.\nSo a window up to 12 hours keeps 1-minute detail, half a day through a\nweek defaults to 300, fifteen days to 1800; interval presets keep their\nown span-derived defaults (`1d` 60s, `1w` 300, `1m` 1800, and the\nunbounded `max`/`all` 43200).\n\nSEND it and it is served exactly as asked, which for a window older than\nthat resolution's retention means an empty page rather than a silent\nsubstitution. An explicit value is also floored per interval: 600 for\n`max`/`all`/`1m`, 300 for `1w`.",
      "location": "query",
      "name": "bucket_seconds",
      "nullable": true,
      "required": false,
      "type": "integer"
    },
    {
      "description": "Point-in-time read, epoch seconds, INCLUSIVE: the latest observation at\nor before this instant. Cannot be combined with a window. `asOf` is an\naccepted alias.",
      "location": "query",
      "name": "as_of",
      "nullable": true,
      "required": false,
      "type": "integer"
    },
    {
      "description": "First-page size; defaults to the cap (10,000). Ignored when `cursor` is\nsupplied (the cursor's size wins).",
      "location": "query",
      "maximum": "10000",
      "minimum": "0",
      "name": "limit",
      "nullable": true,
      "required": false,
      "type": "integer"
    },
    {
      "description": "Opaque pagination cursor from a prior response's `next_cursor`.",
      "location": "query",
      "name": "cursor",
      "nullable": true,
      "required": false,
      "type": "string"
    }
  ],
  "billing": {
    "currency": "USD",
    "mode": "fixed",
    "priceMicroUsd": "0",
    "rounding": null,
    "unit": "call",
    "unitQuantity": null
  },
  "examples": [
    {
      "http_status": 200,
      "name": "Documentation example",
      "request": {
        "body": null,
        "headers": {},
        "path": {},
        "query": {
          "interval": "1d",
          "limit": 2,
          "token_id": "20006732765674855733524007935991362439352594042415161039767275461950712817548"
        }
      },
      "response_body": {
        "data": [
          {
            "price": 0.475,
            "resolution_seconds": 60,
            "timestamp": 1793196240
          },
          {
            "price": 0.475,
            "resolution_seconds": 60,
            "timestamp": 1793196300
          }
        ],
        "pagination": {
          "has_more": true,
          "limit": 2,
          "next_cursor": "eyJkYXRhIjp7InR5cGUiOiJwcmljZXNfaGlzdG9yeSIsInBhcmFtcyI6eyJsIjoyLCJ0cyI6MTc5MzE5NjMwMCwic3EiOiI2MCIsImQiOjJ9fSwic2lnIjoiYWRmNmQzMzBhN2Y3N2NjOTIyNDdkZjM2YjY4YzI3NjEifQ",
          "offset": 0
        }
      }
    }
  ]
}
```

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect the error and usage record before retrying a paid operation.

Examples

Documentation example

Published documentation example. Verify the actual response after an approved call.

  1. Prepare your environment

    Use a terminal with cURL installed.

    Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.

    Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.

    Terminal · macOS / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. Run the request

    Paste the complete command below into your terminal.

    Values to replace before running 8

    Review these request fields before running. Keep the published provider and request method unchanged.

    token_id
    Outcome token id (the CLOB asset id the chart is keyed by). Required. `tokenId` is an accepted alias. This execution profile requires an explicit non-null value. The original optional/nullable OpenAPI declarations remain in officialOperation.
    start
    Window start, epoch seconds, INCLUSIVE. Alone it means "up to the present", and is capped at 15 days back from now. Pass `end` too when paging: a window that tracks the present keeps growing at the tip, and the 15-day cap is re-checked on every page, so a walk that starts near the cap can outlive it.
    end
    Window end, epoch seconds, EXCLUSIVE. Requires `start`; on its own it would ask for every point ever recorded up to `end`.
    interval
    Relative window INSTEAD of `start`/`end`: `max`, `all`, `1m`, `1w`, `1d`, `6h`, `1h`, matched case-sensitively. An empty `interval=` is a malformed value, not an absent one. `max`/`all` serve the market's WHOLE life (back to 2022 for the oldest markets) at 12-hour buckets by default; at `bucket_seconds` of 10800 or 43200 the window is unbounded, while finer widths keep a 30-day window. The other intervals take a width sized to their own span when `bucket_seconds` is omitted (`1h`/`6h`/`1d` 60, `1w` 300, `1m` 1800), and each still floors an explicit value: 600 for `max`/`all`/`1m`, 300 for `1w`.
    bucket_seconds
    Bucket width in SECONDS (60…86400). `bucketSeconds` is an accepted alias. OMIT it and the server sizes the width to the window: the finest tier grain (60, 300, 1800, 10800, 43200) that keeps the series under ~2,500 points, except that an explicit window wider than 12 hours never defaults to the 60s grain (send `bucket_seconds=60` when you want second-by-minute detail over a longer window), and coarsened further if that grain no longer reaches the window's start. So a window up to 12 hours keeps 1-minute detail, half a day through a week defaults to 300, fifteen days to 1800; interval presets keep their own span-derived defaults (`1d` 60s, `1w` 300, `1m` 1800, and the unbounded `max`/`all` 43200). SEND it and it is served exactly as asked, which for a window older than that resolution's retention means an empty page rather than a silent substitution. An explicit value is also floored per interval: 600 for `max`/`all`/`1m`, 300 for `1w`.
    as_of
    Point-in-time read, epoch seconds, INCLUSIVE: the latest observation at or before this instant. Cannot be combined with a window. `asOf` is an accepted alias.
    limit
    First-page size; defaults to the cap (10,000). Ignored when `cursor` is supplied (the cursor's size wins).
    cursor
    Opaque pagination cursor from a prior response's `next_cursor`.
    Terminal · cURL
    curl \
      'https://api.openany.si/v1/agent-apis/polymarket/v2/prices-history?interval=1d&limit=2&token_id=20006732765674855733524007935991362439352594042415161039767275461950712817548' \
      -X GET \
      -H "Authorization: Bearer $OPENANY_API_KEY" \
      -H 'Content-Type: application/json'
  3. Check the response

    Sample response · Documented HTTP 200

    Sample response
    {
      "data": [
        {
          "price": 0.475,
          "resolution_seconds": 60,
          "timestamp": 1793196240
        },
        {
          "price": 0.475,
          "resolution_seconds": 60,
          "timestamp": 1793196300
        }
      ],
      "pagination": {
        "has_more": true,
        "limit": 2,
        "next_cursor": "eyJkYXRhIjp7InR5cGUiOiJwcmljZXNfaGlzdG9yeSIsInBhcmFtcyI6eyJsIjoyLCJ0cyI6MTc5MzE5NjMwMCwic3EiOiI2MCIsImQiOjJ9fSwic2lnIjoiYWRmNmQzMzBhN2Y3N2NjOTIyNDdkZjM2YjY4YzI3NjEifQ",
        "offset": 0
      }
    }

Common questions

Do I need a separate key for every provider?

Use your OpenAny API key for standard API access. Read it from OPENANY_API_KEY in your environment and keep it out of prompts, source code and logs.

Are these providers interchangeable?

No. Each offering has its own inputs, pricing and response contract. Selecting a catalog offering does not establish automatic routing or fallback. Confirm the service contract before calling.

How is this API billed?

API-key calls use your shared balance at the selected implementation's published rate. Check the billing unit and request-specific pricing rules before making a paid call. Recorded usage determines the final charge under that contract.

Where do the price and contract come from?

The selected implementation publishes its provider, request contract, revision and billing rules through OpenAny's public API catalog. A revision number identifies a contract version, not a price update date. A price update timestamp is not supplied; do not treat a page date as one.

How do OpenAny Balance and x402 differ?

OpenAny Balance uses an API key and one shared balance. Card, USDC and x402 top-ups, card auto top-up and USDC subscriptions fund that balance; available routes appear on the Credits page. Direct x402 is a separate pay-per-request flow, available only on listings that show it and requiring an authorized payment client.

Does Playground send a paid request?

Yes. After you sign in, Run sends a real API request using an active OpenAny API key. Charges follow the published API contract and use your shared balance. Selecting an implementation, editing inputs and viewing sample responses do not send requests.

Use Polymarket — Get a token's price history with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.