monaco.api.analytics
Source: protos/api/analytics.proto
Use AnalyticsService for the exchange-wide figures the Monaco explorer shows. Every RPC is public — no auth — and serves the same data as its GET /api/v1/analytics/... route. Each client IP has a read budget; over it, an RPC fails with RESOURCE_EXHAUSTED.
Notes
- Windowed requests take
window(24hdefault,7d,30d,all,custom),start_time(Unix ms; required withcustom, rejected otherwise) andend_time(Unix ms; default now). An invalid window fails withINVALID_ARGUMENT, as does a window counted in hours that starts more than 90 days ago. - The server picks the bucket size from the window’s length (hour up to 2.5 days, day up to 45 days, week beyond) and counts every bucket whose start lies in
[start_time, end_time]. Buckets are UTC; weeks start Monday. Each response echoes the resolvedAnalyticsWindow. volume_usd,spot_volume_usd,perp_volume_usdandtrades_countcount the builders the explorer displays only.protocol_fees_usd,active_takers(distinct across the window),new_traders(first trade on the protocol, each wallet once however many builders it traded through) and everyMarketVolumefigure count every trade.new_accountscounts sign-ups: accounts registered in the window under any application, whether or not they traded, hidden builders included; every sign-up counts, in buckets without a trade too.GetProtocolSeriesreturns oneProtocolSeriesPointper bucket, zeros where nothing traded.ListMarketVolumestakeslimit1 to 100 (default 25).- Custody:
deposits_usd,withdrawals_usd,net_flow_usd,tvl_usdand (on totals)opening_tvl_usdcount USDC only, at 1 USD. A withdrawal counts when initiated.tvl_usdis the USDC custody (the opening custody plus deposits less initiated withdrawals, never below zero) at the end of the window or bucket, carried across buckets without movement; it andopening_tvl_usdare unset before any custody was folded.GetProtocolTotalsResponse.active_accountscounts each wallet once that took a trade, received a deposit, or was paid out a withdrawal initiated in the window (by payout address). GetTreasuryNetFeesis all-time, not windowed:net_fees_usdis Monaco’s all-time net fees, after the rewards it pays out;counting_sinceis unset before any fee.- USD amounts are decimal strings (USDC 1:1).
Builders
- A
Builderis an application (kindapplication) or a display group that shows several applications as one (kindgroup). It carriesname,code,color,verified,applications(each withclient_id,active,archivedand its add-on fee bps) and, for an application shown under a group,group. GetBuilder,GetBuilderTotalsandGetBuilderSeriestakebuilder: an application or group uuid, an application or group code, or an application client id. An application key answers that application, grouped or not; a group key answers the group over its displayed applications. A builder the explorer hides fails withNOT_FOUND, exactly as one that does not exist.ListBuilderslists every displayed builder once, by name; archived applications are left out.- Builder figures:
volume_usd, the spot/perp split andtrades_countcount the trades the builder’s applications took;fees_usdis its add-on revenue,taker_fees_usdplusmaker_fees_usd(maker add-ons on trades it made, whoever took them), never the protocol taker fee;active_takersis distinct across the builder’s applications;new_traderscounts first trades per application and wallet;new_accountscounts the accounts registered under its applications, summed over a group’s applications;deposits_usdis the USDC deposited through its applications,withdrawals_usdthe USDC withdrawals they initiated (attributed by the initiating application), andnet_flow_usdthe difference.BuilderApplication.is_defaultmarks the exchange’s default application. Totals and series read hourly active-taker sets, so they share the 90-day limit on windows counted in hours. ListBuilderLeaderboardranks displayed builders by volume, a group as one row, withlimit1 to 100 (default 25); a builder that only took deposits or only registered accounts ranks with zero volume. It answers windows of any age:active_takersis unset for a window counted in hours that starts before the 90 days hourly sets are kept, and withwindowallit counts every wallet that ever traded through the builder.
Wallets, custody and vault flows
ListWalletLeaderboardranks wallets by all-time taker volume over every builder;limit1 to 100 (default 25).GetWalletSummarytakes a0x20- or 32-byte hexwalletin any case (anything else isINVALID_ARGUMENT) and returns its totals, oneWalletBuilderVolumeper displayed builder (a display group’s applications fold into one row under the group),unattributedfor what hidden builders carried, and its liquidation count and notional (in each market’s quote units; every market is USDC-quoted today). A wallet that never traded returns empty figures, notNOT_FOUND.ListWalletLiquidationspages the wallet’smonaco.api.market.LiquidationEvents newest first;page_size1 to 1000 (default 50); apage_tokenresumes only the wallet it was issued for.ListTokenCustody/GetTokenCustody: custody per token isopening_raw(what the vault held before the explorer’s history starts) plusdeposited_rawlesswithdrawn_raw, which count flows since then, withdrawals at initiation;pending_withdrawals_rawis initiated but not yet executed on-chain; custody is folded asynchronously while pending is read live, so they can disagree briefly while the fold lags. Only USDC is valued (1:1) and counts towardtvl_usd.GetTokenCustodyfinds a token by symbol, asset UUID or contract address, and fails withNOT_FOUNDotherwise.ListVaultDeposits(by on-chain index, withtx_hash) andListVaultWithdrawals(by withdrawal index, every status, no transaction hash) page newest first;page_size1 to 1000 (default 50).token(symbol, asset UUID or contract address) andwallet(a deposit’s credited account, a withdrawal’s payout address) filter them; a token nothing answers to returns an empty page, a malformed wallet isINVALID_ARGUMENT, and apage_tokenis bound to its filters. A row’sbuilderis its displayed builder and is unset for a hidden one and for a deposit withtarget_account_typeINSURANCE_FUND;applicationsis sent empty.

