diff --git a/CHANGELOG.md b/CHANGELOG.md index 08f7d8934..c45454fbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 *It is strongly advised to perform an update of your tentacles after updating OctoBot. (start.py tentacles --install --all)* +## [0.4.1] - 2021-10-15 +### Added +- [Interface][Telegram] + - Restart OctoBot +- [Interface][Web] + - DataCollector stop button + - Backtesting Date selection +- [Evaluator] Death and golden cross +- [Exchanges][Partners] Ascendex + +### Updated +- [Websockets] Cryptofeed from < 2.0.0 to 2.0.1 + +### Fixed +- Websockets multiple issues + +### Removed +- [Infra] Nexus + ## [0.4.0-beta17] - 2021-09-15 ### Fixed - Portfolio holdings market valuation issues diff --git a/README.md b/README.md index ae0b01c2f..8d0f8343c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# OctoBot [0.4.0-beta17](https://github.com/Drakkar-Software/OctoBot/tree/dev/CHANGELOG.md) +# OctoBot [0.4.1](https://github.com/Drakkar-Software/OctoBot/tree/dev/CHANGELOG.md) [![PyPI](https://img.shields.io/pypi/v/OctoBot.svg)](https://pypi.python.org/pypi/OctoBot/) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/e07fb190156d4efb8e7d07aaa5eff2e1)](https://app.codacy.com/gh/Drakkar-Software/OctoBot?utm_source=github.com&utm_medium=referral&utm_content=Drakkar-Software/OctoBot&utm_campaign=Badge_Grade_Dashboard)[![Downloads](https://pepy.tech/badge/octobot/month)](https://pepy.tech/project/octobot) [![Dockerhub](https://img.shields.io/docker/pulls/drakkarsoftware/octobot.svg)](https://hub.docker.com/r/drakkarsoftware/octobot) @@ -19,7 +19,7 @@ ![Web Interface](../assets/web-interface.gif) ## Description -[Octobot](https://www.octobot.online/) is a powerful fully modular open-source cryptocurrency trading robot. +[Octobot](https://www.octobot.online/) is a powerful, fully modular open-source cryptocurrency trading robot. See the [Octobot official website](https://www.octobot.online/). @@ -28,6 +28,8 @@ This repository contains all the features of the bot (trading tools, evaluation To install OctoBot with its tentacles, just use the [latest release for your system](https://github.com/Drakkar-Software/OctoBot/releases/latest) and your OctoBot is ready ! +Find the answers to the most common questions in [our FAQ](https://docs.octobot.online/usage/frequently-asked-questions-faq). + ## Your Octobot Telegram interface [![Twitter Interface](../assets/twitter-interface.png)](https://docs.octobot.online/interfaces/twitter-interface) @@ -40,7 +42,12 @@ OctoBot is **AI ready**: Python being the main language for OctoBot, it's easy t any other lib and take advantage of all the available data and create a very powerful trading strategy. Octobot's main feature is **evolution** : you can [install](https://docs.octobot.online/advanced_usage/tentacle-manager), -[modify](https://developer.docs.octobot.online/guides/customize-your-octobot) and even [create](https://developer.docs.octobot.online/guides/developer-guide) any tentacle you want to build your ideal cryptocurrency trading robot. You can even share your OctoBot evolutions ! +[modify](https://developer.docs.octobot.online/guides/customize-your-octobot) and even [create](https://developer.docs.octobot.online/guides/developer-guide) any tentacle you want to build your ideal cryptocurrency trading robot. You can even share your OctoBot evolutions! + +## Hardware requirements +- CPU : 1 Core / 1GHz +- RAM : 250 Mo +- Disk : 1 Go ## Installation OctoBot's installation is **very simple**... because **very documented** ! See the [installation guides](https://www.octobot.online/guides/#installation) for more info. diff --git a/octobot/api/backtesting.py b/octobot/api/backtesting.py index 7036698ba..f4b8ee4c7 100644 --- a/octobot/api/backtesting.py +++ b/octobot/api/backtesting.py @@ -22,11 +22,15 @@ def create_independent_backtesting(config, data_files, data_file_path=constants.BACKTESTING_FILE_PATH, join_backtesting_timeout=constants.BACKTESTING_DEFAULT_JOIN_TIMEOUT, - run_on_common_part_only=True) -> backtesting.IndependentBacktesting: + run_on_common_part_only=True, + start_timestamp=None, + end_timestamp=None) -> backtesting.IndependentBacktesting: return backtesting.IndependentBacktesting(config, tentacles_setup_config, data_files, data_file_path, run_on_common_part_only=run_on_common_part_only, - join_backtesting_timeout=join_backtesting_timeout) + join_backtesting_timeout=join_backtesting_timeout, + start_timestamp=start_timestamp, + end_timestamp=end_timestamp) async def initialize_and_run_independent_backtesting(independent_backtesting, log_errors=True) -> None: diff --git a/octobot/backtesting/independent_backtesting.py b/octobot/backtesting/independent_backtesting.py index c53648126..f779070f9 100644 --- a/octobot/backtesting/independent_backtesting.py +++ b/octobot/backtesting/independent_backtesting.py @@ -42,7 +42,9 @@ def __init__(self, config, backtesting_files, data_file_path=backtesting_constants.BACKTESTING_FILE_PATH, run_on_common_part_only=True, - join_backtesting_timeout=backtesting_constants.BACKTESTING_DEFAULT_JOIN_TIMEOUT): + join_backtesting_timeout=backtesting_constants.BACKTESTING_DEFAULT_JOIN_TIMEOUT, + start_timestamp=None, + end_timestamp=None): self.octobot_origin_config = config self.tentacles_setup_config = tentacles_setup_config self.backtesting_config = {} @@ -62,7 +64,9 @@ def __init__(self, config, self.tentacles_setup_config, self.symbols_to_create_exchange_classes, self.backtesting_files, - run_on_common_part_only) + run_on_common_part_only, + start_timestamp=start_timestamp, + end_timestamp=end_timestamp) async def initialize_and_run(self, log_errors=True): try: diff --git a/octobot/backtesting/octobot_backtesting.pxd b/octobot/backtesting/octobot_backtesting.pxd index d481a4b36..84683bfbd 100644 --- a/octobot/backtesting/octobot_backtesting.pxd +++ b/octobot/backtesting/octobot_backtesting.pxd @@ -32,6 +32,8 @@ cdef class OctoBotBacktesting: cdef public list backtesting_files cdef public object backtesting cdef public bint run_on_common_part_only + cdef public object start_timestamp + cdef public object end_timestamp cpdef void memory_leak_checkup(self, list to_check_elements) cpdef void check_remaining_objects(self) diff --git a/octobot/backtesting/octobot_backtesting.py b/octobot/backtesting/octobot_backtesting.py index 600f19e12..56949fac8 100644 --- a/octobot/backtesting/octobot_backtesting.py +++ b/octobot/backtesting/octobot_backtesting.py @@ -40,7 +40,9 @@ def __init__(self, backtesting_config, tentacles_setup_config, symbols_to_create_exchange_classes, backtesting_files, - run_on_common_part_only): + run_on_common_part_only, + start_timestamp=None, + end_timestamp=None): self.logger = logging.get_logger(self.__class__.__name__) self.backtesting_config = backtesting_config self.tentacles_setup_config = tentacles_setup_config @@ -53,6 +55,8 @@ def __init__(self, backtesting_config, self.backtesting_files = backtesting_files self.backtesting = None self.run_on_common_part_only = run_on_common_part_only + self.start_timestamp = start_timestamp + self.end_timestamp = end_timestamp async def initialize_and_run(self): self.logger.info(f"Starting on {self.backtesting_files} with {self.symbols_to_create_exchange_classes}") @@ -74,9 +78,9 @@ async def stop_importers(self): async def stop(self, memory_check=False, should_raise=False): self.logger.info(f"Stopping for {self.backtesting_files} with {self.symbols_to_create_exchange_classes}") + exchange_managers = [] try: await backtesting_api.stop_backtesting(self.backtesting) - exchange_managers = [] try: for exchange_manager in trading_api.get_exchange_managers_from_exchange_ids(self.exchange_manager_ids): exchange_managers.append(exchange_manager) @@ -201,7 +205,9 @@ async def _init_exchanges(self): await backtesting_api.adapt_backtesting_channels(self.backtesting, self.backtesting_config, importers.ExchangeDataImporter, - run_on_common_part_only=self.run_on_common_part_only) + run_on_common_part_only=self.run_on_common_part_only, + start_timestamp=self.start_timestamp, + end_timestamp=self.end_timestamp) for exchange_class_string in self.symbols_to_create_exchange_classes.keys(): exchange_builder = trading_api.create_exchange_builder(self.backtesting_config, exchange_class_string) \ diff --git a/octobot/constants.py b/octobot/constants.py index d516326f2..e504ede84 100644 --- a/octobot/constants.py +++ b/octobot/constants.py @@ -15,13 +15,14 @@ # License along with this library. import os import pathlib +import octobot_commons.os_util as os_util PROJECT_NAME = "OctoBot" AUTHOR = "DrakkarSoftware" -SHORT_VERSION = "0.4.0" # major.minor.revision +SHORT_VERSION = "0.4.1" # major.minor.revision PATCH_VERSION = "" # patch : pX -VERSION_DEV_PHASE = "b" # alpha : a / beta : b / release candidate : rc -VERSION_PHASE = "17" # XX +VERSION_DEV_PHASE = "" # alpha : a / beta : b / release candidate : rc +VERSION_PHASE = "" # XX VERSION = f"{SHORT_VERSION}{VERSION_DEV_PHASE}{VERSION_PHASE}" LONG_VERSION = f"{SHORT_VERSION}{PATCH_VERSION}{VERSION_DEV_PHASE}{VERSION_PHASE}" @@ -72,7 +73,7 @@ # errors ERRORS_URL = os.getenv("ERRORS_OCTOBOT_ONLINE_URL", "https://errors.octobot.online/") ERRORS_POST_ENDPOINT = f"{ERRORS_URL}errors" -UPLOAD_ERRORS = bool(not os.getenv("UPLOAD_ERRORS", "True").lower() == "false") +UPLOAD_ERRORS = os_util.parse_boolean_environment_var("UPLOAD_ERRORS", "True") DEFAULT_METRICS_ID = "UNSET" # config types keys @@ -86,6 +87,8 @@ CONFIG_DEBUG_OPTION = "DEV-MODE" FORCE_ASYNCIO_DEBUG_OPTION = False +IS_DEMO = os_util.parse_boolean_environment_var("IS_DEMO", "False") + # Files # Store the path of the octobot directory from this file since it can change depending on the installation path # (local sources, python site-packages, ...) diff --git a/requirements.txt b/requirements.txt index ba521d2b9..c9a713571 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,12 +2,12 @@ cython==0.29.24 # Drakkar-Software requirements -OctoBot-Commons==1.6.13 -OctoBot-Trading==1.13.22 -OctoBot-Evaluators==1.6.20 -OctoBot-Tentacles-Manager==2.5.3 -OctoBot-Services==1.2.25 -OctoBot-Backtesting==1.6.23 +OctoBot-Commons==1.6.14 +OctoBot-Trading==1.14.0 +OctoBot-Evaluators==1.6.21 +OctoBot-Tentacles-Manager==2.6.2 +OctoBot-Services==1.2.26 +OctoBot-Backtesting==1.6.26 Async-Channel==2.0.12 trading-backend==1.0.11 diff --git a/user.zip b/user.zip new file mode 100644 index 000000000..5d739656f Binary files /dev/null and b/user.zip differ