monaco.api.market
Source: protos/api/market.proto
Use MarketService for public market data and perp market metadata.
Notes
- Market-data RPCs are public.
GetTraderMetricsreturns 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 andsuppressedis 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.GetTradeFlowreturns UTC-aligned1m,5m,1h,4h, or1dtaker 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 take4hor1d; 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 isINVALID_ARGUMENT, an unknown pairNOT_FOUND.GetMarketStatsreturns exchange-wide totals since inception across all trading pairs: quote-token volume and trade count.ListLiquidationEventsreturns one market’s stored liquidation events newest first:event_id,timestamp,wallet,side,position_size, the event-timemark_price, andmark_notional(position_size× that same mark, in the quote asset), the position’sliquidation_pricecaptured with the event, andliquidation_fee(the penalty in quote-asset units, absent when none was charged).start_timeis inclusive andend_timeexclusive (Unix milliseconds);page_sizedefaults to 50, at most 1000; follownext_page_token. A bad filter or page token isINVALID_ARGUMENT, an unknown pairNOT_FOUND.ListAllLiquidationEventsreturns the same events across every market, newest first, with the same time filters, page size and cursor. A bad filter or page token isINVALID_ARGUMENT.ListLiquidationEventsandListAllLiquidationEventscover every account liquidated on the exchange, not only one application’s users: neither is filtered by application. An event carries the liquidated position’swallet, but no application, user or margin account ID.ListInsuranceFundsreturns each asset’s insurance fund:asset_id,available_balance_raw(the balance available to cover bad debt, in the asset’s smallest unit) andupdated_at. Resolve the asset’s symbol and decimals fromListTradingPairs.ListAllLiquidationEventsandListInsuranceFundsare charged against a per-client-IP public read budget; over it the call fails withRESOURCE_EXHAUSTED.GetLiquidationMetricsreturns UTC-aligned1m,5m,1h,4hor1dlong 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 take4hor1d).event_countcounts stored event rows, not wallets; an empty side reads zero and a bucket with no events is omitted. An invalid interval or range isINVALID_ARGUMENT, an unknown pairNOT_FOUND.- Use
ListTradingPairsto discover trading pair IDs before calling orderbook, trade, or order RPCs. - An operator-managed market is excluded from
ListTradingPairs, the pair detail reads,GetScreenerand the public price RPCs until its durable runtime projection reaches live.is_activedoes not override that on either request: passingfalsesurfaces delisted ordinary pairs, never a pending, warming or halted managed launch. A pair with no managed launch keeps its existing visibility. ListFundingHistoryandListAllFundingHistoryare cursor-paginated: send an emptypage_tokento start, then each response’snext_page_tokenuntil it comes back empty;page_sizeis 1 to 1000. There is nopagefield: 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_onlymarks an isolated-only market: aCROSSorder that is not reduce-only isINVALID_ARGUMENTwithErrorInfo.reasonCROSS_MARGIN_NOT_ALLOWED.

