☰
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
15.1K
All Categories
0
Incidents
180
Node JS client
52
Go client
863
.Net API client
402
Kite Publisher
555
.Net / VBA / Excel (3rd party)
506
Algorithms and Strategies
1.1K
Java client
1.2K
API clients
410
PHP client
4.4K
Python client
365
Mobile and Desktop apps
1.5K
Market data (WebSockets)
3.7K
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.