Skip to content

Commit

Permalink
Merge pull request #236 [Beta Version Release] 0.1.2-beta release
Browse files Browse the repository at this point in the history
[Beta Version Release] 0.1.2-beta release
  • Loading branch information
Herklos authored Jun 15, 2018
2 parents ff50d50 + b844060 commit 3daab15
Show file tree
Hide file tree
Showing 87 changed files with 2,209 additions and 1,059 deletions.
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,6 @@ ENV/
# config
config/config.json

# evaluators
/.gitmodules
evaluator/.gitignore
**/Default/*.*
**/Advanced/*.*

# Specific config
config/evaluator_config.json

Expand All @@ -121,3 +115,7 @@ backtesting/collector/data/**
logs/matrix_history\.data

logs/OctoBot\.log\.*

# Tentacles
tentacles
config\.json
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ install:
- sudo ./docs/install/linux_installer.sh
- pip3 install -r requirements.txt
- pip3 install -r dev_requirements.txt
- cp ./config/default_config.json ./config/config.json
- cp ./config/default_config.json ./config.json
- python3 start.py -p install all
script:
- pytest --cov=. --cov-config=.coveragerc tests/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OctoBot [0.1.0-beta](https://github.com/Drakkar-Software/OctoBot/tree/dev/docs/CHANGELOG.md)
# OctoBot [0.1.2-beta](https://github.com/Drakkar-Software/OctoBot/tree/dev/docs/CHANGELOG.md)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c83a127c42ba4a389ca86a92fba7c53c)](https://www.codacy.com/app/paul.bouquet/OctoBot?utm_source=github.com&utm_medium=referral&utm_content=Drakkar-Software/OctoBot&utm_campaign=Badge_Grade) [![Build Status](https://api.travis-ci.org/Drakkar-Software/OctoBot.svg?branch=dev)](https://travis-ci.org/Drakkar-Software/OctoBot) [![Code Factor](https://www.codefactor.io/repository/github/Drakkar-Software/OctoBot/badge)](https://www.codefactor.io/repository/github/Drakkar-Software/OctoBot/overview/dev) [![Build Status](https://semaphoreci.com/api/v1/herklos/octobot/branches/dev/shields_badge.svg)](https://semaphoreci.com/herklos/octobot) [![Coverage Status](https://coveralls.io/repos/github/Drakkar-Software/OctoBot/badge.svg?branch=dev)](https://coveralls.io/github/Drakkar-Software/OctoBot?branch=dev) [![Codefresh build status]( https://g.codefresh.io/api/badges/build?repoOwner=Drakkar-Software&repoName=OctoBot&branch=dev&pipelineName=OctoBot&accountName=herklos_marketplace&type=cf-1)]( https://g.codefresh.io/repositories/Drakkar-Software/OctoBot/builds?filter=trigger:build;branch:dev;service:5b06a377435197b088b1757a~OctoBot)
<p align="center">
<img src="../assets/octopus.svg" alt="Octobot Logo" height="400" width="400">
Expand Down
4 changes: 2 additions & 2 deletions backtesting/collector/exchange_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def _prepare(self):
self.file_contents[symbol][time_frame.value] = self.exchange.get_symbol_prices(symbol,
time_frame,
limit=None,
data_frame=False)
return_list=False)
self.time_frame_update[symbol][time_frame] = time.time()
self._update_file(symbol)

Expand All @@ -98,7 +98,7 @@ def run(self):
result_df = self.exchange.get_symbol_prices(symbol,
time_frame,
limit=1,
data_frame=False)[0]
return_list=False)[0]

self.file_contents[symbol][time_frame.value].append(result_df)
self._data_updated = True
Expand Down
65 changes: 50 additions & 15 deletions config/cst.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from enum import Enum

SHORT_VERSION = "0.1.0"
REV_VERSION = "2"
SHORT_VERSION = "0.1.2"
REV_VERSION = "0"
VERSION_DEV_PHASE = "beta"
VERSION = "{0}-{1}".format(SHORT_VERSION, VERSION_DEV_PHASE)
LONG_VERSION = "{0}_{1}-{2}".format(SHORT_VERSION, REV_VERSION, VERSION_DEV_PHASE)
Expand All @@ -18,10 +18,6 @@
CONFIG_ENABLED_OPTION = "enabled"
CONFIG_SYMBOL = "symbol"

# Files
CONFIG_FILE = "config/config.json"
CONFIG_EVALUATOR_FILE = "config/evaluator_config.json"

# Advanced
CONFIG_ADVANCED_CLASSES = "advanced_classes"
CONFIG_ADVANCED_INSTANCES = "advanced_instances"
Expand All @@ -42,13 +38,16 @@
CONFIG_EXCHANGE_KEY = "api-key"
CONFIG_EXCHANGE_SECRET = "api-secret"
CONFIG_TRADER = "trader"
CONFIG_TRADING = "trading"
CONFIG_TRADER_MODES = "modes"
CONFIG_SIMULATOR = "trader_simulator"
CONFIG_STARTING_PORTFOLIO = "starting_portfolio"
CONFIG_TRADER_RISK = "risk"
CONFIG_TRADER_MODE = "mode"
CONFIG_TRADER_RISK_MIN = 0.05
CONFIG_TRADER_RISK_MAX = 1
ORDER_REFRESHER_TIME = 15
ORDER_REFRESHER_TIME_WS = 1
SIMULATOR_LAST_PRICES_TO_CHECK = 15
ORDER_CREATION_LAST_TRADES_TO_USE = 10
CONFIG_TRADER_REFERENCE_MARKET = "reference_market"
Expand All @@ -64,6 +63,9 @@
# Notification
CONFIG_NOTIFICATION_INSTANCE = "notifier"
CONFIG_CATEGORY_NOTIFICATION = "notification"
CONFIG_NOTIFICATION_GLOBAL_INFO = "global_info"
CONFIG_NOTIFICATION_PRICE_ALERTS = "price_alerts"
CONFIG_NOTIFICATION_TRADES = "trades"
NOTIFICATION_STARTING_MESSAGE = "OctoBot v{0} starting...".format(LONG_VERSION)
NOTIFICATION_STOPPING_MESSAGE = "OctoBot v{0} stopping...".format(LONG_VERSION)
REAL_TRADER_STR = "[Real Trader] "
Expand Down Expand Up @@ -106,7 +108,10 @@

# Evaluator
CONFIG_EVALUATOR = "evaluator"
SPECIFIC_CONFIG_PATH = "config/specific_evaluator_config/"
CONFIG_EVALUATOR_SOCIAL = "Social"
CONFIG_EVALUATOR_REALTIME = "RealTime"
CONFIG_EVALUATOR_TA = "TA"
CONFIG_EVALUATOR_STRATEGIES = "Strategies"
START_PENDING_EVAL_NOTE = "0" # force exception
INIT_EVAL_NOTE = 0
START_EVAL_PERTINENCE = 1
Expand All @@ -118,6 +123,7 @@
CONFIG_FILE_EXT = ".json"
CONFIG_CRYPTO_CURRENCIES = "crypto_currencies"
CONFIG_CRYPTO_PAIRS = "pairs"
CONFIG_EVALUATORS_WILDCARD = "*"

# Socials
SOCIAL_EVALUATOR_NOT_THREADED_UPDATE_RATE = 1
Expand All @@ -138,24 +144,53 @@
GITHUB = "github"
GITHUB_RAW_CONTENT_URL = "https://raw.githubusercontent.com"
GITHUB_BASE_URL = "https://github.com"
PYTHON_INIT_FILE = "__init__.py"
TENTACLES_PATH = "tentacles"
TENTACLES_EVALUATOR_PATH = "Evaluator"
TENTACLES_TRADING_PATH = "Trading"
TENTACLES_EVALUATOR_REALTIME_PATH = "RealTime"
TENTACLES_EVALUATOR_TA_PATH = "TA"
TENTACLES_EVALUATOR_SOCIAL_PATH = "Social"
TENTACLES_EVALUATOR_STRATEGIES_PATH = "Strategies"
TENTACLES_EVALUATOR_UTIL_PATH = "Util"
TENTACLES_TRADING_MODE_PATH = "Mode"
TENTACLES_PYTHON_INIT_CONTENT = "from .Default import *\nfrom .Advanced import *\n"
TENTACLES_PUBLIC_REPOSITORY = "Drakkar-Software/OctoBot-Tentacles"
TENTACLES_PUBLIC_LIST = "tentacles_list.json"
TENTACLES_DEFAULT_BRANCH = "master"
EVALUATOR_DEFAULT_FOLDER = "Default"
EVALUATOR_ADVANCED_FOLDER = "Advanced"
TENTACLES_INSTALL_FOLDERS = [EVALUATOR_DEFAULT_FOLDER, EVALUATOR_ADVANCED_FOLDER]
EVALUATOR_CONFIG_FOLDER = "config"
CONFIG_TENTACLES_KEY = "tentacles"
TENTACLE_DESCRIPTION = "tentacle_description"
TENTACLE_DESCRIPTION_LOCALISATION = "localisation"
TENTACLE_DESCRIPTION_IS_URL = "is_url"
TENTACLE_MODULE_DESCRIPTION = "$tentacle_description"
TENTACLE_MODULE_REQUIREMENTS = "requirements"
TENTACLE_MODULE_REQUIREMENT_WITH_VERSION = "requirement_with_version"
TENTACLE_MODULE_REQUIREMENTS_SEPARATOR = ","
TENTACLE_MODULE_REQUIREMENT_VERSION_SEPARATOR = "=="
TENTACLE_MODULE_NAME = "name"
TENTACLE_MODULE_TYPE = "type"
TENTACLE_MODULE_SUBTYPE = "subtype"
TENTACLE_MODULE_VERSION = "version"
TENTACLE_MODULE_CONFIG_FILES = "config_files"

TENTACLE_TYPES = {"Evaluator": TENTACLES_EVALUATOR_PATH,
"Social": TENTACLES_EVALUATOR_SOCIAL_PATH,
"RealTime": TENTACLES_EVALUATOR_REALTIME_PATH,
"Util": TENTACLES_EVALUATOR_UTIL_PATH,
"TA": TENTACLES_EVALUATOR_TA_PATH,
"Strategies": TENTACLES_EVALUATOR_STRATEGIES_PATH,
"Trading": TENTACLES_TRADING_PATH,
"Mode": TENTACLES_TRADING_MODE_PATH}

TENTACLE_TYPES = {"Evaluator": "evaluator",
"Social": "Social",
"RealTime": "RealTime",
"Util": "Util",
"TA": "TA",
"Strategies": "Strategies",
"Trading": "trading",
"Mode": "trader/modes"}
# Files
CONFIG_FILE = "config.json"
CONFIG_EVALUATOR_FILE = "evaluator_config.json"
CONFIG_EVALUATOR_FILE_PATH = "{}/{}/{}".format(TENTACLES_PATH, TENTACLES_EVALUATOR_PATH, CONFIG_EVALUATOR_FILE)
CONFIG_DEFAULT_EVALUATOR_FILE = "config/default_evaluator_config.json"


class EvaluatorMatrixTypes(Enum):
Expand Down
5 changes: 3 additions & 2 deletions config/default_config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"time_frame": ["30m", "1h", "2h", "4h", "1d"],
"crypto_currencies":{
"Bitcoin": {
"pairs" : ["BTC/USDT"]
Expand All @@ -9,7 +8,9 @@
},
"services": {},
"notification":{
"enabled": false,
"global_info": true,
"price_alerts": true,
"trades": true,
"type": []
},
"trader":{
Expand Down
1 change: 0 additions & 1 deletion config/default_evaluator_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"DoubleMovingAverageTrendEvaluator": true,
"BBMomentumEvaluator": true,
"MACDMomentumEvaluator": true,
"CandlePatternMomentumEvaluator": false,
"ADXMomentumEvaluator": true,


Expand Down
4 changes: 2 additions & 2 deletions config/logging_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ args=('logs/OctoBot.log', 'a', 8000000, 20)

[formatter_consoleFormatter]
class=colorlog.ColoredFormatter
format=%(log_color)s %(asctime)s %(levelname)-8s %(name)s %(message)s
format=%(log_color)s %(asctime)s %(levelname)-8s %(name)-20s %(message)s

[formatter_fileFormatter]
format=%(asctime)-16s %(levelname)-6s %(name)s %(filename)-s:%(lineno)-8s %(message)s
format=%(asctime)-16s %(levelname)-6s %(name)-20s %(filename)-s:%(lineno)-8s %(message)s
datefmt=%Y-%m-%d %H:%M:%S

This file was deleted.

14 changes: 0 additions & 14 deletions config/specific_evaluator_config/RedditForumEvaluator.json

This file was deleted.

14 changes: 0 additions & 14 deletions config/specific_evaluator_config/TwitterNewsEvaluator.json

This file was deleted.

39 changes: 39 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
Changelog for 0.1.2-beta
====================
*Released date : June 16 2018*

**Info** :
- New pip package to install "tulipy"
- config.json is now in Octobot's root folder

# Concerned issues :
#214 [Time frames] Setup timeframes at OctoBot setup according to relevant strategies timeframe requirements
#220 [Tentacle Manager] Implement updating command
#224 [TA calulation] Study tulipindicators lib
#225 [Telegram] add get strategies and modes command
#226 [Data] Store symbol candles in dedicated class
#229 [Tentacle Manager] add cleanup and help
#230 [Architecture] Extract Tentacles and config from code folder
#231 [Architecture] evaluator_config.json updated by Tentacle Manager

# New features :
- Tentacle Management : update, versions management
- Migrate from TA-lib indicators to tulipy
- Telegram Interface new command
- Architecture improvements

Changelog for 0.1.1-beta
====================
*Released date : June 8 2018*

# Concerned issues :
#197 Add evaluator specific config in tentacle installation
#211 [Order Management] set refresh period in OctoBot startup
#212 [Tentacles management] add dependancies management
#213 [Tentacles management] add tentacle removal system
#215 [Trading mode] Add config management
#217 [Trading Mode] Implement multiple mini creator (with part of pf)

# New features :
- Tentacle Management : uninstall, requirements, configuration files

Changelog for 0.1.0_2-beta
====================
*Released date : June 3 2018*
Expand Down
7 changes: 0 additions & 7 deletions docs/install/install-ta-lib.sh

This file was deleted.

14 changes: 13 additions & 1 deletion docs/install/linux_installer.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#!/usr/bin/env bash
echo **Installing dependencies...**
apt install -y wget python3 python3-dev python3-pip python3-tk -y
bash ./docs/install/linux_dependencies.sh
bash ./docs/install/install-ta-lib.sh

echo **Installing requirements...**
python3 -m pip install -r requirements.txt

echo **Set default configuration...**
cd %config_path%
cp default_config.json ../config.json

REM BOT MODULES INSTALL
echo **Installing modules...**
cd ..
python3 start.py -p install all
8 changes: 1 addition & 7 deletions docs/install/windows/windows_installer.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#!/usr/bin/env bash
@echo off
REM VARS
set bot_location="../../../"
set config_path=config
set python_cmd=python

REM dependencies url
set TA_LIB_WIN32=https://github.com/Drakkar-Software/OctoBot/releases/download/0.0.12-alpha/TA_Lib-0.4.17-cp36-cp36m-win32.whl
set TA_LIB_WIN64=https://github.com/Drakkar-Software/OctoBot/releases/download/0.0.12-alpha/TA_Lib-0.4.17-cp36-cp36m-win_amd64.whl
set TWISTED_WIN32=https://github.com/Drakkar-Software/OctoBot/releases/download/0.0.12-alpha/Twisted-18.4.0-cp36-cp36m-win32.whl
set TWISTED_WIN64=https://github.com/Drakkar-Software/OctoBot/releases/download/0.0.12-alpha/Twisted-18.4.0-cp36-cp36m-win_amd64.whl

Expand All @@ -18,11 +15,9 @@ if errorlevel 1 goto errorNoPython
REM REQUIREMENTS
echo **Installing dependencies...**
REM ARCH AMD64
%python_cmd% -m pip install %TA_LIB_WIN64%
%python_cmd% -m pip install %TWISTED_WIN64%

REM ARCH WIN32
%python_cmd% -m pip install %TA_LIB_WIN32%
%python_cmd% -m pip install %TWISTED_WIN32%

REM BOT INSTALL
Expand All @@ -35,8 +30,7 @@ echo **Installing requirements...**
REM CONFIGURATION
echo **Set default configuration...**
cd %config_path%
copy default_config.json config.json
copy default_evaluator_config.json evaluator_config.json
copy default_config.json ../config.json

REM BOT MODULES INSTALL
echo **Installing modules...**
Expand Down
1 change: 1 addition & 0 deletions evaluator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.json
Empty file removed evaluator/RealTime/Advanced/.keep
Empty file.
Empty file removed evaluator/RealTime/Default/.keep
Empty file.
3 changes: 1 addition & 2 deletions evaluator/RealTime/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
from .realtime_evaluator import *
from .Default import *
from .Advanced import *
from tentacles.Evaluator.RealTime import *
Loading

0 comments on commit 3daab15

Please sign in to comment.