Navigation

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

    how to get Nifty50 all equity tokens?

    General Discussion
    2
    2
    6
    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.
    • T
      tanmoydev last edited by

      how to get Nifty50 all equity tokens list using this website "https://margincalculator.angelone.in/OpenAPI_File/files/OpenAPIScripMaster.json ". When i try to sort, there is no field available like Nifty50 or BankNifty? actually i want all the tokens of Nifty50 do not manually collect. Because its chenges time to time. #token

      D 1 Reply Last reply Reply Quote 0
      • D
        darshil611 @tanmoydev last edited by

        @tanmoydev
        instrument_url = 'https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json'

        response = urllib.request.urlopen(instrument_url)
        instrument_list = json.loads(response.read())

        instrument_list = [i for i in instrument_list if i['name'] == "NIFTY"]

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