Don't convert between the same currency
This commit is contained in:
parent
3f855dfb59
commit
67404fc161
|
@ -104,9 +104,12 @@ def get_trade_size_in_base(direction, account, strategy, cash_balance, base):
|
|||
log.debug(f"Trade size: {amount_fiat}")
|
||||
|
||||
# Convert the trade size to the base currency
|
||||
trade_size_in_base = to_currency(
|
||||
direction, account, amount_fiat, account.currency, base
|
||||
)
|
||||
if account.currency.lower() == base.lower():
|
||||
trade_size_in_base = amount_fiat
|
||||
else:
|
||||
trade_size_in_base = to_currency(
|
||||
direction, account, amount_fiat, account.currency, base
|
||||
)
|
||||
log.debug(f"Trade size in base: {trade_size_in_base}")
|
||||
|
||||
return trade_size_in_base
|
||||
|
|
Loading…
Reference in New Issue