27 lines
636 B
Python
27 lines
636 B
Python
import schedule
|
|
import bn
|
|
import settings
|
|
import time
|
|
import strategy.ma_arrangement as maa
|
|
import strategy.large_trans as lt
|
|
|
|
# 获取交易所交易对
|
|
symbols = bn.symbols()
|
|
|
|
for s in symbols:
|
|
#15m
|
|
schedule.every(15).minutes.do(maa.strategy_run, symbol=s, interval='15m')
|
|
|
|
#1h
|
|
schedule.every(1).hours.do(maa.strategy_run, symbol=s, interval='1h')
|
|
|
|
#4h
|
|
schedule.every(4).hours.do(maa.strategy_run, symbol=s, interval='4h')
|
|
|
|
# 监控
|
|
schedule.every(settings.whaleAlert_minutes).minutes.do(lt.strategy_run)
|
|
|
|
print(f'Running... ChatID: {settings.chat_id}')
|
|
while True:
|
|
schedule.run_pending()
|
|
time.sleep(1) |