API reference · Markets
List markets
GET/v1/public/markets
Search every Kalshi and Polymarket market Langbot lists, with its status, latest price and volume.
On this page
Auth. None. Without a token the call is served as Free (the Free delay and request budget, shared per IP); send Authorization: Bearer lb_… for your plan's.
Limits. Counts against your plan's API requests; anonymous callers also share 30 a minute per IP.
Parameters
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
q | string | no | Free text over the ticker, title, outcome and phrases (case-insensitive). |
venue | string | no | kalshi or polymarket. |
category | string | no | A category slug; the response lists them under categories. |
status | string | no | open, closed, settled or all. Default all. |
sort | string | no | volume, closing (soonest first) or new. Default volume. |
cursor | string | no | next_cursor from the previous page. |
limit | integer | no | Page size. 1 to 200. Default 50. |
parlays | boolean | no | Include Kalshi combination markets, which are left out by default. |
Request
curl "https://api.langbot.ai/v1/public/markets?q=senate&status=open&limit=2"from langbot import LangbotClient
async with LangbotClient() as lb:
page = await lb.public_markets("senate", status="open", limit=2)
for m in page["markets"]:
print(m["venue"], m["ticker"], m["price"], m["title"])import { LangbotClient } from "@langbotai/sdk";
const lb = new LangbotClient();
const page = await lb.publicMarkets({ q: "senate", status: "open", limit: 2 });
for (const m of page.markets) console.log(m.venue, m.ticker, m.price, m.title);Response
200 OK
{
"ts": 1793685839220,
"q": "senate",
"venue": null,
"category": null,
"status": "open",
"sort": "volume",
"limit": 2,
"total": 3563,
"total_capped": false,
"next_cursor": "bzoy",
"categories": [
{"slug": "crypto", "name": "crypto", "markets": 3915279, "open": 1},
{"slug": "sports", "name": "sports", "markets": 1154664, "open": 33}
],
"markets": [
{
"ticker": "SENATETX-26-R",
"venue": "kalshi",
"event_id": null,
"title": "Will Republicans win the Senate race in Texas?",
"subtitle": "Ken Paxton",
"status": "open",
"result": null,
"category": "elections",
"category_slug": "elections",
"close_ts": 1825254000000,
"open_ts": 1733238000000,
"volume": 48312851.44,
"price": 0.265,
"price_source": "mid"
},
{
"ticker": "KXBALANCEPOWERCOMBO-27FEB-RR",
"venue": "kalshi",
"event_id": null,
"title": "Will House Control be Republican AND Senate Control be Republican for Feb 2027?",
"subtitle": "Republicans sweep",
"status": "open",
"result": null,
"category": "elections",
"category_slug": "elections",
"close_ts": 1801494000000,
"open_ts": 1765465200000,
"volume": 34989300.49,
"price": 0.0535,
"price_source": "mid"
}
]
}A real response from the API; long lists are cut to their first items.
price is the YES probability (0 to 1) and price_source says where it came from: result once settled, else the book mid, the last trade or the close. Pass next_cursor back as cursor for the next page (null on the last).
Errors
| Status | code | When |
|---|---|---|
| 401 | token_invalid | A token was sent and not recognised. Send a valid one, or none to call anonymously. |
| 422 | validation_error | A parameter failed validation; detail[].loc names it. |
| 429 | rate_limited | Over your request budget; wait Retry-After seconds. |
Every error body is {"detail": …, "code": "…"}; branch on code. All codes: Errors.