Open imvinaypatil opened 3 years ago
I have literally the same question. How to get Instrument tokens and Symbols to completely automate python trading script...? If there's any website link to scrap for the Instrument Tokens and Symbols DataFrame or any function to be called.. Please developers tell us. Thanks a lot for helping
https://gist.github.com/nishu88/428c5ea4adb8a58d93bdfa13c4a6bb9d
Feel free to follow ;)
Awesome! Thanks for sharing.
@nishu88 Kotak api is not working. I am getting below error: HTTP Server Error 503 No available server to handle this request
Can you pls check at your end once? Thanks
I'm not sure about that. The instrument list is working right? https://preferred.kotaksecurities.com/security/production/TradeApiInstruments_FNO_02_07_2021.txt
Thank you @nishu88 . @automation-dv assuming you are using right date and expiry (I changed it in code) you would need to change the parameter passed to split to "\n" instead of default space and the above code will work i.e.
r = r.text.split("\n")
instead of
r = r.text.split()
I'm not sure about that. The instrument list is working right? https://preferred.kotaksecurities.com/security/production/TradeApiInstruments_FNO_02_07_2021.txt
@nishu88 @bhushanjawle It was not working last night. It's working for me today. May be their page was down. Thanks..
@bhushanjawle @thebhushanp Hi Sir, I could not find the instrument code for NIFTY SPOT and BANKNIFTY SPOT price. Do you have any idea where to find it? or whats its instrument code?
i would like to know that if by mistake i use the wrong date will i get the wrong Instrument Code bcz i don't have to anything with other information
Once the instrument code is assigned to any instrument then will it be valid till its expiry or it may change on any day...?
@Wadia-007 got it Thanks brother
@Wadia-007 got it Thanks brother
I was asking a question plz read it again...!
import requests
headers = { 'accept': 'application/json', 'consumerKey': 'ConsumerKey', 'Authorization': 'Bearer APIAccessToken', }
response = requests.get('https://tradeapi.kotaksecurities.com/apim/scripmaster/1.1/filename', headers=headers)
@WhiteBlackGray what's the response from this request?
What's the api to get instrument code by symbol ?