-
-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Description
Bug
fetchTrades on Kalshi returns trades with price: NaN and amount: undefined:
const kalshi = new pmxt.Kalshi();
const trades = await kalshi.fetchTrades(outcomeId, { limit: 10 });
// Returns:
// { id: '587d4e7d-...', timestamp: 1772720166597, price: NaN, amount: undefined, side: 'sell' }Expected
price and amount should be populated with numeric values from the Kalshi API response.
Root Cause
Likely a field mapping issue in the Kalshi normalizer/trade mapping — the raw API response fields don't match what the normalizer expects.
Reproduction
import pmxt from 'pmxt-core';
const kalshi = new pmxt.Kalshi();
const markets = await kalshi.fetchMarkets({ slug: 'KXFEDCHAIRNOM-29' });
const outcome = markets[0].outcomes[0];
const trades = await kalshi.fetchTrades(outcome.outcomeId, { limit: 5 });
console.log(trades); // price: NaN, amount: undefinedReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels