Exchange
kalshi
Severity
LOW
What Our Normalizer Expects
normalizer.ts:88 accesses market.liquidity with a || 0 fallback:
liquidity: Number(market.liquidity || 0),
What The Live API Returns
The GET https://api.elections.kalshi.com/trade-api/v2/markets?limit=1 response does not include a liquidity field. The live response contains:
markets[].liquidity_dollars: str ← present (dollar-denominated string)
market.liquidity is absent — the field was renamed to liquidity_dollars.
Endpoint tested: GET https://api.elections.kalshi.com/trade-api/v2/markets?limit=1
Impact
LOW: The || 0 fallback fires on every market normalization. UnifiedMarket.liquidity is always 0 for all Kalshi markets. Any feature that displays or filters by liquidity (market ordering, liquidity-gated UI) will show Kalshi as having zero liquidity.
Suggested Fix
Update the normalizer to read the current field name, with a parse step since the value is a dollar string:
liquidity: parseFloat(market.liquidity_dollars || market.liquidity || '0') || 0,
This handles both the new field name and retains backwards compatibility if the old field ever reappears.
Found by automated response shape drift audit
Exchange
kalshi
Severity
LOW
What Our Normalizer Expects
normalizer.ts:88accessesmarket.liquiditywith a|| 0fallback:What The Live API Returns
The
GET https://api.elections.kalshi.com/trade-api/v2/markets?limit=1response does not include aliquidityfield. The live response contains:market.liquidityis absent — the field was renamed toliquidity_dollars.Endpoint tested:
GET https://api.elections.kalshi.com/trade-api/v2/markets?limit=1Impact
LOW: The
|| 0fallback fires on every market normalization.UnifiedMarket.liquidityis always0for all Kalshi markets. Any feature that displays or filters by liquidity (market ordering, liquidity-gated UI) will show Kalshi as having zero liquidity.Suggested Fix
Update the normalizer to read the current field name, with a parse step since the value is a dollar string:
This handles both the new field name and retains backwards compatibility if the old field ever reappears.
Found by automated response shape drift audit