Skip to content

FeedClient missing fetchFundingRate and fetchFundingRates in both SDKs #932

@realfishsam

Description

@realfishsam

Gap

The core IDataFeed interface declares fetchFundingRate and fetchFundingRates as optional feed capabilities. Both are listed in the DataFeedCapability union type and both return core-defined types (FundingRate, FundingRates). Neither the TypeScript nor the Python FeedClient exposes typed wrappers for these methods. Every other feed capability that has a server route is wrapped in both SDK feed clients; only the funding-rate pair is missing.

Core

core/src/feeds/interfaces.ts:15-16

export type DataFeedCapability =
    | 'loadMarkets'
    | 'fetchTicker'
    | 'fetchTickers'
    | 'watchTicker'
    | 'fetchOHLCV'
    | 'fetchOrderBook'
    | 'watchOrderBook'
    | 'fetchFundingRate'     // ← not in either SDK FeedClient
    | 'fetchFundingRates';   // ← not in either SDK FeedClient

core/src/feeds/interfaces.ts:38-39

export interface IDataFeed {
    // ...
    fetchFundingRate?(symbol: string): Promise<FundingRate>;
    fetchFundingRates?(symbols?: string[]): Promise<FundingRates>;
}

core/src/feeds/types.ts:88

export interface FundingRate {
    symbol: string;
    markPrice?: number;
    indexPrice?: number;
    interestRate?: number;
    estimatedSettlePrice?: number;
    timestamp?: number;
    datetime?: string;
    fundingRate?: number;
    fundingTimestamp?: number;
    fundingDatetime?: string;
    nextFundingRate?: number;
    previousFundingRate?: number;
}
export type FundingRates = Dictionary<FundingRate>;

Both types are exported from core/src/feeds/index.ts:11-12.

TypeScript SDK

sdks/typescript/pmxt/feed-client.ts

The FeedClient class exposes: loadMarkets (line 83), fetchTicker (line 87), fetchTickers (line 91), fetchOHLCV (line 97), fetchOracleRound (line 101), fetchOracleHistory (line 105), fetchHistoricalPrices (line 111).

fetchFundingRate and fetchFundingRates are absent. Neither the method wrappers nor the FundingRate/FundingRates type definitions appear anywhere in the TypeScript SDK source tree.

Python SDK

sdks/python/pmxt/feed_client.py

The FeedClient class exposes: load_markets (line 99), fetch_ticker (line 114), fetch_tickers (line 118), fetch_ohlcv (line 125), fetch_oracle_round (line 140), fetch_oracle_history (line 144), fetch_historical_prices (line 153).

fetch_funding_rate and fetch_funding_rates are absent. No FundingRate dataclass or equivalent exists in sdks/python/pmxt/models.py.

Evidence

grep -rn "fetchFundingRate\|fetch_funding_rate\|FundingRate" sdks/typescript/pmxt/feed-client.ts sdks/python/pmxt/feed_client.py sdks/python/pmxt/models.py returns zero results.

grep -n "fetchFundingRate\|FundingRate" core/src/feeds/interfaces.ts core/src/feeds/types.ts returns lines 15, 16, 38, 39, 88, 106 confirming both methods and their return types are part of the core feeds public API.

Impact

SDK users cannot retrieve perpetual funding rates from data feeds that implement this capability (e.g., a Binance feed that exposes perpetuals). Any strategy that needs to compare prediction-market implied probabilities against perpetual funding rates — a common cross-market signal — must bypass the FeedClient entirely and call the sidecar's feed route directly via raw HTTP. The FundingRate and FundingRates types are also completely absent from the SDK type systems, making it impossible to type funding-rate data even if obtained via callApi.


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