Administrator
2023-06-06 751183dcd74207a50834cacc575f0dfccb41658c
juejin.py
@@ -95,7 +95,7 @@
    # 交易時間不能做初始化
    if not tool.is_init_time():
        raise Exception("交易时间不能初始化")
    init_data()
    codes = gpcode_manager.get_gp_list()
    logger_system.info("每日初始化")
@@ -118,7 +118,7 @@
        big_money_num_manager.expire(code)
    # 清除涨停时间
    global_util.limit_up_time.clear()
    init_data()
    # 初始化同花顺主站
    l2_clients = client_manager.getValidL2Clients()
    for client in l2_clients:
@@ -293,11 +293,13 @@
        t1.start()
    @classmethod
    def get_gp_latest_info(cls, codes):
    def get_gp_latest_info(cls, codes,fields=None):
        if not codes:
            return []
        account_id, s_id, token = getAccountInfo()
        symbols = gpcode_manager.get_gp_list_with_prefix(codes)
        gmapi.set_token(token)
        data = gmapi.get_instruments(symbols=",".join(symbols))
        data = gmapi.get_instruments(symbols=",".join(symbols),fields=fields)
        print(data)
        return data
@@ -352,6 +354,8 @@
    @classmethod
    def get_gp_current_info(cls, codes):
        if not codes:
            return []
        account_id, s_id, token = getAccountInfo()
        symbols = gpcode_manager.get_gp_list_with_prefix(codes)
        gmapi.set_token(token)
@@ -373,10 +377,7 @@
        account_id, s_id, token = getAccountInfo()
        gmapi.run(strategy_id=s_id,
                  filename='juejin.py',
                  # todo 回测模式
                  mode=gmapi.MODE_LIVE,
                  backtest_start_time='2022-08-18 09:25:00',
                  backtest_end_time='2022-08-18 10:30:00',
                  token=token)
    def stop(self):