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

# GET /historical - Fetch historical OHLC bars

> Fetches historical OHLC bars from the platform's bar store.

## Parameters
- `symbol` (required): Full contract symbol like "ESH6", "NQH6"
- `data_type` (optional): "ohlc" (default: "ohlc")
- `interval` (optional): For OHLC - "15s", "30s", "1m", "2m", "3m", "5m", "15m", "30m", "1h", "4h", "1d", "1w" (default: "1m")
- `limit` (optional): Max records to return (default: 5000, max: 10000)
- `days_back` (optional): How many days of history (default: 30, max: 365)

## Price Format
Prices are raw fixed-point integer values. Divide by 1,000,000,000 for display:
- `6010250000000` → `$6010.25`



## OpenAPI

````yaml /api-reference/md-openapi.json get /md/historical
openapi: 3.0.3
info:
  contact:
    name: Hyperprop
    url: https://hyperprop.com
  description: >-
    # Hyperprop Market Data API


    Real-time futures market data streaming.


    ## Overview


    - **REST endpoints** for current ticker prices, OHLC, order books

    - **WebSocket** for real-time streaming with channel subscriptions

    - **JWT authentication** + CME entitlements


    ## Price Format


    Prices are **raw fixed-point integer values** (i64):

    ```text

    displayPrice = rawPrice / 1_000_000_000

    // 6010250000000 → $6010.25

    ```


    ## Authentication


    All WebSocket connections require a JWT token:

    ```http

    wss://api.hyperprop.com/md/ws/stream?token=YOUR_JWT_TOKEN

    ```


    ## CME Entitlements


    Access requires an accepted CME market data agreement and an active
    entitlement for the requested product.


    | Exchange | Symbols |

    |----------|---------|

    | CME | ES, NQ, RTY |

    | CBOT | ZC, ZS, ZW, ZB, ZN |

    | NYMEX | CL, NG, RB |

    | COMEX | GC, SI, HG |


    ## WebSocket Usage


    Connect to `/md/ws/stream` and subscribe to channels:


    ```javascript

    const ws = new
    WebSocket('wss://api.hyperprop.com/md/ws/stream?token=JWT_TOKEN');


    ws.onopen = () => {
      // Subscribe to ticker channel
      ws.send(JSON.stringify({
        action: 'subscribe',
        channel: 'ticker',
        symbols: ['ES', 'NQ']
      }));
    };


    ws.onmessage = (e) => {
      const msg = JSON.parse(e.data);
      if (msg.type === 'Price') {
        console.log(`${msg.data.symbol}: $${(msg.data.price / 1e9).toFixed(2)}`);
      }
    };

    ```
  license:
    name: Proprietary
  title: Hyperprop Market Data API
  version: 0.1.0
servers:
  - url: https://api.hyperprop.com
    description: Production
security: []
tags:
  - description: Health checks and server information
    name: System
  - description: Current ticker prices
    name: Tickers
  - description: OHLC candlestick data
    name: OHLC
  - description: Best bid/ask prices (top of book)
    name: Order Book
  - description: Historical market data (OHLC bars)
    name: Historical
  - description: Real-time streaming via WebSocket
    name: WebSocket
paths:
  /md/historical:
    get:
      tags:
        - Historical
      summary: GET /historical - Fetch historical OHLC bars
      description: >-
        Fetches historical OHLC bars from the platform's bar store.


        ## Parameters

        - `symbol` (required): Full contract symbol like "ESH6", "NQH6"

        - `data_type` (optional): "ohlc" (default: "ohlc")

        - `interval` (optional): For OHLC - "15s", "30s", "1m", "2m", "3m",
        "5m", "15m", "30m", "1h", "4h", "1d", "1w" (default: "1m")

        - `limit` (optional): Max records to return (default: 5000, max: 10000)

        - `days_back` (optional): How many days of history (default: 30, max:
        365)


        ## Price Format

        Prices are raw fixed-point integer values. Divide by 1,000,000,000 for
        display:

        - `6010250000000` → `$6010.25`
      operationId: getHistoricalData
      parameters:
        - description: Symbol to fetch (e.g., "ES", "NQ", "ESH6", "NQH6")
          in: query
          name: symbol
          required: true
          schema:
            type: string
        - description: 'Data type: "ohlc" (default: "ohlc")'
          in: query
          name: data_type
          required: false
          schema:
            type: string
        - description: >-
            OHLC interval: "15s", "30s", "1m", "2m", "3m", "5m", "15m", "30m",
            "1h", "4h", "1d", "1w" (default: "1m")
          in: query
          name: interval
          required: false
          schema:
            type: string
        - description: 'Limit number of records (default: 5000, max: 10000)'
          in: query
          name: limit
          required: false
          schema:
            minimum: 0
            type: integer
        - description: 'How many days back to fetch (default: 30, max: 365)'
          in: query
          name: days_back
          required: false
          schema:
            format: int32
            minimum: 0
            type: integer
        - description: Start time (ISO 8601 format, e.g., "2026-01-20T16:00:00Z")
          in: query
          name: start
          required: false
          schema:
            nullable: true
            type: string
        - description: End time (ISO 8601 format, defaults to now)
          in: query
          name: end
          required: false
          schema:
            nullable: true
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                bars:
                  - close: 29530250000000
                    high: 29534750000000
                    low: 29521000000000
                    open: 29528500000000
                    timestamp: 1786046400000
                    volume: 412
                  - close: 29533000000000
                    high: 29534750000000
                    low: 29521000000000
                    open: 29530250000000
                    timestamp: 1786046460000
                    volume: 412
                count: 2
                end: '2026-08-08T13:32:00Z'
                interval: 1m
                start: '2026-08-08T13:30:00Z'
                success: true
                symbol: NQU6
              schema:
                $ref: '#/components/schemas/HistoricalOhlcResponse'
          description: Historical OHLC data
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoricalErrorResponse'
          description: Invalid parameters
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoricalErrorResponse'
          description: Unauthorized - missing or invalid token
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoricalErrorResponse'
          description: Forbidden - CME agreement not accepted or entitlements not active
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HistoricalErrorResponse'
          description: Server error
      security:
        - bearer_auth: []
components:
  schemas:
    HistoricalOhlcResponse:
      description: Response for historical OHLC data
      properties:
        bars:
          items:
            $ref: '#/components/schemas/HistoricalBar'
          type: array
        count:
          minimum: 0
          type: integer
        end:
          type: string
        interval:
          type: string
        start:
          type: string
        success:
          type: boolean
        symbol:
          type: string
      required:
        - success
        - symbol
        - interval
        - start
        - end
        - count
        - bars
      type: object
    HistoricalErrorResponse:
      description: Error response
      properties:
        code:
          type: string
        error:
          type: string
        success:
          type: boolean
      required:
        - success
        - error
        - code
      type: object
    HistoricalBar:
      description: Historical OHLC bar
      properties:
        close:
          description: Close price
          format: int64
          type: integer
        high:
          description: High price
          format: int64
          type: integer
        low:
          description: Low price
          format: int64
          type: integer
        open:
          description: Open price (raw fixed-point integer value, divide by 1e9)
          format: int64
          type: integer
        timestamp:
          description: Unix timestamp in seconds
          format: int64
          minimum: 0
          type: integer
        volume:
          description: Volume
          format: int64
          minimum: 0
          type: integer
      required:
        - timestamp
        - open
        - high
        - low
        - close
        - volume
      type: object

````

## Related topics

- [GET /historical/latest - Fetch latest OHLC bars for gap fill.](/market-data-api/historical/get-historicallatest--fetch-latest-ohlc-bars-for-gap-fill.md)
- [Get current OHLC bars](/market-data-api/ohlc/get-current-ohlc-bars.md)
- [WebSocket Stream (Documentation Only)](/market-data-api/websocket/websocket-stream-documentation-only.md)
- [Introduction](/introduction.md)
- [GET /depth/history — rolling order-book depth history.](/market-data-api/historical/get-depthhistory-—-rolling-order-book-depth-history.md)
