# API Response for Rewards Rates

### Parameters

- **avg**
  - *string*
  - *enum*
    - Defaults to `7d`
    - If `7d`, returns the 7 days moving average. If not, returns the daily spot rates.
    - Allowed: `7d`

- **decimal**
  - *integer*
  - *Defaults to 2*
  - Specifies the number of desired decimals to be returned. Accepts values between 2 (default) and 5.

### Response Codes

#### `200`
  - Success

#### Object Format
```json
{
  "data": [
    {
      "date": "string",
      "value": "string"
    }
  ]
}
```

#### `401`
  - Invalid API key

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

## Example Response
```json
{
  "data": [
    {
      "date": "2023-08-05",
      "value": "3.49"
    }
  ]
}
```
