API 參考。

每條路由、參數和物件,直接來自我們的 OpenAPI 文件。

基本位址: https://api.kalkas.ai

下載 OpenAPI 文件

參考內容以英文撰寫;本站其餘部分是你的語言。

每個請求。

兩個都是選用的標頭。

參數
  • Kalkas-Versionheader2026-10-03 · 選填

    The API version as a date. Absent: the latest. Unknown: 400 unsupported_version.

  • Idempotency-Keyheaderstring · 選填

    1 to 255 visible ASCII characters. A request that changes something with the same key and request returns the first response for 24 hours; the same key with another request is 409 idempotency_key_reused. Reads ignore it.

GET/v1/decisions

List decisions

The decisions Kalkas has committed, newest question first. A caller sees a decision once its tier first sees it: in a market with first sight on, a free caller after the question closes; in a market with it off, everyone once it is committed.

參數
  • limitqueryinteger · 選填

    Page size, 1 to 100.

  • starting_afterquerystring · 選填

    The next_cursor of the previous page.

  • topicquerystring · 選填

    Only this decisions topic.

  • statusqueryopen | resolved · 選填

    open: not yet resolved. resolved: settled, void or ambiguous.

  • subjectquerystring · 選填

    Only questions about this entity key.

回應
  • 200DecisionList

    OK

GET/v1/decisions/{id}

Get one decision

One decision by its question key (URL-encode it). 404 when the question has no decision this caller sees.

參數
  • idpathstring · 必填
  • expand[]queryanalysis · 選填

    analysis adds every forecaster's latest forecast.

回應
  • 200Decision

    OK

GET/v1/events

List events

The decision event log, oldest first, for replay: decision.created, decision.updated and decision.resolved. Resume with after.

參數
  • limitqueryinteger · 選填

    Page size, 1 to 100.

  • afterquerystring · 選填

    The cursor of the last event read (or next_cursor of the previous page). Absent: from the start.

  • typesquerystring · 選填

    Comma-separated event types.

  • topicsquerystring · 選填

    Comma-separated decisions topics.

回應
  • 200EventList

    OK

GET/v1/record

Get the record

The evaluator's aggregates for one decisions topic, or for every held topic.

參數
  • topicquerystring · 選填

    Only this decisions topic.

回應
  • 200Record or RecordList

    OK

GET/v1/topics

List topics

Every topic Kalkas offers, with whether the caller holds it.

參數
  • limitqueryinteger · 選填

    Page size, 1 to 100.

  • starting_afterquerystring · 選填

    The next_cursor of the previous page.

回應
  • 200TopicList

    OK

物件。

各路由回應的內容。

Decision

欄位
  • analysislist of Forecast · 選填

    Present only with expand[]=analysis.

  • attributionlist of string · 必填

    Text to show with the decision, from the data licences behind it.

  • committed_atstring (date-time) · 必填
  • digeststring · 必填

    Content digest of the decision fact.

  • domainstring · 必填
  • edgenumber or null · 必填
  • fair_oddsnumber or null · 必填

    1 / probability.

  • headlineobject or null · 必填
  • idstring · 必填

    The question's ledger key. URL-encode it in a path.

  • kalkas_paper_actionobject · 必填
  • kalkas_paper_action.actedboolean · 必填

    Whether Kalkas acted on its own paper book. Information only: there is no stake.

  • marketobject · 必填
  • market.probabilitynumber or null · 必填

    The de-vigged market probability at the time. No venue is named.

  • objectalways "decision" · 必填
  • probabilitynumber or null · 必填

    Kalkas's committed probability that the question resolves yes.

  • questionobject · 必填
  • question.classstring · 必填
  • question.deadlinestring (date-time) · 必填
  • question.groupstring or null · 必填
  • question.resolution_rulestring · 必填
  • question.subjectobject · 必填
  • question.subject.entitystring · 必填
  • question.subject.namestring or null · 必填
  • question.termsany · 必填

    The question's structured terms (a symbol, a start, a band), or null.

  • resolutionobject or null · 必填
  • scoreobject or null · 必填
  • seqstring · 必填

    The decision's position in decision lists.

  • standingunresolved | resolved | void | ambiguous · 必填
  • topicstring · 必填
  • versioninteger · 必填

    How many decisions Kalkas has committed on the question that this caller sees.

DecisionList

The decisions, newest first.

欄位
  • datalist of Decision · 必填
  • has_moreboolean · 必填
  • next_cursorstring or null · 必填

    Pass as the cursor parameter to continue. Opaque.

  • objectalways "list" · 必填

Error

欄位
  • errorobject · 必填
  • error.codestring · 必填

    The specific cause, stable within an API version.

  • error.messagestring · 必填

    For people. Not stable.

  • error.paramstring or null · 必填

    The parameter or header at fault, when one is.

  • error.request_idstring · 必填

    The Request-Id of the response; quote it in a report.

  • error.typeinvalid_request_error | authentication_error | permission_error | rate_limit_error | api_error · 必填

    The class of error: what the caller should do about it.

Event

欄位
  • createdstring (date-time) · 必填
  • cursorstring · 必填

    Pass as after to resume after this event.

  • dataobject · 必填
  • data.objectDecision · 必填
  • idstring · 必填

    Stable: the same event has the same id however often it is read.

  • objectalways "event" · 必填
  • topicstring · 必填
  • typedecision.created | decision.updated | decision.resolved · 必填

EventList

Events in ledger order. A page ends at an event not yet due for the caller; the same cursor returns it once it is.

欄位
  • datalist of Event · 必填
  • has_moreboolean · 必填
  • next_cursorstring or null · 必填

    Pass as the cursor parameter to continue. Opaque.

  • objectalways "list" · 必填

Forecast

One forecaster's latest forecast on a question.

欄位
  • forecaster_kindstring · 必填
  • forecaster_versionstring · 必填
  • known_atstring (date-time) · 必填
  • market_probabilitynumber or null · 必填
  • probabilitynumber · 必填

Record

Aggregates of the evaluator over resolved questions: no per-call rows, no stake or profit.

欄位
  • as_ofstring (date-time) · 必填
  • attributionlist of string · 必填
  • calibrationlist of Reliability · 必填
  • closing_line_valueobject · 必填
  • closing_line_value.computableboolean · 必填
  • closing_line_value.meannumber or null · 必填
  • closing_line_value.ninteger · 必填
  • domainstring · 必填
  • objectalways "record" · 必填
  • resolved_questionsinteger · 必填
  • scoreslist of ScoreRow · 必填
  • topicstring · 必填
  • trialsinteger · 必填
  • void_questionsinteger · 必填

RecordList

One record per held decisions topic.

欄位
  • datalist of Record · 必填
  • has_moreboolean · 必填
  • next_cursorstring or null · 必填

    Pass as the cursor parameter to continue. Opaque.

  • objectalways "list" · 必填

Reliability

欄位
  • binslist of object · 必填
  • bins[].highnumber · 必填
  • bins[].hitsinteger · 必填
  • bins[].lownumber · 必填
  • bins[].lowernumber · 必填
  • bins[].mean_pnumber · 必填
  • bins[].ninteger · 必填
  • bins[].observednumber · 必填
  • bins[].uppernumber · 必填
  • classstring · 必填
  • forecasterstring · 必填
  • forecaster_kindstring · 必填
  • ninteger · 必填

ScoreRow

欄位
  • briernumber · 必填
  • calibration_flagstring or null · 必填
  • calibration_slopenumber or null · 必填
  • classstring · 必填
  • ecenumber · 必填
  • edge_vs_marketnumber or null · 必填
  • forecasterstring · 必填
  • forecaster_kindstring · 必填
  • hit_ratenumber · 必填
  • log_lossnumber · 必填
  • mean_pnumber · 必填
  • ninteger · 必填

Topic

欄位
  • domainstring · 必填
  • heldboolean · 必填

    Whether the caller holds a grant for the topic.

  • idstring · 必填
  • kinddecisions | analysis · 必填
  • objectalways "topic" · 必填
  • titlestring · 必填

TopicList

Every topic Kalkas offers, by id.

欄位
  • datalist of Topic · 必填
  • has_moreboolean · 必填
  • next_cursorstring or null · 必填

    Pass as the cursor parameter to continue. Opaque.

  • objectalways "list" · 必填

錯誤。

每條路由都可能回應這些,格式就是 Error 物件。

  • 400

    A malformed request: see error.code and error.param.

  • 403

    The caller holds no grant for the topic (permission_error).

  • 404

    Nothing at this id or path.

  • 405

    The route does not take this method; Allow names the one it does.

  • 409

    The request conflicts with an earlier one.

  • 503

    The ledger could not be read; retry after the Retry-After seconds.

錯誤的運作方式 →