☰
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
13.8K
All Categories
0
Incidents
153
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
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.