From dba21c815a50366cfc6fc4a792bb1ad6ac28069b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 03:56:47 +0000 Subject: [PATCH 1/6] Bump tensorboard from 2.12.1 to 2.12.2 Bumps [tensorboard](https://github.com/tensorflow/tensorboard) from 2.12.1 to 2.12.2. - [Release notes](https://github.com/tensorflow/tensorboard/releases) - [Changelog](https://github.com/tensorflow/tensorboard/blob/master/RELEASE.md) - [Commits](https://github.com/tensorflow/tensorboard/commits) --- updated-dependencies: - dependency-name: tensorboard dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-freqai.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-freqai.txt b/requirements-freqai.txt index 840598d23..51396ab91 100644 --- a/requirements-freqai.txt +++ b/requirements-freqai.txt @@ -8,4 +8,4 @@ joblib==1.2.0 catboost==1.1.1; platform_machine != 'aarch64' and 'arm' not in platform_machine and python_version < '3.11' lightgbm==3.3.5 xgboost==1.7.5 -tensorboard==2.12.1 +tensorboard==2.12.2 From f1730ab51bd8b89601c4a729893fbbf763583334 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 03:56:52 +0000 Subject: [PATCH 2/6] Bump httpx from 0.23.3 to 0.24.0 Bumps [httpx](https://github.com/encode/httpx) from 0.23.3 to 0.24.0. - [Release notes](https://github.com/encode/httpx/releases) - [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md) - [Commits](https://github.com/encode/httpx/compare/0.23.3...0.24.0) --- updated-dependencies: - dependency-name: httpx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 690a7ee70..8c7738f64 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -19,7 +19,7 @@ isort==5.12.0 # For datetime mocking time-machine==2.9.0 # fastapi testing -httpx==0.23.3 +httpx==0.24.0 # Convert jupyter notebooks to markdown documents nbconvert==7.3.1 From f1fcd0760d08e9cbbdc72d6078572c6aebb43e72 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 03:57:07 +0000 Subject: [PATCH 3/6] Bump pytest from 7.3.0 to 7.3.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.3.0 to 7.3.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.3.0...7.3.1) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 690a7ee70..e90930b62 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,7 +10,7 @@ coveralls==3.3.1 ruff==0.0.261 mypy==1.2.0 pre-commit==3.2.2 -pytest==7.3.0 +pytest==7.3.1 pytest-asyncio==0.21.0 pytest-cov==4.0.0 pytest-mock==3.10.0 From 8a8cd6798810a14d179b94e05c3252d0c33277f1 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 17 Apr 2023 07:12:03 +0200 Subject: [PATCH 4/6] Improve ccxt_ohlcv test debuggability --- tests/exchange/test_ccxt_compat.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/exchange/test_ccxt_compat.py b/tests/exchange/test_ccxt_compat.py index 4a65b16d7..34a4a1f0b 100644 --- a/tests/exchange/test_ccxt_compat.py +++ b/tests/exchange/test_ccxt_compat.py @@ -530,7 +530,8 @@ class TestCCXTExchange(): candles = res[3] candle_count = exchange.ohlcv_candle_limit(timeframe, candle_type, since_ms) * 0.9 candle_count1 = (now.timestamp() * 1000 - since_ms) // timeframe_ms - assert len(candles) >= min(candle_count, candle_count1) + assert len(candles) >= min(candle_count, candle_count1), \ + f"{len(candles)} < {candle_count} in {timeframe}, Offset: {offset} " assert candles[0][0] == since_ms or (since_ms + timeframe_ms) def test_ccxt__async_get_candle_history(self, exchange: EXCHANGE_FIXTURE_TYPE): From 6c6d2a0f43e445084bbfac7f48870bcbf5922d24 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 17 Apr 2023 07:22:26 +0200 Subject: [PATCH 5/6] Improve live test resiliance --- tests/exchange/test_ccxt_compat.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/exchange/test_ccxt_compat.py b/tests/exchange/test_ccxt_compat.py index 34a4a1f0b..60855ca54 100644 --- a/tests/exchange/test_ccxt_compat.py +++ b/tests/exchange/test_ccxt_compat.py @@ -528,10 +528,11 @@ class TestCCXTExchange(): assert res[1] == timeframe assert res[2] == candle_type candles = res[3] - candle_count = exchange.ohlcv_candle_limit(timeframe, candle_type, since_ms) * 0.9 - candle_count1 = (now.timestamp() * 1000 - since_ms) // timeframe_ms + factor = 0.9 + candle_count = exchange.ohlcv_candle_limit(timeframe, candle_type, since_ms) * factor + candle_count1 = (now.timestamp() * 1000 - since_ms) // timeframe_ms * factor assert len(candles) >= min(candle_count, candle_count1), \ - f"{len(candles)} < {candle_count} in {timeframe}, Offset: {offset} " + f"{len(candles)} < {candle_count} in {timeframe}, Offset: {offset} {factor}" assert candles[0][0] == since_ms or (since_ms + timeframe_ms) def test_ccxt__async_get_candle_history(self, exchange: EXCHANGE_FIXTURE_TYPE): From 8aec71e27ef605f1cf06acb39c99523a3ff93317 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 17 Apr 2023 07:25:09 +0200 Subject: [PATCH 6/6] Add bitvavo sublass to properly set ohlcv limit --- freqtrade/exchange/__init__.py | 1 + freqtrade/exchange/bitvavo.py | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 freqtrade/exchange/bitvavo.py diff --git a/freqtrade/exchange/__init__.py b/freqtrade/exchange/__init__.py index df10e40e5..8092d5af8 100644 --- a/freqtrade/exchange/__init__.py +++ b/freqtrade/exchange/__init__.py @@ -6,6 +6,7 @@ from freqtrade.exchange.exchange import Exchange from freqtrade.exchange.binance import Binance from freqtrade.exchange.bitpanda import Bitpanda from freqtrade.exchange.bittrex import Bittrex +from freqtrade.exchange.bitvavo import Bitvavo from freqtrade.exchange.bybit import Bybit from freqtrade.exchange.coinbasepro import Coinbasepro from freqtrade.exchange.exchange_utils import (ROUND_DOWN, ROUND_UP, amount_to_contract_precision, diff --git a/freqtrade/exchange/bitvavo.py b/freqtrade/exchange/bitvavo.py new file mode 100644 index 000000000..ba1d355cc --- /dev/null +++ b/freqtrade/exchange/bitvavo.py @@ -0,0 +1,23 @@ +"""Kucoin exchange subclass.""" +import logging +from typing import Dict + +from freqtrade.exchange import Exchange + + +logger = logging.getLogger(__name__) + + +class Bitvavo(Exchange): + """Bitvavo exchange class. + + Contains adjustments needed for Freqtrade to work with this exchange. + + Please note that this exchange is not included in the list of exchanges + officially supported by the Freqtrade development team. So some features + may still not work as expected. + """ + + _ft_has: Dict = { + "ohlcv_candle_limit": 1440, + }