API reference · Markets

Get market context

GET/v1/context/{ticker}

One market in one call, with its rules, latest book, base rate for its speaker and phrase, its event and recent mentions.

On this page

Auth. An API token: Authorization: Bearer lb_… (create one). Signed-in web sessions work too.

Limits. One history query per call (500 a day on Free; unlimited on Builder and Standard).

Parameters

Path parameters

NameTypeRequiredDescription
tickerstringyesThe venue ticker or pm_<id>.

Query parameters

NameTypeRequiredDescription
window_daysintegernoLook-back window for the base rate, in days. 1 to 3650.

Request

Terminal
curl "https://api.langbot.ai/v1/context/KXFEDMENTION-26OCT-TRANSITORY" \
  -H "Authorization: Bearer $LANGBOT_API_TOKEN"

Response

200 OK

JSON
{
  "ts": 1793380000000,
  "ticker": "KXFEDMENTION-26OCT-TRANSITORY",
  "market": {
    "ticker": "KXFEDMENTION-26OCT-TRANSITORY",
    "venue": "kalshi",
    "event_id": "ev_fomc_oct_2026_presser",
    "title": "Will Powell say \"transitory\" at the October press conference?",
    "phrases": ["transitory"],
    "status": "open",
    "close_ts": 1793390400000
  },
  "outcome": null,
  "rules_text": "If Jerome Powell says \"transitory\" during the press conference…",
  "settlement_source": "the official video of the press conference",
  "speaker": "powell",
  "phrase": "transitory",
  "base_rates": { "speaker": "powell", "phrase": "transitory", "window_days": 365, "markets": 9, "yes": 2, "no": 7, "void": 0, "yes_rate": 0.222 },
  "book": { "ticker": "KXFEDMENTION-26OCT-TRANSITORY", "ts": 1793380000000, "yes_bid": 0.12, "yes_ask": 0.15 },
  "event": { "id": "ev_fomc_oct_2026_presser", "title": "FOMC press conference", "starts_at": 1793385000000, "status": "upcoming" },
  "rights": "public_domain",
  "mentions": []
}

Errors

StatuscodeWhen
404not_foundNo market with that ticker.
401auth_requiredNo token was sent.
401token_invalidThe token was not recognised (mistyped, revoked or expired).
422validation_errorA parameter failed validation; detail[].loc names it.
429quota_exceededToday's history queries are spent; quota.resets_at says when they reset.
429rate_limitedOver your request budget; wait Retry-After seconds.

Every error body is {"detail": …, "code": "…"}; branch on code. All codes: Errors.