It looks like you're new here. If you want to get involved, click one of these buttons!
.Net API client
.Net / VBA / Excel (3rd party)
Algorithms and Strategies
Mobile and Desktop apps
Market data (WebSockets)
In this Discussion
delay in profit loss
When I calculate profit via open positions , api profit loss is delayed , how long is the delay ?
You can refer to this similar
pnl = (sellValue - buyValue) + (netQuantity * lastPrice * multiplier);
Can I use all these values from get positions ? is lastPrice retrieved from get positions is realtime ?
The whole point is to defer polling the positions. Now you want to calculate the same P&L with the last price provided in the same response.
You need to use GetQuote or websocket to get the latest last traded price. The last price in the positions response is a cached value.
Hmm , I get it , it makes no sense why its cached , you could just interlink it with get quote and just give the pnl