osparamatrix / ks-orderapi-python

47 stars 59 forks source link

Where to get the list of instrument tokens #36

Closed erwaqarmalik closed 3 years ago

erwaqarmalik commented 3 years ago

To place orders instrument tokens is required. Can you provide a csv with all the instrument codes.

kalilinux-png commented 3 years ago

To place orders instrument tokens is required. Can you provide a csv with all the instrument codes.

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

kalilinux-png commented 3 years ago

please close this issue if issue resolved

erwaqarmalik commented 3 years ago

To place orders instrument tokens is required. Can you provide a csv with all the instrument codes.

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

Thanks. Please share for FNO also

arasu84 commented 3 years ago

where to find weekly option instrument token

erwaqarmalik commented 3 years ago

where to find weekly option instrument token

You can use this link https://preferred.kotaksecurities.com/security/production/TradeApiInstruments_CASH_19_08_2021.txt Alternatively you can fetch it via https://preferred.kotaksecurities.com/security/production/TradeApiInstruments_FNO_"+today+".txt" in python

sapankj commented 3 years ago

Please resolve this for FNO Token info: Forbidden You don't have permission to access /security/production/TradeApiInstrumentsFNO"+today+".txt on this server.

kalilinux-png commented 3 years ago

@sapankj USE THE LINK BELOW https://preferred.kotaksecurities.com/security/production/TradeApiInstruments_FNO_17_08_2021.txt

LET ME KNOW IT WORKS OR NOT IF YOU FACE ANY ERROR REGARDING LOGIN AND SETUP OPEN THE ISSUE NAMED #37 VIDEO TUTORIAL

sapankj commented 3 years ago

@sapankj USE THE LINK BELOW https://preferred.kotaksecurities.com/security/production/TradeApiInstruments_FNO_17_08_2021.txt

LET ME KNOW IT WORKS OR NOT IF YOU FACE ANY ERROR REGARDING LOGIN AND SETUP OPEN THE ISSUE NAMED #37 VIDEO TUTORIAL

Thank you very much!

kalilinux-png commented 3 years ago

@sapankj NOTE: PLEASE CHANGE THE DATES ACCORDING TO YOUR NEED

erwaqarmalik commented 3 years ago

replace CASH with FNO in URL for FNO data

`import pandas as pd from datetime import date

date = date.today() today = date.strftime("%d%m%Y") df = pd.read_csv("https://preferred.kotaksecurities.com/security/production/TradeApiInstruments_CASH_"+today+".txt", delimiter="|") ins = pd.DataFrame(df) ins.set_index('instrumentName', inplace=True) name = input('Enter Instrument Name') print(ins.loc[(name.upper()),('instrumentToken','exchange')]) `