monaco.api.applications
Source: protos/api/applications.proto
Use ApplicationsService for application configuration and public, application-scoped reporting.
Notes
GetConfigis session-authenticated. The reporting RPCs are public: each selects its application byclient_idand is rate limited per client IP.- Use
GetConfigto fetch application-level runtime configuration. ListAppOrders,ListAppUsers,ListAppMovements,ListAppBalancesandListAppMarginAccountsare 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.ListAppMovementsalso lists deposits and withdrawals that go straight into or out of a margin account:reference_typeismargin_account_depositormargin_account_withdrawal,reference_idis the margin account, and the balance snapshot fields are unset. Funding payments are not part of this listing.ApplicationMovementamounts and balance snapshots are raw token units (the smallest unit): divide by 10^decimals of the token for a human-readable value.- In
ListAppMovements, each fill writesTRADErows withreference_typeTRADEandreference_idset to the fill’s trade ID: aDEBITof what the user gave and aCREDITof what they received, one leg in the base token (the fill quantity) and one in the quote token (the fill notional). The fill’s fee is netted into the quote leg; there is no separate fee row. A buying maker’s quoteDEBITis the reserve its fill used, and it can get a third row for the same fill, a quoteCREDITthat returns its rebate or unused reserve. An order that fills against several makers writes rows for every fill, and both sides are listed when both are the application’s users, so count trades by distinctreference_idamongTRADE-referenced rows, not by dividing the row count by two. - A fill in a perp market writes the same base and quote
TRADErows, but their amounts are the trade’s size, not cash entering or leaving a wallet, and the balance snapshot fields are unset. Never sum them for a balance or for equity: read margin collateral and equity fromListAppMarginAccounts. ListAppBalancesreturns wallet balances only. Funds held in a margin account are not included, so a user funded through margin can show zero: read those users fromListAppMarginAccounts.last_sync_at,last_sync_blockandon_chain_balanceonApplicationBalanceare deprecated. They are not kept up to date and are not a sync or health signal.ListAppMarginAccountsreturns one row per margin account, sub-accounts included; an optionaladdresskeeps one wallet’s accounts. Its figures are a persisted baseline repriced at the latest risk marks, so they can briefly lag the matching engine. Reserved sub-accounts are not listed.ListAppOrdersandGetAppStatshave a 3-second read budget: a read that cannot finish in time returnsUNAVAILABLE. Narrow the filters, or passsincetoGetAppStats, or retry later.- A missing
client_idisINVALID_ARGUMENTand an unknown or inactive one isNOT_FOUND. The six reporting RPCs share a per-client-IP budget of 60 requests per minute (burst 120) and returnRESOURCE_EXHAUSTEDwith agoogle.rpc.RetryInfodelay past it.

