Historical Data API Output Missing

Dear Dhan Team,

I am trying to fetch the 1 min candle historical data for stock but getting no output.
Can you please help resolve

I have got the data but not sure 1. why it is EOD data only and does not have min candle data. 2. Time data is not correct.

How to resolve

Not able to get the option data. It shows success but data is missing

1 Like

Hello @ashisha16

First of all, welcome to Dhan Community!
Answering your queries here:

Since you are using the Historical Data API (here) it only provides Daily OHLC Volume data.

Timestamp is custom epoch based date. You can use the timestamp converter added in the version 1.2 to convert it to system date format.

Options Daily Data is not available yet on DhanHQ APIs. You can look into available instrument data in the documentation.

1 Like

Documentation says that intraday data is available with the tickers in the documentation but i am not able to get the data on query. I am just looking 1 min candle data for option ticker for example NIFTY 18000 PE 16 Feb expiry . Documentation says that you can get the HL of the ticker along with OI and volume data. Can you explain how can i get this data with python coding.

The query with output for equity stock is shown below. It shows the query success but no data.

Hey @ashisha16

Since you’re looking for options data here, you will have to add NSE_FNO in the exchange_segment parameter. In instrument_type, you’ll have to add OPTIDX.

You can check the documentation here for reference. Note that OI data is not available yet, you can only get OHLC and volume data.

is historical data available for intradaytimeframe?? for options?

Hello @Nijan

Yes. Historical Data is available for options for intraday time frame of 1 min.

df = dhan.historical_minute_charts(
symbol=‘TCS’,
exchange_segment=‘NSE_EQ’,
instrument_type=‘EQUITY’,
expiry_code=0,
from_date=‘2022-01-08’,
to_date=‘2022-02-08’
)

I’m only getting daily data from the above code. can you please help me to get 1-minute data?

@Nijan

We only provide Daily OHLC data as part of Historical Data. You can get 1 min OHLC data only for the current day.

@Hardik coould you please help here… Have followed the doc but couldn’t get the data out.

dhan.intraday_daily_minute_charts(
    security_id='25',
    exchange_segment='NSE_FNO',
    instrument_type='OPTIDX'
)
{'status': 'success', 'remarks': '', 'data': {}}

dhan.intraday_daily_minute_charts(
    security_id='25',
    exchange_segment='NSE_FNO',
    instrument_type='INDEX'
)
{'status': 'success', 'remarks': '', 'data': {}}

dhan.intraday_daily_minute_charts(
    security_id='25',
    exchange_segment='NSE_EQ',
    instrument_type='INDEX'
)
{'status': 'success', 'remarks': '', 'data': {}}

None of the options above seem to providing me data… I am trying to get intraday 1 minute data for banknifty index

Hello @VivekTrader

Welcome to Dhan Community!

When you are trying to fetch data for Index, then you need to enter exchange_segment as IDX_I and instrument_type needs to be INDEX.