> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getbutter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Daily Spend

> Track credit usage and additions over time.

Provides a time-series array of your credit transactions. You can use this to chart daily costs against account top-ups.

### Query Parameters

<ParamField query="start_date" type="string">
  Start date in `YYYY-MM-DD` format. Defaults to 30 days ago.
</ParamField>

<ParamField query="end_date" type="string">
  End date in `YYYY-MM-DD` format. Defaults to today.
</ParamField>

<ParamField query="start_datetime" type="string">
  Start exact time in ISO 8601 format (e.g. `2024-03-01T14:30:00Z`). Changes the granularity of the time-series points to `minute`.
</ParamField>

<ParamField query="end_datetime" type="string">
  End exact time in ISO 8601 format.
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="period" type="object">
      The start and end boundaries of the query.
    </ResponseField>

    <ResponseField name="granularity" type="string">
      The time grouping used for the data points. Either `day` or `minute`.
    </ResponseField>

    <ResponseField name="daily" type="array">
      Array of data points matching the granularity.

      <Expandable title="items">
        <ResponseField name="date" type="string">
          The date (or exact timestamp if minute granularity) for this data point.
        </ResponseField>

        <ResponseField name="credits_used" type="number">
          Platform credits consumed during this interval.
        </ResponseField>

        <ResponseField name="credits_added" type="number">
          Credits added to the account balance during this interval.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>
