"STRING VALUE IN JSON REQUEST" error while placing order

pankajrb
We are getting following error when order is placede using "Publisher' API.
Parameters sent.

"STRING VALUE IN JSON REQUEST"


{"tradingsymbol":"HCC","exchange":"NSE","transaction_type":"BUY","order_type":"MARKET","product":"MIS","quantity":1}

Screenhot: https://drive.google.com/open?id=0B_ggaHcgXUbRZUJCQzM5d1FtTjA
  • sujith
    Hi @pankajrb,
    Try sending quantity in string.
  • pankajrb
    Tried sending quantity as string. But still getting the same error.
  • sujith
    Hi @pankajrb,

    Can you paste your complete request here?
  • pankajrb
    url: https://kite.trade/connect/basket?sess_id=m7r72a0qdfqdzlzdzmdwcvqyw99pfvih&api_key=XXXXXX

    body: [{"tradingsymbol":"HCC","exchange":"NSE","transaction_type":"BUY","order_type":"MARKET","product":"MIS","quantity":1}]

    This request used to work for last 3 months. I tried for quantity as string as well, but getting the same error.
  • sujith
    Did you try this?
    [{"tradingsymbol":"HCC","exchange":"NSE","transaction_type":"BUY","order_type":"MARKET","product":"MIS","quantity":"1"}]
    If it is still not working. Can you ping me link to your website from where you are trying?
  • pankajrb
    Yes, tried using [{"tradingsymbol":"HCC","exchange":"NSE","transaction_type":"BUY","order_type":"MARKET","product":"MIS","quantity":"1"}]

    We are sending the request from app using webview
  • sujith
    Can you paste response also?
  • pankajrb
    Here is the page source we are using. We get the same error as app on pressing "PLACE".












    var my_basket = [];
    var order = {};
    order.tradingsymbol = "INFY";
    order.exchange = "NSE";
    order.transaction_type = "BUY";
    order.product = "MIS";
    order.order_type = "MARKET";
    order.quantity = "10";
    my_basket.push(order);

    order = {};
    order.tradingsymbol = "HCC";
    order.exchange = "NSE";
    order.transaction_type = "BUY";
    order.product = "MIS";
    order.order_type = "MARKET";
    order.quantity = "10";
    my_basket.push(order);

    document.getElementById("basket").value = JSON.stringify(my_basket);
    document.getElementById("basket-form").submit();



  • sujith
    Give me sometime, I will check with concerned team and get back to you.
  • pankajrb
    pankajrb edited December 2016
    ok. Waiting for your reply.
  • sujith
    Can you hard refresh and check now?
  • pankajrb
    Its working now. Thanks.

    Can you please explain what was the error and is it possible we get this error again?
  • sujith
    Hi @pankajrb,

    We had done some changes in kite front which had caused this and it is fixed now.
This discussion has been closed.