Skip to content

Response drift: polymarket — markets[].feeSchedule structure not accessed by normalizer #2190

Description

@realfishsam

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

  1. Add feeSchedule?: { exponent?: number; rate?: number; takerOnly?: boolean; rebateRate?: number } to the PolymarketRawMarket interface
  2. Surface fee information on the normalized UnifiedMarket (e.g., in sourceMetadata.fees or a dedicated feeSchedule field)

Found by automated response shape drift audit

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions