Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/src/exchanges/kalshi/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export interface KalshiRawMarket {
export interface KalshiRawEvent {
event_ticker: string;
title: string;
mututals_description?: string;
image_url?: string;
category?: string;
tags?: string[];
Expand Down
2 changes: 1 addition & 1 deletion core/src/exchanges/kalshi/normalizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class KalshiNormalizer implements IExchangeNormalizer<KalshiRawEvent, Kal
return {
id: raw.event_ticker,
title: raw.title,
description: raw.mututals_description || this.deriveEventDescription(raw.markets || []),
description: this.deriveEventDescription(raw.markets || []),
slug: raw.event_ticker,
markets,
volume24h: markets.reduce((sum, m) => sum + m.volume24h, 0),
Expand Down
5 changes: 2 additions & 3 deletions core/test/normalizers/exchange-normalizers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ describe('KalshiNormalizer', () => {
const rawEvent: Readonly<KalshiRawEvent> = freeze({
event_ticker: 'FED-25JAN29',
title: 'Fed Funds Rate Decision - January 2025',
mututals_description: 'Markets on the Federal Reserve interest rate decision.',
image_url: 'https://kalshi.com/img/fed.png',
category: 'Economics',
tags: ['Federal Reserve', 'Interest Rates'],
Expand Down Expand Up @@ -593,8 +592,8 @@ describe('KalshiNormalizer', () => {
expect(event.title).toBe('Fed Funds Rate Decision - January 2025');
});

it('maps description from mututals_description', () => {
expect(event.description).toBe('Markets on the Federal Reserve interest rate decision.');
it('derives description from market rules', () => {
expect(event.description).toBe('This market resolves YES if the Fed Funds Rate is above 4.75% on Jan 29, 2025.');
});

it('populates nested markets array', () => {
Expand Down
Loading