When are postback's triggered exactly?

Hi Team,
I had a couple of questions regarding the postback. When are they called exactly? Are they called every time when an arbitrary chunk gets filled or after an entire order is executed?

Let's say I put 100 quantity for sell and they get executed in chunks of 25, 25 (so 50 shares are filled). Would a postback be triggered every time a chunk gets sold?

For some reason only 50 shares were sold and rest could not be sold. What would be the status of the postback? Would filled_quantity be equal to 50?

Let me know,
  • sujith
    Hi @Chiran,
    As of now, postbacks are only sent when an order is executed.
    Basically, you will get a post back when the order is completely filled or cancelled or rejected.
  • Chiran
    Chiran edited August 2017
    Ok, understood @sujith.
    What happens in this scenario. Lets consider a sell order was 'open' (partially executed) when the market closes for the day. Will we receive a postback? What will be the value of status and would filled_quantity be equal to shares that were sold?
  • sujith
    Hi @Chiran,
    All pending orders are cancelled at 3:20 PM and you will get a post back for the cancelled order.
  • krtrader
    If postback is sent only when full order is completed then what is importance of filled_quantity, pendind_quantity and unfilled_quantity?
    @sujith could you please elaborate on these 3 fields?
  • sujith
    Hi @krtrader,
    An order can be filled in multiple trades. Let us say you placed an order for 1000 quantity, only 500 got filled in one trade then pending_quantity and unfilled quantity will be 500 and filled_quantity will be 500.
    In future, we will be providing postbacks for each status change.
  • krtrader
    So as of now when we receive postback, filled_quantity will be equal to quantity and unfilled_quantity, pending_quantity will be always zero untill you release next update, right?

    Btw what is probable ETA for postback for each status update?
  • sujith
    Not really, let's say an MIS order was partially filled at 3:20 and it was canceled by Admin then you might get postback as canceled but filled quantity field can be non-zero.

    Currently, postbacks are sent whenever OMS sends us notification for an order. In future, we will be adding our own mechanism for sending postbacks and it will be sent via websockets. So users don't have to set up a separate endpoint for postbacks.
    As of now, we can't guarantee timeline.
Sign In or Register to comment.