Revert unintended double-call of amount conversion
This commit is contained in:
parent
67a5739501
commit
7f88f9bf27
@ -1288,13 +1288,9 @@ class Exchange:
|
|||||||
# since needs to be int in milliseconds
|
# since needs to be int in milliseconds
|
||||||
_params = params if params else {}
|
_params = params if params else {}
|
||||||
my_trades = self._api.fetch_my_trades(
|
my_trades = self._api.fetch_my_trades(
|
||||||
pair,
|
pair, int((since.replace(tzinfo=timezone.utc).timestamp() - 5) * 1000),
|
||||||
int((since.replace(tzinfo=timezone.utc).timestamp() - 5) * 1000),
|
params=_params)
|
||||||
params=_params
|
matched_trades = [trade for trade in my_trades if trade['order'] == order_id]
|
||||||
)
|
|
||||||
matched_trades = self._trades_contracts_to_amount(
|
|
||||||
trades=[trade for trade in my_trades if trade['order'] == order_id]
|
|
||||||
)
|
|
||||||
|
|
||||||
self._log_exchange_response('get_trades_for_order', matched_trades)
|
self._log_exchange_response('get_trades_for_order', matched_trades)
|
||||||
|
|
||||||
|
@ -2797,7 +2797,7 @@ def test_name(default_conf, mocker, exchange_name):
|
|||||||
|
|
||||||
@pytest.mark.parametrize("trading_mode,amount", [
|
@pytest.mark.parametrize("trading_mode,amount", [
|
||||||
('spot', 0.2340606),
|
('spot', 0.2340606),
|
||||||
('futures', 23.40606),
|
('futures', 2.340606),
|
||||||
])
|
])
|
||||||
@pytest.mark.parametrize("exchange_name", EXCHANGES)
|
@pytest.mark.parametrize("exchange_name", EXCHANGES)
|
||||||
def test_get_trades_for_order(default_conf, mocker, exchange_name, trading_mode, amount):
|
def test_get_trades_for_order(default_conf, mocker, exchange_name, trading_mode, amount):
|
||||||
|
Loading…
Reference in New Issue
Block a user