AMO failing using kite publisher

yadhukar
When I am trying to place multiple AMO's in a loop using KiteConnect(""), most of the times 50% of AMO's are failing with "Error placing order"
  • balajimit
    Same issue for the last few days. This more or less looks like an issue in Kite's server end. But wonder whey they are asking to raise issue in developers forum.
  • sujith
    Can you paste a sample request for which it failed with exact params and response?

    @balajimit,
    The support team is aware of the technicalities of the APIs, they won't be able to provide you with a solution. Hence, they will ask you to post it here.
  • yadhukar
    Hi Sujith,
    Below java script is reading values from xml file and adding to kite object
    kite.add({
    "exchange": "NSE",
    "tradingsymbol": tradingsymbol.childNodes[0].nodeValue,
    "quantity": parseFloat(quantity.childNodes[0].nodeValue),
    "order_type": "LIMIT",
    "transaction_type": transaction_type.childNodes[0].nodeValue,
    "variety": "amo",
    "product": "CNC",
    "validity": "DAY",
    "price": parseFloat(price.childNodes[0].nodeValue)
    });

    xml file values for which AMO failed.
    -<.stock>
    <.tradingsymbol>ASTRAMICRO<./tradingsymbol>
    <.transaction_type>BUY<./transaction_type>
    <.quantity>14<./quantity>
    <.price>73.9<./price>
    <./stock>

    Please note that for below values AMO was placed successfully in same loop.
    -<.stock>
    <.tradingsymbol>KTKBANK<./tradingsymbol>
    <.transaction_type>BUY<./transaction_type>
    <.quantity>9<./quantity>
    <.price>113.4<./price>
    <./stock>

    (Ignore dot in tags. it is place as tags are messing up in preview)
  • yadhukar
    Response I got for failed AMO's - "Error placing order"
  • yadhukar
    @Sujith, Any update on above issue?
  • Vivek
    If you hover over the error message it shows you the full error message. Can you updated us what you are getting?
  • yadhukar
    When I hover over error message "Error placing order" it just says "Too many requests"
  • balajimit
    balajimit edited January 2019
    @sujith, Error is same as Yadhukar reported.
    My code has been the same too all along. Have used with 25+ orders too sometimes (even a month ago). This has to be something with server side changes done recently..

    To be precise, the code is copy paste of template, nothing special:
    <!DOCTYPE html>



    KiteConnect.ready(function() {
    var kite = new KiteConnect("................");
    kite.add({"tradingsymbol": ...........});
    .....


  • yadhukar
    @vivek & Sujith, Any update?
  • balajimit
    Any update?? It fails quite regularly. Takes away the ease of scripting/automation.
    As a workaround, if you cant fix it now, will adding (automatically) a delay help? But wonder if this can be done without changing individual kite-connect apps..
    Could not find any direct way adding delay within a renderButton too.
  • yadhukar
    do we have any update on above issue?
  • sujith
    We have informed the concerned team and they are looking into this.
  • yadhukar
    Past 2 days I am able to place AMO's without any error/fail. Anything is done to fix the issue?
Sign In or Register to comment.