Trading Pairs
(params?) => Promise<GetTradingPairsResponse>
Fetch paginated list of trading pairs.Returns:
{ tradingPairs: TradingPair[], page, pageSize, total, totalPages }(symbol: string) => Promise<TradingPair | undefined>
Get a specific trading pair by symbol. Resolves
undefined on a miss (never throws), so guard the result before dereferencing. The hook forwards only symbol; to disambiguate a symbol listed in both SPOT and MARGIN, call sdk.market.getTradingPairBySymbol(symbol, marketType) on the core SDK directly.Market Data
(tradingPairId: string, interval: Interval, params?: GetCandlesticksParams) => Promise<Candlestick[]>
Fetch OHLCV candlestick data for a trading pair.Parameters:
tradingPairId: string - Trading pair UUID (usegetTradingPairBySymbolto get this)interval:"1m" | "5m" | "15m" | "1h" | "4h" | "1d"params?: Optional query parametersstartTime?: number - Unix timestamp in msendTime?: number - Unix timestamp in mslimit?: number - Max candlesticks (default: 350, max: 500)priceType?:"trade" | "mark"- price series to chart."trade"(default) is the trade-derived OHLCV series;"mark"is the close-only mark-price series for margin pairs (each candle’s open/high/low/close are the minute’s closing mark, volume0)."mark"on a spot pair returns a400
(pairId: string) => Promise<MarketMetadata>
Fetch market metadata for a trading pair including current price, volume, and statistics.Parameters:
pairId: string - Trading pair UUID
MarketMetadata object with market statisticsFields (all nullable):lastPrice: string | null- Most recent trade price (null if no trades)lastPriceTimestamp: number | null- Timestamp of last tradehigh24h: string | null- 24-hour high price (null if insufficient data)low24h: string | null- 24-hour low price (null if insufficient data)volume24h: string | null- 24-hour trading volume in base-asset units (null if insufficient data)quoteVolume24h?: string | null- 24-hour trading volume in quote-token (USDC) unitspriceChange24h: string | null- 24-hour price changepriceChangePercent24h: string | null- 24-hour price change percentagemarketInitializationTimestamp: number | null- When market was initialized
Perp Market Data
For margin concepts, see Margin. For full type shapes, see the TypeScript Market reference.(tradingPairId: string) => Promise<PerpMarketConfig>
Static perp config:
minLeverage, maxLeverage, base initial/maintenance margin ratios, fundingIntervalSeconds, riskTiers, liquidationFeeBps.(tradingPairId: string) => Promise<PerpMarketSummary>
Aggregate snapshot:
markPrice, indexPrice, 24h stats (base-asset volume24h and quote-token quoteVolume24h), openInterest (base-asset, alias of openInterestBase), openInterestBase, openInterestNotional (base × mark, in quote units), currentFundingRate, nextFundingTime.(tradingPairId: string) => Promise<MarkPrice>
Live mark price (oracle reference). Returns
{ markPrice, oracleProvider, regime, updatedAt, ... }.(tradingPairId: string) => Promise<IndexPrice>
Live index price with provider components. Returns
{ indexPrice, components: IndexComponent[], updatedAt }.(tradingPairId: string) => Promise<FundingState>
Current and estimated next funding rate plus settlement time.
(tradingPairId: string, params?: ListFundingHistoryParams) => Promise<ListFundingHistoryResponse>
Historical funding payments. Pagination via
page/pageSize, optional startTime/endTime.(tradingPairId: string) => Promise<OpenInterest>
Current open interest in base-asset units and notional.

