Symbols for index like NIFTY, BANKNIFTY or any other index
Answered
Hello,
I am using WebSocket API and I can pull data for NIFTY or BANKNIFTY futures by lines below:
hist_data = td_app.get_historic_data('NIFTY-I', duration = '6 D', bar_size = 'EOD')
hist_data = td_app.get_historic_data('BANKNIFTY-I', duration = '6 D', bar_size = 'EOD')
However, I am not able to find symbol to pull data for index itself like NIFTY or BANKNIFTY.
Where I can find list of symbols for indices?
Thanks/
I am looking for something similar to this: https://feedback.truedata.in/knowledge-base/article/list-of-all-indices?_route_=feedback/knowledge-base/article/list-of-all-indices
However, as these symbols are from Velocity, they are not working in WebSocket API.
I am looking for something similar to this: https://feedback.truedata.in/knowledge-base/article/list-of-all-indices?_route_=feedback/knowledge-base/article/list-of-all-indices
However, as these symbols are from Velocity, they are not working in WebSocket API.
Please find the symbols list of Market Data (WebSocket) API >> Symbol Formats for Market Data (WebSocket) API
Please find the symbols list of Market Data (WebSocket) API >> Symbol Formats for Market Data (WebSocket) API
Thanks Sourabh. It worked for NIFTY indices.
However, I tried to pull data for BANKNIFTY options by looking at your examples, I got error.
I tried this line:
hist_data = td_app.get_historic_data('BANKNIFTY21032518000CE', duration = '5 D', bar_size = 'EOD')
df = pd.DataFrame(hist_data)
print(df)
I was trying to get data for BANKNIFTY 18000 call option expiring on 25th March 2021. However, I got error:
Your request failed with error "No Data exists for BANKNIFTY21032518000CE".
Am I missing something/doing something wrong here?
Thanks.
Thanks Sourabh. It worked for NIFTY indices.
However, I tried to pull data for BANKNIFTY options by looking at your examples, I got error.
I tried this line:
hist_data = td_app.get_historic_data('BANKNIFTY21032518000CE', duration = '5 D', bar_size = 'EOD')
df = pd.DataFrame(hist_data)
print(df)
I was trying to get data for BANKNIFTY 18000 call option expiring on 25th March 2021. However, I got error:
Your request failed with error "No Data exists for BANKNIFTY21032518000CE".
Am I missing something/doing something wrong here?
Thanks.
You're Welcome!
I see that you are trying to pull Data for BANKNIFTY 18000 call option which is not trading at this time and hence please try to pull the Data for BANKNIFTY 35000 call option and it would give you the data (snapshot below).
Always try to pull options closer to ATM and it will work for you.
You're Welcome!
I see that you are trying to pull Data for BANKNIFTY 18000 call option which is not trading at this time and hence please try to pull the Data for BANKNIFTY 35000 call option and it would give you the data (snapshot below).
Always try to pull options closer to ATM and it will work for you.
Yes, it worked. Thanks Sourabh.
Yes, it worked. Thanks Sourabh.
You're Welcome Sir! :o)
You're Welcome Sir! :o)
Replies have been locked on this page!