Looking for list of stock codes.

Bharat_tradefirst
Hi Guys,

To read real time data we need to pass stock code (we cant pass SBIN) number, I am struggling find stock codes, where can I get list of all listed stock codes ? providing example below for reference.
// Subscribing to Tata Power and setting mode to LTP INFY (408065) and TATAMOTORS (884737)
ticker.Subscribe(Tokens: new UInt32[] { 884737 });
ticker.SetMode(Tokens: new UInt32[] { 884737 }, Mode: Constants.MODE_LTP);

Thanks,
Bharat.
Tagged:
  • tahseen
    filehandle = open("instruments_file.csv","w")
    req = requests.get(f"https://api.kite.trade/instruments?api_key={API_KEY}")
    filehandle.write(req.content.decode("utf-8"))
    filehandle.close()
  • tahseen
    once you generate this file once before 9am, like around 8:50am, you can read this file for all mappings you need
Sign In or Register to comment.