Trading Pairs
An operator-managed market is public only while its launch’s durable runtime projection readslive — the coordinator’s own launch phase is not what publishes it, so a launch whose phase is already live stays hidden whenever its runtime projection is anything else, halted included. Until then it is excluded from pair discovery, pair detail, the screener and the public price reads, and asking for inactive markets does not surface it either. A pair with no managed launch is an ordinary instrument and keeps its existing visibility, so this changes nothing about the markets that trade today. The maker side of such a launch is driven through sdk.managedMarkets.
(params?) => Promise<GetTradingPairsResponse>
Fetch paginated list of trading pairs.Parameters: all optional
page?: numberpageSize?: numbercategory?:"crypto" | "equities" | "commodities" | "fx"— filter by asset class
TradingPair includes a category field indicating its asset class,
and baseAssetName / quoteAssetName — the human-readable asset display
names from the asset registry (e.g. "Robinhood Markets" for HOOD,
"USDC" for USDC). Use them for name-based market search (a query like
“Robinhood” can match the HOOD market) and to render display names next to
tickers. Also present on getTradingPair and getTradingPairBySymbol.(tradingPairId: string) => Promise<TradingPair>
Fetch a single trading pair by its UUID. Returns the unwrapped
TradingPair. Rejects with an APIError (404) when no pair with that UUID exists — it never resolves undefined.Parameters:tradingPairId: string - Trading pair UUID
(symbol: string, marketType?: TradingMode) => Promise<TradingPair | undefined>
Get a specific trading pair by symbol. Resolves
undefined on a miss — it never throws for an unknown symbol, so guard the result before dereferencing. Note the failure modes are opposite: getTradingPair rejects, getTradingPairBySymbol resolves undefined. The lookup scans only the first 100 pairs (optionally filtered by marketType); use getPaginatedTradingPairs directly if the listing ever exceeds that.Parameters:symbol: string - Trading pair symbol (e.g."BTC/USDC")marketType?:TradingMode- Restrict the lookup to"SPOT"or"MARGIN"pairs
Market Screener
(params?: GetScreenerParams) => Promise<GetScreenerResponse>
Fetch the paginated market screener. Each row carries 1h/24h/7d quote-volume and price-change windows plus a 7-day daily snapshot. Results are sorted by 24h quote volume descending, with nulls last.Parameters:
params? - all optionalpage?: number - Page number (min 1, default 1)pageSize?: number - Items per page (min 1, max 100, default 50)marketType?:"SPOT" | "MARGIN"- Filter by market typeisActive?: boolean - Filter by active status; defaults totrueso delisted pairs are hidden. The managed-market fence is an additional gate rather than an override of this filter: a managed launch is hidden until its runtime projection is live, and once live its pair is active, soisActive: falsestill excludes itcategory?:"crypto" | "equities" | "commodities" | "fx"- Filter by asset class
GetScreenerResponse:items:ScreenerItem[]page: numberpageSize: numbertotal: numbertotalPages: number
ScreenerItem:tradingPairId: string - Trading pair UUIDsymbol: string - Trading pair symbol (e.g. “BTC/USDC”)category: string - Asset class:"crypto","equities","commodities", or"fx"baseIconUrl: string - Base token icon URLquoteIconUrl: string - Quote token icon URLlastPrice: string | null - Most recent close price (null if no trades yet)lastPriceTimestamp: string | null - Timestamp of the last candle (ms since epoch, as string; null if no trades yet)quoteVolume1h: string | null - Quote-token volume over the last 1 hour (null if insufficient history)quoteVolume24h: string | null - Quote-token volume over the last 24 hours (null if insufficient history)quoteVolume7d: string | null - Quote-token volume over the last 7 days (null if insufficient history)priceChangePercent1h: string | null - Percent price change over the last 1 hour (null if insufficient history)priceChangePercent24h: string | null - Percent price change over the last 24 hours (null if insufficient history)priceChangePercent7d: string | null - Percent price change over the last 7 days (null if insufficient history). Screener rows carry percent changes only — for an absolute 24h change, readpriceChange24hfromgetMarketMetadata/getPerpMarketSummary, or estimate it fromlastPriceandpriceChangePercent24h(approximate, since the percentage is rounded)snapshot7d:ScreenerSnapshotPoint[]- Up to 7 UTC-day buckets (oldest first); empty when less than 1 day of history. Each point is{ bucketStart, quoteVolume, priceChangePercent, openInterestNotionalAvg }. The daily average isstring | nulland needs at least 95% of the completed UTC day’s 1440 minutes (1368) to be valued.totalQuoteVolumeLtd: string - Cumulative quote-token volume since inception (decimal string;"0"if no trades)totalTradeCountLtd: number - Cumulative trade count since inception (0if no trades)latestFundingRate: string | null - Latest capped settled funding rate (decimal fraction per window);nullfor spot pairs and perps with no settled window yetlastFundingTime: string | null - Close time of the latest settled funding window (ms since epoch, as string);nullfor spot pairs and perps with no settled window yetopenInterestBase: string | null - Base-asset open interest;nullfor spot pairs,"0"for a margin pair with no open positionsopenInterestNotional: string | null - Open interest notional in quote units, valued at the pair’s latest trade price (a snapshot — for a mark-accurate notional usegetPerpMarketSummaryorgetOpenInterest);nullfor spot pairs,"0"for a margin pair with no open positionsopenInterestNotionalAvg1h,openInterestNotionalAvg24h,openInterestNotionalAvg7d: string | null - Arithmetic averages of the valued completed UTC minute observations in the last 60, 1440, or 10080 minutes ending at the current minute boundary, published once at least 95% of those minutes (57, 1368, or 9576) are valued. Each observation is gross open position size multiplied by latest trade price in quote units, the same priceopenInterestNotionaluses; a minute without a trade price is unvalued rather than zero.nullfor spot or below that coverage; known zero is"0". No historical backfill; windows warm after deployment.
decimal.js (npm install decimal.js) to compute surge directly from decimal strings.Market Metadata
(tradingPairId: string) => Promise<MarketMetadata>
Get comprehensive market metadata including current price and 24-hour statisticsParameters:
tradingPairId: string - Trading pair UUID
MarketMetadata:symbol: string - Trading pair symbol (e.g., “BTC/USDC”)lastPrice: string - Current price (8 decimal precision)lastPriceTimestamp: number - Unix timestamp (ms)high24h: string | null - 24h high pricelow24h: string | null - 24h low pricevolume24h: string | null - 24h trading volume in base-asset unitsquoteVolume24h?: string | null - 24h trading volume in quote-token (USDC) unitspriceChange24h: string | null - Absolute price changepriceChangePercent24h: string | null - Percentage changemarketInitializationTimestamp: number | null - Market start timetotalBaseVolumeLtd: string - Cumulative base-token volume since inception (decimal string;"0"if no trades)totalQuoteVolumeLtd: string - Cumulative quote-token volume since inception (decimal string;"0"if no trades)totalTradeCountLtd: number - Cumulative trade count since inception (0if no trades)
Exchange Statistics
() => Promise<MarketStats>
Fetch exchange-wide life-to-date cumulative statistics. No authentication required.Returns:
MarketStats:totalQuoteVolumeLtd: string - Cumulative quote-token (notional) volume across all trading pairs, as a decimal string in display unitstotalTradeCountLtd: number - Cumulative trade count across all trading pairs
"0" / 0.Example:Candlestick 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 ms (for forward pagination)endTime?: number - Unix timestamp in ms (for backward pagination)limit?: number - Max candlesticks to return (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, where each candle’s open/high/low/close are the minute’s closing mark and volume is0."mark"on a spot pair returns a400
Perp Market Data
Perp-specific market endpoints. For margin concepts, see Margin.(tradingPairId: string) => Promise<PerpMarketConfig>
Static configuration for a perp pair: leverage bounds, base margin ratios, funding interval, risk tiers, liquidation fee.Returns —
PerpMarketConfig:tradingPairId,symbol: stringminLeverage,maxLeverage: string (decimal)initialMarginRatio,maintenanceMarginRatio: stringfundingIntervalSeconds: numberliquidationFeeBps?: stringriskTiers:RiskTier[], ascending bylowerBoundNotional— each{ tierLevel, lowerBoundNotional, maxLeverage?, initialMarginRatio, maintenanceMarginRatio, initialMarginDeduction, maintenanceMarginDeduction, maxPositionSize? }.maxPositionSizeis the market-wide maximum absolute base-asset quantity, repeated on every tier; a deprecatedmaxPositionNotionalalias may also be present (it is a base quantity, not a notional — readmaxPositionSize).initialMarginDeduction/maintenanceMarginDeductionkeep the ladder floor and maintenance margin continuous at a tier bound:IM_floor(N) = N x initialMarginRatio - initialMarginDeduction,MM(N) = N x maintenanceMarginRatio - maintenanceMarginDeductionfor a position of notionalNin that tier. Actual position initial margin is the greater ofIM_floor(N)and the selected-leverage initial margin scaled to the current mark. A position’s tier is the last one whoselowerBoundNotionalis at or below its notional. See Margin ladders.updatedAt: string
(tradingPairId: string) => Promise<PerpMarketSummary>
Aggregate snapshot of a perp market: mark, index, 24h stats, open interest, current and estimated next funding rate.Returns —
PerpMarketSummary:tradingPairId,symbol: stringlastPrice,markPrice,indexPrice: stringhigh24h?,low24h?,priceChange24h?,priceChangePercent24h?: stringvolume24h?: string — 24h volume in base-asset unitsquoteVolume24h?: string — 24h volume in quote-token (USDC) unitsopenInterest: string — open interest in base-asset units (alias ofopenInterestBase)openInterestBase?: string — open interest in base-asset unitsopenInterestNotional?: string — open interest notional in quote (USDC) units, equal toopenInterestBase× mark price (falling back to the latest trade/close price when no mark is available)currentFundingRate?,estimatedNextFundingRate?: stringnextFundingTime?: string — ISO 8601marketStatus,marketRegime: stringupdatedAt: string
(tradingPairId: string) => Promise<MarkPrice>
Live mark price (oracle reference used for PnL and liquidation).Returns:
{ tradingPairId, markPrice, oracleProvider, oracleEpoch?, regime, updatedAt }(tradingPairId: string) => Promise<IndexPrice>
Live index price (aggregated external fair-value reference used for funding).Returns:
{ tradingPairId, indexPrice, components: IndexComponent[], updatedAt }. Each IndexComponent is { provider, price, weight?, updatedAt? }.(tradingPairId: string) => Promise<FundingState>
Current and estimated-next funding rate, plus next settlement time.Returns:
{ tradingPairId, currentFundingRate, estimatedNextFundingRate?, nextFundingTime, fundingIntervalSeconds, lastFundingTime?, updatedAt }nextFundingTime reflects the market’s actual settlement cadence, and estimatedNextFundingRate refreshes as new samples arrive.(tradingPairId: string, params?: ListFundingHistoryParams) => Promise<ListFundingHistoryResponse>
Historical settled funding for a single pair.Parameters: all optional
startTime?,endTime?: string — ISO 8601 or ms-epoch stringpage?,pageSize?: numberorderBy?:"ASC" | "DESC"— sort direction, defaultDESC
{ records: FundingRecord[], total, page, pageSize }. The ergonomic FundingRecord surfaces { tradingPairId, fundingRate, cumulativeFundingPerUnit?, carried? } — carried is true when the window settled at the carried last rate under the sparse-sample rule. The ergonomic type also carries the per-window fields — epoch, fundingDeltaPerUnit, referencePrice (the settlement mark price), sampleCount, windowStartedAt, windowClosedAt, and settledAt (the sort key for listAllFundingHistory). fundingDeltaPerUnit is normally fundingRate × referencePrice; in the one defensive case where that product cannot be represented (the engine bounds the rate below 100 % per window, so this needs a mark near the numeric ceiling), the record keeps the fundingRate that would have applied, settles fundingDeltaPerUnit as 0, leaves cumulativeFundingPerUnit unchanged and still advances epoch — a window in which nothing was paid, not a missing window.(params?: ListAllFundingHistoryParams) => Promise<ListAllFundingHistoryResponse>
Settled funding history across every perp market in one call, so you no longer fan out one
listFundingHistory request per pair. No authentication required.Parameters: all optionalstartTime?,endTime?: string — ms-epoch strings, inclusive bounds onsettledAtpage?: number — default 1pageSize?: number — default 50, max 100orderBy?:"ASC" | "DESC"— sort direction forsettledAt, defaultDESC
{ records: FundingRecord[], total, page, pageSize }, sorted by the wire settledAt field. Each FundingRecord carries its own tradingPairId, so you can group rows by market client-side (see listFundingHistory for the full record shape).Example:(tradingPairId: string) => Promise<OpenInterest>
Current open interest in base-asset units and notional.Returns:
{ tradingPairId, openInterestBase, openInterestNotional, updatedAt }Orderbook Snapshot
Get a point-in-time orderbook snapshot via REST API. For real-time updates, use WebSocket subscriptions.(tradingPairId: string, options?) => Promise<OrderbookEvent>
Fetch current orderbook state for a trading pairParameters:
tradingPairId: string - Trading pair UUIDoptions?: Optional settingsdepth?: number - Number of price levels (default: 10, max: 100)tradingMode?: “SPOT” | “MARGIN” - Trading mode (default: “SPOT”)magnitude?: number - Price grouping (0.0001, 0.001, 0.01, 0.1, 1, 10, 100, 1000, 10000)denomination?: “BASE” | “QUOTE” - Quantity denomination
symbol: string - Trading pair symboltradingMode: “SPOT” | “MARGIN” - Trading modebids: Array of{ price, quantity, orderCount }asks: Array of{ price, quantity, orderCount }bestBid?: string - Best bid price (optional)bestAsk?: string - Best ask price (optional)bidVolume?: string - Total bid volume (optional)askVolume?: string - Total ask volume (optional)priceChange?: object - Price change info (optional)baseDecimals: number - Base token decimalsquoteDecimals: number - Quote token decimalstimestamp: string - Snapshot timestamp (UTC)sequence: number - Sequence number
Historical Trades
Fetch recent trade history for a trading pair. For real-time trade updates, use WebSocket subscriptions.(tradingPairId: string, options?) => Promise<TradeEvent[]>
Fetch historical trades for a trading pair (newest first)Parameters:
tradingPairId: string - Trading pair UUIDoptions?: Optional settingspage?: number - Page number, starts from 1 (default: 1)pageSize?: number - Max records to return (default: 25, max: 100)
TradeEvent:eventType: “trade”tradingPairId: string - Trading pair UUIDtradingMode: “SPOT” | “MARGIN”data:tradeId: string - Unique trade IDprice: string - Execution pricequantity: string - Executed quantitymakerSide: “BUY” | “SELL” - Side of the maker orderexecutedAt: string - ISO 8601 date-time timestamp (UTC), empty string if the trade has no recorded execution time
executedAt is an ISO-8601 / RFC 3339 date-time string with an explicit +00:00 UTC offset (e.g. 2025-01-15T10:30:00+00:00). Any standard parser, including new Date(...), handles it.Example:(tradeId: string) => Promise<TradeEvent>
Fetch a single trade by its UUID. Throws
APIError if the trade is not found.Parameters:tradeId: string - Trade UUID
TradeEvent (same shape as the entries returned by getTrades). data.executedAt is an empty string if the trade has no recorded execution time.Example:
