get_gtts call does not return tag

if place_gtt accept orders, which include tag field.
then, get_gtts should also return tag field.
  • sujith
    The order tags are not supported while placing a GTT.
  • sudhirtambe
    sudhirtambe edited July 23
    tag is supported for GTT order, see working code snippet below. I am able to retrieve the tag through ticker as well when GTT is triggered & executed. So tag is functional in all aspect, except when get_gtts() is invoked.
    if jsonOrdData['trigger_type']: #Indicates OCO Order
    lstTriggers.insert(0, jsonOrdData['slPrice'])
    lstOrders.insert(0, {'transaction_type':jsonOrdData['transaction_type'], 'quantity' :jsonOrdData['quantity'],
    'price':jsonOrdData['slPrice'], 'order_type':orderType, 'product':product ,'tag':jsonOrdData['tag']})
    trigger_type = KiteConnect.GTT_TYPE_OCO
    print(f'lstTriggers: {lstTriggers}')
    print(f'New lstOrders: {lstOrders}')
    kite = KiteSingleton.get_instance()
    ordId = kite.place_gtt(trigger_type=trigger_type, tradingsymbol=jsonOrdData['tradingsymbol'], exchange=jsonOrdData['exchange'],
    last_price=last_price,trigger_values=lstTriggers, orders = lstOrders)
    if data['status'] == "COMPLETE": # or data['status'] == "CANCELLED":
    TradeDAO.insertKiteMultiTrades(data['order_id'], data['tag'])
  • rhnvrm

    Currently we don't support tag in GTT, and we may consider supporting it at a later date.

    At the moment, even the python api docs do not mention tag. ( To clarify, I think you are getting confused with the order api, which supports it. The order expected in GTT is not the same as that.
Sign In or Register to comment.