---
title: "Market Data History"
method: GET
path: "/iserver/marketdata/history"
tags: ["Market Data"]
---

# Market Data History

`GET /iserver/marketdata/history`

Get historical market Data for given conid, length of data is controlled by 'period' and 'bar'.
Formatted as: min=minute, h=hour, d=day, w=week, m=month, y=year
e.g. period =1y with bar =1w returns 52 data points (Max of 1000 data points supported).
**Note**: There's a limit of 5 concurrent requests. Excessive requests will return a 'Too many requests' status 429 response.

## Query parameters

- `conid` string, required
- `exchange` string
- `period` string, required
- `bar` string
- `outsideRth` boolean

## Response `200`

Returns an object

- HistoryData
  - `symbol` string — Underlying symbol
  - `text` string — companyName
  - `priceFactor` integer — priceFactor is price increment obtained from display rule
  - `startTime` string — start date time in the format YYYYMMDD-HH:mm:ss
  - `high` string — High value during this time series with format %h/%v/%t. %h is the high price (scaled by priceFactor), %v is volume (volume factor will always be 100 (reported volume = actual volume/100)) and %t is minutes from start time of the chart
  - `low` string — Low value during this time series with format %l/%v/%t. %l is the low price (scaled by priceFactor), %v is volume (volume factor will always be 100 (reported volume = actual volume/100)) and %t is minutes from start time of the chart
  - `timePeriod` string — The duration for the historical data request
  - `barLength` integer — The number of seconds in a bar
  - `mdAvailability` string — Market Data Availability. The field may contain two chars. The first char is the primary code: S = Streaming, R = Realtime, D = Delayed, Z = Frozen, Y = Frozen Delayed. The second char is the secondary code: P = Snapshot Available, p = Consolidated.
  - `mktDataDelay` integer — The time it takes, in milliseconds, to process the historical data request
  - `outsideRth` boolean — The historical data returned includes outside of regular trading hours
  - `tradingDayDuration` integer — The number of seconds in the trading day
  - `volumeFactor` integer
  - `priceDisplayRule` integer
  - `priceDisplayValue` string
  - `negativeCapable` boolean
  - `messageVersion` integer
  - `data` object[]
    - `o` number — open price
    - `c` number — close price
    - `h` number — high price
    - `l` number — low price
    - `v` number — volume
    - `t` number — unix time stamp
  - `points` integer — total number of points
  - `travelTime` integer

## Other responses

- `429` — Too many requests
- `500` — System Error

---

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