How to get Unrealized Profits on open Position?
Created at 26 Jan 2021, 20:19
How to get Unrealized Profits on open Position?
26 Jan 2021, 20:19
Hi all,
I'm playing around with the Open API, and I'm trying to close a position based on the amount of unrealized profit it has made. However, I cannot find the unrealized profit on a trade. This seems like a rather easy operation but I cannot seem to find the right request to send. Does anyone have any idea?
I'm using Python, and the spotware-connect library which is actually quite nice.
Thanks!
PanagiotisCharalampous
27 Jan 2021, 08:57
Hi bankerx,
This information is not available through the API. You need to calculate it yourself using the position's entry price and the current spot prices.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous