curl --request GET \
--url https://api.routeur.app/v1/markets/{venue}/{id}/rules \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.routeur.app/v1/markets/{venue}/{id}/rules"
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}/rules', 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}/rules"
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": {
"venue": "kalshi",
"id": "KXCPI-26SEP-T3.0",
"title": "CPI above 3.0% in September?",
"rules_hash": "6d1f0a4c2e8b9f70c13a5e7d2b4c6a8e0f1d3c5b7a9e1f3d5c7b9a1e3f5d7c9b",
"rules": "If the CPI for September 2026 is above 3.0%, then the market resolves to Yes.\n\nThe Source Agency is the Bureau of Labor Statistics.",
"rulebooks": [
{
"venue": "kalshi",
"kind": "series",
"id": "KXCPI",
"content_hash": "2c9e7a1d4b6f8e0c1a3d5f7b9e1c3a5d7f9b1e3c5a7d9f1b3e5c7a9d1f3b5e7c",
"first_seen_at": "2026-09-14T12:00:00Z",
"last_seen_at": "2026-09-17T09:00:00Z",
"fields": {
"contract_terms_url": "https://assets.kalshi.com/contract_terms/KXCPI.pdf",
"contract_url": "https://assets.kalshi.com/regulatory/product-certifications/KXCPI.pdf",
"settlement_sources": [
{
"name": "Bureau of Labor Statistics",
"url": "https://www.bls.gov/cpi/"
}
],
"additional_prohibitions": [
"Persons who are employed by any of the Source Agencies are not permitted to trade on the Contract."
],
"product_metadata": {}
},
"settlement_sources": [
{
"name": "Bureau of Labor Statistics",
"url": "https://www.bls.gov/cpi/"
}
],
"source_url": "https://assets.kalshi.com/contract_terms/KXCPI.pdf",
"document": {
"url": "https://assets.kalshi.com/contract_terms/KXCPI.pdf",
"content_hash": "9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7d9f1a3c5e7b9d1f3a5c7e9b1d",
"text": "KXCPI\nScope: These rules shall apply to this contract.\nUnderlying: The Consumer Price Index for All Urban Consumers...",
"fetched_at": "2026-09-17T03:10:00Z"
},
"changed_fields": []
},
{
"venue": "kalshi",
"kind": "event",
"id": "KXCPI-26SEP",
"content_hash": "4e6a8c0e2a4c6e8a0c2e4a6c8e0a2c4e6a8c0e2a4c6e8a0c2e4a6c8e0a2c4e6a",
"first_seen_at": "2026-09-14T12:00:00Z",
"last_seen_at": "2026-09-17T09:00:00Z",
"fields": {
"mutually_exclusive": true,
"settlement_sources": [
{
"name": "Bureau of Labor Statistics",
"url": "https://www.bls.gov/cpi/"
}
],
"strike_date": "2026-10-14T12:30:00Z",
"strike_period": "",
"collateral_return_type": "MECNET"
},
"settlement_sources": [
{
"name": "Bureau of Labor Statistics",
"url": "https://www.bls.gov/cpi/"
}
],
"changed_fields": []
}
],
"versions": [
{
"rules_hash": "1a3c5e7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7d9f1a3c",
"first_seen_at": "2026-09-14T12:00:00Z",
"last_seen_at": "2026-09-15T18:00:00Z",
"changed_fields": [],
"rulebooks_changed": []
},
{
"rules_hash": "6d1f0a4c2e8b9f70c13a5e7d2b4c6a8e0f1d3c5b7a9e1f3d5c7b9a1e3f5d7c9b",
"first_seen_at": "2026-09-15T19:00:00Z",
"last_seen_at": "2026-09-17T09:00:00Z",
"changed_fields": [
"rules"
],
"summary": "Rules text changed (+1 −1 lines).",
"diff": "--- rules@1a3c5e7b9d1f\n+++ rules@6d1f0a4c2e8b\n@@ -1,3 +1,3 @@\n-If the CPI for September 2026 is above 3.0%, then the market resolves to Yes.\n+If the CPI for September 2026 is above 3.0%, then the market resolves to Yes.\n \n The Source Agency is the Bureau of Labor Statistics.\n",
"rulebooks_changed": []
}
],
"changes": [
{
"scope": "contract",
"from_hash": "1a3c5e7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7d9f1a3c",
"to_hash": "6d1f0a4c2e8b9f70c13a5e7d2b4c6a8e0f1d3c5b7a9e1f3d5c7b9a1e3f5d7c9b",
"changed_at": "2026-09-15T19:00:00Z",
"changed_fields": [
"rules"
],
"summary": "Rules text changed (+1 −1 lines)."
}
]
}
}{
"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."
}
}Get a market's rules and their history
The market’s current rule text, the rulebooks in force above it with their settlement sources, source links and contract terms documents, every recorded version of the contract (hash, when it was first and last seen, which fields changed, a unified diff from the version before, and which rulebooks changed with it), and the ledger of every change to the market’s terms, including rulebook and document changes under an unchanged contract. Use it to see exactly how a market is decided, whether that changed since a position was taken, and what the venue’s own terms document says. Works for any market ever recorded, listed or not.
curl --request GET \
--url https://api.routeur.app/v1/markets/{venue}/{id}/rules \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.routeur.app/v1/markets/{venue}/{id}/rules"
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}/rules', 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}/rules"
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": {
"venue": "kalshi",
"id": "KXCPI-26SEP-T3.0",
"title": "CPI above 3.0% in September?",
"rules_hash": "6d1f0a4c2e8b9f70c13a5e7d2b4c6a8e0f1d3c5b7a9e1f3d5c7b9a1e3f5d7c9b",
"rules": "If the CPI for September 2026 is above 3.0%, then the market resolves to Yes.\n\nThe Source Agency is the Bureau of Labor Statistics.",
"rulebooks": [
{
"venue": "kalshi",
"kind": "series",
"id": "KXCPI",
"content_hash": "2c9e7a1d4b6f8e0c1a3d5f7b9e1c3a5d7f9b1e3c5a7d9f1b3e5c7a9d1f3b5e7c",
"first_seen_at": "2026-09-14T12:00:00Z",
"last_seen_at": "2026-09-17T09:00:00Z",
"fields": {
"contract_terms_url": "https://assets.kalshi.com/contract_terms/KXCPI.pdf",
"contract_url": "https://assets.kalshi.com/regulatory/product-certifications/KXCPI.pdf",
"settlement_sources": [
{
"name": "Bureau of Labor Statistics",
"url": "https://www.bls.gov/cpi/"
}
],
"additional_prohibitions": [
"Persons who are employed by any of the Source Agencies are not permitted to trade on the Contract."
],
"product_metadata": {}
},
"settlement_sources": [
{
"name": "Bureau of Labor Statistics",
"url": "https://www.bls.gov/cpi/"
}
],
"source_url": "https://assets.kalshi.com/contract_terms/KXCPI.pdf",
"document": {
"url": "https://assets.kalshi.com/contract_terms/KXCPI.pdf",
"content_hash": "9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7d9f1a3c5e7b9d1f3a5c7e9b1d",
"text": "KXCPI\nScope: These rules shall apply to this contract.\nUnderlying: The Consumer Price Index for All Urban Consumers...",
"fetched_at": "2026-09-17T03:10:00Z"
},
"changed_fields": []
},
{
"venue": "kalshi",
"kind": "event",
"id": "KXCPI-26SEP",
"content_hash": "4e6a8c0e2a4c6e8a0c2e4a6c8e0a2c4e6a8c0e2a4c6e8a0c2e4a6c8e0a2c4e6a",
"first_seen_at": "2026-09-14T12:00:00Z",
"last_seen_at": "2026-09-17T09:00:00Z",
"fields": {
"mutually_exclusive": true,
"settlement_sources": [
{
"name": "Bureau of Labor Statistics",
"url": "https://www.bls.gov/cpi/"
}
],
"strike_date": "2026-10-14T12:30:00Z",
"strike_period": "",
"collateral_return_type": "MECNET"
},
"settlement_sources": [
{
"name": "Bureau of Labor Statistics",
"url": "https://www.bls.gov/cpi/"
}
],
"changed_fields": []
}
],
"versions": [
{
"rules_hash": "1a3c5e7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7d9f1a3c",
"first_seen_at": "2026-09-14T12:00:00Z",
"last_seen_at": "2026-09-15T18:00:00Z",
"changed_fields": [],
"rulebooks_changed": []
},
{
"rules_hash": "6d1f0a4c2e8b9f70c13a5e7d2b4c6a8e0f1d3c5b7a9e1f3d5c7b9a1e3f5d7c9b",
"first_seen_at": "2026-09-15T19:00:00Z",
"last_seen_at": "2026-09-17T09:00:00Z",
"changed_fields": [
"rules"
],
"summary": "Rules text changed (+1 −1 lines).",
"diff": "--- rules@1a3c5e7b9d1f\n+++ rules@6d1f0a4c2e8b\n@@ -1,3 +1,3 @@\n-If the CPI for September 2026 is above 3.0%, then the market resolves to Yes.\n+If the CPI for September 2026 is above 3.0%, then the market resolves to Yes.\n \n The Source Agency is the Bureau of Labor Statistics.\n",
"rulebooks_changed": []
}
],
"changes": [
{
"scope": "contract",
"from_hash": "1a3c5e7b9d1f3a5c7e9b1d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7d9f1a3c",
"to_hash": "6d1f0a4c2e8b9f70c13a5e7d2b4c6a8e0f1d3c5b7a9e1f3d5c7b9a1e3f5d7c9b",
"changed_at": "2026-09-15T19:00:00Z",
"changed_fields": [
"rules"
],
"summary": "Rules text changed (+1 −1 lines)."
}
]
}
}{
"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."
}
}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}$Response
The market's terms and history.
Show child attributes
Show child attributes