☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
14.1K
All Categories
0
Incidents
157
Node JS client
41
Go client
797
.Net API client
385
Kite Publisher
537
.Net / VBA / Excel (3rd party)
463
Algorithms and Strategies
1K
Java client
1.1K
API clients
407
PHP client
4.1K
Python client
349
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.4K
General
In this Discussion
March 2023
rakeshr
How to fetch realized and unrealized profit separately using kite connect API
KN5981
March 2023
in
Python client
Hi
@admin
I need to fetch the realized and unrealized profit separately. Right now I used below formula, but it returns the P&L. I want to fetch the realized and unrealized separately. Kindly help me to solve this issue.
pnl = (sellValue - buyValue) + (netQuantity * lastPrice * multiplier);
rakeshr
March 2023
The formula remains the same for both, just for realized p&l you need to replace lastPrice with the sold price/sell price.
This article
explains more.
Sign In
or
Register
to comment.