trading-quant/main.py
2023-06-09 14:05:43 +08:00

27 lines
643 B
Python

import schedule
import bn
import settings
import time
import strategy.crossover as crossover
# 获取交易所交易对
symbols = bn.symbols()
for s in symbols:
# 5m
schedule.every(5).minutes.do(crossover.strategy_run, symbol=s, interval='5m')
# 30m
schedule.every(30).minutes.do(crossover.strategy_run, symbol=s, interval='30m')
# 1h
schedule.every(1).hours.do(crossover.strategy_run, symbol=s, interval='1h')
# 4h
schedule.every(4).hours.do(crossover.strategy_run, symbol=s, interval='4h')
print(f'监控开始... ChatID: {settings.chat_id}')
while True:
schedule.run_pending()
time.sleep(1)