Exchange
kalshi
Severity
MEDIUM
What Our Normalizer Expects
normalizer.ts:115 accesses raw.image_url with no fallback:
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
Exchange
kalshi
Severity
MEDIUM
What Our Normalizer Expects
normalizer.ts:115accessesraw.image_urlwith no fallback:What The Live API Returns
The
GET https://api.elections.kalshi.com/trade-api/v2/events?limit=1response does not include animage_urlfield.Endpoint tested:
GET https://api.elections.kalshi.com/trade-api/v2/events?limit=1Fields present on event objects:
image_urlis not present.Impact
MEDIUM: All kalshi events will have
image: undefined. Downstream UI components that render event images receiveundefinedinstead 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 ?? undefinedis already effectively what happens, but to make it explicit and intentional — or check if the Kalshi/marketsendpoint (which may includeimage_urlon individual markets) can supply this and thread it through event normalization.Found by automated response shape drift audit