PlaceOrder confirmation that order received in kite

pandithurai
Hi,

After placing the order in c# how do I check whether order received in Kite or failed?

Now I am using the below code, but some time it places multiple orders.

int retry = 2;
for (int retrycount = 0; retrycount <= retry; retrycount++)
{
Dictionary<string, dynamic> response = Trade.kite.PlaceOrder(Exchange.Trim(), SymbolName.Trim(), "SELL", Convert.ToInt16(Quantity), OrderType: "MARKET", Product: "MIS", Validity: "DAY");
orderid = response["data"]["order_id"];
OrderReference = orderid;
if (orderid != string.Empty)
{
break;
}
}

I appreciate your help as soon as possible.

Thanks and regards
Pandithurai


  • sujith
    sujith edited October 2018
    Hi @pandithurai,
    It is not advisable to retry POST requests generally as it might lead to disastrous situations sometimes.

    In this case, you need to fetch orderbook and check before retrying to place the order.
Sign In or Register to comment.