Platform statistics (admin only).
GET
/api/admin/stats
const url = 'https://api.tradr.cloud/api/admin/stats';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tradr.cloud/api/admin/statsAdmin-gated (403 ADMIN_REQUIRED for non-admins) and per-user rate limited (60 / 60 s). Returns total users, “Active now” users (still-valid sessions in the last 30 min — activeUsersWindowMinutes is serialized for honest labeling), positions by status, and revenue as micro-USD integer strings: allTime and the reversal-attributed UTC currentMonth, with the pinned basis: 'purchased-credit-volume'. An empty instance returns well-formed zeros, never errors (REQ-2.7).
Responses
Section titled “Responses”AdminStats — totals
Not authenticated.
ADMIN_REQUIRED — authenticated but not an admin.
Admin rate limit reached (60 / 60 s per user).