Merge pull request #6732 from freqtrade/remove_duplicate_liqprice_call

Don't call interest_rate and isolated_liq twice
This commit is contained in:
Matthias
2022-04-28 07:38:32 +02:00
committed by GitHub
3 changed files with 8 additions and 21 deletions

View File

@@ -789,7 +789,9 @@ class Exchange:
rate: float, leverage: float, params: Dict = {},
stop_loss: bool = False) -> Dict[str, Any]:
order_id = f'dry_run_{side}_{datetime.now().timestamp()}'
_amount = self.amount_to_precision(pair, amount)
# Rounding here must respect to contract sizes
_amount = self._contracts_to_amount(
pair, self.amount_to_precision(pair, self._amount_to_contracts(pair, amount)))
dry_order: Dict[str, Any] = {
'id': order_id,
'symbol': pair,