| | |
| | | CODE_LIST_BLACK = "black" |
| | | CODE_LIST_WANT = "want" |
| | | CODE_LIST_PAUSE_BUY = "pause_buy" |
| | | CODE_LIST_MUST_BUY = "must_buy" |
| | | |
| | | # 类型 |
| | | API_TYPE_TRADE = "trade" # 交易 |
| | |
| | | API_TYPE_SAVE_RUNNING_DATA = "save_running_data" # 保存运行时数据 |
| | | API_TYPE_GET_CODE_POSITION_INFO = "get_code_position_info" # 获取代码持仓信息 |
| | | API_TYPE_COMMON_REQUEST = "common_request" # 通用请求 |
| | | |
| | | |
| | | |
| | | class ActionCallback(object): |
| | |
| | | return key, sk |
| | | |
| | | @classmethod |
| | | def init(cls, addr, port, trade_action_callback, common_client_count=20, trade_client_count=15): |
| | | def init(cls, addr, port, trade_action_callback, common_client_count=20, trade_client_count=20): |
| | | cls.common_client_dict.clear() |
| | | cls.common_client_count = common_client_count |
| | | cls.trade_client_dict.clear() |