How to get list of all equity token from master json
-
I'm trying to find if getting list of all token for equity stock (without fno, book entry and other indexes). Is there a pattern which I can use to filter in python?
eg: for reliance it is reliance-eq but for jothi resins symbol is just jothi so I want to get all these equity token
-
import pandas as pd
import requestsurl = 'https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json'
print(url)
d = requests.get(url).json()
tokendf =pd.DataFrame.from_dict(d)temp1=tokendf[tokendf['exch_seg'].str.contains('NSE') == True]
token=temp1[temp1['symbol'].str.contains('-EQ') == True]print(token)
#to convert in CSV format
#token.to_csv("D:/test.csv")
- topic:timeago_earlier,3 months
-
@Vignesha I find same issue. Would be nice if there is a easy, consistent way
3 out of 3