monaco.api.pitpass
Source: protos/api/pitpass.proto
Use TraderCodeService to retrieve and validate TraderCodes, read your referral position and downline, read a user’s rewards balance, and transfer earned rewards into a trading balance.
Notes
GetMyTraderCoderequires authentication. It is idempotent and never returnsNOT_FOUND— the code row is created on demand for the authenticated wallet.GetTraderCodeInfois public (no auth). It accepts a bare wallet address or theMonaco - <address>display form. ReturnsNOT_FOUNDwhen the code does not resolve to a known wallet.GetRewardsBalancereturns an emptybalanceslist when no rewards have been earned yet.availablevalues are in raw atomic units.TransferRewardsmoves the specified amount from the caller’s rewards bucket into the calling application’s trading balance. The transfer is ledger-only — no on-chain transaction. ReturnsFAILED_PRECONDITIONwhen the rewards balance is insufficient.- Reward rates are configured via feature flags and may change over time. The
rate_appliedon each reward event is captured at fill time and stored in the audit log. GetMyReferralPositionandGetMyReferralDownlineare authenticated and self-scoped: identity comes only from the session, never a request id, so a caller can only ever read their own referral chain. Both map every other user to their public wallet address (with adisplaycustom-handle-or-wallet variant), never an internal id.GetMyReferralPositionreturns your direct (L1) referrer only (referreris empty when you were not referred), your all-timetotal_earned, and your most recent reward rows (up to the 100 newest;total_earnedstays the complete aggregate).GetMyReferralDownlinereturnsearnings_by_sourceacross all three reward levels (L1/L2/L3), your L1 direct-referee roster (including referees who have not traded yet, shown with0earned; showing up to the 500 most recent effective referees (after per-wallet dedupe), drawn from a bounded scan so a very large history may yield an incomplete roster, while the earnings views stay unbounded), and a per-levelsummary.- Both referral reads share the standard authenticated-read error set:
UNAUTHENTICATEDwhen the session is missing or invalid,RESOURCE_EXHAUSTEDwhen the account’s read budget is exhausted (retry after the interval in theRetryInfodetail), andINTERNALon a server error.

