API reference · Research

Get calibration

GET/v1/research/calibration

How the venue's opening prices compared with settlement over every settled market the filters keep, by price bucket, with intervals.

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.
seriesstringnoA venue series ticker.
categorystringnoA category.
phrasestringnoA normalized phrase key.
venuestringnokalshi or polymarket.
sinceintegernoms epoch, by settlement time.
untilintegernoms epoch, by settlement time.
min_volumeintegernoLeave out markets with less volume.
basisstringnomid (the first two-sided mid, default) or trade (the first trade, which the caveats explain).
bucketsintegernoNumber of equal-width price buckets. 2 to 20. Default 10.
test_fractionnumbernoShare of markets, by settlement time, held out as the later split. Default 0.3.

Request

Terminal
curl "https://api.langbot.ai/v1/research/calibration?speaker=powell&basis=mid" \
  -H "Authorization: Bearer $LANGBOT_API_TOKEN"

Response

200 OK

JSON
{
  "v": 1,
  "basis": "mid",
  "buckets": 10,
  "n": 214,
  "by_bucket": [ { "bucket": 1, "lo_c": 10, "hi_c": 20, "n": 31, "avg_price_c": 14.6, "yes_rate": 0.161, "yes_rate_ci90": [0.08, 0.29], "gap_c": 1.5, "brier": 0.134, "p_value": 0.71 } ],
  "overall": { "n": 214, "gap_c": -0.8, "gap_ci90_clustered": [-4.1, 2.6], "brier": 0.151 },
  "split": { "test_fraction": 0.3, "train": { "n": 150 }, "test": { "n": 64 } },
  "trials": { "count_30d": 4 },
  "caveats": ["mid basis: the first two-sided mid"]
}

Every figure has its sample size and a 90% interval, with Benjamini-Hochberg control across buckets. Each query is written to your trials ledger. Measurements, never signals.

Errors

StatuscodeWhen
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.