Differentiate between trades+profit and profit in ES

This commit is contained in:
Mark Veidemanis 2022-02-17 23:24:12 +00:00
parent bc0a60a601
commit 96168d8d6f
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 9 additions and 3 deletions

View File

@ -552,9 +552,15 @@ class Transactions(object):
total_usd += trades_usd
profit = total_usd - float(settings.Money.BaseUSD)
if trades:
cast_es = {
"profit_trades_usd": profit,
}
else:
cast_es = {
"profit_usd": profit,
}
self.write_to_es("get_profit", cast_es)
return profit