Update typehint for cancel_order
This commit is contained in:
parent
0273539f06
commit
c775d65126
@ -922,9 +922,9 @@ class Exchange:
|
|||||||
return order.get('status') in ('closed', 'canceled') and order.get('filled') == 0.0
|
return order.get('status') in ('closed', 'canceled') and order.get('filled') == 0.0
|
||||||
|
|
||||||
@retrier
|
@retrier
|
||||||
def cancel_order(self, order_id: str, pair: str) -> None:
|
def cancel_order(self, order_id: str, pair: str) -> Dict:
|
||||||
if self._config['dry_run']:
|
if self._config['dry_run']:
|
||||||
return
|
return {}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return self._api.cancel_order(order_id, pair)
|
return self._api.cancel_order(order_id, pair)
|
||||||
|
@ -1728,7 +1728,7 @@ def test_get_historic_trades_notsupported(default_conf, mocker, caplog, exchange
|
|||||||
def test_cancel_order_dry_run(default_conf, mocker, exchange_name):
|
def test_cancel_order_dry_run(default_conf, mocker, exchange_name):
|
||||||
default_conf['dry_run'] = True
|
default_conf['dry_run'] = True
|
||||||
exchange = get_patched_exchange(mocker, default_conf, id=exchange_name)
|
exchange = get_patched_exchange(mocker, default_conf, id=exchange_name)
|
||||||
assert exchange.cancel_order(order_id='123', pair='TKN/BTC') is None
|
assert exchange.cancel_order(order_id='123', pair='TKN/BTC') == {}
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("exchange_name", EXCHANGES)
|
@pytest.mark.parametrize("exchange_name", EXCHANGES)
|
||||||
|
Loading…
Reference in New Issue
Block a user