Skip to content

Commit

Permalink
add get_symbol_candles into real time evaluator
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume De Saint Martin committed Apr 6, 2020
1 parent 7261d66 commit 57d841f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions octobot_evaluators/evaluator/realtime_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ def __init__(self):
def load_config(self):
self.set_default_config()
self.specific_config = {**self.specific_config, **get_tentacle_config(self.__class__)}

def get_symbol_candles(self, exchange_name: str, exchange_id: str, symbol: str, time_frame):
try:
from octobot_trading.api.symbol_data import get_symbol_candles_manager
return get_symbol_candles_manager(self.get_exchange_symbol_data(exchange_name, exchange_id, symbol),
time_frame)
except ImportError:
self.logger.error(f"Can't get candles manager: requires OctoBot-Trading package installed")

0 comments on commit 57d841f

Please sign in to comment.