Skip to content

Response drift: polymarket_us — markets[].minimumTradeQty present in live API but not accessed by normalizer #2017

Description

@realfishsam

Exchange

polymarket_us

Severity

MEDIUM

What Our Normalizer Expects

core/src/exchanges/polymarket_us/normalizer.tsRealMarket type definition does not include minimumTradeQty. The field is not accessed anywhere in the normalizer and is not included in any promoted keys list.

What The Live API Returns

The live gateway API returns minimumTradeQty as an integer on every market object:

markets[].minimumTradeQty: int   ← minimum number of shares per trade

Endpoint tested: GET https://gateway.polymarket.us/v1/markets?limit=5

Impact

MEDIUM: Order placement UI has no programmatic access to the minimum trade quantity for each market. Orders submitted below minimumTradeQty will be rejected by the gateway with an error — but the current normalized output gives consumers no prior warning or enforcement signal. This is especially problematic for low-liquidity markets where the minimum may be non-trivial.

Relationship to Existing Issues

Issue #1091 covers the separate finding that the order book REST response wraps bids/offers in a marketData envelope. This issue concerns the market list endpoint and is unrelated.

Suggested Fix

Add minimumTradeQty to the RealMarket type and surface it in the normalized output:

// normalizer.ts — RealMarket type
minimumTradeQty?: number;

// normalizer.ts — normalizeMarket (or equivalent)
minTradeQty: market.minimumTradeQty ?? undefined,

Include in UnifiedMarket as a typed field (e.g. minOrderSize) or in sourceMetadata at minimum, consistent with similar constraint fields on other exchanges.


Found by automated response shape drift audit

Metadata

Metadata

Assignees

No one assigned

    Labels

    response-driftLive API response shape differs from normalizer expectations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions