Get Polymarket Market Data Range
curl --request GET \
--url https://api.entityml.com/api/v1/polymarket/market/data/range \
--header 'Authorization: <authorization>'import requests
url = "https://api.entityml.com/api/v1/polymarket/market/data/range"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.entityml.com/api/v1/polymarket/market/data/range', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.entityml.com/api/v1/polymarket/market/data/range",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.entityml.com/api/v1/polymarket/market/data/range"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.entityml.com/api/v1/polymarket/market/data/range")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.entityml.com/api/v1/polymarket/market/data/range")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"market_condition_id": "<string>",
"start_timestamp": 123,
"end_timestamp": 123,
"data_count": 123,
"data": [
{}
],
"pagination": {
"limit": 123,
"has_more": true,
"next_cursor": "<string>"
}
}Polymarket
Get Polymarket Market Data Range
Retrieve raw Polymarket order book events across an inclusive timestamp range using cursor pagination.
GET
/
api
/
v1
/
polymarket
/
market
/
data
/
range
Get Polymarket Market Data Range
curl --request GET \
--url https://api.entityml.com/api/v1/polymarket/market/data/range \
--header 'Authorization: <authorization>'import requests
url = "https://api.entityml.com/api/v1/polymarket/market/data/range"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.entityml.com/api/v1/polymarket/market/data/range', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.entityml.com/api/v1/polymarket/market/data/range",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.entityml.com/api/v1/polymarket/market/data/range"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.entityml.com/api/v1/polymarket/market/data/range")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.entityml.com/api/v1/polymarket/market/data/range")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"market_condition_id": "<string>",
"start_timestamp": 123,
"end_timestamp": 123,
"data_count": 123,
"data": [
{}
],
"pagination": {
"limit": 123,
"has_more": true,
"next_cursor": "<string>"
}
}Request
Headers
string
required
Bearer token. Example:
Bearer YOUR_API_KEYQuery Parameters
string
required
The Polymarket market condition ID. Values are accepted with or without the
0x prefix and normalized in the response.integer
required
Inclusive lower timestamp bound. Accepts Unix seconds or milliseconds.
integer
required
Inclusive upper timestamp bound. Accepts Unix seconds or milliseconds.
string
Opaque cursor returned by the previous page for the same market and timestamp range.
integer
Maximum number of records to return per page. Default:
10000. Max: 100000.Response
string
The normalized market condition ID with the
0x prefix.integer
Inclusive lower timestamp bound normalized to milliseconds.
integer
Inclusive upper timestamp bound normalized to milliseconds.
integer
Number of records returned in the current page.
array
Array of raw Polymarket events matching the requested range.
object
The legacy alias
GET /api/v1/market/data/range remains available for existing integrations.This endpoint rejects timestamp ranges earlier than
2026-02-08T00:00:00Z, even though some backfilled Polymarket storage exists earlier for a subset of markets.Example
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.entityml.com/api/v1/polymarket/market/data/range?condition_id=0x0008043c3ed513ecff7ee64380fc943dc73eb3dfb6674f281149efe4769f7515&start_timestamp=1773964800000&end_timestamp=1774051199999&limit=500"
import os
import requests
response = requests.get(
"https://api.entityml.com/api/v1/polymarket/market/data/range",
headers={"Authorization": f"Bearer {os.environ['ENTITY_API_KEY']}"},
params={
"condition_id": "0x0008043c3ed513ecff7ee64380fc943dc73eb3dfb6674f281149efe4769f7515",
"start_timestamp": 1773964800000,
"end_timestamp": 1774051199999,
"limit": 500,
},
)
print(response.json())
Example response
{
"market_condition_id": "0x0008043c3ed513ecff7ee64380fc943dc73eb3dfb6674f281149efe4769f7515",
"start_timestamp": 1773964800000,
"end_timestamp": 1774051199999,
"data_count": 500,
"data": [
{
"market": "0x0008043c3ed513ecff7ee64380fc943dc73eb3dfb6674f281149efe4769f7515",
"asset_id": "97684905927345553455494278582909124912046930226695064344571162061840768197777",
"timestamp": "1773966061736",
"hash": "98894e2c3a5764942f6e6b8183b18cb330985975",
"bids": [],
"asks": [
{
"price": "0.99",
"size": "310000"
}
],
"event_type": "book",
"received_at": "2026-03-20T00:21:03.548509",
"worker_id": 24
}
],
"pagination": {
"limit": 500,
"has_more": true,
"next_cursor": "eyJ2IjoxLCJjb25kaXRpb25faWQiOiIweC4uLiJ9"
}
}
next_cursor is opaque. Pass it back unchanged with the same condition_id, start_timestamp, and end_timestamp to continue paging.