diff --git a/docs/deprecated.md b/docs/deprecated.md index 312f2c74f..1d44b5d28 100644 --- a/docs/deprecated.md +++ b/docs/deprecated.md @@ -33,3 +33,8 @@ The old section of configuration parameters (`"pairlist"`) has been deprecated i ### deprecation of bidVolume and askVolume from volume-pairlist Since only quoteVolume can be compared between assets, the other options (bidVolume, askVolume) have been deprecated in 2020.4, and have been removed in 2020.9. + +### Using order book steps for sell price + +Using `order_book_min` and `order_book_max` used to allow stepping the orderbook and trying to find the next ROI slot - trying to place sell-orders early. +As this does however increase risk and provides no benefit, it's been removed for maintainability purposes in 2021.6. diff --git a/tests/conftest.py b/tests/conftest.py index 6e00db274..a843d9397 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -290,8 +290,7 @@ def get_default_conf(testdatadir): }, "ask_strategy": { "use_order_book": False, - "order_book_min": 1, - "order_book_max": 1 + "order_book_top": 1, }, "exchange": { "name": "binance", diff --git a/tests/exchange/test_exchange.py b/tests/exchange/test_exchange.py index ba9ec8bc7..45db3a5e4 100644 --- a/tests/exchange/test_exchange.py +++ b/tests/exchange/test_exchange.py @@ -1844,8 +1844,7 @@ def test_get_sell_rate_orderbook(default_conf, mocker, caplog, side, expected, o # Test orderbook mode default_conf['ask_strategy']['price_side'] = side default_conf['ask_strategy']['use_order_book'] = True - default_conf['ask_strategy']['order_book_min'] = 1 - default_conf['ask_strategy']['order_book_max'] = 2 + default_conf['ask_strategy']['order_book_top'] = 1 pair = "ETH/BTC" mocker.patch('freqtrade.exchange.Exchange.fetch_l2_order_book', order_book_l2) exchange = get_patched_exchange(mocker, default_conf) @@ -1862,8 +1861,7 @@ def test_get_sell_rate_orderbook_exception(default_conf, mocker, caplog): # Test orderbook mode default_conf['ask_strategy']['price_side'] = 'ask' default_conf['ask_strategy']['use_order_book'] = True - default_conf['ask_strategy']['order_book_min'] = 1 - default_conf['ask_strategy']['order_book_max'] = 2 + default_conf['ask_strategy']['order_book_top'] = 1 pair = "ETH/BTC" # Test What happens if the exchange returns an empty orderbook. mocker.patch('freqtrade.exchange.Exchange.fetch_l2_order_book', @@ -1871,7 +1869,7 @@ def test_get_sell_rate_orderbook_exception(default_conf, mocker, caplog): exchange = get_patched_exchange(mocker, default_conf) with pytest.raises(PricingError): exchange.get_sell_rate(pair, True) - assert log_has("Sell Price at location from orderbook could not be determined.", caplog) + assert log_has_re(r"Sell Price at location 1 from orderbook could not be determined\..*", caplog) def test_get_sell_rate_exception(default_conf, mocker, caplog): diff --git a/tests/test_freqtradebot.py b/tests/test_freqtradebot.py index aac8d0c4c..06f42d5be 100644 --- a/tests/test_freqtradebot.py +++ b/tests/test_freqtradebot.py @@ -3990,8 +3990,7 @@ def test_order_book_ask_strategy(default_conf, limit_buy_order_open, limit_buy_o mocker.patch('freqtrade.exchange.Exchange.fetch_l2_order_book', order_book_l2) default_conf['exchange']['name'] = 'binance' default_conf['ask_strategy']['use_order_book'] = True - default_conf['ask_strategy']['order_book_min'] = 1 - default_conf['ask_strategy']['order_book_max'] = 2 + default_conf['ask_strategy']['order_book_top'] = 1 default_conf['telegram']['enabled'] = False patch_RPCManager(mocker) patch_exchange(mocker) @@ -4027,7 +4026,7 @@ def test_order_book_ask_strategy(default_conf, limit_buy_order_open, limit_buy_o return_value={'bids': [[]], 'asks': [[]]}) with pytest.raises(PricingError): freqtrade.handle_trade(trade) - assert log_has('Sell Price at location 1 from orderbook could not be determined.', caplog) + assert log_has_re(r'Sell Price at location 1 from orderbook could not be determined\..*', caplog) def test_startup_state(default_conf, mocker):