From 3ea84f8adaeeb851e590fa74ceed009a0a19b08c Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 28 十一月 2023 17:46:38 +0800 Subject: [PATCH] 近6个交易日涨幅过高实现 --- outside_api_command_manager.py | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/outside_api_command_manager.py b/outside_api_command_manager.py index a476003..348691d 100644 --- a/outside_api_command_manager.py +++ b/outside_api_command_manager.py @@ -33,6 +33,7 @@ OPERRATE_SET = 1 # 璁剧疆 OPERRATE_DELETE = 2 # 鍒犻櫎 OPERRATE_GET = 3 # 鑾峰彇 +OPERRATE_ADD = 4 # 鏂板 # 浠g爜鍚嶅崟绫诲瀷 CODE_LIST_WHITE = "white" @@ -44,6 +45,7 @@ API_TYPE_TRADE = "trade" # 浜ゆ槗 API_TYPE_TRADE_STATE = "trade_state" # 浜ゆ槗鐘舵�� API_TYPE_TRADE_MODE = "trade_mode" # 浜ゆ槗妯″紡 +API_TYPE_SELL_RULE = "sell_rule" # 鍗栧嚭瑙勫垯 API_TYPE_CODE_LIST = "code_list" # 浠g爜鍚嶅崟 API_TYPE_EXPORT_L2 = "export_l2" # 瀵煎嚭L2鏁版嵁 API_TYPE_INIT = "init" # 鍒濆鍖� @@ -56,7 +58,9 @@ API_TYPE_GET_FROM_DATA_SERVER = "get_from_data_server" # 浠庢暟鎹湇鍔″櫒鎷夊彇鏁版嵁 API_TYPE_CODE_TRADE_INFO = "code_trade_info" # 浠g爜浜ゆ槗淇℃伅 API_TYPE_CODE_L2_LISTEN_ACTIVE_COUNT = "l2_listen_active_count" # L2鏈夋晥鐩戝惉鏁伴噺 - +API_TYPE_SAVE_RUNNING_DATA = "save_running_data" # 淇濆瓨杩愯鏃舵暟鎹� +API_TYPE_GET_CODE_POSITION_INFO = "get_code_position_info" # 鑾峰彇浠g爜鎸佷粨淇℃伅 +API_TYPE_COMMON_REQUEST = "common_request" # 閫氱敤璇锋眰 class ActionCallback(object): # 浜ゆ槗 @@ -69,6 +73,10 @@ # 浜ゆ槗妯″紡 def OnTradeMode(self, client_id, request_id, data): + pass + + # 鍗栧嚭瑙勫垯 + def OnSellRule(self, client_id, request_id, data): pass # 浠g爜鍚嶅崟 @@ -104,6 +112,15 @@ pass def OnGetActiveListenCount(self, client_id, request_id): + pass + + def OnSaveRunningData(self, client_id, request_id): + pass + + def OnGetCodePositionInfo(self, client_id, request_id, data): + pass + + def OnCommonRequest(self, client_id, request_id, data): pass @@ -185,6 +202,8 @@ cls.action_callback.OnTradeState(client_id, request_id, data) elif content_type == API_TYPE_TRADE_MODE: cls.action_callback.OnTradeMode(client_id, request_id, data) + elif content_type == API_TYPE_SELL_RULE: + cls.action_callback.OnSellRule(client_id, request_id, data) elif content_type == API_TYPE_CODE_LIST: cls.action_callback.OnCodeList(client_id, request_id, data) elif content_type == API_TYPE_EXPORT_L2: @@ -209,6 +228,14 @@ 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) + elif content_type == API_TYPE_GET_CODE_POSITION_INFO: + cls.action_callback.OnGetCodePositionInfo(client_id, request_id, data) + elif content_type == API_TYPE_COMMON_REQUEST: + cls.action_callback.OnCommonRequest(client_id, request_id, data) + + except Exception as e: logging.exception(e) -- Gitblit v1.8.0