Navigation

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

    Get historical price of Nifty Future contracts

    Python SDK
    0
    4
    81
    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.
    • F
      falconTrader last edited by

      Hello Traders,
      I would like to fetch the historical price for Nifty future contracts from 2020 till date.
      What I am looking to is for e.g. starting from January 1st, 2020, I would like to get the nifty current month contract price and so on for each subsequent month. After every monthly expiry, the next month becomes the current month!
      How can I do that with smartapi?

      F 1 Reply Last reply Reply Quote 0
      • F
        falconTrader @falconTrader last edited by

        @admin @administrators any guidance on the subject please?

        J 1 Reply Last reply Reply Quote 0
        • J
          jaskirat1208 @falconTrader last edited by

          @falconTrader I'm not an admin, but I think I can help you here.

          This function gives you all the upcoming expiry dates for a symbol since the first date.

          $ pip install nsepython
          $ python
          > nsepython.expiry_list('NIFTY') # Can enter banknifty, finnifty, etc as per convenience
          
          F 1 Reply Last reply Reply Quote 0
          • F
            falconTrader @jaskirat1208 last edited by

            @jaskirat1208 Appreciate you taking time to respond.
            Though, my issue is not what you suggested.

            I am looking to fetch "historical" Nifty & BankNifty futures contract prices for e.g. from 1 Jan 2018 onwards.

            Usually these are only in monthly contracts (current month, near & next month), but if we refer to TradingView there we have a continuous current month contract which gives intraday candle data since almost 2 years or so.
            I want that feed if possible from AngelOne coz they are my broker. I won't rely so much on TradingView historical data.

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