Skip to main content
Package: monaco.api.applications Source: protos/api/applications.proto Use ApplicationsService for application configuration and public, application-scoped reporting.

Notes

  • GetConfig is session-authenticated. The reporting RPCs are public: each selects its application by client_id and is rate limited per client IP.
  • Use GetConfig to fetch application-level runtime configuration.
  • ListAppOrders, ListAppUsers, ListAppMovements, ListAppBalances and ListAppMarginAccounts 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.
  • ListAppMovements also lists deposits and withdrawals that go straight into or out of a margin account: reference_type is margin_account_deposit or margin_account_withdrawal, reference_id is the margin account, and the balance snapshot fields are unset. Funding payments are not part of this listing.
  • ApplicationMovement amounts 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 writes TRADE rows with reference_type TRADE and reference_id set to the fill’s trade ID: a DEBIT of what the user gave and a CREDIT of 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 quote DEBIT is the reserve its fill used, and it can get a third row for the same fill, a quote CREDIT that 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 distinct reference_id among TRADE-referenced rows, not by dividing the row count by two.
  • A fill in a perp market writes the same base and quote TRADE rows, 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 from ListAppMarginAccounts.
  • ListAppBalances returns wallet balances only. Funds held in a margin account are not included, so a user funded through margin can show zero: read those users from ListAppMarginAccounts. last_sync_at, last_sync_block and on_chain_balance on ApplicationBalance are deprecated. They are not kept up to date and are not a sync or health signal.
  • ListAppMarginAccounts returns one row per margin account, sub-accounts included; an optional address keeps 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.
  • ListAppOrders and GetAppStats have a 3-second read budget: a read that cannot finish in time returns UNAVAILABLE. Narrow the filters, or pass since to GetAppStats, or retry later.
  • A missing client_id is INVALID_ARGUMENT and an unknown or inactive one is NOT_FOUND. The six reporting RPCs share a per-client-IP budget of 60 requests per minute (burst 120) and return RESOURCE_EXHAUSTED with a google.rpc.RetryInfo delay past it.