curl --request GET \
--url https://api.polyorderbooks.com/v1/markets/{id_or_slug} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.polyorderbooks.com/v1/markets/{id_or_slug}"
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/markets/{id_or_slug}', 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/markets/{id_or_slug}",
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/markets/{id_or_slug}"
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/markets/{id_or_slug}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polyorderbooks.com/v1/markets/{id_or_slug}")
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{
"description": "Resolves to YES if Candidate X wins the 2025 election.",
"end_date": "2025-11-05T23:59:59Z",
"id": "618831",
"question": "Will Candidate X win the 2025 election?",
"slug": "will-candidate-x-win-2025",
"start_date": "2025-09-01T00:00:00Z",
"status": "open",
"tokens": [
{
"id": "12345",
"label": "Yes"
},
{
"id": "12346",
"label": "No"
}
]
}{
"error": "unauthorized",
"message": "Invalid or expired API key."
}{
"error": "not_found",
"message": "Market not found: nonexistent_market_id"
}{
"detail": [
{
"loc": [
"query",
"limit"
],
"msg": "Input should be less than or equal to 1000",
"type": "less_than_equal"
}
]
}{
"error": "rate_limited",
"message": "Rate limit exceeded. Please try again later."
}{
"error": "internal_error",
"message": "Failed to fetch data."
}Polymarket Market Details API
Get detailed information about a specific market by ID or slug.
Returns full market information, including tokens, description, and resolution status. Covers Polymarket crypto markets from the PolyOrderbooks historical archive.
curl --request GET \
--url https://api.polyorderbooks.com/v1/markets/{id_or_slug} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.polyorderbooks.com/v1/markets/{id_or_slug}"
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/markets/{id_or_slug}', 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/markets/{id_or_slug}",
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/markets/{id_or_slug}"
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/markets/{id_or_slug}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polyorderbooks.com/v1/markets/{id_or_slug}")
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{
"description": "Resolves to YES if Candidate X wins the 2025 election.",
"end_date": "2025-11-05T23:59:59Z",
"id": "618831",
"question": "Will Candidate X win the 2025 election?",
"slug": "will-candidate-x-win-2025",
"start_date": "2025-09-01T00:00:00Z",
"status": "open",
"tokens": [
{
"id": "12345",
"label": "Yes"
},
{
"id": "12346",
"label": "No"
}
]
}{
"error": "unauthorized",
"message": "Invalid or expired API key."
}{
"error": "not_found",
"message": "Market not found: nonexistent_market_id"
}{
"detail": [
{
"loc": [
"query",
"limit"
],
"msg": "Input should be less than or equal to 1000",
"type": "less_than_equal"
}
]
}{
"error": "rate_limited",
"message": "Rate limit exceeded. Please try again later."
}{
"error": "internal_error",
"message": "Failed to fetch data."
}Authorizations
Path Parameters
Market ID or market slug.
1 - 200"618831"
Response
Detailed market object with tokens and resolution metadata.
Detailed response for GET /markets/{id_or_slug}.
Unique market identifier.
"618831"
Stable URL-friendly market slug.
"will-candidate-x-win-2025"
Human-readable market question.
"Will Candidate X win the 2025 election?"
Long-form market description, if available.
"Resolves to YES if Candidate X wins the 2025 election."
Current market status.
"open"
Market start timestamp in ISO 8601 format.
"2025-09-01T00:00:00Z"
Market end timestamp in ISO 8601 format.
"2025-11-05T23:59:59Z"
Timestamp when the market was closed.
"2025-11-06T03:00:00Z"
Winning token identifier when market is resolved.
"12345"
Winning token label when market is resolved.
"Yes"
All tokens for the market.
Show child attributes
Show child attributes