Historical top of book
curl --request GET \
--url https://api.oddpool.com/historical/kalshi/top-of-bookimport requests
url = "https://api.oddpool.com/historical/kalshi/top-of-book"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.oddpool.com/historical/kalshi/top-of-book', 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.oddpool.com/historical/kalshi/top-of-book",
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://api.oddpool.com/historical/kalshi/top-of-book"
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://api.oddpool.com/historical/kalshi/top-of-book")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oddpool.com/historical/kalshi/top-of-book")
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_bodyKalshi
Historical top of book
Lightweight timeseries of best bid, best ask, mid, and spread.
GET
/
historical
/
kalshi
/
top-of-book
Historical top of book
curl --request GET \
--url https://api.oddpool.com/historical/kalshi/top-of-bookimport requests
url = "https://api.oddpool.com/historical/kalshi/top-of-book"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.oddpool.com/historical/kalshi/top-of-book', 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.oddpool.com/historical/kalshi/top-of-book",
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://api.oddpool.com/historical/kalshi/top-of-book"
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://api.oddpool.com/historical/kalshi/top-of-book")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oddpool.com/historical/kalshi/top-of-book")
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_bodyLightweight timeseries of best bid, best ask, mid, and spread. Same data as the orderbook endpoint but without the full level arrays. Ideal for charting price history.
Parameters
string
required
Kalshi market ticker (e.g.,
KXFEDDECISION-26APR-H0).integer
Start time in Unix ms. Omit with
end_time to get latest data.integer
End time in Unix ms. Omit with
start_time to get latest data.string
default:"1m"
Snapshot interval:
1m or 5m.integer
default:"100"
Max rows per page (1-200).
string
Cursor from previous response for next page.
Example
curl -H "X-API-Key: oddpool_..." \
"https://api.oddpool.com/historical/kalshi/top-of-book?market_id=KXFEDDECISION-26APR-H0&start_time=1774015200000&end_time=1774018800000&granularity=5m"
Response
{
"snapshots": [
{
"market_id": "KXFEDDECISION-26APR-H0",
"timestamp": 1774015256106,
"best_yes_bid": 0.94,
"best_yes_ask": 0.94,
"mid": 0.94,
"spread": 0.0
}
],
"pagination": { ... }
}
best_yes_bid and best_yes_ask are null when the book had no resting orders at sample time. Filter client-side if you only want quoted snapshots.