Get into oanda submenu (#1611)

Comment-out not needed checks for `to` and `from` currency.
Add `oanda` forex source in dictionary.
Fix #1608
This commit is contained in:
Szymon Błaszczyński
2022-04-02 15:31:36 +02:00
committed by GitHub
parent d52032836e
commit 0f7154b584
4 changed files with 10 additions and 9 deletions

View File

@@ -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, _):

View File

@@ -19,6 +19,7 @@ from openbb_terminal.config_terminal import theme
FOREX_SOURCES: Dict = {
"yf": "YahooFinance",
"av": "AlphaAdvantage",
"oanda": "Oanda",
}
SOURCES_INTERVALS: Dict = {

View File

@@ -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:

View File

@@ -1260,7 +1260,7 @@ class KeysController(BaseController):
help="token",
)
parser.add_argument(
"-t",
"-at",
"--account_type",
type=str,
dest="account_type",