# Including CSPR rates

Often, when looking at the fiat value of a native token amount, we want it to be converted using the rate that was relevant at the moment when the corresponding action happened. CSPR.cloud REST API provides the possibility to do so when requesting data having the `timestamp` property and when it's semantically acceptable To learn more, visit the [CSPR rate](/1.5.x/rest-api/cspr-rate.md) page.

In the example below, we include the USD to CSPR rate in the account delegation rewards response by calling the `rate` [function](/1.5.x/documentation/overview/optional-properties.md#functions) with the USD currency ID as the argument in the `includes` query param:

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/accounts/019aa4adcd6f58f92eb4c98c0245e5d86b61de4919245c23ae9e906a6df5d41b0c/delegation-rewards?includes=rate(1)' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "item_count": 38490,
  "page_count": 3849,
  "data": [
    {
      "amount": "139319",
      "era_id": 11774,
      "public_key": "019aa4adcd6f58f92eb4c98c0245e5d86b61de4919245c23ae9e906a6df5d41b0c",
      "rate": 0.04051209,
      "timestamp": "2023-12-20T12:55:54Z",
      "validator_public_key": "0106ca7c39cd272dbf21a86eeb3b36b7c26e2e9b94af64292419f7862936bca2ca"
    },
    {
      "amount": "186761050",
      "era_id": 11774,
      "public_key": "019aa4adcd6f58f92eb4c98c0245e5d86b61de4919245c23ae9e906a6df5d41b0c",
      "rate": 0.04051209,
      "timestamp": "2023-12-20T12:55:54Z",
      "validator_public_key": "017d96b9a63abcb61c870a4f55187a0a7ac24096bdb5fc585c12a686a4d892009e"
    },
    ...
    {
      "amount": "139010",
      "era_id": 11771,
      "public_key": "019aa4adcd6f58f92eb4c98c0245e5d86b61de4919245c23ae9e906a6df5d41b0c",
      "rate": 0.0403257,
      "timestamp": "2023-12-20T06:55:27Z",
      "validator_public_key": "0106ca7c39cd272dbf21a86eeb3b36b7c26e2e9b94af64292419f7862936bca2ca"
    }
  ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cspr.cloud/1.5.x/documentation/highlights/including-cspr-rates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
