Getting LTP values like Margins

arjunender edited September 16 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.
  • katemiller
    Thanks for these tips!
  • katemiller
    katemiller edited September 27
    As mentioned earlier, many people are able to complete software development tasks without having to learn any complicated coding. However, there are still some individuals who would prefer to learn about coding so that they could understand how different coding patterns work when it comes to developing a specific piece of software by This is because these people are usually more interested in finding ways to cut down on the time it takes for their employees to develop the specific piece of software that they need. Learning about the various programming languages, however, can definitely help you become a better software developer.
Sign In or Register to comment.