def __init__(self, api, buy_min_percent, buy_max_percent, buy_desired_1h_change, total_slots, data_ticks_to_save): self.api = api self.buy_min_percent = buy_min_percent self.buy_max_percent = buy_max_percent self.buy_desired_1h_change = buy_desired_1h_change self.total_slots = total_slots self.data_ticks_to_save = data_ticks_to_save self.bittrex_coins = utils.get_updated_bittrex_coins() self.coinmarketcap_coins = utils.get_updated_coinmarketcap_coins() self.historical_coin_data = {} self.refresh_held_pending_history() self.held_coins = utils.file_to_json("held_coins.json") self.pending_orders = utils.file_to_json("pending_orders.json") self.history_coins = utils.file_to_json( "coin_highest_price_history.json")
def update_coinmarketcap_coins(self): self.coinmarketcap_coins = utils.get_updated_coinmarketcap_coins()
def update_coinmarketcap_coins(self): return utils.get_ranks(utils.get_updated_coinmarketcap_coins())