Oder cost is real cost (including leverage)

This commit is contained in:
Matthias 2022-07-16 13:12:50 +02:00
parent ed64e4299b
commit d03dfb3934
2 changed files with 2 additions and 2 deletions

View File

@ -822,7 +822,7 @@ class Exchange:
'price': rate,
'average': rate,
'amount': _amount,
'cost': _amount * rate / leverage,
'cost': _amount * rate,
'type': ordertype,
'side': side,
'filled': 0,

View File

@ -1135,7 +1135,7 @@ def test_create_dry_run_order(default_conf, mocker, side, exchange_name, leverag
assert order["symbol"] == "ETH/BTC"
assert order["amount"] == 1
assert order["leverage"] == leverage
assert order["cost"] == 1 * 200 / leverage
assert order["cost"] == 1 * 200
@pytest.mark.parametrize("side,startprice,endprice", [