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

# Get historical market snapshots

> Fetch market snapshots within a time range for one or more markets. Optionally interpolate to a uniform time grid.



## OpenAPI

````yaml /openapi/markets.json get /v0/markets/history
openapi: 3.1.1
info:
  title: Markets & Positions API (Beta)
  version: 0.0.1
servers:
  - url: https://markets.dial.to/api
security:
  - apiKey: []
paths:
  /v0/markets/history:
    get:
      tags:
        - Markets
      summary: Get historical market snapshots
      description: >-
        Fetch market snapshots within a time range for one or more markets.
        Optionally interpolate to a uniform time grid.
      operationId: markets-positions.marketsV0Api.marketsHistory
      parameters:
        - name: marketIds
          in: query
          required: true
          schema:
            type: string
            description: >-
              Market ID can be found in our /markets list endpoint and
              /positions endpoint.
            default: jupiter.earn.USDC
          allowEmptyValue: true
          allowReserved: true
        - name: startTime
          in: query
          required: true
          schema:
            type: string
            format: date-time
            x-native-type: date
            description: Start time of the snapshot. Date or datetime in RFC 3339 format
            default: '2025-12-01T00:00:00Z'
          allowEmptyValue: true
          allowReserved: true
        - name: endTime
          in: query
          required: false
          schema:
            type: string
            format: date-time
            x-native-type: date
            description: >-
              End time of the snapshot. Date or datetime in RFC 3339 format.
              Defaults to current time if not provided
          allowEmptyValue: true
          allowReserved: true
        - name: resolution
          in: query
          required: false
          schema:
            enum:
              - 1h
              - 1d
            type: string
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      markets:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            history:
                              type: array
                              items:
                                type: object
                                properties:
                                  timestamp:
                                    type: string
                                    format: date-time
                                    x-native-type: date
                                  depositApy:
                                    anyOf:
                                      - type: number
                                      - type: 'null'
                                  totalDeposit:
                                    anyOf:
                                      - type: number
                                      - type: 'null'
                                  totalDepositUsd:
                                    anyOf:
                                      - type: number
                                      - type: 'null'
                                required:
                                  - timestamp
                          required:
                            - id
                            - history
                    required:
                      - markets
                required:
                  - data
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-dialect-client-key
      in: header
      description: Client key for the Markets API
      x-default: pk_demo

````