| | |
| | | # 已经订阅的代码 |
| | | subscripted_codes = set() |
| | | |
| | | # 涨停代码 |
| | | __limit_up_codes = set() |
| | | |
| | | # 买入的大单订单号 |
| | | |
| | | def __init__(self, api, l2_data_upload_manager: L2DataUploadManager): |
| | |
| | | # (pDepthMarketData['AskPrice5'], pDepthMarketData['AskVolume5']) |
| | | # ] |
| | | } |
| | | limit_up_count = len(self.__limit_up_codes) |
| | | # 获取是否涨停价 |
| | | limit_up_price = float( |
| | | tool.to_price(decimal.Decimal(str(pDepthMarketData['PreClosePrice'])) * decimal.Decimal("1.1"))) |
| | | if abs(limit_up_price - pDepthMarketData['LastPrice']) < 0.001 or abs( |
| | | limit_up_price - pDepthMarketData['BidPrice1']) < 0.001: |
| | | huaxin_l2_log.info(logger_local_huaxin_l2_market, f"{d}") |
| | | self.__limit_up_codes.add(pDepthMarketData['SecurityID']) |
| | | else: |
| | | self.__limit_up_codes.discard(pDepthMarketData['SecurityID']) |
| | | if limit_up_count != len(self.__limit_up_codes): |
| | | huaxin_l2_log.info(logger_local_huaxin_l2_market, f"涨停代码:{self.__limit_up_codes}") |
| | | except: |
| | | pass |
| | | |