Multiple Postback on Order Completion

anuragrath
Hello There,
I am getting multiple postbacks for order completion with same payload data.
Is it expected behavior?

Should I be handling the scenario of actions based on postback at the client end?
Tagged:
  • sujith
    You can check out this similar thread.
  • anuragrath
    anuragrath edited October 2020
    Actually the same status I am getting twice...
    The only thing that looks different is the order_timestamp

    {
    "placed_by": "####",
    "order_id": "201023201015517",
    "exchange_order_id": "1100000008144702",
    "parent_order_id": "",
    "status": "COMPLETE",
    "status_message": "",
    "status_message_raw": "",
    "order_timestamp": "2020-10-23 13:15:18",
    "exchange_update_timestamp": "2020-10-23 13:15:18",
    "exchange_timestamp": "2020-10-23 13:15:18",
    "variety": "regular",
    "exchange": "NSE",
    "tradingsymbol": "IDFCFIRSTB",
    "instrument_token": 2863105,
    "order_type": "MARKET",
    "transaction_type": "BUY",
    "validity": "DAY",
    "product": "MIS",
    "quantity": 1,
    "disclosed_quantity": 0,
    "price": 0,
    "trigger_price": 0,
    "average_price": 31.65,
    "filled_quantity": 1,
    "pending_quantity": 0,
    "cancelled_quantity": 0,
    "market_protection": 0,
    "meta": {},
    "tag": "",
    "guid": "23766XXXLnLLWFQZIP",
    "user_id": "####",
    "unfilled_quantity": 0,
    "app_id": 23766,
    "checksum": "11e7facf29f869160b5526217efd13a53b0146169f44cdfc68f10208826f6a79"
    },
    {
    "placed_by": "####",
    "order_id": "201023201015517",
    "exchange_order_id": "1100000008144702",
    "parent_order_id": "",
    "status": "COMPLETE",
    "status_message": "",
    "status_message_raw": "",
    "order_timestamp": "2020-10-23 07:45:18",
    "exchange_update_timestamp": "2020-10-23 13:15:18",
    "exchange_timestamp": "2020-10-23 13:15:18",
    "variety": "regular",
    "exchange": "NSE",
    "tradingsymbol": "IDFCFIRSTB",
    "instrument_token": 2863105,
    "order_type": "MARKET",
    "transaction_type": "BUY",
    "validity": "DAY",
    "product": "MIS",
    "quantity": 1,
    "disclosed_quantity": 0,
    "price": 0,
    "trigger_price": 0,
    "average_price": 31.65,
    "filled_quantity": 1,
    "pending_quantity": 0,
    "cancelled_quantity": 0,
    "market_protection": 0,
    "meta": {},
    "tag": "",
    "guid": "23766XXXLnLLWFQZIP",
    "user_id": "####",
    "unfilled_quantity": 0,
    "app_id": 23766,
    "checksum": "2c0142214c24a9b25c20aba14c5a8ecc12f9a244373183284d297202a6b66e00"
    }

    @sujith Would appreciate if you help me understand whats the root cause for it?
  • enliyo
    enliyo edited October 2020
    Thanks for posting this. I was going mad thinking about scenarios why I am getting double order updates in NodeJS websockets. I haven't changed the related code in long time and since last 1-2 weeks I have started receiving 2 same order updates for single update. e.g. When order completes/rejected I receive 2 updates from websocket. This seems to be regression from Kite side.

    I am also receiving 2 postbacks like anurag mentioned and what he observed about order_timestamp is absolutely correct. The timestamps are 5 hours 30 minutes apart. Looks like issue from Kite due to incorrect clocks.

    @sujith can you please confirm this on your end? I can reproduce this now on MCX orders as well.
  • sujith
    @enliyo, @anuragrath
    Thank you for pointing out. It should be fixed now.
  • anuragrath
    Yes.. for me it seemed like a timezone related issue, where in postback was done for both UTC & Asia/Kolkatta
  • enliyo
    enliyo edited October 2020
    @sujith it looks like order_timestamp got regression. Was something changed during above fix? This is response from /orders API.


    "order_timestamp": "2020-10-28 03:53:58",
    "exchange_update_timestamp": "2020-10-28 09:23:58",
    "exchange_timestamp": "2020-10-28 09:23:58"


    order_timestamp is lagging by 5:30 hours now. If i remember correctly, order_timestamp and exchange_timestamp used to match.
  • sujith
    @enliyo,
    This is not related to that. We will check and get back to you about this.
Sign In or Register to comment.