nifty = [i for i in instruments if i["name"] == "NIFTY 50"] banknifty = [i for i in instruments if i["name"] == "NIFTY BANK"] print(nifty) print(banknifty) nifty_token = nifty[0]["instrument_token"] banknifty_token = banknifty[0]["instrument_token"]
This is my code , which is just a small snippet , i just wanted to confirm that how come we use both representations (either passing a token or hardcoding a symbol is working ) , like in the github repo i saw that it is mentioned to use instrument symbol exchange:Trading symbol then how tokens do work ? also is there a method that gives us the exchange:trading symbol rather than hardcoding one ?