| | |
| | | |
| | | logger_local_huaxin_l2_transaction.info(f"{item}") |
| | | |
| | | l2_transaction_price_queue.put_nowait( |
| | | (pTransaction['SecurityID'], pTransaction['TradePrice'], pTransaction['TradeTime'])) |
| | | huaxin_l2_log.info(logger_local_huaxin_l2_transaction, f"{item}") |
| | | |
| | | # if pTransaction['TradePrice'] == self.limit_up_price_dict.get(pTransaction['SecurityID']): |
| | | # # TODO 成交价是涨停价才输出 |
| | | # huaxin_l2_log.info(logger_local_huaxin_l2_transaction, f"{item}") |
| | | # if not self.__is_limit_up_dict.get(pTransaction['SecurityID']): |
| | | # huaxin_l2_log.info(logger_local_huaxin_l2_upload, |
| | | # f"{pTransaction['TradeTime']} {pTransaction['SecurityID']} 下单") |
| | | # self.__is_limit_up_dict[pTransaction['SecurityID']] = True |
| | | # else: |
| | | # self.__is_limit_up_dict[pTransaction['SecurityID']] = False |
| | | if pTransaction['TradePrice'] == self.limit_up_price_dict.get(pTransaction['SecurityID']): |
| | | # TODO 成交价是涨停价才输出 |
| | | #huaxin_l2_log.info(logger_local_huaxin_l2_transaction, f"{item}") |
| | | if not self.__is_limit_up_dict.get(pTransaction['SecurityID']): |
| | | huaxin_l2_log.info(logger_local_huaxin_l2_upload, |
| | | f"{pTransaction['TradeTime']} {pTransaction['SecurityID']} 下单") |
| | | l2_transaction_price_queue.put_nowait( |
| | | (pTransaction['SecurityID'], pTransaction['TradePrice'], pTransaction['TradeTime'])) |
| | | |
| | | self.__is_limit_up_dict[pTransaction['SecurityID']] = True |
| | | else: |
| | | self.__is_limit_up_dict[pTransaction['SecurityID']] = False |
| | | except Exception as e: |
| | | logger_local_huaxin_l2_error.exception(e) |
| | | |
| | |
| | | try: |
| | | # 代码, 成交价格, 成交时间 |
| | | result = l2_transaction_price_queue.get() |
| | | trade_call_back_queue.put_nowait(result) |
| | | continue |
| | | code = result[0] |
| | | if code not in __latest_transaction_price_dict: |
| | | __latest_transaction_price_dict[code] = [] |