def generate_coins(specific_hour): coins = [] #OMG coin = Coin() coin.name = 'omg' coin.treshold = 0.65 one_day_before = specific_hour + timedelta(days=-1) coin.loadtime = one_day_before.strftime("%Y-%m-%d") coin.hashtags = ['omg', 'omisego'] coins.append(coin) #NEO coin = Coin() coin.name = 'neo' coin.treshold = 0.51 one_day_before = specific_hour + timedelta(days=-1) coin.loadtime = one_day_before.strftime("%Y-%m-%d") coin.hashtags = ['neo'] #coins.append(coin) #XVG coin = Coin() coin.name = 'xvg' coin.treshold = 0.55 one_day_before = specific_hour + timedelta(days=-1) coin.loadtime = one_day_before.strftime("%Y-%m-%d") coin.hashtags = ['xvg', 'verge'] #coins.append(coin) return coins
def test_tweetio_read_db2(self): coin = Coin() coin.name = 'omg' yesterday = date.today() + timedelta(days=-1) coin.loadtime = yesterday.strftime("%Y-%m-%d") coin.hashtags = ['omg', 'omisego'] tio = TweetIO() df = tio.read_db_tweet_last_n_hour_by_coin(coin) print(df)
def test_date_time_binance3(self): bapi = BinanceApi() coin = Coin() coin.name = 'OMG' one_day_before = datetime.now() + timedelta(days=-1) coin.loadtime = one_day_before.strftime("%Y-%m-%d") spech = datetime.now() + timedelta(hours=-1) print("spec_closed_hour: ") pricehourly = bapi.collect_coindata(coin, spech) print(pricehourly)
def generate_coins(specific_hour): coins = [] #OMG coin = Coin() coin.name = 'omg' coin.treshold = 0.81 one_day_before = specific_hour + timedelta(days=-1) coin.loadtime = one_day_before.strftime("%Y-%m-%d") coin.hashtags = ['omg', 'omisego'] coin.target = 1.7 coin.stoploss = coin.target / (-0.5) coin.timelimit = 3 coin.modelfile='omg/found_omg_bsig34.0_prec0.7083333333333334_tre64_aimr1.7_decr-0' \ '.5_offs3_actmet_tanh_keras_model.h5' coin.scalerfile = 'omg/found_omg_bsig34.0_prec0.7083333333333334_tre64_aimr1.7_decr-0.5_offs3_actmet_tanh_scaler.pkl' coins.append(coin) #NEO coin = Coin() coin.name = 'neo' coin.treshold = 0.72 one_day_before = specific_hour + timedelta(days=-1) coin.loadtime = one_day_before.strftime("%Y-%m-%d") coin.hashtags = ['neo'] coin.target = 1.7 coin.stoploss = coin.target / (-0.667) coin.timelimit = 3 coin.modelfile = 'neo/found_neo_bsig18.0_prec0.782608695652174_tre72_aimr1.7_decr-0.667_offs4_actmet_relu_keras_model.h5' coin.scalerfile = 'neo/found_neo_bsig18.0_prec0.782608695652174_tre72_aimr1.7_decr-0.667_offs4_actmet_relu_scaler.pkl' coins.append(coin) #XVG coin = Coin() coin.name = 'xvg' coin.treshold = 0.99 one_day_before = specific_hour + timedelta(days=-1) coin.loadtime = one_day_before.strftime("%Y-%m-%d") coin.hashtags = ['xvg', 'verge'] #coins.append(coin) #LSK coin = Coin() coin.name = 'lsk' coin.treshold = 0.61 one_day_before = specific_hour + timedelta(days=-1) coin.loadtime = one_day_before.strftime("%Y-%m-%d") coin.hashtags = ['lsk', 'lisk'] #coins.append(coin) #ADA coin = Coin() coin.name = 'ada' coin.treshold = 0.56 one_day_before = specific_hour + timedelta(days=-1) coin.loadtime = one_day_before.strftime("%Y-%m-%d") coin.hashtags = ['ada', 'cardano'] #coins.append(coin) #GNT coin = Coin() coin.name = 'gnt' coin.treshold = 0.55 #buysig 3, at prec 1.0! one_day_before = specific_hour + timedelta(days=-1) coin.loadtime = one_day_before.strftime("%Y-%m-%d") coin.hashtags = ['gnt', 'golem'] #coins.append(coin) return coins