Administrator
5 天以前 0b8d40a005ec3bdee63f80eca3490e3dea6ec4e7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""
代码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)