# Statistics: Top and Total

Top donors and the donation total for a period. We count all connected sources and convert to rubles. Donations rejected by moderation are included. Set `period` and `timeZone` in the request. For allowed values and defaults, see the [Top donors](https://developers.donatty.com/en/reference/stats-top.md) and [Total donated](https://developers.donatty.com/en/reference/stats-total.md) methods. In the response, `from` and `to` specify the period boundaries.

## `Top`

**Returned by:**

- [Top donors](https://developers.donatty.com/en/reference/stats-top.md) · `GET /v1/stats/top` — the whole response

| Field | Type | Description |
|---|---|---|
| `period` | string, values: `DAY`, `WEEK`, `MONTH`, `YEAR`, `ALL_TIME` | The period from the request. |
| `from` | string (date-time) | Start of the period. For `ALL_TIME`, `1970-01-01T00:00:00Z`. |
| `to` | string (date-time) | Start of the next period; that moment itself is not included. For `ALL_TIME`, the moment of the response. |
| `items` | list of objects |  |
| `items[].rank` | integer, ≥ 1 | Position in the top, starting from 1. |
| `items[].name` | string | Donor name. |
| `items[].total` | [`Money`](https://developers.donatty.com/en/structures.md#money) | The donor's total for the period, in rubles. |

### Example

```json
{
  "period": "WEEK",
  "from": "2026-11-08T21:00:00Z",
  "to": "2026-11-15T21:00:00Z",
  "items": [
    {
      "rank": 1,
      "name": "Alex",
      "total": {
        "value": "12500.00",
        "currency": "RUB"
      }
    },
    {
      "rank": 2,
      "name": "Maria",
      "total": {
        "value": "4300.75",
        "currency": "RUB"
      }
    },
    {
      "rank": 3,
      "name": "Ivan",
      "total": {
        "value": "1000.00",
        "currency": "RUB"
      }
    }
  ]
}
```

## `Total`

**Returned by:**

- [Total donated](https://developers.donatty.com/en/reference/stats-total.md) · `GET /v1/stats/total` — the whole response

| Field | Type | Description |
|---|---|---|
| `period` | string, values: `DAY`, `WEEK`, `MONTH`, `YEAR`, `ALL_TIME` | The period from the request. |
| `from` | string (date-time) | Start of the period. For `ALL_TIME`, `1970-01-01T00:00:00Z`. |
| `to` | string (date-time) | Start of the next period; that moment itself is not included. For `ALL_TIME`, the moment of the response. |
| `total` | [`Money`](https://developers.donatty.com/en/structures.md#money) | The total donated for the period, in rubles. |

### Example

```json
{
  "period": "DAY",
  "from": "2026-11-09T17:00:00Z",
  "to": "2026-11-10T17:00:00Z",
  "total": {
    "value": "18250.25",
    "currency": "RUB"
  }
}
```
