osparamatrix / ks-orderapi-python

47 stars 59 forks source link

where can i find the instrument token list? #69

Closed pv-ajay-thota closed 2 years ago

pv-ajay-thota commented 2 years ago

Unable to locate the instrument token list.. please share the references if any..

pv-ajay-thota commented 2 years ago

https://preferred.kotaksecurities.com/security/production/TradeApiInstruments_CASH_17_08_2021.txt https://preferred.kotaksecurities.com/security/production/TradeApiInstruments_FNO_17_08_2021.txt

ashwinkp commented 2 years ago

@pv-ajay-thota a better way to get the latest instrument.

import requests from requests.structures import CaseInsensitiveDict url = "https://ctradeapi.kotaksecurities.com/apim/scripmaster/1.1/filename" headers = CaseInsensitiveDict() headers["accept"] = "application/json" headers["consumerKey"] = client.consumer_key headers["Authorization"] = "Bearer " + client.access_token scriptMaster=requests.get(url, headers=headers) print(scriptMaster.json())