| | |
| | | """ |
| | | import json |
| | | |
| | | from db.redis_manager import RedisUtils |
| | | from utils import tool |
| | | from db import redis_manager |
| | | from log_module.log import logger_trade_queue_price_info |
| | |
| | | # 保存买1价格信息 |
| | | @classmethod |
| | | def __save_buy1_price_info(cls, code, limit_up_time, open_limit_up_time): |
| | | cls.__get_redis().setex(f"buy1_price_limit_up_info-{code}", tool.get_expire(), |
| | | RedisUtils.setex(cls.__get_redis(),f"buy1_price_limit_up_info-{code}", tool.get_expire(), |
| | | json.dumps((limit_up_time, open_limit_up_time))) |
| | | |
| | | @classmethod |
| | |
| | | @classmethod |
| | | def __save_buy1_price(cls, code, buy_1_price): |
| | | cls.__current_buy_1_price[code] = buy_1_price |
| | | cls.__get_redis().setex(f"buy1_price-{code}", tool.get_expire(), buy_1_price) |
| | | RedisUtils.setex(cls.__get_redis(),f"buy1_price-{code}", tool.get_expire(), buy_1_price) |
| | | |
| | | @classmethod |
| | | def __get_buy1_price(cls, code): |
| | |
| | | # 设置炸板后的最低价 |
| | | @classmethod |
| | | def __save_open_limit_up_lowest_price(cls, code, price): |
| | | cls.__get_redis().setex(f"open_limit_up_lowest_price-{code}", tool.get_expire(), f"{price}") |
| | | RedisUtils.setex(cls.__get_redis(),f"open_limit_up_lowest_price-{code}", tool.get_expire(), f"{price}") |
| | | |
| | | @classmethod |
| | | def __get_open_limit_up_lowest_price(cls, code): |