Getting LTP values like Margins

arjunender edited September 2021 in .Net API client

Can i get LTP values like Margins (

  • sujith
    You can use this API.
  • arjunender
    trying to get this using javascript but getting CORS Error

    cross-origin resource sharing error preflightmissingalloworiginheader

    url: "",
    type: 'GET',
    dataType: 'json',
    cors: true,
    contentType: 'application/json',
    secure: true,
    headers: {
    'Access-Control-Allow-Origin': '*',
    beforeSend: function (xhr) {
    xhr.setRequestHeader("Authorization", "token api:token");
    success: function (data) {

  • sujith
    A third party app can't show our data on their website. You can contact any exchange registered data vendor for live market data and candle data.
  • arjunender

    i am able to get margins ( with API AND TOKEN

    can i get LTP ("") with API AND TOKEN

    If yes
    below is the code not working am i missing something

    var url = "";
    var httpRequest = (HttpWebRequest)WebRequest.Create(url);
    httpRequest.Method = "POST";

    httpRequest.Headers["Authorization"] = "token " + api + ":" + accesstoken;
    httpRequest.ContentType = "application/x-www-form-urlencoded";

    //var data = "['NSE:INFY', 'BSE:INFY']"; //
    //using (var streamWriter = new StreamWriter(httpRequest.GetRequestStream()))
    // streamWriter.Write(data);

    var httpResponse = (HttpWebResponse)httpRequest.GetResponse();
    string result;
    using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
    result = streamReader.ReadToEnd();
    json = JsonConvert.DeserializeObject(result);

    return result;
  • sujith
    A third party website can't display our market data and candle data. You can speak to compliance at kiteconnect(at) for more information.
  • AnastasiaSin
    I totally agree, but I think that you shouldn't learn coding if you want to open, for example, an e-commerce site, or if you already have a site on Magento, and you want to make it on Magento 2. It's better to entrust this to professionals
Sign In or Register to comment.