Exchange
kalshi
Drift Type
changed_response
Severity
MEDIUM — the balance_dollars field is a centi-cent precision fixed-point string in the live API but typed as a floating-point number in the spec; any JSON parser expecting a number will fail to parse a string value
Their Docs
Per the Kalshi changelog (May 28, 2026), balance_dollars on the GET /portfolio/balance response is specified as a FixedPointDollars type — a centi-cent precision string (e.g., "1234.5678") for direct-member accounts. The live OpenAPI spec uses $ref: FixedPointDollars for this field.
Source: https://docs.kalshi.com/welcome (changelog, May 28, 2026)
Our Cached Spec
core/specs/kalshi/Kalshi.yaml — GetBalance response schema has balance_dollars: { type: number, format: double }. This type mismatch means typed code generated from the spec will attempt to use it as a number when the actual response delivers a string.
File: core/specs/kalshi/Kalshi.yaml (GetBalance response, balance_dollars field)
callApi() References at Risk
callApi('GetBalance') at fetcher.ts:381 — balance response affected
Hardcoded URL Bypasses
None
Impact
The normalizer at normalizer.ts:317 reads raw.balance (the cents-based integer field, not balance_dollars) via / 100. However, if any code uses the balance_dollars field via the typed spec interface, it will encounter a string where a number is expected.
Fix: Update balance_dollars type in Kalshi.yaml to type: string (or add $ref: '#/components/schemas/FixedPointDollars') to match the live spec.
Found by automated spec drift audit
Exchange
kalshi
Drift Type
changed_response
Severity
MEDIUM — the
balance_dollarsfield is a centi-cent precision fixed-point string in the live API but typed as a floating-point number in the spec; any JSON parser expecting a number will fail to parse a string valueTheir Docs
Per the Kalshi changelog (May 28, 2026),
balance_dollarson theGET /portfolio/balanceresponse is specified as aFixedPointDollarstype — a centi-cent precision string (e.g.,"1234.5678") for direct-member accounts. The live OpenAPI spec uses$ref: FixedPointDollarsfor this field.Source: https://docs.kalshi.com/welcome (changelog, May 28, 2026)
Our Cached Spec
core/specs/kalshi/Kalshi.yaml—GetBalanceresponse schema hasbalance_dollars: { type: number, format: double }. This type mismatch means typed code generated from the spec will attempt to use it as a number when the actual response delivers a string.File:
core/specs/kalshi/Kalshi.yaml(GetBalance response,balance_dollarsfield)callApi() References at Risk
callApi('GetBalance')atfetcher.ts:381— balance response affectedHardcoded URL Bypasses
None
Impact
The normalizer at
normalizer.ts:317readsraw.balance(the cents-based integer field, notbalance_dollars) via/ 100. However, if any code uses thebalance_dollarsfield via the typed spec interface, it will encounter a string where a number is expected.Fix: Update
balance_dollarstype inKalshi.yamltotype: string(or add$ref: '#/components/schemas/FixedPointDollars') to match the live spec.Found by automated spec drift audit