Market catalog stats
curl --request GET \
--url https://api.polynode.dev/v3/markets/stats \
--header 'x-api-key: <api-key>'import requests
url = "https://api.polynode.dev/v3/markets/stats"
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.polynode.dev/v3/markets/stats', 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.polynode.dev/v3/markets/stats",
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.polynode.dev/v3/markets/stats"
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.polynode.dev/v3/markets/stats")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v3/markets/stats")
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{
"market_count": 1,
"event_linked_market_count": 1,
"event_count": 1,
"status_counts": {
"open": 1,
"closed": 1,
"inactive": 1
}
}Markets & Search
Market Catalog Stats
Get complete market counts and open, closed, and inactive status totals.
GET
/
v3
/
markets
/
stats
Market catalog stats
curl --request GET \
--url https://api.polynode.dev/v3/markets/stats \
--header 'x-api-key: <api-key>'import requests
url = "https://api.polynode.dev/v3/markets/stats"
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.polynode.dev/v3/markets/stats', 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.polynode.dev/v3/markets/stats",
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.polynode.dev/v3/markets/stats"
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.polynode.dev/v3/markets/stats")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v3/markets/stats")
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{
"market_count": 1,
"event_linked_market_count": 1,
"event_count": 1,
"status_counts": {
"open": 1,
"closed": 1,
"inactive": 1
}
}Returns counts for the complete market catalog,
independent of any one page.
Counts change as markets are added or their status changes.
Request
curl "https://api.polynode.dev/v3/markets/stats" \
-H "x-api-key: $POLYNODE_API_KEY"
Response
{
"market_count": 2662678,
"event_linked_market_count": 2653204,
"event_count": 900634,
"status_counts": {
"open": 544652,
"closed": 2071666,
"inactive": 46360
}
}
| Field | Type | Description |
|---|---|---|
market_count | integer | Markets in the complete catalog. |
event_linked_market_count | integer | Markets with a parent event slug. |
event_count | integer | Distinct parent events represented by linked markets. |
status_counts.open | integer | Open markets. |
status_counts.closed | integer | Closed markets. |
status_counts.inactive | integer | Markets that are neither open nor closed. |
Errors
| Status | Error | When it occurs |
|---|---|---|
401 | authentication error | The API key is missing or invalid. |
503 | temporarily_unavailable | Markets and events are temporarily unavailable. |

