Calculate profit in XMR
This commit is contained in:
@@ -340,6 +340,7 @@ class Money(object):
|
||||
remaining = withdraw_threshold - total_usd
|
||||
|
||||
profit = total_usd - total_base_usd
|
||||
profit_in_xmr = profit / xmr_usd["monero"]["usd"]
|
||||
|
||||
# Convert the total USD price to GBP and SEK
|
||||
price_sek = rates["SEK"] * total_usd
|
||||
@@ -358,6 +359,7 @@ class Money(object):
|
||||
total_remaining = withdraw_threshold - total_with_trades
|
||||
|
||||
total_profit = total_with_trades - total_base_usd
|
||||
total_profit_in_xmr = total_profit / xmr_usd["monero"]["usd"]
|
||||
|
||||
# cast = (
|
||||
# (
|
||||
@@ -392,6 +394,7 @@ class Money(object):
|
||||
"total_withdrawal_limit": total_withdrawal_limit,
|
||||
"remaining": remaining,
|
||||
"profit": profit,
|
||||
"profit_in_xmr": profit_in_xmr,
|
||||
"withdraw_threshold": withdraw_threshold,
|
||||
}
|
||||
if trades:
|
||||
@@ -399,6 +402,7 @@ class Money(object):
|
||||
cast_es["total_with_trades"] = total_with_trades
|
||||
cast_es["total_remaining"] = total_remaining
|
||||
cast_es["total_profit"] = total_profit
|
||||
cast_es["total_profit_in_xmr"] = total_profit_in_xmr
|
||||
# await self.write_to_es("get_total", cast_es)
|
||||
return cast_es
|
||||
|
||||
|
||||
Reference in New Issue
Block a user