def __init__(self, ticker: str, log: bool = True, no_console: bool = True): super().__init__(ticker) self.ticker = ticker if not (accountID and access_token): raise Exception("oandakey should hasn't been settled!") self.oanda = OandaAPI(accountID, access_token) if log: LoggerFactory('oandapyV20', info_log=False) if no_console: logging.getLogger('oandapyV20').propagate = False
def __init__(self, accountID, access_token, database, collection, host=None, port=None, print_log=True): super().__init__(database, collection, host, port) self.api = OandaAPI(accountID, access_token) self.print_log = print_log
def __init__(self): super().__init__() self.oanda = OandaAPI(accountID, access_token)