Skip to main content

Get Expired Historical Candle Data

This API extends the functionality of the existing Get Historical Candle Data API by allowing users to query data for expired contracts.

This API is particularly useful for traders and analysts who need to analyze past performance and trends of expired contracts.

It provides historical Open, High, Low, Close (OHLC) data for expired contracts, available across multiple time intervals including: 1minute, 3minute, 5minute, 15minute, 30minute and day.

NOTE
Important
  • Expired Historical Candle Data is currently not available for the MCX.
  • This API is specifically for expired contracts that have passed their expiry date.

Header Parameters

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

Path Parameters

NameRequiredTypeDescription
expired_instrument_keytruestringThe unique identifier for the expired financial instrument for which historical data is being queried. This key is combination of normal instrument key and expiry date. The expired_instrument_key key must match the regex pattern specified in the Field Pattern Appendix.
intervaltruestringSpecifies the time frame of the candles.
Possible values: 1minute, 3minute,5minute,15minute,30minute, day.
to_datetruestringThe ending date (inclusive) for the historical data range. Format: YYYY-MM-DD.
from_datetruestringThe starting date for the historical data range. Format: YYYY-MM-DD.
Responses

Response Body

{
"status": "success",
"data": {
"candles": [
[
"2022-11-30T00:00:00+05:30",
125.35,
126.8,
122.1,
123.45,
1542678,
184632
],
[
"2022-11-29T00:00:00+05:30",
120.85,
126.55,
120.5,
125.35,
1876543,
195732
]
]
}
}
NameTypeDescription
statusstringA string indicating the outcome of the request. Typically success for successful operations.
dataobjectContains OHLC values for expired contracts 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...