Do profit calculation the right way around
This commit is contained in:
parent
c0f266da73
commit
ffdbcecc8d
|
@ -31,7 +31,7 @@ class Profit(LoginRequiredMixin, OTPRequiredMixin, ObjectList):
|
|||
details = account.client.get_account()
|
||||
item = {
|
||||
"account": account,
|
||||
"pl": D(account.initial_balance) - D(details["balance"]),
|
||||
"pl": D(details["balance"]) - D(account.initial_balance),
|
||||
"unrealizedPL": D(details["unrealizedPL"]),
|
||||
"balance": details["balance"],
|
||||
"currency": details["currency"],
|
||||
|
|
Loading…
Reference in New Issue