> ## 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 Epoch History

> Get epoch timetable and paging cursors



## OpenAPI

````yaml /api-specs/public-rest-unified.json get /stats/api/v1/epochs
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/epochs:
    get:
      tags:
        - System
      summary: Get Epoch History
      description: Get epoch timetable and paging cursors
      parameters:
        - in: query
          name: epoch
          schema:
            type: integer
          description: The epoch boundary used when fetching the next timeseries page.
          example: 100
        - in: query
          name: limit
          schema:
            type: integer
            default: 500
          description: The number of rows to return
        - in: query
          name: offset
          schema:
            type: integer
            default: 0
          description: The offset of returned rows
      responses:
        '200':
          description: Epoch start and end time data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EpochsAPISuccessResponse'
        '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:
    EpochsAPISuccessResponse:
      type: object
      additionalProperties: false
      properties:
        value:
          type: array
          items:
            type: object
            properties:
              epochId:
                type: string
                description: The epoch number.
                examples:
                  - 100
              startTime:
                type: string
                format: date-time
                description: The timestamp at which this epoch started.
                examples:
                  - '2023-01-06T16:37:27.929Z'
              endTime:
                anyOf:
                  - type: object
                    format: date-time
                  - type: 'null'
                description: >-
                  The timestamp at which this epoch ended. This will be null if
                  the epoch is still ongoing.
                type: string
                examples:
                  - '2023-01-06T16:37:27.929Z'
                  - null
            required:
              - epochId
              - startTime
              - endTime
            additionalProperties: false
            description: Start and end metadata for each epoch.
          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:
        - success
        - timestamp
        - value
      description: Successful response for Epochs 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

````