Skip to content

Response drift: kalshi — event.image_url absent from live /events response, no fallback #442

@realfishsam

Description

@realfishsam

Exchange

kalshi

Severity

MEDIUM

What Our Normalizer Expects

normalizer.ts:115 accesses raw.image_url with no fallback:

image: raw.image_url,

What The Live API Returns

The GET https://api.elections.kalshi.com/trade-api/v2/events?limit=1 response does not include an image_url field.

Endpoint tested: GET https://api.elections.kalshi.com/trade-api/v2/events?limit=1

Fields present on event objects:

events[].available_on_brokers: bool
events[].category: str
events[].collateral_return_type: str
events[].event_ticker: str
events[].last_updated_ts: str
events[].mutually_exclusive: bool
events[].series_ticker: str
events[].strike_period: str
events[].sub_title: str
events[].title: str

image_url is not present.

Impact

MEDIUM: All kalshi events will have image: undefined. Downstream UI components that render event images receive undefined instead of a URL string, which may show broken image placeholders or throw if the field is expected to be a string.

Suggested Fix

Add a fallback: image: raw.image_url ?? undefined is already effectively what happens, but to make it explicit and intentional — or check if the Kalshi /markets endpoint (which may include image_url on individual markets) can supply this and thread it through event normalization.


Found by automated response shape drift audit

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions