Unable to fetch LTP for BankNifty
-
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.
-
@Reddy change exchange to NFO
-
@jorawarjora Thanks for the quick response. I am still getting the below error.
-
@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
-
@jorawarjora Still getting the same error. Can you please send the syntax in R language for BankNifty 15th July 35200 CE.
-
@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
-
@jorawarjora ha ha no worries. Can you share the code in Python for the mentioned BankNifty.
-
@jorawarjora @admin
Thanks I am now able to fetch the ltp for the NFO exchange.Regards,
Reddy -
@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 -
HI @Reddy Currently we only provide data for nse equity.