Regarding positions and holdings P&L

paragsatpute edited May 2020 in PHP client
pnl = (sellValue - buyValue) + (netQuantity * lastPrice * multiplier);
I want to use the formula to calculate the positions on my end but,
1. What is the "sellValue" and "buyValue" in the formula?
2. What is the multiplier?
3. Do you use the same formula for getting Holdings PnL too?
4. Can we poll Order status in an interval of 2 seconds?
5. Apart from the above, are there any other considerations which we as API users should be aware of (because these are not noted anywhere)?
  • sujith
    There will be one entry of a tradingsymbol traded at an exchange in a day. Even if you have traded multiple times in a day, there will be only one entry.
    A Sell value is the net value of the sold quantities and buy value is the net value of bought quantities. You can check out more details here. You will receive those values in the positions response.

    The multiplier is a lot size multiplier used of calculating P&L, it is usually 1 for equity.

    For Holdings P&L, pnl = (lastPrice - averagePrice) * (quantity + t1_quantity)

    You can use postbacks or Websockets order updates for checking the order status. We don't recommend polling orderbook.

    At any point in time, make sure you don't hit API rate limits. You can know about rate limits on FAQs.
Sign In or Register to comment.