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
34
35
36
| """
| 华鑫L1数据管理器
| """
| __current_buy1_data_dict = {}
|
|
| def set_buy1_data(code, buy1_price, buy1_volume):
| """
| 设置买1的数据
| @param code:
| @param buy1_price:
| @param buy1_volume:
| @return:
| """
| __current_buy1_data_dict[code] = (buy1_price, buy1_volume)
|
|
| def get_buy1_info(code):
| """
| 获取买1信息
| @param code:
| @return:
| """
| return __current_buy1_data_dict.get(code)
|
|
| def get_buy1_money(code):
| """
| 获取买1金额
| @param code:
| @return:
| """
| info = get_buy1_info(code)
| if not info:
| return None
| return info[0] * info[1]
|
|