> ## 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/latest - Fetch latest OHLC bars for gap fill.



## OpenAPI

````yaml /api-reference/md-openapi.json get /md/historical/latest
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/latest:
    get:
      tags:
        - Historical
      summary: GET /historical/latest - Fetch latest OHLC bars for gap fill.
      operationId: getLatestHistoricalBars
      parameters:
        - description: Symbol to fetch (e.g., "ES", "NQ", "ESH6", "NQH6")
          in: query
          name: symbol
          required: true
          schema:
            type: string
        - description: >-
            OHLC interval: "15s", "30s", "1m", "2m", "3m", "5m", "15m", "30m",
            "1h", "4h", "1d", "1w"
          in: query
          name: interval
          required: false
          schema:
            type: string
        - description: >-
            Unix timestamp in seconds. Bars at or after this timestamp are
            returned.
          in: query
          name: since
          required: false
          schema:
            format: int64
            minimum: 0
            nullable: true
            type: integer
        - description: 'Limit number of records (default: 500, max: 10000)'
          in: query
          name: limit
          required: false
          schema:
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              example:
                bars:
                  - close: 29530250000000
                    high: 29534750000000
                    low: 29521000000000
                    open: 29528500000000
                    timestamp: 1786046400000
                    volume: 412
                count: 1
                interval: 1m
                since: 1786046400
                success: true
                symbol: NQU6
              schema:
                $ref: '#/components/schemas/LatestHistoricalOhlcResponse'
          description: Latest/gap-fill OHLC bars
        '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:
    LatestHistoricalOhlcResponse:
      description: Response for latest/gap-fill OHLC bars.
      properties:
        bars:
          items:
            $ref: '#/components/schemas/HistoricalBar'
          type: array
        count:
          minimum: 0
          type: integer
        interval:
          type: string
        since:
          format: int64
          minimum: 0
          nullable: true
          type: integer
        success:
          type: boolean
        symbol:
          type: string
      required:
        - success
        - symbol
        - interval
        - 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 - Fetch historical OHLC bars](/market-data-api/historical/get-historical--fetch-historical-ohlc-bars.md)
- [Get current OHLC bars](/market-data-api/ohlc/get-current-ohlc-bars.md)
- [Reconcile a trading day in one call](/platform-api/organization/reconcile-a-trading-day-in-one-call.md)
- [WebSocket Stream (Documentation Only)](/market-data-api/websocket/websocket-stream-documentation-only.md)
- [Get current ticker prices](/market-data-api/tickers/get-current-ticker-prices.md)
