| | |
| | | |
| | | import constant |
| | | from db import redis_manager |
| | | from db.redis_manager import RedisUtils |
| | | from utils import tool |
| | | import l2.l2_data_util |
| | | from log_module.log import logger_l2_trade_buy_queue, logger_l2_trade_buy_progress |
| | |
| | | |
| | | def __save_buy_queue_data(self, code, num_list): |
| | | key = "trade_buy_queue_data-{}".format(code) |
| | | self.__getRedis().setex(key, tool.get_expire(), json.dumps((num_list, tool.get_now_time_str()))) |
| | | RedisUtils.setex(self.__getRedis(), key, tool.get_expire(), json.dumps((num_list, tool.get_now_time_str()))) |
| | | |
| | | # 返回数据与更新时间 |
| | | def __get_buy_queue_data(self, code): |
| | |
| | | |
| | | def __save_buy_progress_index(self, code, index, is_default): |
| | | key = "trade_buy_progress_index-{}".format(code) |
| | | self.__getRedis().setex(key, tool.get_expire(), json.dumps((index, is_default))) |
| | | RedisUtils.setex(self.__getRedis(), key, tool.get_expire(), json.dumps((index, is_default))) |
| | | # 返回数据与更新时间 |
| | | |
| | | def __get_buy_progress_index(self, code): |
| | |
| | | # 最近的非涨停买1的时间 |
| | | def __save_latest_not_limit_up_time(self, code, time_str): |
| | | key = "latest_not_limit_up_time-{}".format(code) |
| | | self.__getRedis().setex(key, tool.get_expire(), time_str) |
| | | RedisUtils.setex(self.__getRedis(), key, tool.get_expire(), time_str) |
| | | |
| | | def __get_latest_not_limit_up_time(self, code): |
| | | key = "latest_not_limit_up_time-{}".format(code) |