Sell price problem

darsh
I had sort position of SUBEX quantity:1.When i check the price of sold Subex in kite app.it shows "average price =9.8" in order book.
for same, if i use API "kite.postions()". it shows me sell_price= 9.533928571428572 in 'day' list.

my objective is to know what price i have sold that share after sold the share or execute to sold the share(in short position)

please tell me which value is my desirable value and why there is difference in value
  • sujith
    Hi,
    An average price of an order is the average of the price at which all the trades have happened.
    An average price of a position is the average calculated based on multiple orders.
    Are you trying to calculate P&L?
  • darsh
    darsh edited February 2018
    @sujith i am trying to make strategy. in that strategy when stock price goes down with respect to price at which stock was bought.Stock will be sold out.For that i need price at which i have already bought the stock and Last traded price so i can compare those two price.for that I needed price at which i bought particular stock.Same apply for short position.
  • sujith
    If your strategy is confined to one order then you can use order's average price else you need to look at position's average price.
    You need to also note that if you take a position and close it and re-open again then the average price is the average of both buys.
  • darsh
    darsh edited February 2018
    Okay thank you very much.
This discussion has been closed.