admin
9 天以前 38b5789ae4feb253e91051b9a65d566585e6a86f
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# 是否为测试
import os
import platform
 
TEST = False
 
JUEJIN_LOCAL_API = False
 
 
def is_windows():
    system = platform.system()
    if system == 'Windows':
        return True
    return False
 
 
# redis设置
REDIS_CONFIG = {
    "host": "gz-crs-6l6xbc4j.sql.tencentcdb.com",
    "port": 29994,
    "db": 0,
    "pwd": "Yeshi2016@"
} if is_windows() else {
    "host": "172.16.32.15",
    "port": 6379,
    "db": 0,
    "pwd": "Yeshi2016@"
    # "host": "127.0.0.1",
    # "port": 6380,
    # "db": 0,
    # "pwd": "123456"
}
 
MYSQL_CONFIG = {
    "host": "gz-cdb-r13d0yi9.sql.tencentcdb.com",
    "port": 62929,
    "database": "gp_ls",
    "charset": "utf8",
    "user": "root",
    "passwd": "Yeshi2016@"
} if is_windows() else {
    "host": "172.16.16.17",
    "port": 3306,
    "database": "gp_ls",
    "charset": "utf8",
    "user": "root",
    "passwd": "Yeshi2016@"
}
 
MAX_L2_CHANNEL_COUNT = 10
 
LOG_DIR = "low_suction_log"
 
 
# 获取根路径
def get_path_prefix():
    return 'D:' if is_windows() else '/home/userzjj'
 
 
# 定义log日志的路径
LOG_PATH = f"{get_path_prefix()}/logs"
# 定义L2数据日志的路径
L2_LOG_PATH = f"{get_path_prefix()}/low_suction_log/huaxin/l2"
 
DATA_DIR_PATH = f"{get_path_prefix()}/local_storage_data"
 
if not os.path.exists(DATA_DIR_PATH):
    os.makedirs(DATA_DIR_PATH)
 
# 板块数据路径
ALL_STOCKS_PLATE_PATH = f"{DATA_DIR_PATH}/all_stocks_plate_dict.json"
 
# K线路径
K_BARS_PATH = f"{DATA_DIR_PATH}/all_stocks_all_K_line_property_dict.json"
# 指数K线路径
INDEX_K_BARS_PATH = f"{DATA_DIR_PATH}/all_index_k_line_property_dict.json"
# 每日涨停概念记录数据
KPL_LIMIT_UP_DATA_PATH = f"{DATA_DIR_PATH}/limit_up_block_date_data.jsonl"
# 日内所有股票开盘数据存储  [只是在初步编写时测试使用]
KPL_LIMIT_UP_BLOCK_NAMES_PATH = f"{DATA_DIR_PATH}/limit_up_block_names.json"
 
# 订阅L2代码数据
SUBSCRIPT_L2_CODES = set()
 
# 是否是仿真交易
IS_SIMULATED_TRADE = False