Get position details API: Query

I have a query regarding the carryForwardBuyValue and carryForwardSellValue columns coming from self.get_positions() api request. In the following example, I have 1 lot BN option carried forward. e.g. for first position, costPrice was 774.55 and quantity is 15 thus the carryForwardBuyValue should be 15*774.55 = 11618.25 which is not matching with carryForwardBuyValue.

Can you please clarify this?

Hello @kbkalyani56

Over here, costPrice is your actual Buy Price or Sell Price of the instrument. When it comes to carry forward positions, the system also maintains Mark-to-Market prices, which is displayed as buyAvg and sellAvg in the API response.

carryForwardBuyValue and carryForwardSellValue is computed as:

buyAvg * netQty

@Hardik Thanks for replying.
Shouldn’t ideally costPrice and buyAvg should be the same for long positions?

@kbkalyani56

No. As mentioned, both denotes different methods of displaying Positions. Mark to Market becomes important when calculating Day’s profit/loss.

1 Like