diff --git a/monitors/macd_boll.py b/monitors/macd_boll.py index 9c03e15..3094ab8 100644 --- a/monitors/macd_boll.py +++ b/monitors/macd_boll.py @@ -70,7 +70,7 @@ def stratergy_run(symbol, interval, df, debug): def run_crypto(interval, debug=False): print('Vegas策略运行.') time.sleep(5) - for s in redis_helper.get_symbols(): + for s in setting.symbols: df = crypto.get_klines(s, interval, True) stratergy_run(s,interval, df, debug) diff --git a/redis_helper.py b/redis_helper.py deleted file mode 100644 index b969a33..0000000 --- a/redis_helper.py +++ /dev/null @@ -1,10 +0,0 @@ -import redis -import json - -r = redis.Redis(host='45.76.104.85', port=6379, db=0 ,password="redis_ihkXTj") - -def get_symbols(): - data = json.loads(r.get('t_symbols')) - print(f'symbols: \r\n{data}') - - return data \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 604a95d..7de1a72 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,6 @@ numpy==1.26.4 pandas requests schedule -TA_Lib tweepy discord_webhook redis \ No newline at end of file diff --git a/test.py b/test.py index e02f098..9c211fc 100644 --- a/test.py +++ b/test.py @@ -11,12 +11,16 @@ import datasource from binance.um_futures import UMFutures import redis + + + + # r = redis.Redis(host='45.76.104.85', port=6379, db=0 ,password="redis_ihkXTj") # r.set('r_symbols', "test") # print(r.get('r_symbols')) -print(datasource.crypto.get_future_symbols()) +# print(datasource.crypto.get_future_symbols()) # macd_boll.run_crypto('15m', debug=True) @@ -27,11 +31,15 @@ print(datasource.crypto.get_future_symbols()) +key = 'QSZvYevTytwi8CJEkiUqqlZRQBOjIa23BoB8wFwTSY26GBAFkViTExex2mFNJ0ij' +secret = '1eGO4aeICAxPRXQzw2lQBc0QAkIKn6WiCV4cRLnUwnJulzixYFkoBeho5ZzsKTbn' -# client = UMFutures() +client = UMFutures(key=key, secret=secret) # print(client.exchange_info()) # data = client.funding_rate('BTCUSD_PERP', limit=1) +print(client.balance()) + # fundingRate = float(data[0]['fundingRate']) * 100 # text = f"币种: {data[0]['symbol']}\r\n资金费率: {fundingRate} %"