Accounts

Get account usage by UTC day for a time range.

Returns every UTC calendar day intersecting the requested half-open range. Days without usage have an empty data array.

get/v2/accounts/{account_id}/usage/daily

Path parameters

account_idstring required

LedgerUp account identifier.

Example:account_0194f4e3a2b77c6aa91c4f6b4db2a980

Query parameters

start_atinteger required

Unix timestamp in seconds.

Example:1767225600

Inclusive lower bound for event occurrence time.

end_atinteger required

Unix timestamp in seconds.

Example:1767225600

Exclusive upper bound for event occurrence time.

aggregation'sum' | 'min' | 'max' | 'avg' | 'latest' | 'count'

Aggregation applied to corrected usage events. latest returns the quantity from the event with the latest occurred_at; ties use accepted_at then event ID. count returns the number of events.

Example:sum
currencystring
Example:usd

Aggregate only events for this currency. Normalized to lowercase.

Response

Raw metric quantities for every UTC day in the requested range.

aggregation'sum' | 'min' | 'max' | 'avg' | 'latest' | 'count' required

Aggregation applied to corrected usage events. latest returns the quantity from the event with the latest occurred_at; ties use accepted_at then event ID. count returns the number of events.

Example response

{
  "aggregation": "sum",
  "data": [
    {
      "period_start_at": 1767225600,
      "data": [
        {
          "metric_id": "metric_0194f4e3a2b77c6aa91c4f6b4db2a980",
          "currency": "usd",
          "quantity": "1250.5"
        }
      ]
    }
  ]
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.