Merge branch 'develop' into feat/short

This commit is contained in:
Matthias
2022-01-22 17:25:21 +01:00
77 changed files with 1886 additions and 252 deletions

View File

@@ -752,8 +752,9 @@ class Exchange:
'cost': _amount * rate,
'type': ordertype,
'side': side,
'filled': 0,
'remaining': _amount,
'datetime': arrow.utcnow().isoformat(),
'datetime': arrow.utcnow().strftime('%Y-%m-%dT%H:%M:%S.%fZ'),
'timestamp': arrow.utcnow().int_timestamp * 1000,
'status': "closed" if ordertype == "market" else "open",
'fee': None,
@@ -768,6 +769,7 @@ class Exchange:
average = self.get_dry_market_fill_price(pair, side, amount, rate)
dry_order.update({
'average': average,
'filled': _amount,
'cost': (dry_order['amount'] * average) / leverage
})
dry_order = self.add_dry_order_fee(pair, dry_order)