cURL
curl --request GET \
--url 'https://api.coinstats.app/v1/prediction/events/<slug>' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.coinstats.app/v1/prediction/events/<slug>"
headers = {"X-API-KEY": "<api-key>"}
response = requests.request("GET", url, headers=headers)
print(response.json())const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.coinstats.app/v1/prediction/events/<slug>', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/prediction/events/<slug>",
CURLOPT_RETURNTRANSFER => true,
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"
"io"
"net/http"
)
func main() {
url := "https://api.coinstats.app/v1/prediction/events/<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.coinstats.app/v1/prediction/events/<slug>")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinstats.app/v1/prediction/events/{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{
"success": true,
"timestamp": "2025-06-19T12:00:00.000Z",
"data": {
"source": "polymarket",
"sourceId": "<string>",
"eventId": 123,
"slug": "us-election-2024",
"title": "2024 US Presidential Election",
"description": "<string>",
"image": "<string>",
"icon": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"volume": 123,
"volume24hr": 123,
"liquidity": 123,
"competitive": 123,
"active": true,
"closed": true,
"archived": true,
"restricted": true,
"marketIds": [
"<string>"
],
"tagIds": [
"<string>"
],
"seriesId": "<string>",
"markets": [
{
"source": "polymarket",
"sourceId": "0x1234",
"conditionId": "0xcondition...",
"marketId": 512345,
"slug": "will-btc-hit-100k-2025",
"question": "Will BTC hit $100k in 2025?",
"description": "<string>",
"image": "<string>",
"icon": "<string>",
"outcomes": [
"Yes",
"No"
],
"outcomePrices": [
0.62,
0.38
],
"clobTokenIds": [
"<string>"
],
"volume": 1500000,
"volume24hr": 45000,
"liquidity": 230000,
"openInterest": 123,
"bestBid": 123,
"bestAsk": 123,
"spread": 123,
"midpoint": 123,
"startDate": "<string>",
"endDate": "<string>",
"active": true,
"closed": true,
"resolved": true,
"acceptingOrders": true,
"resolutionSource": "<string>",
"resolvedOutcome": "<string>",
"resolvedAt": "<string>",
"eventId": 123,
"eventSlug": "<string>",
"tagIds": [
"<string>"
],
"priceChange24hr": 123,
"volumeChange24hr": 123
}
]
}
}{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}Prediction · Events
Get Event
Get an event with its child markets
GET
/
v1
/
prediction
/
events
/
{slug}
cURL
curl --request GET \
--url 'https://api.coinstats.app/v1/prediction/events/<slug>' \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.coinstats.app/v1/prediction/events/<slug>"
headers = {"X-API-KEY": "<api-key>"}
response = requests.request("GET", url, headers=headers)
print(response.json())const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.coinstats.app/v1/prediction/events/<slug>', options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coinstats.app/v1/prediction/events/<slug>",
CURLOPT_RETURNTRANSFER => true,
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"
"io"
"net/http"
)
func main() {
url := "https://api.coinstats.app/v1/prediction/events/<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.coinstats.app/v1/prediction/events/<slug>")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coinstats.app/v1/prediction/events/{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{
"success": true,
"timestamp": "2025-06-19T12:00:00.000Z",
"data": {
"source": "polymarket",
"sourceId": "<string>",
"eventId": 123,
"slug": "us-election-2024",
"title": "2024 US Presidential Election",
"description": "<string>",
"image": "<string>",
"icon": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"volume": 123,
"volume24hr": 123,
"liquidity": 123,
"competitive": 123,
"active": true,
"closed": true,
"archived": true,
"restricted": true,
"marketIds": [
"<string>"
],
"tagIds": [
"<string>"
],
"seriesId": "<string>",
"markets": [
{
"source": "polymarket",
"sourceId": "0x1234",
"conditionId": "0xcondition...",
"marketId": 512345,
"slug": "will-btc-hit-100k-2025",
"question": "Will BTC hit $100k in 2025?",
"description": "<string>",
"image": "<string>",
"icon": "<string>",
"outcomes": [
"Yes",
"No"
],
"outcomePrices": [
0.62,
0.38
],
"clobTokenIds": [
"<string>"
],
"volume": 1500000,
"volume24hr": 45000,
"liquidity": 230000,
"openInterest": 123,
"bestBid": 123,
"bestAsk": 123,
"spread": 123,
"midpoint": 123,
"startDate": "<string>",
"endDate": "<string>",
"active": true,
"closed": true,
"resolved": true,
"acceptingOrders": true,
"resolutionSource": "<string>",
"resolvedOutcome": "<string>",
"resolvedAt": "<string>",
"eventId": 123,
"eventSlug": "<string>",
"tagIds": [
"<string>"
],
"priceChange24hr": 123,
"volumeChange24hr": 123
}
]
}
}{
"statusCode": 400,
"message": "Bad Request",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 401,
"message": "Unauthorized",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 403,
"message": "Forbidden",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 404,
"message": "Not Found",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 409,
"message": "Transactions not synced",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 429,
"message": "Rate limit exceeded",
"requestId": "11111111-2222-3333-4444-555555555555",
"path": "<requested-endpoint>"
}{
"statusCode": 503,
"message": "Service Unavailable. Please Contact Support"
}1 credit per request
You will get
You will get
- A single event by
slugalong with every market nested under it. - Use it to render an event page showing all constituent outcomes (e.g. all candidates in a race) in one request.
Authorizations
API key required to access the endpoints. Generate one from your dashboard at https://openapi.coinstats.app and pass it in the X-API-KEY request header. Never expose your key in client-side code.
Path Parameters
Was this page helpful?
⌘I