Skip to content

Python SDK Router.fetch_market_matches missing min_difference and sort parameters #858

@realfishsam

Description

@realfishsam

Gap

The core FetchMarketMatchesParams includes minDifference and sort fields that are absent from the Python SDK Router.fetch_market_matches typed signature. Users cannot filter by minimum price spread or control result ordering through the Python SDK Router.

Core

core/src/router/types.ts:74

export interface FetchMarketMatchesParams {
    // ...
    minDifference?: number;                               // NOT in Python SDK
    sort?: 'confidence' | 'volume' | 'priceDifference';  // NOT in Python SDK
    // ...
}

TypeScript SDK

Missing too — covered separately in issue #857.

Python SDK

sdks/python/pmxt/router.py:147

def fetch_market_matches(
    self,
    market: Optional[UnifiedMarket] = None,
    *,
    market_id: Optional[str] = None,
    slug: Optional[str] = None,
    url: Optional[str] = None,
    query: Optional[str] = None,
    category: Optional[str] = None,
    relation: Optional[MatchRelation] = None,
    min_confidence: Optional[float] = None,
    limit: Optional[int] = None,
    include_prices: bool = False,
) -> List[MatchResult]: ...

min_difference and sort are absent from the signature.

Evidence

FetchMarketMatchesParams.minDifference and sort are defined in core/src/router/types.ts:74. The Python SDK's typed fetch_market_matches at router.py:147 omits them. Callers who need to filter by price spread or sort by volume cannot do so through the typed API.

Impact

  • Filtering matches by minimum price difference (min_difference) is unavailable.
  • Sorting results by confidence, volume, or priceDifference (sort) is unavailable.
    Users who need arbitrage-style filtered queries (e.g., only show matches with >3% spread, sorted by volume) cannot express these through the Python SDK Router.

Found by automated Core-to-SDK surface coverage audit

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions