Skip to content

Commit

Permalink
Merge pull request #1863 from Drakkar-Software/dev
Browse files Browse the repository at this point in the history
master merge
  • Loading branch information
GuillaumeDSM authored Oct 15, 2021
2 parents 0e17fc6 + 325d87c commit 2df2fbc
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 20 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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/).

Expand All @@ -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
<a href="https://www.octobot.online/guides/#telegram"><img src="../assets/telegram-interface.png" height="414" alt="Telegram interface"></a>
[![Twitter Interface](../assets/twitter-interface.png)](https://docs.octobot.online/interfaces/twitter-interface)
Expand All @@ -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.
Expand Down
8 changes: 6 additions & 2 deletions octobot/api/backtesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions octobot/backtesting/independent_backtesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand All @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions octobot/backtesting/octobot_backtesting.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 9 additions & 3 deletions octobot/backtesting/octobot_backtesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}")
Expand All @@ -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)
Expand Down Expand Up @@ -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) \
Expand Down
11 changes: 7 additions & 4 deletions octobot/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down Expand Up @@ -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
Expand All @@ -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, ...)
Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file added user.zip
Binary file not shown.

0 comments on commit 2df2fbc

Please sign in to comment.