From 47aba3bc64686aca993ecd174b6121bb1630ed2c Mon Sep 17 00:00:00 2001 From: aaron <> Date: Fri, 26 Jul 2024 12:11:20 +0800 Subject: [PATCH] update --- main.py | 13 ++++--------- monitors/move.py | 5 +++-- test.py | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/main.py b/main.py index bc09e7b..4576cd1 100644 --- a/main.py +++ b/main.py @@ -7,20 +7,15 @@ import dingding import monitors.move as move #move +schedule.every(5).minutes.do(move.run_crypto, interval = '5m') + + schedule.every().hour.at(":00").do(move.run_crypto, interval = '15m') schedule.every().hour.at(":30").do(move.run_crypto, interval = '15m') schedule.every().hour.at(":15").do(move.run_crypto, interval = '15m') schedule.every().hour.at(":45").do(move.run_crypto, interval = '15m') -schedule.every().hour.at(":00").do(move.run_crypto, interval = '1h') - - #vegas -schedule.every().hour.at(":00").do(vegas.run_crypto, interval = '15m') -schedule.every().hour.at(":30").do(vegas.run_crypto, interval = '15m') -schedule.every().hour.at(":15").do(vegas.run_crypto, interval = '15m') -schedule.every().hour.at(":45").do(vegas.run_crypto, interval = '15m') - schedule.every().hour.at(":00").do(vegas.run_crypto, interval = '30m') schedule.every().hour.at(":30").do(vegas.run_crypto, interval = '30m') @@ -29,7 +24,7 @@ times = ["00:00", "04:00", "08:00", "12:00", "16:00", "20:00"] for t in times: schedule.every().day.at(t).do(vegas.run_crypto, interval = '4h') -version = 'V1.6' +version = 'V1.7' print(f'Running... {version}') while True: schedule.run_pending() diff --git a/monitors/move.py b/monitors/move.py index 9e9ff36..af15c4b 100644 --- a/monitors/move.py +++ b/monitors/move.py @@ -50,14 +50,15 @@ def stratergy_run(symbol, interval, df, debug): message += f"策略:【趋势追踪V1.0】\r\n" message += f"品种: {symbol}\r\n" message += f"周期: {interval}\r\n" - message += f"信号: 【{"多头排列" if isbullish else "空头排列"}】\r\n" + message += f"信号: 【{'多头排列' if isbullish else '空头排列'}】\r\n" dingding.send_message(message, isAtAll=True) telegram_sender.send_message(setting.chat_id, message) def run_crypto(interval, debug=False): - symbols = datasource.crypto.get_top_binance_usdt_pairs(100) + + symbols = ['BTCUSDT','ETHUSDT','BNBUSDT','SOLUSDT','DOGEUSDT','LINKUSDT','NEARUSDT','WIFUSDT','ARBUSDT','ARUSDT','JASMYUSDT','FTMUSDT','EGLDUSDT','ENSUSDT','GALAUSDT','ORDIUSDT','TRUUSDT','LPTUSDT','JUPUSDT','WIFUSDT','AVAXUSDT','GALUSDT','BONKUSDT','UNFIUSDT','CHZUSDT'] for s in symbols: df = crypto.get_klines(s, interval) stratergy_run(s,interval, df, debug) diff --git a/test.py b/test.py index b2a81fa..2175224 100644 --- a/test.py +++ b/test.py @@ -1,4 +1,4 @@ import requests from monitors import move -move.run_crypto('30m') \ No newline at end of file +move.run_crypto('5m') \ No newline at end of file