Bug: kc.getPositions does not return the current actual PNL or price

pkoka
pkoka edited August 6 in Node JS client
When using the kiteconnect nodejs library, calling kc.getPositions seems to get stuck returning old data for unrealised & realised profit, last_price and so on.

For example, in my first request, I received unrealised pnl of -0.5 on this Cover Order. In every subsequent request, I receive the same value even though it has actually changed, until the trade is exited. The value is only changed after the position is exited, which is not very helpful:
{
...
net: [...],
day: [
{
tradingsymbol: 'NAZARA',
exchange: 'NSE',
instrument_token: 764673,
product: 'CO',
quantity: 1,
overnight_quantity: 0,
multiplier: 1,
average_price: 915.95,
close_price: 0,
last_price: 915.45,
value: -915.95,
pnl: -0.5,
m2m: -0.5,
unrealised: -0.5,
realised: 0,
buy_quantity: 1,
buy_price: 915.95,
buy_value: 915.95,
buy_m2m: 915.95,
sell_quantity: 0,
sell_price: 0,
sell_value: 0,
sell_m2m: 0,
day_buy_quantity: 1,
day_buy_price: 915.95,
day_buy_value: 915.95,
day_sell_quantity: 0,
day_sell_price: 0,
day_sell_value: 0
},]
...
}
  • rakeshr
    kc.getPositions seems to get stuck returning old data for unrealised & realised profit, last_price
    P&L and LTP are not updated in real-time in the holdings and positions. Go through the positions FAQs.
Sign In or Register to comment.