Tag Not working

omtechnologies
@sujith sir, tags we are providing with while placing the order doesn't seem to be working.

For eg. Order ID 210205202210039, 210205202074922 etc.. we provided tag "NMA25" and "NMA24" but when queried for orders or trades, we are not getting back tags in the response.

The problem without tag is that we don't know whether client will be entering his own order or it is the order generated by our software. Although we can match order ids and only manage orders that are opened by our software, but still having tags working will be much better option with both order and trades.

Best Regards,
U.S. Goel
Om Technologies
Tagged:
  • sujith
    Can you give us the debug logs and mention the library version you are using?
    Make sure to remove the app and client-specific information.
  • omtechnologies
    omtechnologies edited February 2021
    @sujith thanks for quick response. We are using php client library for placing and managing orders and javascript for websockets. So if this is specific to us then it must be something left unimplemented in php client library.
    Version if kite connect library we are using is 3.0.2b

    Sample Code for placing order
    $order = $kite->placeOrder("regular", [
    "tradingsymbol" => "AMARAJABAT",
    "exchange" => "NSE",
    "quantity" => 1,
    "transaction_type" => "SELL",
    "order_type" => "LIMIT",
    "price" => 1000.00,
    "product" => "MIS",
    "tag" => 'NMA13579'
    ]);
    print_r($order->order_id);
    Sample code for retriving orders
    ********************************
    $order_id = '210205201304627';

    $orderInfo = $kite->getOrderHistory($order_id);
    Sample code for retriving trades.
    //Trades for an order
    $order_id = '210205201304627';
    try {
    $tradeInfo = $kite->getOrderTrades($order_id);
    } catch(Exception $e) {
    print_r($e);
    }
  • rakeshr
    @omtechnologies
    As stated in the documentation, you will get a tag field when the order book is retrieved. So, in order to get Tag field, you need to either use getOrders or getOrderHistory method call for PHP client.
  • omtechnologies
    @rakeshr thanks for quick support. We got the tags back with getOrders now..

    You may close the thread.
This discussion has been closed.