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.
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.
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)
@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": ...........}); .....
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.
@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.
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)
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": ...........});
.....
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.