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...
Polymarket — Get a token's price history
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- Pricing
On this page
Playground
Run sends a real API request. Charges follow the published API contract.
Response structure
dataobject[]pricenumberresolution_secondsintegertimestampinteger
paginationobjecthas_morebooleanlimitintegernext_cursorstringoffsetinteger
// Inferred from response examples. Fields are optional and other fields may be returned.
export type ApiResponse = {
data?: Array<{
price?: number;
resolution_seconds?: number;
timestamp?: number;
}>;
pagination?: {
has_more?: boolean;
limit?: number;
next_cursor?: string;
offset?: number;
};
};Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
PolymarketCurrent Polymarket — Get a token's price history · GET · View API reference | $0 / call | — | —successP50— |
- 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.
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.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
token_id | URL query parametersquery | string | Yes | 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 | URL query parametersquery | integer | null | No | 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 | URL query parametersquery | integer | null | No | Window end, epoch seconds, EXCLUSIVE. Requires `start`; on its own it would ask for every point ever recorded up to `end`. |
interval | URL query parametersquery | string | null | No | 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 | URL query parametersquery | integer | null | No | 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 | URL query parametersquery | integer | null | No | 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 | URL query parametersquery | integer | null | No | First-page size; defaults to the cap (10,000). Ignored when `cursor` is
supplied (the cursor's size wins). minimum: 0 · maximum: 10000 |
cursor | URL query parametersquery | string | null | No | Opaque 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.
{
"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
# 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
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Documentation example
Published documentation example. Verify the actual response after an approved call.
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 / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'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 · cURLcurl \ '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'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 } }