Skip to content

Get the usage & billing report

GET https://rest.haasapi.com/v1/whitelabel/report

Returns this partner’s monthly usage and billing, oldest month first. The current month is compiled live; earlier months are settled bills. Each month carries the billable bot count, distinct active end-users, backtests run, the cost, and per-market and per-strategy breakdowns.

Requires the whitelabel scope.

Terminal window
curl "https://rest.haasapi.com/v1/whitelabel/report" \
-H "Authorization: Bearer hk_live_YOUR_KEY"

200 OK. Returns a PartnerReport.

{
"data": [
{
"year": 2026,
"month": 8,
"cost": "420.00",
"bots": 84,
"users": 37,
"backtests": 512,
"is_paid": true,
"market_details": [
{
"market": "BTC_USDT",
"users": 21,
"bots": 44
}
],
"script_details": [
{
"type": "spot_grid",
"users": 18,
"bots": 31,
"markets": 6
}
],
"user_details": [
{
"user_id": "8f14e45f-ceea-467a-9c9a-2b0f1d6a3c77",
"bots": 4,
"markets": 2
}
]
}
]
}

The public contract for GET /v1/whitelabel/report - this partner’s monthly usage and billing, ordered oldest month to newest. The current month is compiled live; earlier months are the stored bills. Same single-source-of-truth pattern as the rest of /v1: [JsonProperty] is the wire format, [Description] is the docs. The terse WhiteLabelBill wire keys (Y/M/C/B/U/…) never reach a caller - this is the shape.

The bill keys its per-user breakdown by the internal trading-account id; PartnerAPI.GET_REPORT translates that to the public user_id (via the partner’s roster) before this shapes it, so user_details[].user_id correlates with GET /v1/whitelabel/users. A row whose end-user was removed since the billed month drops out (no public id to map to).

Field Type Description
data array of PartnerReportMonth One entry per month, ordered oldest to newest. The last entry is the current month, compiled live.
Field Type Description
year integer (int32) Calendar year of the reporting month.
month integer (int32) Calendar month, 1-12.
cost string (decimal) Amount billed for the month, in USD, as a decimal string.
bots integer (int32) Bots active during the month - the billable count.
users integer (int32) Distinct end-users active during the month.
backtests integer (int32) Backtests run during the month.
is_paid boolean Whether the month’s bill has been settled.
market_details array of PartnerReportMarket Per-market breakdown of the month’s activity.
script_details array of PartnerReportScript Per-strategy breakdown of the month’s activity.
user_details array of PartnerReportUser Per-end-user breakdown of the month’s activity, keyed by the same user_id GET /v1/whitelabel/users returns.
Field Type Description
market string Market tag (e.g. BTC_USDT).
users integer (int32) Distinct end-users trading this market during the month.
bots integer (int32) Bots trading this market during the month.
Field Type Description
type WhiteLabelScriptType Strategy type.
users integer (int32) Distinct end-users running this strategy during the month.
bots integer (int32) Bots running this strategy during the month.
markets integer (int32) Distinct markets this strategy ran on during the month.

Type of trading bot script

Value Description
spot_grid Grid trading on a spot market.
futures_grid Grid trading on a futures market.
spot_dollar_cost_averaging Dollar-cost averaging on a spot market.
futures_dollar_cost_averaging Dollar-cost averaging on a futures market.
webhook Signal Bot - trades on externally pushed signals. The wire value stays webhook for API compatibility.
Field Type Description
user_id string The end-user identifier - the same id GET /v1/whitelabel/users returns.
bots integer (int32) Bots this end-user ran during the month.
markets integer (int32) Distinct markets this end-user traded during the month.

All errors are RFC 9457 problem documents.

Status Description
400 The request is malformed (invalid limit, unusable cursor, …). (code: invalid_request)
401 Missing, malformed, disabled, or revoked API key. (code: invalid_api_key)
500 An unexpected error inside the API. Nothing about the request caused it; retry, and quote the instance value if it persists. (code: internal_error)
502 An internal service answered in a way the API could not serve. Retry. (code: upstream_error)
503 The request could not be served right now. Retry with the same key - do not discard it. (code: temporarily_unavailable)
504 An internal service did not answer within the deadline. Retry with backoff. (code: upstream_timeout)
{
"type": "https://docs.haasapi.com/errors/invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request is malformed (invalid limit, unusable cursor, …).",
"code": "invalid_request"
}