monaco.api.trades
Source: protos/api/trades.proto
Use TradesService for recent trade history, single-trade lookup, and authenticated user trade history.
Notes
- Recent public trades do not require authentication.
GetTradesis cursor-paginated, newest first: send an emptypage_tokento start, then each response’snext_page_tokenuntil it comes back empty; an empty token is definitive.page_sizedefaults to25and must be 1–1000. The walk seeks on(executed_at, id), so a page never repeats or skips a trade when new fills land mid-walk. The token is pinned to itstrading_pair_id, so a token reused for another pair, or one minted byListUserTrades, is rejected. There is nopagefield: code that still sets it fails to compile against a regenerated stub, and a stub generated from an older proto has the unknown field discarded and reads the first page on every call. The walk covers the recent trades window, not a pair’s full archived history.ListUserTradesis authenticated and gRPC-only.ListUserTradesreturnsUserTrade.feeas the total fee paid (monaco_fee+builder_fee);builder_feeis"0"for a maker. All three are integer strings in raw quote units, scaled by10^quoteDecimals(so4178is0.004178at six decimals); this message carries no separate normalized fee fields.ListUserTradesaccepts an optionalorder_idUUID that returns only trades where that order placed the caller’s own side of the fill, across hot and archived history. Adding or changing it invalidates an existingpage_token— restart the cursor walk with an empty token.

