Get price history for markets
curl --request GET \
--url https://api-v2.polyrouter.io/price-history \
--header 'X-API-Key: <api-key>'import requests
url = "https://api-v2.polyrouter.io/price-history"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api-v2.polyrouter.io/price-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-v2.polyrouter.io/price-history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"timestamp": 1700000000,
"price": {
"close": 0.65,
"open": 0.6,
"high": 0.7,
"low": 0.55
},
"platform": "kalshi",
"marketId": "KXELONMARS-99",
"volume": 10000,
"openInterest": 5000,
"bidAsk": {
"bid": {
"close": 0.65,
"open": 0.6,
"high": 0.7,
"low": 0.55
},
"ask": {
"close": 0.65,
"open": 0.6,
"high": 0.7,
"low": 0.55
}
},
"outcomeId": "yes"
}
],
"meta": {
"total_points": 500,
"platforms": [
"polymarket",
"kalshi"
],
"time_range": {
"start": 1700000000,
"end": 1700100000
},
"interval": "1h",
"request_time": 250,
"cache_hit": true,
"data_freshness": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"timestamp": "2025-01-01T00:00:00.000Z"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"timestamp": "2025-01-01T00:00:00.000Z"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"timestamp": "2025-01-01T00:00:00.000Z"
}
}Markets
Get price history for markets
Fetch historical price data (OHLC candlesticks) for one or more markets
GET
/
price-history
Get price history for markets
curl --request GET \
--url https://api-v2.polyrouter.io/price-history \
--header 'X-API-Key: <api-key>'import requests
url = "https://api-v2.polyrouter.io/price-history"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api-v2.polyrouter.io/price-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-v2.polyrouter.io/price-history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": [
{
"timestamp": 1700000000,
"price": {
"close": 0.65,
"open": 0.6,
"high": 0.7,
"low": 0.55
},
"platform": "kalshi",
"marketId": "KXELONMARS-99",
"volume": 10000,
"openInterest": 5000,
"bidAsk": {
"bid": {
"close": 0.65,
"open": 0.6,
"high": 0.7,
"low": 0.55
},
"ask": {
"close": 0.65,
"open": 0.6,
"high": 0.7,
"low": 0.55
}
},
"outcomeId": "yes"
}
],
"meta": {
"total_points": 500,
"platforms": [
"polymarket",
"kalshi"
],
"time_range": {
"start": 1700000000,
"end": 1700100000
},
"interval": "1h",
"request_time": 250,
"cache_hit": true,
"data_freshness": "<string>"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"timestamp": "2025-01-01T00:00:00.000Z"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"timestamp": "2025-01-01T00:00:00.000Z"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"timestamp": "2025-01-01T00:00:00.000Z"
}
}Authorizations
API key for authentication
Query Parameters
Comma-separated list of market IDs (max 10)
Example:
"524153,KXELONMARS-99"
Start timestamp (Unix seconds)
Example:
"1700000000"
End timestamp (Unix seconds)
Example:
"1700100000"
Time interval in minutes. Supported: 1 (1 minute), 60 (1 hour), 1440 (1 day)
Available options:
1, 60, 1440 Example:
"60"
Maximum number of points to return (max 5000)
Example:
"1000"

