| | |
| | | from log_module import log, async_log_util |
| | | from log_module.async_log_util import huaxin_l2_log |
| | | from log_module.log import logger_local_huaxin_l2_subscript, logger_system, logger_local_huaxin_l2_transaction, \ |
| | | logger_local_huaxin_g_cancel, logger_l2_codes_subscript, printlog |
| | | logger_local_huaxin_g_cancel, logger_l2_codes_subscript, printlog, logger_debug |
| | | from utils import tool |
| | | |
| | | ###B类### |
| | |
| | | def OnRtnNGTSTick(self, pTick): |
| | | # logger_debug.info(f"OnRtnNGTSTick: {pTick}") |
| | | # 输出逐笔成交数据 |
| | | try: |
| | | if pTick['TickType'] == b'T': |
| | | item = {"SecurityID": pTick['SecurityID'], "TradePrice": pTick['Price'], |
| | | "TradeVolume": pTick['Volume'], |
| | |
| | | elif pTick['Side'] == b'2': |
| | | item['OrderNO'] = pTick['SellNo'] |
| | | self.l2_data_upload_manager.add_l2_order_detail(item, 0) |
| | | except Exception as e: |
| | | logger_debug.exception(e) |
| | | |
| | | |
| | | class MyL2ActionCallback(L2ActionCallback): |