pnl calculation for intraday equity trading

SAPANKHUNTIA
Hii traders and coders.

As we have discussed earlier that the kite.position is showing wrong last price hence wrong pnl data. So is there any other way we can find out the pnl of equity shares traded. and kindly tell me what does the average_price mean in an intraday trade.

Thank you.
  • rakeshr
    kite.position is showing wrong last price hence wrong pnl data. So is there any other way we can find out the pnl of equity shares traded
    You can go through this thread.
    kindly tell me what does the average_price mean in an intraday trade.
    You can check the detail of all position response attributes here.
  • SAPANKHUNTIA
    hii @rakeshr
    sir in the kite.positions request the last_price data is showing wrong. is there any way to put the right one in the formula ?

    thank you.
  • SAPANKHUNTIA
    and like LTP can we trust the average_price from kite.positions ?
  • sujith
    Yes, the average price will only change when there is a new trade. You can use Quote API or Websockets API for the latest market data.
  • SAPANKHUNTIA
    Thank you @sujith.
    But can i know why the values like ltp and pnl aren't updating in realtime ?
  • sujith
    You can know more here.
  • SAPANKHUNTIA
    Hii sujith..
    Hope you are in good health.

    According to you the average price should show updated value.


    but mine is showing different value than the price i have bought or sold the shares.

    Kindly follow the two images to get a view of what i am asking about.

    Thank you.
  • sujith
    An average price of a position is the average of all the trades done for the day, it won't show the latest trade's average price.
  • SAPANKHUNTIA
    okay @sujith.
    thank you.
  • SAPANKHUNTIA
    hii @sujith.

    i need the average price at which an order was executed.
    how can i fetch the same.

    will you please help me with this?
  • rakeshr
    i need the average price at which an order was executed.
    You can go through this thread.
Sign In or Register to comment.