☰
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.2K
All Categories
0
Incidents
159
Node JS client
45
Go client
804
.Net API client
386
Kite Publisher
538
.Net / VBA / Excel (3rd party)
466
Algorithms and Strategies
1K
Java client
1.1K
API clients
408
PHP client
4.1K
Python client
350
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.