# Staking Reporting API

The Staking Reporting API enables you to monitor, analyze, and retrieve detailed information about staking-related activities, such as rewards, statuses, and processing health, across multiple protocols, including:

**[Ethereum](https://docs.blockdaemon.com/reference/ethereum-api-v2-overview)**

**[Cardano](https://docs.blockdaemon.com/reference/cardano-reporting-api-overview)**

**[Polkadot](https://docs.blockdaemon.com/reference/polkadot-reporting-api-overview)**

**[Polygon](https://docs.blockdaemon.com/reference/polygon-reporting-api-overview)**

**[Solana](https://docs.blockdaemon.com/reference/solana-reporting-api-overview)**

## Response Format  
Endpoints that return `application/x-ndjson` also support `application/json` and `text/csv`. Use the `Accept` request header to specify the format you want:

| `Accept` header | Response format |  
| --- | --- |  
| `application/x-ndjson` (default) | Newline-delimited JSON stream |  
| `application/json` | Standard JSON |  
| `text/csv` | CSV |

## Use Cases

### ➡️ Data Granularity  
The API supports different levels of data granularity, such as daily or epoch-based data, which can be queried using specific endpoints. Rewards are available at the epoch level as well as daily, weekly, monthly, and yearly roll-ups.

Below is the sample request to [get Ethereum Validator Rewards](https://docs.blockdaemon.com/reference/getrewards-ethereum):

**cURL**

```curl
curl --request POST \
     --url https://svc.blockdaemon.com/reporting/staking/v2/ethereum/mainnet/validator/rewards \
     --header 'X-API-Key: <API_KEY>' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data ' \
      {\n        "period": "monthly",\n        "aggregate": false,\n        "denomination": "wei"\n      }\n    ' 
```

This response shows reward data for the specified validator in a monthly granularity, along with details about the validator's start balance and epoch range.

**JSON**

```json
{
  "address": "0xaf3cfa981e084985c88928ae2fc7802790195d5d4e297fb384230b6b8e4540b2654a50a17dfeccc73f550461bd794563",
  "denomination": "wei",
  "return": "17859798000000000",
  "startTime": 1716422400,
  "endTime": 1719100799,
  "period": "monthly",
  "startBalance": "32002448366000000000",
  "metadata": {
    "epoch": "285413-287302",
    "withdrawals": "18477398000000000",
    "deposits": "0",
    "syncCommitteeReward": "0",
    "blockReward": "0",
    "attestationReward": "17859798000000000",
    "mevBlockReward": "0",
    "blockFeeReward": "0",
    "index": "1333904"
  }
}
```

### ➡️ Reporting and Analytics  
The Staking Reporting API helps users track staking performance, returns, and identify areas for improvement with clear reports and analytics.

a) Below is the sample request to [get Polygon Address Status](https://docs.blockdaemon.com/reference/getstatus-polygon):

**cURL**

```curl
curl --request GET \
     --url https://svc.blockdaemon.com/reporting/staking/v2/polygon/mainnet/validator/status/0xAB30eF276ADC2bE22CE58d75B4F4009173A73676 \
     --header 'X-API-Key: YOUR_API_KEY' \
     --header 'accept: application/json'
```

This response shows the status of the validator's address along with the metadata details for tracking the validator's performance and status.

**JSON**

```json
{
  "address": "0x875e901465A639f2E71fcfC10F426eD32F5A909a",
  "status": "ACTIVE",
  "timestamp": 1710003868,
  "metadata": {
    "validatorId": "143",
    "validatorContract": "0x875e901465A639f2E71fcfC10F426eD32F5A909a",
    "type": "validator",
    "owner": "0xAB30eF276ADC2bE22CE58d75B4F4009173A73676"
  }
}
```

b) Another example is the Rewards Processing Health. The API also allows users to monitor the protocol’s rewards processing health and the current status of the blockchain.

**cURL**

```curl
curl --request GET \
     --url https://svc.blockdaemon.com/reporting/staking/v2/polygon/mainnet/health \
     --header 'X-API-Key: YOUR_API_KEY' \
     --header 'accept: application/json'
```

This response indicates that the protocol is operating in an "OPTIMAL" state, with metadata providing an additional context of the network.

**JSON**

```json
{
  "status": "OPTIMAL",
  "timestamp": 1737556200,
  "metadata": {
    "chainCheckpoint": "75333",
    "lastProcessedCheckpoint": "75332"
  }
}
```

### ➡️ Yield Metrics  
**APR** is the annual percentage rate. It represents a rate of return without considering the compounding of rewards. In the context of the yield APIs, APR is calculated over the selected date range and annualized.

The calculation is:

**APR**=(Total Return for Period / Average Stake for Period) × (Periods per Year / Periods in Calculation)

**APY** is the annual percentage yield, which takes into account the APR and compounding of rewards. We use the standard APY calculation:

**APY**=(1 + APR/N)^N − 1

> **APY** = annual percentage yield  
> **APR** = annual percentage rate  
> **N** = number of compounding periods per year

### Note  
For Ethereum, APY is only relevant **Post-Pectra upgrade**, where a validator’s configured maximum effective balance exceeds its current effective balance. In this case, rewards are auto-compounded until the maximum is reached. If the validator is already at the maximum, rewards are not compounded, and APY becomes irrelevant.

### Related API References  
- **Solana**  
  - [Get a Stream of Yield Summaries (Multiple Validators/Delegators)](https://docs.blockdaemon.com/reference/getyields-solana)  
  - [Get a Yield for a Validator Address](https://docs.blockdaemon.com/reference/getyield-validator-solana)  
- **Ethereum**  
  - [Get a Stream of Yield Summaries (Multiple Validators)](https://docs.blockdaemon.com/reference/getyields-ethereum)  
  - [Get a Yield for a Validator Address](https://docs.blockdaemon.com/reference/getyield-validator-ethereum)

## Contact  
Contact us through [email](mailto:support@blockdaemon.com) or our [support page](/content/support/index.html) for any issues, bugs, or assistance you may need.
