Skip to content

Both SDK Routers: fetchHedges accepts only market anchor params — missing query, category, relation, minConfidence, limit, includePrices from core FetchMatchesParams #1413

Description

@realfishsam

Gap

Same truncation as #1412 (compareMarketPrices), but for fetchHedges. Core's fetchHedges accepts the full FetchMatchesParams interface. Both SDK Router implementations accept only the 4 market-anchor fields, omitting all filter/sort parameters.

Core

core/src/BaseExchange.ts:1656:

async fetchHedges(params: FetchMatchesParams): Promise<PriceComparison[]>

FetchMatchesParams = FetchMarketMatchesParams — 12 fields:

{
    query?, category?,
    market?, marketId?, slug?, url?,
    relation?, minConfidence?, limit?, includePrices?,
    minDifference?, sort?
}

TypeScript SDK

sdks/typescript/pmxt/router.ts:534-539:

async fetchHedges(params?: {
    market?: UnifiedMarket;
    marketId?: string;
    slug?: string;
    url?: string;
    // query, category, relation, minConfidence, limit, includePrices, minDifference, sort — absent
}): Promise<PriceComparison[]>

Python SDK

sdks/python/pmxt/router.py:523-530:

def fetch_hedges(
    self,
    market=None, *, market_id=None, slug=None, url=None,
    # query, category, relation, min_confidence, limit, include_prices, min_difference, sort — absent
) -> List[PriceComparison]

Evidence

  • Core signature: core/src/BaseExchange.ts:1656fetchHedges(params: FetchMatchesParams)
  • FetchMatchesParams defined at core/src/router/types.ts:95-96 (alias for FetchMarketMatchesParams, lines 74-93)
  • TS SDK Router: sdks/typescript/pmxt/router.ts:534-539 — 4 fields only
  • Python SDK Router: sdks/python/pmxt/router.py:523-530 — 4 keyword args only

Impact

fetchHedges is the hedge-discovery method — it returns complement/subset/superset matches for a given market. Without the missing params, SDK users cannot:

  • Browse hedges across all markets matching a keyword (query)
  • Filter hedges by category (category)
  • Filter by the specific hedge relation (relation = 'complement', 'subset', 'superset')
  • Control confidence threshold, result count, price enrichment

The relation filter is especially significant: the semantic difference between a complement hedge and a superset/subset hedge matters to risk management, and callers cannot narrow to the specific type they want.


Found by automated Core-to-SDK surface coverage audit

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-sdk-gapCore engine capabilities not exposed in SDKs

    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