Placing Multiple order in a single ajax and geting orderid/status each order

Bipul_Saha
I place single order and works fine. i am calling ajax each time for each order. below is the code:
But if i want to place two orders or array of orders just changing the trading symbol and rest will be same. What will be the procedure?
as well as the order history of each order as below as i hve been geting in single order. Please guide with a example

$tradingsymbol =$_POST["Tradingsymbol"];
$exchange = $_POST["Exchange"];
$quantity = $_POST['Qty'];
$transaction_type = $_POST['Buy_Sale'];
$order_type = $_POST['Order_Type'];
$product = $_POST["Product"];
$order_id='';
$order = $kite->placeOrder("regular", [
"tradingsymbol" =>$tradingsymbol,
"exchange" => $exchange,
"quantity" => $quantity,
"transaction_type" => $transaction_type,
"order_type" => $order_type,
"product" => $product
]);
$order_id = json_decode(json_encode($order), True)['order_id'];
$order_detail=$kite->getOrderHistory($order_id);
$status=($order_detail[4]->status);
$av_price=($order_detail[4]->average_price);
echo $status.'|'.$av_price;
  • sujith
    Kite Connect offers only placing order for one instrument. You will have to create a list or queue at your end and use that as the source for placing order.
Sign In or Register to comment.