""" 代码L1数据管理 """ class L1DataManager: # 现价 __current_price_dict = {} # 开盘价 __open_price_dict = {} @classmethod def set_l1_current_price(cls, code, price): cls.__current_price_dict[code] = price @classmethod def set_open_price(cls, code, price): """ 设置开盘价 @param code: @param price: @return: """ cls.__open_price_dict[code] = price # 获取L1现价 @classmethod def get_l1_current_price(cls, code): return cls.__current_price_dict.get(code) @classmethod def get_open_price(cls, code): return cls.__open_price_dict.get(code)