| | |
| | | API_TYPE_GET_FROM_DATA_SERVER = "get_from_data_server" # 从数据服务器拉取数据 |
| | | API_TYPE_CODE_TRADE_INFO = "code_trade_info" # 代码交易信息 |
| | | API_TYPE_CODE_L2_LISTEN_ACTIVE_COUNT = "l2_listen_active_count" # L2有效监听数量 |
| | | API_TYPE_SAVE_RUNNING_DATA = "save_running_data" # 保存运行时数据 |
| | | |
| | | |
| | | class ActionCallback(object): |
| | |
| | | pass |
| | | |
| | | def OnGetActiveListenCount(self, client_id, request_id): |
| | | pass |
| | | |
| | | def OnSaveRunningData(self, client_id, request_id): |
| | | pass |
| | | |
| | | |
| | |
| | | cls.action_callback.OnGetCodeTradeInfo(client_id, request_id, data) |
| | | elif content_type == API_TYPE_CODE_L2_LISTEN_ACTIVE_COUNT: |
| | | cls.action_callback.OnGetActiveListenCount(client_id, request_id) |
| | | elif content_type == API_TYPE_SAVE_RUNNING_DATA: |
| | | cls.action_callback.OnSaveRunningData(client_id, request_id) |
| | | |
| | | except Exception as e: |
| | | logging.exception(e) |