positions data not updating

nsarup
Hi, using PHP Client Version 3

print_r($kite->getPositions());
Fetches data, but it is not updating ..

whereas
print_r($kite->getQuote(["NSE:INFY", "NSE:SBIN"]));

in the same script is fetching the latest quote data..

what could I be doing wrong?
  • nsarup
    even
    curl "https://api.kite.trade/portfolio/positions" \
    -H "X-Kite-Version: 3" \
    -H "Authorization: token api_key:access_token"

    returns data , but the data is not updating .. same data showing trying multiple times in last few minutes
  • sujith
    @nsarup,
    You can refer to this thread.
    Please create a new thread for new query, it might help others who are searching for the same.
  • nsarup
    The thread you pointed to has issue " When i call GetPositions its always giving me value 10 -15 second old data."

    In my case data is not updating at all. even the last_price coming is not updating.. So how do i solve this?
  • nsarup
    @sujith please help
  • sujith
    @nsarup,
    It is not recommended to poll positions to calculate P&L. You need to calculate P&L using the last price received on Quote API or Websockets API.
  • nsarup
    Got it . Thanks
This discussion has been closed.