Market Order Executed Price 0

Shabeershah2002
After placing Buy/Sell market order and when the order completed we are retrieving the order details but the returned order details Price is 0 at the same time Average Price will be something , but sometimes Price will be something and Average Price will be 0.
can you please tell why this is happening ?, what is the exact process happening at your end when a market order placed ?, please explain in both case BUY Market Order and SELL Market order.

As we are not able to stick on one either returned Price or Average Price.....

this clarification will help us a lot on, as we are struggling to work on some strategies , because if the order details price is 0 then whole strategy running wrong ........
  • sujith
    Hi @Shabeershah2002,
    Price field is price what user has sent while placing order and average_price is average price at which order is executed(order may be executed in multiple trades).

    We follow standard procedure wherein, we send price as 0 for market orders.
  • Shabeershah2002
    Hi Sujith

    Yes i understand that, on your API documentation for placing the order its mentioned that if order_type is LIMIT then there is a need of Price , in that case for MARKET order no need of price , and this is working perfectly no issue, we leave the price blank and mark the order_type "MARKET" and order gets executed,
    but once the order is COMPLETE and when we retrieve that individual order details by using
    https://api.kite.trade/orders/ORDERID?api_key=xxx&access_token=yyy the response sometimes have PRICE 0 and at the same time AVERAGE PRICE will be there , and sometimes the AVERAGE PRICE will be 0 and PRICE will be there .
    what i am trying to say is retrieving individual order details gives the price anyway but it appears sometimes on AVERAGE PRICE and sometimes on PRICE.
    Is that because if the order executed on multiple prices then the price will appear on AVERAGE PRICE ?
    And if the order is executed on a single price then the executed price will appear on PRICE ?

    if thats the case we need to make the mechanism to pick price from either of them when one is 0, or if thats not the case and this is because related to order types or something let me know so that i can move that way ....
  • sujith
    @Shabeershah2002,
    If you come across this scenario today, can you let me know? I will check orderbook and get back to you.
Sign In or Register to comment.