diff --git a/vnpy/api/da/generator/da_future_struct.py b/vnpy/api/da/generator/da_future_struct.py index e798c03f..67c95f21 100644 --- a/vnpy/api/da/generator/da_future_struct.py +++ b/vnpy/api/da/generator/da_future_struct.py @@ -155,6 +155,8 @@ CFutureReqOrderModifyField = { "ErrorDescription": "string", } +CFutureRspOrderInsertField = CFutureRspOrderModifyField + CFutureReqOrderCancelField = { "UserId": "string", "UserType": "string", @@ -597,6 +599,10 @@ CFutureRtnCapitalField = { "SellNeedAddMargin": "double", } +CFutureRtnOrderField = CFutureRtnPositionField + +CFutureRspTradeField = CFutureRtnTradeField + CFutureReqGetQuestionField = { "Unused": "int", "ErrorDescription": "string", @@ -650,6 +656,8 @@ CFutureQryTotalPositionField = { "ErrorDescription": "string", } +CFutureRtnOrderField = CFutureRspTotalPositionField + CFutureQryStrategyField = { "ExchangeNo": "string", "ErrorDescription": "string", diff --git a/vnpy/api/da/generator/da_stock_struct.py b/vnpy/api/da/generator/da_stock_struct.py index c8725228..0d7324aa 100644 --- a/vnpy/api/da/generator/da_stock_struct.py +++ b/vnpy/api/da/generator/da_stock_struct.py @@ -155,6 +155,8 @@ CStockReqOrderModifyField = { "ErrorDescription": "string", } +CStockRspOrderInsertField = CStockRspOrderModifyField + CStockReqOrderCancelField = { "UserId": "string", "UserType": "string", @@ -554,6 +556,10 @@ CStockRtnCapitalField = { "SellNeedAddMargin": "double", } +CStockRspPositionField = CStockRtnPositionField + +CStockRspTradeField = CStockRtnTradeField + CStockReqGetQuestionField = { "Unused": "int", "ErrorDescription": "string", diff --git a/vnpy/api/da/generator/generate_struct.py b/vnpy/api/da/generator/generate_struct.py index b121197a..530ad53b 100644 --- a/vnpy/api/da/generator/generate_struct.py +++ b/vnpy/api/da/generator/generate_struct.py @@ -54,7 +54,12 @@ class StructGenerator: def process_typedef(self, line: str): """处理类型定义""" - print("typdef注意", line) # 一共三行,手动处理 + line = line.replace("\t", " ") + words = line.split(" ") + name = words[1] + value = words[2] + new_line = f"{name} = {value}\n\n" + self.f_struct.write(new_line) def process_declare(self, line: str): """处理声明"""