From 0f7154b584d3c1ca59ce78d25a2f03e00a573df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20B=C5=82aszczy=C5=84ski?= Date: Sat, 2 Apr 2022 15:31:36 +0200 Subject: [PATCH] Get into oanda submenu (#1611) Comment-out not needed checks for `to` and `from` currency. Add `oanda` forex source in dictionary. Fix #1608 --- openbb_terminal/forex/forex_controller.py | 14 +++++++------- openbb_terminal/forex/forex_helper.py | 1 + openbb_terminal/forex/oanda/oanda_controller.py | 2 +- openbb_terminal/keys_controller.py | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/openbb_terminal/forex/forex_controller.py b/openbb_terminal/forex/forex_controller.py index 64149e9cd89..d147cae499f 100644 --- a/openbb_terminal/forex/forex_controller.py +++ b/openbb_terminal/forex/forex_controller.py @@ -287,14 +287,14 @@ class ForexController(BaseController): """Enter Oanda menu.""" from openbb_terminal.forex.oanda.oanda_controller import OandaController - if self.to_symbol and self.from_symbol: + # if self.to_symbol and self.from_symbol: - self.queue = self.load_class( - OandaController, - queue=self.queue, - ) - else: - console.print("No currency pair data is loaded. Use 'load' to load data.\n") + self.queue = self.load_class( + OandaController, + queue=self.queue, + ) + # else: + # console.print("No currency pair data is loaded. Use 'load' to load data.\n") @log_start_end(log=logger) def call_ta(self, _): diff --git a/openbb_terminal/forex/forex_helper.py b/openbb_terminal/forex/forex_helper.py index 1a2295bc9ce..a2f133f4a4b 100644 --- a/openbb_terminal/forex/forex_helper.py +++ b/openbb_terminal/forex/forex_helper.py @@ -19,6 +19,7 @@ from openbb_terminal.config_terminal import theme FOREX_SOURCES: Dict = { "yf": "YahooFinance", "av": "AlphaAdvantage", + "oanda": "Oanda", } SOURCES_INTERVALS: Dict = { diff --git a/openbb_terminal/forex/oanda/oanda_controller.py b/openbb_terminal/forex/oanda/oanda_controller.py index d41ababc2e2..4ea48a58db4 100644 --- a/openbb_terminal/forex/oanda/oanda_controller.py +++ b/openbb_terminal/forex/oanda/oanda_controller.py @@ -56,7 +56,7 @@ class OandaController(BaseController): self.from_symbol = "" self.to_symbol = "" - self.source = "Oanda" + self.source = "oanda" self.instrument: Union[str, None] = None if session and obbff.USE_PROMPT_TOOLKIT: diff --git a/openbb_terminal/keys_controller.py b/openbb_terminal/keys_controller.py index ebc052646f0..4e820f13a4c 100644 --- a/openbb_terminal/keys_controller.py +++ b/openbb_terminal/keys_controller.py @@ -1260,7 +1260,7 @@ class KeysController(BaseController): help="token", ) parser.add_argument( - "-t", + "-at", "--account_type", type=str, dest="account_type",