# API Responses

## Average Rewards Rate

### Parameters

- **avg**  
  String, Defaults to `7d`.  
  If `7d`, returns the 7 days moving average. If not, returns the daily spot rates.
- **decimal**  
  Integer, Defaults to `2`.  
  Specifies the number of desired decimals to be returned. Accepts values between 2 (default) and 5.

### Responses

- **200**  
  Success  
  ```json
  {
    "data": [
      {
        "date": "2023-08-05",
        "value": "3.49"
      }
    ]
  }
  ```
- **401**  
  Invalid API key

### Example Request

```shell
curl --request GET \
     --url 'https://api.figment.io/cardano/rewards_rates?avg=7d&decimal=2' \
     --header 'accept: application/json' \
     --header 'x-api-key: your-api-key-here'
```
