Price history
curl --request GET \
--url https://relay.bayse.markets/v1/pm/events/{eventId}/price-historyimport requests
url = "https://relay.bayse.markets/v1/pm/events/{eventId}/price-history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://relay.bayse.markets/v1/pm/events/{eventId}/price-history', 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://relay.bayse.markets/v1/pm/events/{eventId}/price-history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://relay.bayse.markets/v1/pm/events/{eventId}/price-history"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://relay.bayse.markets/v1/pm/events/{eventId}/price-history")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.bayse.markets/v1/pm/events/{eventId}/price-history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"b2c3d4e5-f6a7-8901-bcde-f12345678901": [
{
"outcome": "YES",
"price": 0.65,
"timestamp": "2026-02-10T00:00:00Z"
},
{
"outcome": "YES",
"price": 0.68,
"timestamp": "2026-02-11T00:00:00Z"
},
{
"outcome": "YES",
"price": 0.72,
"timestamp": "2026-02-17T00:00:00Z"
}
]
}
Market data
Price history
Get historical price data for a prediction market event
GET
/
v1
/
pm
/
events
/
{eventId}
/
price-history
Price history
curl --request GET \
--url https://relay.bayse.markets/v1/pm/events/{eventId}/price-historyimport requests
url = "https://relay.bayse.markets/v1/pm/events/{eventId}/price-history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://relay.bayse.markets/v1/pm/events/{eventId}/price-history', 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://relay.bayse.markets/v1/pm/events/{eventId}/price-history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://relay.bayse.markets/v1/pm/events/{eventId}/price-history"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://relay.bayse.markets/v1/pm/events/{eventId}/price-history")
.asString();require 'uri'
require 'net/http'
url = URI("https://relay.bayse.markets/v1/pm/events/{eventId}/price-history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"b2c3d4e5-f6a7-8901-bcde-f12345678901": [
{
"outcome": "YES",
"price": 0.65,
"timestamp": "2026-02-10T00:00:00Z"
},
{
"outcome": "YES",
"price": 0.68,
"timestamp": "2026-02-11T00:00:00Z"
},
{
"outcome": "YES",
"price": 0.72,
"timestamp": "2026-02-17T00:00:00Z"
}
]
}
Authentication
No authentication required.Path parameters
UUID of the event.
Query parameters
Time window for the history. One of:
12H, 24H, 1W, 1M, 1Y.Filter to specific market UUIDs (comma-separated). Omit to return all markets in the event.
Filter to a specific outcome:
YES or NO.Example request
curl "https://relay.bayse.markets/v1/pm/events/a1b2c3d4-e5f6-7890-abcd-ef1234567890/price-history?timePeriod=1W&outcome=YES"
const eventId = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
const response = await fetch(
`https://relay.bayse.markets/v1/pm/events/${eventId}/price-history?timePeriod=1W&outcome=YES`
);
const data = await response.json();
import requests
event_id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'
resp = requests.get(
f'https://relay.bayse.markets/v1/pm/events/{event_id}/price-history',
params={'timePeriod': '1W', 'outcome': 'YES'},
)
data = resp.json()
req, _ := http.NewRequest(
"GET",
"https://relay.bayse.markets/v1/pm/events/a1b2c3d4-e5f6-7890-abcd-ef1234567890/price-history",
nil,
)
q := req.URL.Query()
q.Add("timePeriod", "1W")
q.Add("outcome", "YES")
req.URL.RawQuery = q.Encode()
resp, _ := http.DefaultClient.Do(req)
Response
Returns a map of market IDs to their price history arrays.{
"b2c3d4e5-f6a7-8901-bcde-f12345678901": [
{
"outcome": "YES",
"price": 0.65,
"timestamp": "2026-02-10T00:00:00Z"
},
{
"outcome": "YES",
"price": 0.68,
"timestamp": "2026-02-11T00:00:00Z"
},
{
"outcome": "YES",
"price": 0.72,
"timestamp": "2026-02-17T00:00:00Z"
}
]
}
⌘I