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

# Get Price Checkpoint History

> Get price checkpoints over time



## OpenAPI

````yaml /api-specs/public-rest-unified.json get /stats/api/v1/price_checkpoints
openapi: 3.1.0
info:
  title: DerivaDEX API Documentation
  version: '1.0'
  description: ''
servers:
  - url: https://testnet.derivadex.io
    description: DerivaDEX testnet
security: []
tags:
  - name: Venue-Wide Tables
    description: These APIs expose venue-wide public tables and reference data.
    x-source-api: Public REST API
  - name: System
    description: These APIs return system info.
    x-source-api: Public REST API
  - name: Trade
    description: These APIs provide data for a particular trader.
    x-source-api: Public REST API
  - name: Market
    description: These APIs return key high level metrics for markets.
    x-source-api: Public REST API
  - name: Trade
    description: These APIs provide data for a particular trader.
    x-source-api: Public Exchange REST API
  - name: Market
    description: These APIs return key high level metrics for markets.
    x-source-api: Public Exchange REST API
  - name: System
    description: These APIs return system info.
    x-source-api: Public Exchange REST API
paths:
  /stats/api/v1/price_checkpoints:
    get:
      tags:
        - Market
      summary: Get Price Checkpoint History
      description: Get price checkpoints over time
      parameters:
        - in: query
          name: limit
          schema:
            type: integer
            default: 500
          description: The number of rows to return
        - in: query
          name: epoch
          schema:
            type: integer
          description: The epoch boundary used when fetching the next timeseries page.
          example: 100
        - in: query
          name: txOrdinal
          schema:
            type: integer
          description: >-
            The txOrdinal boundary used when fetching the next timeseries page.
            Must be passed along with epoch.
          example: 4323
        - in: query
          name: order
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
          description: The ordering of the results.
        - in: query
          name: symbol
          schema:
            type: string
          description: The symbol
          example: ETHP
        - name: priceHash
          in: query
          schema:
            type: string
            example: '0xe30f69fffa653b9cb7d4e90f099fe12ea21c5ff8e97f7854dd'
          description: >-
            the index price hash of the mark price. Multiple price hash values
            can be provided.
      responses:
        '200':
          description: Price checkpoint data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriceCheckpointAPISuccessResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatsAPIErrorResponse'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatsAPIErrorResponse'
components:
  schemas:
    PriceCheckpointAPISuccessResponse:
      type: object
      additionalProperties: false
      properties:
        nextEpoch:
          type:
            - number
            - 'null'
          description: >-
            Pointer for the epoch boundary of the next page. Will return null
            when there is no more data left to fetch.
          examples:
            - 100
            - null
        nextTxOrdinal:
          type:
            - number
            - 'null'
          description: >-
            Pointer for the txOrdinal boundary of the next page. Will return
            null when there is no more data left to fetch.
          examples:
            - 3432
            - null
        nextOrdinal:
          type:
            - number
            - 'null'
          description: >-
            Pointer for the ordinal boundary of the next page. Will return null
            when there is no more data left to fetch.
          examples:
            - 100
            - null
        value:
          type: array
          items:
            type: object
            properties:
              epochId:
                type: string
                description: The epoch in which this transaction occured.
                examples:
                  - 100
              txOrdinal:
                type: string
                description: The transaction ordinal, within the epoch.
                examples:
                  - 3432
              indexPriceHash:
                type: string
                description: The hash of the index price.
                examples:
                  - '0x607b9303d1da6aa842c4f7af2ae18d8616e5af63b692a05151'
              symbol:
                type: string
                description: The symbol of the asset.
                examples:
                  - ETHP
              indexPrice:
                type: string
                description: >-
                  The exponential weighted average of prices from the price feed
                  by source.
                examples:
                  - '5311.571505'
              markPrice:
                type: string
                description: >-
                  The index price + ema clamped to 50bps above/below the index
                  price at all times.
                examples:
                  - '5311.203'
              time:
                type: string
                description: >-
                  The monotonic clock tick associated with this price
                  checkpoint.
                examples:
                  - '100'
              ema:
                type:
                  - string
                  - 'null'
                description: >-
                  Exponential moving average which tracks the spread between the
                  DerivaDEX Petual swap price and the underlying index price it
                  is tracking.
                examples:
                  - '-2.67'
              priceOrdinal:
                type: string
                description: The ordinal of this price update.
                examples:
                  - '100'
              createdAt:
                type: string
                format: date-time
                description: The time when this row was added to the database.
                examples:
                  - '2023-01-06T16:37:27.929Z'
            required:
              - epochId
              - txOrdinal
              - indexPriceHash
              - symbol
              - indexPrice
              - markPrice
              - time
              - ema
              - priceOrdinal
              - createdAt
            additionalProperties: false
            description: A price checkpoint transaction.
          description: The value of the response
        success:
          type: boolean
          const: true
          description: Whether the request was successful
        timestamp:
          type: number
          description: The timestamp of the response
          examples:
            - 1673031089
      required:
        - nextEpoch
        - nextOrdinal
        - nextTxOrdinal
        - success
        - timestamp
        - value
      description: Successful response for the Price Checkpoints API
    StatsAPIErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          const: false
        errorMsg:
          anyOf:
            - type: string
            - type: array
              items:
                type: object
                additionalProperties: false
      required:
        - success
      additionalProperties: false

````