Skip to main content
GET
/
price-history
Get price history
curl --request GET \
  --url https://api.polyrouter.io/functions/v1/price-history \
  --header 'X-API-Key: <api-key>'
{
  "data": [
    {
      "timestamp": 123,
      "price": {
        "close": 123,
        "open": 123,
        "high": 123,
        "low": 123
      },
      "volume": 123,
      "openInterest": 123,
      "bidAsk": {
        "bid": {
          "close": 123,
          "open": 123,
          "high": 123,
          "low": 123
        },
        "ask": {
          "close": 123,
          "open": 123,
          "high": 123,
          "low": 123
        }
      },
      "platform": "kalshi",
      "marketId": "<string>",
      "outcomeId": "<string>"
    }
  ],
  "meta": {
    "total_points": 123,
    "platforms": [
      "<string>"
    ],
    "time_range": {
      "start": 123,
      "end": 123
    },
    "interval": "<string>",
    "request_time": 123,
    "cache_hit": true,
    "data_freshness": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Query Parameters

market_ids
string
required

Comma-separated list of platform-specific market IDs

start_ts
integer
default:1759333191
required

Start timestamp (Unix timestamp) - Required for data retrieval

end_ts
integer
default:1760283591
required

End timestamp (Unix timestamp) - Required for data retrieval

interval
enum<string>
default:1d
required

Time interval - Required

Available options:
1m,
5m,
1h,
4h,
1d
limit
integer
default:10

Maximum number of data points per market (1-5000)

Required range: 1 <= x <= 5000

Response

Price history retrieved successfully

data
object[]
meta
object