API reference · History

Get base rates

GET/v1/history/base-rates

How often markets on a speaker, a phrase or the pair settled YES, and at what prices they opened and closed.

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

Query parameters

NameTypeRequiredDescription
speakerstringnoA canonical speaker key. Omit it for a phrase-wide rate.
phrasestringnoA normalized phrase key. Omit it for a speaker-wide rate.
seriesstringnoA venue series ticker.
window_daysintegernoLook-back window in days. 1 to 3650.

Request

Terminal
curl "https://api.langbot.ai/v1/history/base-rates?speaker=powell&phrase=transitory" \
  -H "Authorization: Bearer $LANGBOT_API_TOKEN"

Response

200 OK

JSON
{
  "speaker": "powell",
  "phrase": "transitory",
  "series": null,
  "window_days": 365,
  "since": 1761900000000,
  "markets": 9,
  "yes": 2,
  "no": 7,
  "void": 0,
  "yes_rate": 0.222,
  "by_month": [ { "month": "2026-09", "markets": 1, "yes": 0, "no": 1, "void": 0, "yes_rate": 0.0 } ],
  "avg_open_price": 21.4,
  "avg_close_price": 19.8,
  "mispricing": 0.008
}

yes_rate = yes / (yes + no); voids are left out. Prices are in cents. mispricing is the mean of (1 if YES else 0) minus the opening price as a fraction. These describe what settled, not the next market.

Errors

StatuscodeWhen
404not_foundNothing settled on that speaker and phrase.
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.