| | |
| | | :return: |
| | | """ |
| | | if datas: |
| | | logger_debug.debug(f"{code} - L2逐笔成交上报:{len(datas)}") |
| | | price, time_str = datas[-1][1], huaxin_util.convert_time(datas[-1][3]) |
| | | try: |
| | | # 获取最近的成交价 |
| | |
| | | results = juejin_api.JueJinApi.history_n(tool.get_symbol(code), "1d", 1, 1, "close") |
| | | if results: |
| | | self.__pre_close_price_dict[code] = results[0]["close"] |
| | | logger_debug.debug(f"{code} - 获取到昨日收盘价:{results[0]['close']}") |
| | | if self.__last_price_dict.get(code) == price: |
| | | return |
| | | limit_up_price = tool.get_limit_up_price(code, self.__pre_close_price_dict[code]) |
| | |
| | | # 炸板s |
| | | finally: |
| | | logger_debug.info(f"炸板:{code}-({price},{time_str})") |
| | | except Exception as e: |
| | | logger_debug.exception(e) |
| | | finally: |
| | | self.__last_price_dict[code] = price |
| | | |