curl --request GET \
--url https://api.polyorderbooks.com/v1/tokens/{token_id}/books \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.polyorderbooks.com/v1/tokens/{token_id}/books"
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.polyorderbooks.com/v1/tokens/{token_id}/books', 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.polyorderbooks.com/v1/tokens/{token_id}/books",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.polyorderbooks.com/v1/tokens/{token_id}/books"
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))
}HttpResponse<String> response = Unirest.get("https://api.polyorderbooks.com/v1/tokens/{token_id}/books")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polyorderbooks.com/v1/tokens/{token_id}/books")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"asks": [
[
0.73,
140
],
[
0.74,
300
]
],
"bids": [
[
0.72,
150
],
[
0.71,
320
]
],
"t": "2025-09-05T10:00:00Z"
}
],
"market_id": "618831",
"metadata": {
"count": 1,
"limit": 100
},
"resolution": "1h",
"token_id": "12345",
"token_label": "Yes"
}Polymarket Token Order Book API — L2 History
Get historical order book snapshots for a specific token.
Pagination limits:
- Default
limit: 100 points per page - Maximum
limit: 200 points per page - Use
cursorfrommetadata.next_cursorto fetch the next page
Aggregation: The last (most recent) order book in each interval is returned.
Format: JSON only. Covers Polymarket crypto markets from the PolyOrderbooks historical archive.
curl --request GET \
--url https://api.polyorderbooks.com/v1/tokens/{token_id}/books \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.polyorderbooks.com/v1/tokens/{token_id}/books"
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.polyorderbooks.com/v1/tokens/{token_id}/books', 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.polyorderbooks.com/v1/tokens/{token_id}/books",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.polyorderbooks.com/v1/tokens/{token_id}/books"
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))
}HttpResponse<String> response = Unirest.get("https://api.polyorderbooks.com/v1/tokens/{token_id}/books")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polyorderbooks.com/v1/tokens/{token_id}/books")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"asks": [
[
0.73,
140
],
[
0.74,
300
]
],
"bids": [
[
0.72,
150
],
[
0.71,
320
]
],
"t": "2025-09-05T10:00:00Z"
}
],
"market_id": "618831",
"metadata": {
"count": 1,
"limit": 100
},
"resolution": "1h",
"token_id": "12345",
"token_label": "Yes"
}Authorizations
Path Parameters
Token ID.
1 - 200"12345"
Query Parameters
Inclusive range start. Accepts ISO 8601 timestamp or Unix seconds.
"2025-09-04T00:00:00Z"
"1756944000"
Exclusive range end. Accepts ISO 8601 timestamp or Unix seconds.
"2025-09-05T00:00:00Z"
"1757030400"
Aggregation bucket size.
1s, 1m, 5m, 10m, 15m, 1h, 6h, 1d Maximum number of points to return in this page. Default: 100, max: 200.
x >= 1100
Opaque cursor from a previous response metadata.next_cursor.
Response
Historical order book snapshots for a single token.
Response for GET /tokens/{token_id}/books.
Canonical market ID.
"618831"
Requested token ID.
"12345"
Human-readable token label.
"Yes"
Applied resolution.
"1h"
Chronological order book snapshots for the selected token.
Show child attributes
Show child attributes
Pagination metadata for this history page.
Show child attributes
Show child attributes