Exchange
polymarket
Severity
MEDIUM
What Our Normalizer Expects
mapMarketToUnified in utils.ts does not access any feeSchedule fields from raw market objects. The field is not declared in the PolymarketRawMarket TypeScript interface.
What The Live API Returns
The live Gamma API (GET https://gamma-api.polymarket.com/markets) returns a nested feeSchedule object on each market:
markets[].feeSchedule.exponent: integer
markets[].feeSchedule.rate: float
markets[].feeSchedule.takerOnly: boolean
markets[].feeSchedule.rebateRate: float
Impact
- Normalized polymarket markets carry no fee information
- Consumers cannot compute net expected value or accurate P&L without knowing taker fees and rebate rates
takerOnly flag is especially important — maker orders on taker-only markets would fail or be repriced unexpectedly
- Fee schedule changes at the venue are invisible to PMXT
Suggested Fix
- Add
feeSchedule?: { exponent?: number; rate?: number; takerOnly?: boolean; rebateRate?: number } to the PolymarketRawMarket interface
- Surface fee information on the normalized
UnifiedMarket (e.g., in sourceMetadata.fees or a dedicated feeSchedule field)
Found by automated response shape drift audit
Exchange
polymarket
Severity
MEDIUM
What Our Normalizer Expects
mapMarketToUnifiedinutils.tsdoes not access anyfeeSchedulefields from raw market objects. The field is not declared in thePolymarketRawMarketTypeScript interface.What The Live API Returns
The live Gamma API (
GET https://gamma-api.polymarket.com/markets) returns a nestedfeeScheduleobject on each market:Impact
takerOnlyflag is especially important — maker orders on taker-only markets would fail or be repriced unexpectedlySuggested Fix
feeSchedule?: { exponent?: number; rate?: number; takerOnly?: boolean; rebateRate?: number }to thePolymarketRawMarketinterfaceUnifiedMarket(e.g., insourceMetadata.feesor a dedicatedfeeSchedulefield)Found by automated response shape drift audit