curl --request GET \
--url https://api.routeur.app/v1/markets/{venue}/{id}/book \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.routeur.app/v1/markets/{venue}/{id}/book"
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.routeur.app/v1/markets/{venue}/{id}/book', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.routeur.app/v1/markets/{venue}/{id}/book"
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))
}{
"data": {
"volume_24h_usd": "0.4100",
"trades_24h": 123,
"liquidity": "deep",
"venue": "kalshi",
"market_id": "<string>",
"source": "live",
"tier": "full",
"as_of": "2023-11-07T05:31:56Z",
"snapshot_at": "2023-11-07T05:31:56Z",
"events_applied": 123,
"depth": 123,
"yes": {
"bids": [
{
"price_usd": "0.4100",
"quantity": "0.4100",
"notional_usd": "0.4100"
}
],
"asks": [
{
"price_usd": "0.4100",
"quantity": "0.4100",
"notional_usd": "0.4100"
}
]
},
"no": {
"bids": [
{
"price_usd": "0.4100",
"quantity": "0.4100",
"notional_usd": "0.4100"
}
],
"asks": [
{
"price_usd": "0.4100",
"quantity": "0.4100",
"notional_usd": "0.4100"
}
]
},
"top": {
"yes_depth_1c_usd": "0.4100",
"yes_depth_2c_usd": "0.4100",
"yes_depth_5c_usd": "0.4100",
"no_depth_1c_usd": "0.4100",
"no_depth_2c_usd": "0.4100",
"no_depth_5c_usd": "0.4100",
"yes_bid_usd": "0.4100",
"yes_bid_quantity": "0.4100",
"yes_ask_usd": "0.4100",
"yes_ask_quantity": "0.4100",
"no_bid_usd": "0.4100",
"no_ask_usd": "0.4100",
"mid_usd": "0.4100",
"microprice_usd": "0.4100",
"spread_usd": "0.4100",
"imbalance": "0.4100"
},
"feed": {
"connected": true,
"stale_seconds": 123,
"last_message_at": "2023-11-07T05:31:56Z"
},
"issues": [
"<string>"
],
"volume_source": "venue",
"total_volume_usd": "0.4100",
"open_interest_usd": "0.4100",
"spread_usd": "0.4100",
"yes_spread_usd": "0.4100",
"no_spread_usd": "0.4100",
"book_spread_usd": "0.4100",
"book_yes_depth_5c_usd": "0.4100",
"book_no_depth_5c_usd": "0.4100",
"book_imbalance": "0.4100",
"book_at": "2023-11-07T05:31:56Z",
"venue_ts": "2023-11-07T05:31:56Z",
"seq": 123
}
}{
"error": {
"code": "invalid_parameter",
"message": "Invalid or unsupported query parameter: limit."
}
}{
"error": {
"code": "api_key_required",
"message": "Send an API key in the X-API-Key header or as a Bearer token."
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Order book
The market’s order book: both outcomes’ bids and asks to the depth asked, best first, with the top of book, the USD resting within 1, 2 and 5 cents of each side’s best bid, the imbalance between the sides, and the market’s liquidity grade.
Books are recorded from the venues’ own feeds. Markets graded
tradeable or deep, markets in a current lead, and markets of followed
events are recorded at full depth as every level changes (tier is
full); every other listed market is polled over REST, five levels
per side, once a cycle (tier is rest; /v1/books/health gives the
cycle time). A Yes ask is a No bid at the complementary price: the
two outcomes’ ladders are one book seen from each side.
Without at, the book is the latest recorded, rebuilt from the last
snapshot and every level change since (source is live; as_of is
when the last change was received, and feed says whether the venue
feed is connected). With at, the book as it stood at that moment
(source is rebuilt), from up to 90 days back while events are
still hot; older history is in the daily Parquet export.
Prices are per contract that pays $1; quantities are contracts on Kalshi and outcome shares on Polymarket.
curl --request GET \
--url https://api.routeur.app/v1/markets/{venue}/{id}/book \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.routeur.app/v1/markets/{venue}/{id}/book"
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.routeur.app/v1/markets/{venue}/{id}/book', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.routeur.app/v1/markets/{venue}/{id}/book"
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))
}{
"data": {
"volume_24h_usd": "0.4100",
"trades_24h": 123,
"liquidity": "deep",
"venue": "kalshi",
"market_id": "<string>",
"source": "live",
"tier": "full",
"as_of": "2023-11-07T05:31:56Z",
"snapshot_at": "2023-11-07T05:31:56Z",
"events_applied": 123,
"depth": 123,
"yes": {
"bids": [
{
"price_usd": "0.4100",
"quantity": "0.4100",
"notional_usd": "0.4100"
}
],
"asks": [
{
"price_usd": "0.4100",
"quantity": "0.4100",
"notional_usd": "0.4100"
}
]
},
"no": {
"bids": [
{
"price_usd": "0.4100",
"quantity": "0.4100",
"notional_usd": "0.4100"
}
],
"asks": [
{
"price_usd": "0.4100",
"quantity": "0.4100",
"notional_usd": "0.4100"
}
]
},
"top": {
"yes_depth_1c_usd": "0.4100",
"yes_depth_2c_usd": "0.4100",
"yes_depth_5c_usd": "0.4100",
"no_depth_1c_usd": "0.4100",
"no_depth_2c_usd": "0.4100",
"no_depth_5c_usd": "0.4100",
"yes_bid_usd": "0.4100",
"yes_bid_quantity": "0.4100",
"yes_ask_usd": "0.4100",
"yes_ask_quantity": "0.4100",
"no_bid_usd": "0.4100",
"no_ask_usd": "0.4100",
"mid_usd": "0.4100",
"microprice_usd": "0.4100",
"spread_usd": "0.4100",
"imbalance": "0.4100"
},
"feed": {
"connected": true,
"stale_seconds": 123,
"last_message_at": "2023-11-07T05:31:56Z"
},
"issues": [
"<string>"
],
"volume_source": "venue",
"total_volume_usd": "0.4100",
"open_interest_usd": "0.4100",
"spread_usd": "0.4100",
"yes_spread_usd": "0.4100",
"no_spread_usd": "0.4100",
"book_spread_usd": "0.4100",
"book_yes_depth_5c_usd": "0.4100",
"book_no_depth_5c_usd": "0.4100",
"book_imbalance": "0.4100",
"book_at": "2023-11-07T05:31:56Z",
"venue_ts": "2023-11-07T05:31:56Z",
"seq": 123
}
}{
"error": {
"code": "invalid_parameter",
"message": "Invalid or unsupported query parameter: limit."
}
}{
"error": {
"code": "api_key_required",
"message": "Send an API key in the X-API-Key header or as a Bearer token."
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Path Parameters
The venue the market is listed on.
kalshi, polymarket The venue's market id, such as a Kalshi ticker or a Polymarket market slug.
^[A-Za-z0-9][A-Za-z0-9_.-]{0,199}$Query Parameters
Levels per side to return.
1 <= x <= 100The moment to rebuild the book at, RFC 3339. Omit for the latest book.
Response
The book.
Show child attributes
Show child attributes