---
title: "fetch OHLC for daily candle"
method: POST
path: "/charts/historical"
tags: ["Data API's"]
---

# fetch OHLC for daily candle

`POST /charts/historical`

Retrieve OHLC & Volume of daily candle for desired instrument. The data for any scrip is available back upto the date of its inception.

## Headers

- `access-token` string, required

## Request body

- HistoricalChartsRequest
  - `securityId` string — Exchange standard identification for each scrip
  - `exchangeSegment` 'NSE_EQ' | 'NSE_FNO' | 'BSE_EQ' | 'BSE_FNO' | 'MCX_COMM' | 'IDX_I' — | **Enums** | **Exchange** | **Segment** | |--------------|--------------|-------------------| | NSE_EQ | NSE | Equity Cash | | NSE_FNO | NSE | Futures & Options | | BSE_EQ | BSE | Equity Cash | | BSE_FNO | BSE | Futures & Options | | MCX_COMM | MCX | Commodity | | IDX_I | INDEX | Indices |
  - `instrument` 'INDEX' | 'FUTIDX' | 'OPTIDX' | 'EQUITY' | 'FUTSTK' | 'OPTSTK' | 'FUTCOM' | 'OPTFUT' — Represents the security instrument type, refer charts annexure for possible values.
  - `expiryCode` integer — Represents the expiry code value, refer charts annexure for possible values.
  - `oi` boolean — Open Interest Data
  - `fromDate` string, date — Chart data request start date in format YYYY-MM-DD
  - `toDate` string, date — Chart data request end date in format YYYY-MM-DD

## Response `200`

Successful operation

- ChartsResponse
  - `open` number[] — Array of values representing OHLC open value
  - `high` number[] — Array of values representing OHLC high value
  - `low` number[] — Array of values representing OHLC low value
  - `close` number[] — Array of values representing OHLC close value
  - `volume` number[] — Array of values representing volume
  - `timestamp` number[] — Array of values representing date times in seconds since January 01, 1980
  - `open_interest` number[] — Array of values representing open interest

---

[API](https://skmtc.dev/dhan/apis/dhanhq-api.md) · [All operations](https://skmtc.dev/dhan/apis/dhanhq-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dhan/dhanhq-api/revisions/2d368b9ed32d/schema)
