Navigation

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

    Unable to fetch LTP for BankNifty

    Java SDK
    3
    10
    99
    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.
    • J
      jainullah last edited by

      Hello @admin
      I am trying to get the LTP for the Bank Nifty 35200 Call option 15th July 2021 expiry using the below parameters. Getting the error message "Failed to get symbol details". Please let me know how to resolve the issue.
      Screenshot 2021-07-11 at 9.16.22 PM.png

      J 1 Reply Last reply Reply Quote 0
      • J
        jorawarjora @jainullah last edited by

        @Reddy change exchange to NFO

        J 1 Reply Last reply Reply Quote 0
        • J
          jainullah @jorawarjora last edited by

          @jorawarjora Thanks for the quick response. I am still getting the below error.

          Screenshot 2021-07-11 at 9.58.48 PM.png

          J 1 Reply Last reply Reply Quote 0
          • J
            jorawarjora @jainullah last edited by

            @Reddy
            // Get Get LTP Data
            LTPDataRequest lreq = new LTPDataRequest();
            lreq.exchange = Constants.EXCHANGE_NFO;
            lreq.symboltoken = "3045";
            lreq.tradingsymbol = "SBIN-EQ";
            obj = connect.GetLTPData(lreq);
            GetLTPDataResponse ltp = obj.GetLTPDataResponse;

            try this method

            J 1 Reply Last reply Reply Quote 0
            • J
              jainullah @jorawarjora last edited by

              @jorawarjora Still getting the same error. Can you please send the syntax in R language for BankNifty 15th July 35200 CE.

              J 1 Reply Last reply Reply Quote 0
              • J
                jorawarjora @jainullah last edited by

                @Reddy sorry bro, dont know about R lang. here is what i got from github.

                get_ltp_data<-function(object,exchange,tradingsymbol,symboltoken){
                params <- as.list(environment(), all=TRUE)
                params[["object"]] <- NULL
                keys <- names(params)

                for(key in keys){
                if(is.null(params[[key]])){
                params[[key]] <- NULL
                }
                }

                https://github.com/angelbroking-github/smartapi-r/blob/main/R/api_calls.R

                J 1 Reply Last reply Reply Quote 0
                • J
                  jainullah @jorawarjora last edited by

                  @jorawarjora ha ha no worries. Can you share the code in Python for the mentioned BankNifty.

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

                    @jorawarjora @admin
                    Thanks I am now able to fetch the ltp for the NFO exchange.

                    Regards,
                    Reddy

                    1 Reply Last reply Reply Quote 0
                    • J
                      jainullah last edited by

                      @jorawarjora I am getting the empty list while running the get_candle_data for NFO exchange. I am trying the below syntax and the token is for BANKNIFTY02SEP2131500CE :

                      get_candle_data(object = session_data,
                      exchange = "NFO",
                      symboltoken = "39203",
                      interval = "ONE_MINUTE",
                      fromdate = "2021-07-10 09:00",
                      todate = "2021-07-12 09:30")

                      Please can you help me in fetching the historical candle data for Banknifty.

                      Regards,
                      Reddy

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        admin @jainullah last edited by

                        HI @Reddy Currently we only provide data for nse equity.

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