---
title: "Market Data History (Beta)"
method: GET
path: "/hmds/history"
tags: ["Market Data"]
---

# Market Data History (Beta)

`GET /hmds/history`

Using a direct connection to the market data farm, will provide a list of historical market data for given conid.

## Query parameters

- `conid` integer, required
- `period` 'min' | 'h' | 'd' | 'w' | 'm' | 'y', required
- `bar` 'min' | 'h' | 'd' | 'w' | 'm'
- `outsideRth` boolean

## Response `200`

Valid result

- HistoryResult
  - `bars` object
    - `open` number — First price returned for bar value.
    - `startTime` string — Start Time in the format YYYYMMDD.
    - `startTimeVal` integer — Start Time Value - Formatted in unix time in ms.
    - `endTime` string — End Time in the format YYYYMMDD.
    - `endTimeVal` integer — End Time Value - Formatted in unix time in ms.
    - `points` integer — total number of data points.
    - `data` object[]
      - `t` number — Time - Formatted in unix time in ms.
      - `o` number — Open - First price returned for bar value.
      - `c` number — Close - Last price returned for bar value.
      - `h` number — High - High price returned for bar value.
      - `l` number — Low - Last price returned for bar value.
      - `v` number — Volume - Traded volume for bar value.
    - `mktDataDelay` integer — If 0 then data is returned in real time. Otherwise will return the number of seconds history data is delayed.

## Other responses

- `400` — Bad request

---

[API](https://skmtc.dev/interactivebrokers/apis/client-portal-web-api.md) · [All operations](https://skmtc.dev/interactivebrokers/apis/client-portal-web-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/interactivebrokers/client-portal-web-api/revisions/32edbfe496d1/schema)
