> ## Documentation Index
> Fetch the complete documentation index at: https://docs.amberdata.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Hourly & Daily Reference Rates

> Retrieve the historical (time series) hourly and daily reference rates for a specific asset.



## OpenAPI

````yaml get /spot/reference-rates/{assetId}
openapi: 3.1.0
info:
  title: market-api
  version: '2'
servers:
  - url: https://api.amberdata.com/markets
security:
  - ApiKeyAuth: []
paths:
  /spot/reference-rates/{assetId}:
    get:
      summary: Hourly & Daily Reference Rates
      description: >-
        Retrieve the historical (time series) hourly and daily reference rates
        for a specific asset.
      operationId: spot-reference-rates-historical
      parameters:
        - name: assetId
          in: path
          description: The id of the asset for which reference rates are needed.
          schema:
            type: string
            enum:
              - btc
              - eth
            default: btc
          required: true
        - name: startDate
          in: query
          description: >-
            **[Optional]** Payload only includes data after this date
            (inclusive).  **[Formats]** `seconds | milliseconds | iso8601`
            **[Examples]** `1578531600 | 1578531600000 | 2020-09-01T01:00:00`
          schema:
            type: string
            format: date-time
        - name: endDate
          in: query
          description: >-
            **[Optional]** Payload only includes data before this date
            (exclusive).  **[Formats]** `seconds | milliseconds | iso8601`
            **[Examples]** `1578531600 | 1578531600000 | 2020-09-01T01:00:00`
          schema:
            type: string
            format: date-time
        - name: timeFormat
          in: query
          description: '**[Optional]** Time format of the timestamps in the return payload.'
          schema:
            type: string
            enum:
              - milliseconds
              - ms*
              - iso
              - iso8601
              - hr
              - human_readable
            default: hr
        - name: timeInterval
          in: query
          description: Specify the granularity of the desired reference rate.
          schema:
            type: string
            enum:
              - hours
              - days
            default: hours
        - name: dailyTime
          in: query
          description: >-
            Use with `timeInterval=days`.  Filter for the asset's daily
            reference rate at 16:00 hours for a specific timezone. 
            **[Examples]** `dailyTime=T16:00+08:00` is 16:00 Singapore & Hong
            Kong
          schema:
            type: string
            enum:
              - T16:00-05:00
              - T16:00-04:00
              - T16:00+00:00
              - T16:00+01:00
              - T16:00+04:00
              - T16:00+08:00
              - T16:00+09:00
        - name: direction
          in: query
          description: >-
            The order in which to return the results (ascending or descending).
            By default, records are returned in descending order, so the most
            recent records are returned first.
          schema:
            type: string
            enum:
              - desc
              - asc
        - name: Accept-Encoding
          in: header
          required: true
          description: ''
          schema:
            type: string
            default: gzip, deflate, br
        - name: api-version
          in: header
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: 200
                    title: OK
                    description: Successful request
                    payload:
                      metadata:
                        timeInterval: hours
                        api-version: '2023-09-30'
                      data:
                        assetARCID: eth
                        assetSymbol: eth
                        assetName: Ether
                        currency: usd
                        referenceRates:
                          - timestamp: 2023-11-05 18:00:00 000
                            unitPrice: 1896.2722539256226
                          - timestamp: 2023-11-05 19:00:00 000
                            unitPrice: 1892.070741279808
                          - timestamp: 2023-11-05 20:00:00 000
                            unitPrice: 1888.6184732343843
                          - timestamp: 2023-11-05 21:00:00 000
                            unitPrice: 1870.1300714429476
                          - timestamp: 2023-11-05 22:00:00 000
                            unitPrice: 1881.8808731384033
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 200
                    default: 0
                  title:
                    type: string
                    example: OK
                  description:
                    type: string
                    example: Successful request
                  payload:
                    type: object
                    properties:
                      metadata:
                        type: object
                        properties:
                          timeInterval:
                            type: string
                            example: hours
                          api-version:
                            type: string
                            example: '2023-09-30'
                      data:
                        type: object
                        properties:
                          assetARCID:
                            type: string
                            example: eth
                          assetSymbol:
                            type: string
                            example: eth
                          assetName:
                            type: string
                            example: Ether
                          currency:
                            type: string
                            example: usd
                          referenceRates:
                            type: array
                            items:
                              type: object
                              properties:
                                timestamp:
                                  type: string
                                  example: 2023-11-05 18:00:00 000
                                unitPrice:
                                  type: number
                                  example: 1896.2722539256226
                                  default: 0
      deprecated: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````