Hi All,
A newbie here.
I am trying to collect historical data and able to get it. Only Issue is how can i convert and save it in a tabular format.
My Code is very Simple:
symbols = [‘TCS’,‘NTPC’]
for symbol in symbols:
symbol_data = dhan.historical_minute_charts(
symbol=symbol,
exchange_segment=‘NSE_EQ’,
instrument_type=‘EQUITY’,
expiry_code=0,
from_date=‘2023-06-21’,
to_date=‘2023-06-23’
)
print(symbol_data)
Thanks Hardik,
I was able to solve it using pandas Only and below is the code where it will ask for User to input and store the data in Panda Dataframe.
If you want to place Equity FnO, then you just need exchange_segment as ‘NSE_FNO’ and rest all the parameters can remain same. Do make sure you are entering the Security ID for the Equity Options instrument and along with that, the quantity is entered as per the lot size.
We are working on building our own Websockets for Live Market Feed and will be releasing it soon.
We will reach out to you and announce it on the community first as soon as we are ready with this.
Thanks Hardik,
One more thing as a feature. I check DHAN API where it can gives you major information like OHLCV but for derivative , i am not sure if there are options to get options greek for both equity derivative and index derivative.
Yes, we do not provide Greek values as part of our Data APIs. But once with Market Feed, you will be able to calculate this as you will have all the required data to do so.