Skip to content

Response drift: kalshi — market.previous_price_dollars absent from live API (renamed to previous_yes_ask_dollars / previous_yes_bid_dollars), priceChange24h always 0 #2349

Description

@realfishsam

Summary

The Kalshi normalizer reads market.previous_price_dollars at normalizer.ts:81–82 to compute the 24-hour price change. The live Kalshi API no longer includes previous_price_dollars at the market level; the equivalent data is now split into previous_yes_ask_dollars and previous_yes_bid_dollars.

Affected field

  • market.previous_price_dollars — absent from live API response

Live API returns instead:

  • market.previous_yes_ask_dollars: float
  • market.previous_yes_bid_dollars: float

Code location

core/src/exchanges/kalshi/normalizer.ts:81–82 — reads market.previous_price_dollars for the priceChange24h calculation, with a fallback that returns 0 when the field is absent.

Severity

LOW — No crash. The fallback produces 0 for priceChange24h, so 24-hour price movement is always shown as flat for Kalshi markets.

Suggested fix

Replace market.previous_price_dollars with (market.previous_yes_ask_dollars + market.previous_yes_bid_dollars) / 2 (midpoint) or choose one side depending on convention.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions