Postback response data

mnkartik
Hi Team,

From the given doc, https://kite.trade/docs/connect/v1/#postback-webhooks

in the case of Market orders, which is the price we need to consider ( price or average_price ) when the order status is COMPLETE.

Pls clarify.
Tagged:
  • sujith
    Hi @mnkartik,
    Price field will have user entered value, you should look at average price.
  • mnkartik
    Hi @sujith , but in case of markets, we never put the price when the order is raised. Its only in the case of limits. So to consolidated

    when the trade type is LIMIT : then do we need to consider 'price' or 'average_price'
    when the trade type is MARKET : then do we need to consider 'price' or 'average_price'

    pls clarify.
  • sujith
    Hi @Karthik,
    Meaning of order will not change in this scenario. LIMIT and MARKET are just order types. Price field is a value entered by user while placing order. It is true for both order types, in case of LIMIT order price field will have some value but in MARKET order, price will have 0 as value. "average_price" is average of price at which order is fulfilled.

    PS: An order may be fulfilled in multiple trades which might have different price.
  • mnkartik
    Hi @sujith ,
    This is just to confirm back,

    For Market type purchase orders,
    price = 0
    and upon response from the postback url endpoint,
    price = 0 &
    average_price = holds the price at which the order is fullfilled.


    Now for Limit type purchase orders,
    price = will have some price set
    and upon response from the postback_url endpoint,
    price = same value as set in time of purchase &
    average_price = holds the price at which the order is fullfilled.

    Pls clarify.
  • sujith
    @mnkartik,
    Yes, you are right.
Sign In or Register to comment.