Get historical currency rates

Get a paginated list of historical currency rates for the given time range.

GET /currencies/{currency_id}/rates

Query params

Query paramDescription

from

Start of the range in the ISO 8601 format

to

End of the range in the ISO 8601 format

Sorting

PropertyDescription

created

Sort rates by timestamp

Default sorting is created ASC

Optional properties

None

Response

PaginatedResponse<Rate>

Example

curl -X 'GET' \
  'https://api.testnet.cspr.cloud/currencies/1/rates' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
{
  "data": [
    {
      "currency_id": 1,
      "amount": 1.32545,
      "created": "2021-05-12T00:00:00Z"
    },
    {
      "currency_id": 1,
      "amount": 1.16265,
      "created": "2021-05-12T01:00:00Z"
    },
    ...
    {
      "currency_id": 1,
      "amount": 1.25135,
      "created": "2021-05-12T09:00:00Z"
    }
  ],
  "item_count": 1258084,
  "page_count": 125809
}

Last updated