| | |
| | | szse_codes = [] |
| | | sse_codes = [] |
| | | for code in codes: |
| | | if code.find("00") == 0: |
| | | szse_codes.append(code.encode()) |
| | | elif code.find("60") == 0: |
| | | market_type = tool.get_market_type(code) |
| | | if market_type == tool.MARKET_TYPE_SSE: |
| | | sse_codes.append(code.encode()) |
| | | elif market_type == tool.MARKET_TYPE_SZSE: |
| | | szse_codes.append(code.encode()) |
| | | return sse_codes, szse_codes |
| | | |
| | | def __unsubscribe(self, _codes): |
| | |
| | | limit_up_count = len(self.__limit_up_codes) |
| | | # 获取是否涨停价 |
| | | limit_up_price = float( |
| | | tool.to_price(decimal.Decimal(str(pDepthMarketData['PreClosePrice'])) * decimal.Decimal("1.1"))) |
| | | tool.to_price(decimal.Decimal(str(pDepthMarketData['PreClosePrice'])) * decimal.Decimal(tool.get_limit_up_rate(pDepthMarketData['SecurityID'])))) |
| | | if abs(limit_up_price - pDepthMarketData['LastPrice']) < 0.001 or abs( |
| | | limit_up_price - pDepthMarketData['BidPrice1']) < 0.001: |
| | | huaxin_l2_log.info(hx_logger_l2_market_data_before_open, f"{d}") |