Skip to content
These docs describe Tradr v0.14.0. Running an older release? Check the release notes for what changed.

Platform usage and revenue over a period (admin only).

GET
/api/admin/usage
curl --request GET \
--url https://api.tradr.cloud/api/admin/usage

Admin-gated (403 ADMIN_REQUIRED). from/to are optional ISO 8601 datetimes; the default window is the trailing 30 days ending now. from > to and ranges over 366 days are a 400 VALIDATION_ERROR. Returns period, totals (token/credit integer strings; providerCost is null when zero covered rows — pre-0013 rows have no recorded raw cost, see providerCostCoverage), the UTC-day series, topUsers (max 50 by billed credits), and the reversal-attributed revenue { credited, reversed, net }. Empty/future ranges return well-formed zeros.

from
string format: date-time
to
string format: date-time

AdminUsage — period, totals, series, topUsers, revenue.

VALIDATION_ERROR — malformed datetimes, from > to, or range > 366 days.

Not authenticated.

ADMIN_REQUIRED — authenticated but not an admin.

Admin rate limit reached (60 / 60 s per user).