Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple fixes #196

Merged
merged 3 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions octobot_trading/exchanges/exchange_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# License along with this library.
from octobot_commons.logging.logging_util import get_logger

from octobot_trading.api.modes import init_trading_mode_config, create_trading_modes
from octobot_trading.api.modes import create_trading_modes
from octobot_trading.constants import CONFIG_EXCHANGES, CONFIG_EXCHANGE_SANDBOXED
from octobot_trading.exchanges.exchange_manager import ExchangeManager
from octobot_trading.exchanges.exchanges import Exchanges
Expand Down Expand Up @@ -82,7 +82,6 @@ async def _build_trader(self):

async def _build_modes(self):
try:
init_trading_mode_config(self.config)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Managed by tentacle manager ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By OctoBot, it's related to the advanced manager (when we figure out advanced classes). Maybe we should move it into the tentacle manager if we decide it's its role to manage advanced classes in the future

Copy link
Member

@Herklos Herklos May 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it should be better in Tentacle manager, I don't think Octobot have to do that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return await create_trading_modes(self.config,
self.exchange_manager,
self._tentacles_setup_config,
Expand Down
2 changes: 1 addition & 1 deletion octobot_trading/exchanges/exchange_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def _load_config_symbols_and_time_frames(self):
client = self.exchange.client
if client:
self.client_symbols = client.symbols
self.client_time_frames = list(client.timeframes.values()) if hasattr(client, "timeframes") else []
self.client_time_frames = list(client.timeframes) if hasattr(client, "timeframes") else []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We keep only keys now right ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, list(dict) returns a list of its keys

else:
self._logger.error("Failed to load client from REST exchange")
self._raise_exchange_load_error()
Expand Down
1 change: 1 addition & 0 deletions octobot_trading/producers/abstract_mode_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ async def start(self) -> None:
cryptocurrency=self.trading_mode.cryptocurrency if self.trading_mode.cryptocurrency else CONFIG_WILDCARD,
symbol=self.trading_mode.symbol if self.trading_mode.symbol else CONFIG_WILDCARD,
evaluator_type=EvaluatorMatrixTypes.STRATEGIES.value,
exchange_name=self.exchange_name,
time_frame=self.trading_mode.time_frame if self.trading_mode.time_frame else CONFIG_WILDCARD)
except (KeyError, ImportError):
self.logger.error(f"Can't connect matrix channel on {self.exchange_name}")
Expand Down