Get Polymarket Market Data
curl --request GET \
--url https://api.entityml.com/api/v1/polymarket/market/data \
--header 'Authorization: <authorization>'import requests
url = "https://api.entityml.com/api/v1/polymarket/market/data"
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', 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",
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"
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")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.entityml.com/api/v1/polymarket/market/data")
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>",
"date": "<string>",
"data_count": 123,
"data": [
{
"market": "<string>",
"asset_id": "<string>",
"timestamp": "<string>",
"hash": "<string>",
"event_type": "<string>",
"bids": [
{}
],
"asks": [
{}
],
"changes": [
{}
],
"received_at": "<string>",
"worker_id": 123
}
],
"pagination": {}
}Polymarket
Get Polymarket Market Data
Retrieve raw Polymarket order book events for a specific market condition and UTC date.
GET
/
api
/
v1
/
polymarket
/
market
/
data
Get Polymarket Market Data
curl --request GET \
--url https://api.entityml.com/api/v1/polymarket/market/data \
--header 'Authorization: <authorization>'import requests
url = "https://api.entityml.com/api/v1/polymarket/market/data"
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', 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",
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"
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")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.entityml.com/api/v1/polymarket/market/data")
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>",
"date": "<string>",
"data_count": 123,
"data": [
{
"market": "<string>",
"asset_id": "<string>",
"timestamp": "<string>",
"hash": "<string>",
"event_type": "<string>",
"bids": [
{}
],
"asks": [
{}
],
"changes": [
{}
],
"received_at": "<string>",
"worker_id": 123
}
],
"pagination": {}
}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. If you only have a slug or Polymarket URL, use Look Up Polymarket Slug.string
required
UTC date in
YYYY-MM-DD format. Orderbook data exists for a subset of Polymarket markets from 2025-09-01, but coverage is not continuous. Broad Polymarket crypto-related coverage begins on 2026-02-04, and broad all-market capture begins on 2026-04-02, with known April 2026 quality exceptions. This endpoint currently rejects dates earlier than 2026-02-08. Use Get Polymarket Market Date Range to inspect stored availability for a specific market.integer
Number of filtered records to skip. Default:
0.integer
Maximum number of filtered records to return. Default:
10000. Max: 100000.Response
string
The normalized market condition ID with the
0x prefix.string
The requested UTC date.
integer
Number of records returned in the current page.
array
Array of raw Polymarket events. Each event can include the following fields:
Show Event fields
Show Event fields
string
Market condition ID.
string
CLOB token ID.
string
Event timestamp in milliseconds.
string
Unique hash for the event.
string
Event type, typically
"book" or "price_change".array
Array of bid orders with
price and size fields. Present on snapshot-style records.array
Array of ask orders with
price and size fields. Present on snapshot-style records.array
Array of price changes with
price, side, and size fields. Present on incremental records.string
ISO timestamp when the event was recorded.
integer
Internal ingestion worker identifier when present.
object
Pagination metadata with
offset, limit, total_count, and has_more.The legacy alias
GET /api/v1/market/data remains available for existing integrations.For arbitrary windows across one or more days, use Get Polymarket Market Data Range.
Example
from entityml import EntityMLClient
client = EntityMLClient(api_key="YOUR_API_KEY")
data = client.polymarket.get_market_data(
condition_id="0x8213d395e079614d6c4d7f4cbb9be9337ab51648a21cc2a334ae8f1966d164b4",
date="2026-03-20",
)
print(data["data_count"])
export ENTITY_API_KEY="YOUR_API_KEY"
entityml polymarket market-data \
--condition-id 0x8213d395e079614d6c4d7f4cbb9be9337ab51648a21cc2a334ae8f1966d164b4 \
--date 2026-03-20
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.entityml.com/api/v1/polymarket/market/data?condition_id=0x8213d395e079614d6c4d7f4cbb9be9337ab51648a21cc2a334ae8f1966d164b4&date=2026-03-20&offset=0&limit=500"
import os
import requests
api_key = os.environ.get('ENTITY_API_KEY')
response = requests.get(
'https://api.entityml.com/api/v1/polymarket/market/data',
headers={'Authorization': f'Bearer {api_key}'},
params={
'condition_id': '0x8213d395e079614d6c4d7f4cbb9be9337ab51648a21cc2a334ae8f1966d164b4',
'date': '2026-03-20',
'offset': 0,
'limit': 500,
}
)
print(response.json())
const params = new URLSearchParams({
condition_id: '0x8213d395e079614d6c4d7f4cbb9be9337ab51648a21cc2a334ae8f1966d164b4',
date: '2026-03-20',
offset: '0',
limit: '500'
});
const response = await fetch(
`https://api.entityml.com/api/v1/polymarket/market/data?${params}`,
{
headers: {
'Authorization': `Bearer ${process.env.ENTITY_API_KEY}`
}
}
);
const data = await response.json();
console.log(data);
Example response
{
"market_condition_id": "0x8213d395e079614d6c4d7f4cbb9be9337ab51648a21cc2a334ae8f1966d164b4",
"date": "2026-03-20",
"data_count": 47,
"data": [
{
"market": "0x8213d395e079614d6c4d7f4cbb9be9337ab51648a21cc2a334ae8f1966d164b4",
"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": {
"offset": 0,
"limit": 500,
"total_count": 47,
"has_more": false
}
}