@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / PriceFeedConfig

Interface: PriceFeedConfig

Defined in: packages/sdk/src/config.ts:137

The realtime price-feed endpoint — the standalone EMA price-feed indexer (Hasura GraphQL). ONE endpoint serves every tracked asset (BTC/USDC, ETH/USDC, …); callers select an asset by filter. Snapshot + history read over HTTP; live prices stream over a Hasura WebSocket subscription.

Properties

url

url: string

Defined in: packages/sdk/src/config.ts:139

HTTP GraphQL endpoint (snapshot + history + candles, all assets).


wsUrl?

optional wsUrl?: string

Defined in: packages/sdk/src/config.ts:144

WebSocket GraphQL endpoint for live subscriptions. Derived from url (http→ws, https→wss) when omitted.


quote?

optional quote?: string

Defined in: packages/sdk/src/config.ts:154

Quote asset to pin every read to (e.g. "USDC"), case-insensitive. The feed indexes SEVERAL quotes per base (BTC/USDC, BTC/USDT), so base alone is no longer a unique feed key: leaving this unset matches every quote, which double-counts a base that trades against more than one quote — duplicate candle buckets (a hard error in charting libs that require strictly ascending, unique timestamps), an arbitrary Feed/tick row per push. Set it to the quote you want (leave unset only if a base has one quote).