Skip to main content

Historical Candle Data

API to retrieve OHLC (Open, High, Low, Close) data for instruments spanning multiple timeframes. Historical data is available for the following time durations:

  • 1-minute: Retrieve the candles from the final month leading up to the endDate.
  • 30-minute: Retrieve the candles from the past year up to the endDate.
  • Daily: Retrieve data for the past year, concluding on the endDate.
  • Weekly: Retrieve data from the previous ten years, ending on the endDate.
  • Monthly: Retrieve data spanning the last ten years, up to the specified endDate.
NOTE
  • Use the Intraday API to retrieve data specific to the current trading day.
  • One-minute and 30-minute candle data are accessible solely for the preceding six months.
  • It's important to note that instrument_key parameter accepts only a single identifier per request; comma-separated values or multiple identifiers are not supported.

Header Parameters

NameRequiredTypeDescription
AccepttruestringDefines the content format the client expects, which should be set to application/json.

Path Parameters

NameRequiredTypeDescription
instrument_keytruestringThe unique identifier for the financial instrument for which historical data is being queried. For the regex pattern applicable to this field, see the Field Pattern Appendix.
intervaltruestringSpecifies the time frame of the candles.
Possible values: 1minute, 30minute, day, week, month.
to_datetruestringThe ending date (inclusive) for the historical data range. Format: 'YYYY-MM-DD'.
from_datefalsestringThe starting date for the historical data range. Format: 'YYYY-MM-DD'.
Responses

Response Body

{
"status": "success",
"data": {
"candles": [
[
"2023-10-01T00:00:00+05:30",
53.1,
53.95,
51.6,
52.05,
235519861,
0
],
[
"2023-09-01T00:00:00+05:30",
50.35,
56.85,
49.35,
52.8,
1004998611,
0
]
]
}
}
NameTypeDescription
statusstringA string indicating the outcome of the request. Typically success for successful operations.
dataobjectContains OHLC values for all instruments across various timeframes.
data.candlesarray[]Array of candle data, each presented as an array with sequential elements representing trading activity.
data.candle[0]numberTimestamp: Indicating the start time of the candle's timeframe.
data.candle[1]numberOpen: The opening price of the asset for the given timeframe.
data.candle[2]numberHigh: The highest price at which the asset traded during the timeframe.
data.candle[3]numberLow: The lowest price at which the asset traded during the timeframe.
data.candle[4]numberClose: The closing price of the asset for the given timeframe.
data.candle[5]numberVolume: The total amount of the asset that was traded during the timeframe.
data.candle[6]numberOpen Interest: The total number of outstanding derivative contracts, such as options or futures.

Examples

A comprehensive set of examples is provided to illustrate various use cases and implementation scenarios for this API. To view detailed examples and access sample code, please refer to: API Examples.

Loading...