Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    How to get list of all equity token from master json

    Python SDK
    0
    3
    92
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Vignesha last edited by

      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

      M 1 Reply Last reply Reply Quote 0
      • M
        mshanu @Vignesha last edited by

        @Vignesha I find same issue. Would be nice if there is a easy, consistent way

        1 Reply Last reply Reply Quote 0
        • N
          NaitikJyani last edited by

          import pandas as pd
          import requests

          url = '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")

          1 Reply Last reply Reply Quote 2
          • First post
            Last post