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

# Custom Range Rewards

> Get validator rewards for any custom epoch or date range — a single aggregated call on Scale/Enterprise, or per-epoch iteration for finer detail

## Overview

There are two ways to get rewards for a **specific date range** that doesn't match the predefined evaluation windows (`24h`, `7d`, `30d`, `90d`, `all_time`):

> [card] Aggregated custom range 💎
>
> A single [Rewards Aggregated](https://docs.beaconcha.in/api-reference/ethereum/validators/rewards-aggregate.md) call with an explicit `timestamp`, `epoch`, or `slot` range. Requires a [Scale or Enterprise plan](https://beaconcha.in/pricing). Served at whole-UTC-day granularity.

> [card] Per-epoch iteration
>
> Iterate each epoch with the [Rewards List](https://docs.beaconcha.in/api-reference/ethereum/validators/rewards-list.md) endpoint. Works on any plan and returns per-epoch values — needed for finer-than-daily detail and per-epoch fiat values.

> [!TIP]
>
> Need daily rewards with fiat values for up to 366 days, without code? The [Income & Tax Report](https://docs.beaconcha.in/explorer/income-tax-report.md) does it on the website.

***

## Aggregated Custom Range 💎

With a [Scale or Enterprise plan](https://beaconcha.in/pricing), pass an explicit range to `rewards-aggregate` to get a single total for that period — no epoch iteration required. Specify the range by `timestamp` (Unix seconds), `epoch`, or `slot`.

```bash theme={null}
curl --request POST \
  --url https://beaconcha.in/api/v2/ethereum/validators/rewards-aggregate \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "chain": "mainnet",
  "validator": { "dashboard_id": 123 },
  "range": {
    "timestamp": { "start": 1710460800, "end": 1719705600 }
  }
}
'
```

> [!NOTE]
>
> **Whole-UTC-day granularity:** Aggregated custom ranges are rounded outward to whole UTC days — the query covers every UTC day your range touches. The response `range` echoes the range actually covered by the returned data. It can be wider than requested (outward day expansion) or narrower: leading or trailing days with no data for the selected validators do not extend the range. For sub-day precision or per-epoch values, use per-epoch iteration below.

> [!NOTE]
>
> **Ranges without data:** When the range ends before any of the selected validators had a validator index, or starts after the latest available day, the call answers `404` with `no validator rewards data available for the requested range and validators`. A selector that matches no validators gets the same answer, so check the selector once with a named window, for example `"range": { "evaluation_window": "24h" }`. If that call returns `200`, count a range that ends before the first of your validators was activated and answers `404` as zero rewards. Any other `404` for a past range means the data is missing or not aggregated yet: retry later, and report it if it persists. Per-epoch iteration works the same way: `rewards-list` answers `404` for an epoch before any of the selected validators had a validator index.

***

## Per-Epoch Iteration

When you need per-epoch values — finer-than-daily precision, per-epoch fiat conversion, or you're on a plan without custom-range aggregation — iterate each epoch using the **Rewards List** endpoint.

> [!WARNING]
>
> **API Usage Consideration:** Each epoch requires at least one API call, plus one more for every further 10 validators (`rewards-list` returns at most 10 validators per page). A full month contains \~6,750 epochs, and a full year contains \~82,000 epochs. Ensure your API plan supports this volume of requests.

> [!NOTE]
>
> **API Endpoint:** This approach uses [`/api/v2/ethereum/validators/rewards-list`](https://docs.beaconcha.in/api-reference/ethereum/validators/rewards-list) for per-epoch reward data.

***

## When to Use Each Approach

| Scenario | Approach |
| - | - |
| Last 30 days summary (total only) | Use `rewards-aggregate` with `30d` ✅ |
| All-time rewards (total only) | Use `rewards-aggregate` with `all_time` ✅ |
| Specific month total (e.g., March 2024) 💎 | Use `rewards-aggregate` with a custom range ✅ |
| Q1 total (Jan 1 - Mar 31) 💎 | Use `rewards-aggregate` with a custom range ✅ |
| Daily totals for tax reporting 💎 | One `rewards-aggregate` call per UTC day ✅ |
| Per-epoch data for fiat conversion | Iterate epochs with `rewards-list` ⚠️ |
| Sub-day / exact-epoch precision | Iterate epochs with `rewards-list` ⚠️ |

> [!NOTE]
>
> **Tax Calculations:** To value rewards at the price when you received them, you need rewards per day or per epoch. `all_time` and the rolling windows return a single total, so they don't work for this, but a custom range of one UTC day returns that day's total. See [Tax Year Calculations](https://docs.beaconcha.in/api/use-cases/rewards/tax-year.md) for complete tax guidance.

***

## Per-Epoch Iteration Performance

These estimates apply to the **per-epoch iteration** approach (the aggregated custom range is a single call). They compare processing time between the **Free Trial** (1 req/s) and **Scale** plan (5 req/s):

| Range | Epochs | Est. API Calls | Est. Time (Free) | Est. Time (Scale) |
| - | - | - | - | - |
| 1 day | \~225 | \~225 | \~4-5 min | \~1 min |
| 1 week | \~1,575 | \~1,575 | \~25-30 min | \~5-6 min |
| 1 month | \~6,750 | \~6,750 | \~2 hours | \~25 min |
| 1 quarter | \~20,250 | \~20,250 | \~6 hours | \~1 hour |
| 1 year | \~82,000 | \~82,000 | \~23 hours | \~4-5 hours |

> [!TIP]
>
> **Optimize API Usage:** For large ranges, consider:
>
> * **Use dashboards and groups** — Query all validators in a dashboard with a single `dashboard_id` or filter by `group_id`, instead of listing identifiers (results are still paginated at 10 validators per page)
> * **Run calculations during off-peak hours** — Better API response times
> * **Use parallel requests** — Respecting your plan's rate limits

> [!TIP]
>
> **Upgrade for Faster Processing:** [Scale](https://beaconcha.in/pricing) offers 5 req/sec, while [Enterprise plans](https://beaconcha.in/pricing) offer custom limits for high-volume needs.

***

## Related Resources

* [Introduction](https://docs.beaconcha.in/api/use-cases/rewards.md) — Overview and endpoint comparison
* [Tax Year Calculations](https://docs.beaconcha.in/api/use-cases/rewards/tax-year.md) — Specific guidance for annual tax reporting
* [Epoch & Time Zone Conversion](https://docs.beaconcha.in/api/use-cases/rewards/epoch-time-zone-conversion.md) — Detailed epoch/timestamp math
* [Pagination Guide](https://docs.beaconcha.in/api/pagination.md) — Handling paginated responses

> [!TIP]
>
> API references: [Rewards Aggregated](https://docs.beaconcha.in/api-reference/ethereum/validators/rewards-aggregate.md) and [Rewards List](https://docs.beaconcha.in/api-reference/ethereum/validators/rewards-list.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.