Not able to get indices data


  • I am not able to get the data of indices like NIFTY 100, NIFTY 500, NIFTY FIN SERVICES using the getLtpData url, however, I can get data for Nifty and BANKNIFTY only. However I am able to get the indices data using websocket but after some responses the data I get from the websocket is ng 0 and then again for sometime I get the live feed then again I get ng 0. Any help is appreciated Thank You !

    Code using the getLtpData

    var axios = require('axios');
    var data = JSON.stringify({
      "exchange":"NSE",
      "tradingsymbol":"Nifty 100",
      "symboltoken":"99926012"
    });
    
    
    
    
    
    var config = {
      method: 'post',
      url: 'https://apiconnect.angelbroking.com/order-service/rest/secure/angelbroking/order/v1/getLtpData',
      headers: {
        'Authorization': 'Bearer JWT_TOKEN', 
        'Content-Type': 'application/json', 
        'Accept': 'application/json', 
        'X-UserType': 'USER', 
        'X-SourceID': 'WEB', 
        'X-ClientLocalIP': 'CLIENT_LOCAL_IP', 
        'X-ClientPublicIP': 'CLIENT_PUBLIC_IP', 
        'X-MACAddress': 'MAC_ADDRESS', 
        'X-PrivateKey': 'API_KEY'
      },
      data : data,
    };
    
    axios(config)
    .then(function (response) {
      console.log(JSON.stringify(response.data));
    })
    .catch(function (error) {
      console.log(error);
    });
    
    
    

    Output

    {"status":true,"message":"SUCCESS","errorcode":"","data":null}
    

  • Hi @Jeet-Pattani

    Apologies for delayed response.
    We have checked for indices token of NIFTY 100, NIFTY 500, NIFTY FIN SERVICES(99926012, 99926004, 99926037) on getLTPData API. We are able to retrieve the data for the same, Kindly reverify and let us know if the issue still occurs

    Thanks & Regards,
    SmartAPI team