"co" order not working

amitab61ds
Hi Team
I am trying to create CO order but not its not working.
Should we need to create two requests one for "regular order " and other request for "co order"? I see we need to send order_id as parameter in co order but not clear how we get it.
Is there any example request or code is there for CO orders which we can check?

Thanks!
  • rakeshr
    I see we need to send order_id as parameter in co order but not clear how we get it.
    No, you don't have to send order_id to create a fresh co-order.
    Is there any example request or code is there for CO orders which we can check?
    You can check all place order param here. Check here all extra param required for CO orders.
  • amitab61ds
    Hi Rakesh

    I already checked these examples but it is not clear how I can request it using PHP

    $post_arr = [
    "tradingsymbol" => $request->symble,
    "exchange" => "NSE",
    "quantity" => 1,
    "transaction_type" => "BUY",
    "order_type" => "MARKET",
    "product" => "MIS",
    "price" => "0.00",
    "trigger_price" => $request->trigger_price,
    ];

    $order = $kite->placeOrder("co", $post_arr);



    Right now I am using above code but it is not working correctly. Can you please let me know what I am doing wrong here.
  • sujith
    Can you give us the error code and the json response?
  • rakeshr
    "order_type" => "MARKET",
    "price" => "0.00",
    "trigger_price" => $request->trigger_price,
    ];
    For CO market orders, you have to send only trigger price not limit price field. Price field is meant for CO LIMIT order.
    You can know more about CO orders here.
  • amitab61ds
    @sujith @rakeshr It is not giving any error. Just creating product as "MIS" not CO


  • amitab61ds
    @rakeshr @sujith
    Thanks for your quick response. It is working now.
This discussion has been closed.