Skip to main content
Package: monaco.api.market Source: protos/api/market.proto Use MarketService for public market data and perp market metadata.

Notes

  • Market-data RPCs are public.
  • GetTraderMetrics returns current long/short account counts, account shares and ratio, and 1h/24h/7d distinct trader counts. Accounts are classified by net position across OPEN risk buckets. No account IDs are returned; position splits are suppressed if either side has fewer than five accounts. Within each activity window, all three counts are null and suppressed is true if any cohort is below five users, or while the server’s active-trader history does not yet reach back to the window’s start (briefly, after that history is first built); counts include system user IDs on liquidation and ADL fills. The snapshot may be reused for up to 30 seconds per pair.
  • GetTradeFlow returns UTC-aligned 1m, 5m, 1h, 4h, or 1d taker buy/sell quote notional buckets for a required half-open [start_time, end_time) range. All executed trades, including liquidation and ADL fills, are included. The range is limited to 90 days and 2,048 buckets, so ranges longer than about 85 days take 4h or 1d; empty buckets are omitted and cumulative volume delta starts at the requested range start. Notional remains in the quote asset, and ratios are rounded to six decimal places. An invalid interval or range is INVALID_ARGUMENT, an unknown pair NOT_FOUND.
  • GetMarketStats returns exchange-wide totals since inception across all trading pairs: quote-token volume and trade count.
  • ListLiquidationEvents returns one market’s stored liquidation events newest first: event_id, timestamp, wallet, side, position_size, the event-time mark_price, and mark_notional (position_size × that same mark, in the quote asset), the position’s liquidation_price captured with the event, and liquidation_fee (the penalty in quote-asset units, absent when none was charged). start_time is inclusive and end_time exclusive (Unix milliseconds); page_size defaults to 50, at most 1000; follow next_page_token. A bad filter or page token is INVALID_ARGUMENT, an unknown pair NOT_FOUND.
  • ListAllLiquidationEvents returns the same events across every market, newest first, with the same time filters, page size and cursor. A bad filter or page token is INVALID_ARGUMENT.
  • ListLiquidationEvents and ListAllLiquidationEvents cover every account liquidated on the exchange, not only one application’s users: neither is filtered by application. An event carries the liquidated position’s wallet, but no application, user or margin account ID.
  • ListInsuranceFunds returns each asset’s insurance fund: asset_id, available_balance_raw (the balance available to cover bad debt, in the asset’s smallest unit) and updated_at. Resolve the asset’s symbol and decimals from ListTradingPairs.
  • ListAllLiquidationEvents and ListInsuranceFunds are charged against a per-client-IP public read budget; over it the call fails with RESOURCE_EXHAUSTED.
  • GetLiquidationMetrics returns UTC-aligned 1m, 5m, 1h, 4h or 1d long and short totals per populated bucket (event_count, position_size, mark_notional) for a required [start_time, end_time) range of at most 90 days and 2,048 buckets (ranges longer than about 85 days take 4h or 1d). event_count counts stored event rows, not wallets; an empty side reads zero and a bucket with no events is omitted. An invalid interval or range is INVALID_ARGUMENT, an unknown pair NOT_FOUND.
  • Use ListTradingPairs to discover trading pair IDs before calling orderbook, trade, or order RPCs.
  • An operator-managed market is excluded from ListTradingPairs, the pair detail reads, GetScreener and the public price RPCs until its durable runtime projection reaches live. is_active does not override that on either request: passing false surfaces delisted ordinary pairs, never a pending, warming or halted managed launch. A pair with no managed launch keeps its existing visibility.
  • ListFundingHistory and ListAllFundingHistory are cursor-paginated: send an empty page_token to start, then each response’s next_page_token until it comes back empty; page_size is 1 to 1000. There is no page field: a stub generated from an older proto that still sets it is not rejected (protobuf discards the unknown field) and reads the first page on every call, so regenerate stubs and walk the token.
  • TradingPairData.isolated_only marks an isolated-only market: a CROSS order that is not reduce-only is INVALID_ARGUMENT with ErrorInfo.reason CROSS_MARGIN_NOT_ALLOWED.