diff --git a/vn.lts/vnltsmd/pyltsmd/vnltsmd.cpp b/vn.lts/vnltsmd/pyltsmd/vnltsmd.cpp index 35d4a459..4ed66837 100644 --- a/vn.lts/vnltsmd/pyltsmd/vnltsmd.cpp +++ b/vn.lts/vnltsmd/pyltsmd/vnltsmd.cpp @@ -505,56 +505,130 @@ struct MdApiWrap : MdApi, wrapper < MdApi > { virtual void onFrontConnected() { + //在向python环境中调用回调函数推送数据前,需要先获取全局锁GIL,防止解释器崩溃 PyLock lock; - this->get_override("onFrontConnected")(); + + //以下的try...catch...可以实现捕捉python环境中错误的功能,防止C++直接出现原因未知的崩溃 + try + { + this->get_override("onFrontConnected")(); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onFrontDisconnected(int i) { PyLock lock; - this->get_override("onFrontDisconnected")(i); + + try + { + this->get_override("onFrontDisconnected")(i); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onHeartBeatWarning(int i) { PyLock lock; - this->get_override("onHeartBeatWarning")(i); + + try + { + this->get_override("onHeartBeatWarning")(i); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspError(dict data, int id, bool last) { PyLock lock; - this->get_override("onRspError")(data, id, last); + + try + { + this->get_override("onRspError")(data, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspUserLogin(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspUserLogin")(data, error, id, last); + + try + { + this->get_override("onRspUserLogin")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspUserLogout(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspUserLogout")(data, error, id, last); + + try + { + this->get_override("onRspUserLogout")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspSubMarketData(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspSubMarketData")(data, error, id, last); + + try + { + this->get_override("onRspSubMarketData")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspUnSubMarketData(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspUnSubMarketData")(data, error, id, last); + + try + { + this->get_override("onRspUnSubMarketData")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRtnDepthMarketData(dict data) { PyLock lock; - this->get_override("onRtnDepthMarketData")(data); + + try + { + this->get_override("onRtnDepthMarketData")(data); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; }; diff --git a/vn.lts/vnltsmd/test/mdtest.py b/vn.lts/vnltsmd/test/mdtest.py index b2c0364b..8480ee9d 100644 --- a/vn.lts/vnltsmd/test/mdtest.py +++ b/vn.lts/vnltsmd/test/mdtest.py @@ -1,4 +1,4 @@ -# encoding = UTF-8 +# encoding: UTF-8 import sys from time import sleep @@ -10,14 +10,14 @@ from vnltsmd import * #---------------------------------------------------------------------- def print_dict(d): - """按照键值打印一个字典""" + """鎸夌収閿兼墦鍗颁竴涓瓧鍏""" for key,value in d.items(): print key + ':' + str(value) #---------------------------------------------------------------------- def simple_log(func): - """简单装饰器用于输出函数名""" + """绠鍗曡楗板櫒鐢ㄤ簬杈撳嚭鍑芥暟鍚""" def wrapper(*args, **kw): print "" print str(func.__name__) @@ -27,7 +27,7 @@ def simple_log(func): ######################################################################## class TestMdApi(MdApi): - """测试用实例""" + """娴嬭瘯鐢ㄥ疄渚""" #---------------------------------------------------------------------- def __init__(self): @@ -37,112 +37,112 @@ class TestMdApi(MdApi): #---------------------------------------------------------------------- @simple_log def onFrontConnected(self): - """服务器连接""" + """鏈嶅姟鍣ㄨ繛鎺""" pass #---------------------------------------------------------------------- @simple_log def onFrontDisconnected(self, n): - """服务器断开""" + """鏈嶅姟鍣ㄦ柇寮""" print n #---------------------------------------------------------------------- @simple_log def onHeartBeatWarning(self, n): - """心跳报警""" + """蹇冭烦鎶ヨ""" print n #---------------------------------------------------------------------- @simple_log def onRspError(self, error, n, last): - """错误""" + """閿欒""" print_dict(error) #---------------------------------------------------------------------- def onRspUserLogin(self, data, error, n, last): - """登陆回报""" + """鐧婚檰鍥炴姤""" print_dict(data) print_dict(error) #---------------------------------------------------------------------- @simple_log def onRspUserLogout(self, data, error, n, last): - """登出回报""" + """鐧诲嚭鍥炴姤""" print_dict(data) print_dict(error) #---------------------------------------------------------------------- @simple_log def onRspSubMarketData(self, data, error, n, last): - """订阅合约回报""" + """璁㈤槄鍚堢害鍥炴姤""" print_dict(data) print_dict(error) #---------------------------------------------------------------------- @simple_log def onRspUnSubMarketData(self, data, error, n, last): - """退订合约回报""" + """閫璁㈠悎绾﹀洖鎶""" print_dict(data) print_dict(error) #---------------------------------------------------------------------- @simple_log def onRtnDepthMarketData(self, data): - """行情推送""" + """琛屾儏鎺ㄩ""" print_dict(data) #---------------------------------------------------------------------- def main(): - """主测试函数,出现堵塞时可以考虑使用sleep""" + """涓绘祴璇曞嚱鏁帮紝鍑虹幇鍫靛鏃跺彲浠ヨ冭檻浣跨敤sleep""" reqid = 0 - # 创建Qt应用对象,用于事件循环 + # 鍒涘缓Qt搴旂敤瀵硅薄锛岀敤浜庝簨浠跺惊鐜 app = QtGui.QApplication(sys.argv) - # 创建API对象 + # 鍒涘缓API瀵硅薄 api = TestMdApi() - # 在C++环境中创建MdApi对象,传入参数是希望用来保存.con文件的地址 + # 鍦–++鐜涓垱寤篗dApi瀵硅薄锛屼紶鍏ュ弬鏁版槸甯屾湜鐢ㄦ潵淇濆瓨.con鏂囦欢鐨勫湴鍧 api.createFtdcMdApi('') - # 注册前置机地址 - api.registerFront("tcp://101.231.210.1:24513") + # 娉ㄥ唽鍓嶇疆鏈哄湴鍧 + api.registerFront("tcp://211.144.195.163:34513") - # 初始化api,连接前置机 + # 鍒濆鍖朼pi锛岃繛鎺ュ墠缃満 api.init() sleep(0.5) - # 登陆 - loginReq = {} # 创建一个空字典 - loginReq['UserID'] = '' # 参数作为字典键值的方式传入 - loginReq['Password'] = '' # 键名和C++中的结构体成员名对应 - loginReq['BrokerID'] = '2011' - reqid = reqid + 1 # 请求数必须保持唯一性 + # 鐧婚檰 + loginReq = {} # 鍒涘缓涓涓┖瀛楀吀 + loginReq['UserID'] = '' # 鍙傛暟浣滀负瀛楀吀閿肩殑鏂瑰紡浼犲叆 + loginReq['Password'] = '' # 閿悕鍜孋++涓殑缁撴瀯浣撴垚鍛樺悕瀵瑰簲 + loginReq['BrokerID'] = '' + reqid = reqid + 1 # 璇锋眰鏁板繀椤讳繚鎸佸敮涓鎬 i = api.reqUserLogin(loginReq, 1) sleep(0.5) - ## 登出 + ## 鐧诲嚭 #reqid = reqid + 1 #i = api.reqUserLogout({}, 1) #sleep(0.5) - # 获取交易日,目前输出为空 + # 鑾峰彇浜ゆ槗鏃ワ紝鐩墠杈撳嚭涓虹┖ #day = api.getTradingDay() #print 'Trading Day is:' + str(day) #sleep(0.5) - # 订阅合约 + # 璁㈤槄鍚堢害 subReq = {} - subReq['InstrumentID'] = '600600' + subReq['InstrumentID'] = '11000061' subReq['ExchangeID'] = 'SSE' i = api.subscribeMarketData(subReq) - ## 退订合约 + ## 閫璁㈠悎绾 #i = api.unSubscribeMarketData(subReq) - # 连续运行,用于输出行情 + # 杩炵画杩愯锛岀敤浜庤緭鍑鸿鎯 app.exec_() diff --git a/vn.lts/vnltsmd/test/vnltsmd.pyd b/vn.lts/vnltsmd/test/vnltsmd.pyd index f2cc12d4..52844e77 100644 Binary files a/vn.lts/vnltsmd/test/vnltsmd.pyd and b/vn.lts/vnltsmd/test/vnltsmd.pyd differ diff --git a/vn.lts/vnltstd/PythonTest/test.py b/vn.lts/vnltstd/PythonTest/test.py deleted file mode 100644 index 4565019a..00000000 --- a/vn.lts/vnltstd/PythonTest/test.py +++ /dev/null @@ -1,83 +0,0 @@ -# encoding = UTF-8 - -from PyQt4 import QtGui -import sys -from time import sleep - -from vnltstd import * - -def printdict(error): - for key, value in error.items(): - print key + ':' + str(value) - -class MyTdApi(TdApi): - def __init__(self): - super(MyTdApi, self).__init__() - - def onFrontConnected(self): - print 'connected' - - def onFrontDisconnected(self, i): - print 'disconnected' - - def onHeartBeatWarning(self, i): - print 'heartbeat' - - def onRspError(self, data, id_, last): - print 'error' - print data - - def onRspUserLogin(self, data, error, id_, last) : - print 'login' - printdict(data) - printdict(error) - - - def onRspUserLogout(self, data, error, id_, last): - print 'logout' - printdict(data) - printdict(error) - - #---------------------------------------------------------------------- - def onRspQryInstrument(self, data, error, id_, last): - """""" - printdict(data) - - #---------------------------------------------------------------------- - def onRspQryInvestor(self, data, error, id_, last): - """""" - printdict(data) - -def main(): - - app = QtGui.QApplication(sys.argv) - - api = MyTdApi() - api.createFtdcTraderApi('') - - api.registerFront("tcp://101.231.210.1:24505") - api.init() - sleep(1.0) - - lgreq = {} - lgreq['UserID'] = '010000058678' - lgreq['Password'] = '0656032' - lgreq['BrokerID'] = '2011' - i = api.reqUserLogin(lgreq, 1) - print i - sleep(1.0) - - #req2 = {} - #req2['InstrumentID'] = '600600' - #req2['ExchangeID'] = 'SSE' - #api.subscribeMarketData(req2) - - ireq = {} - #a = api.reqQryInstrument(ireq, 3) - b = api.reqQryInvestor(ireq, 3) - #print 'a is:'+ str(a) - - app.exec_() - -if __name__ == '__main__': - main() diff --git a/vn.lts/vnltstd/PythonTest/vnltstd.pyd b/vn.lts/vnltstd/PythonTest/vnltstd.pyd deleted file mode 100644 index eeb5758b..00000000 Binary files a/vn.lts/vnltstd/PythonTest/vnltstd.pyd and /dev/null differ diff --git a/vn.lts/vnltstd/pyltstd.opensdf b/vn.lts/vnltstd/pyltstd.opensdf deleted file mode 100644 index f445973d..00000000 Binary files a/vn.lts/vnltstd/pyltstd.opensdf and /dev/null differ diff --git a/vn.lts/vnltstd/pyltstd/vnltstd.cpp b/vn.lts/vnltstd/pyltstd/vnltstd.cpp index a325d3a1..74a596a0 100644 --- a/vn.lts/vnltstd/pyltstd/vnltstd.cpp +++ b/vn.lts/vnltstd/pyltstd/vnltstd.cpp @@ -323,22 +323,25 @@ void TdApi::OnRspQryTradingAccount(CSecurityFtdcTradingAccountField *pTradingAcc void TdApi::OnRspQryDepthMarketData(CSecurityFtdcDepthMarketDataField *pDepthMarketData, CSecurityFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYDEPTHMARKETDATA; - task.task_data = *pDepthMarketData; - if (pRspInfo) + if (pDepthMarketData) //手动修改,因为有可能出现pDepthMarketData为空指针的情况 { - task.task_error = *pRspInfo; + Task task = Task(); + task.task_name = ONRSPQRYDEPTHMARKETDATA; + task.task_data = *pDepthMarketData; + if (pRspInfo) + { + task.task_error = *pRspInfo; + } + else + { + CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); + memset(&empty_error, 0, sizeof(empty_error)); + task.task_error = empty_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); } - else - { - CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); - memset(&empty_error, 0, sizeof(empty_error)); - task.task_error = empty_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); }; void TdApi::OnRspQryBondInterest(CSecurityFtdcBondInterestField *pBondInterest, CSecurityFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) @@ -383,22 +386,25 @@ void TdApi::OnRspQryMarketRationInfo(CSecurityFtdcMarketRationInfoField *pMarket void TdApi::OnRspQryInstrumentCommissionRate(CSecurityFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CSecurityFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINSTRUMENTCOMMISSIONRATE; - task.task_data = *pInstrumentCommissionRate; - if (pRspInfo) + if (pInstrumentCommissionRate) //手动修改,因为有可能出现空指针的情况 { - task.task_error = *pRspInfo; + Task task = Task(); + task.task_name = ONRSPQRYINSTRUMENTCOMMISSIONRATE; + task.task_data = *pInstrumentCommissionRate; + if (pRspInfo) + { + task.task_error = *pRspInfo; + } + else + { + CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); + memset(&empty_error, 0, sizeof(empty_error)); + task.task_error = empty_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); } - else - { - CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); - memset(&empty_error, 0, sizeof(empty_error)); - task.task_error = empty_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); }; void TdApi::OnRspQryETFInstrument(CSecurityFtdcETFInstrumentField *pETFInstrument, CSecurityFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) @@ -483,62 +489,71 @@ void TdApi::OnRspQrySFInstrument(CSecurityFtdcSFInstrumentField *pSFInstrument, void TdApi::OnRspQryOrder(CSecurityFtdcOrderField *pOrder, CSecurityFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYORDER; - task.task_data = *pOrder; - if (pRspInfo) + if (pOrder) //手动修改,因为有可能出现pOrder为空指针的情况 { - task.task_error = *pRspInfo; + Task task = Task(); + task.task_name = ONRSPQRYORDER; + task.task_data = *pOrder; + if (pRspInfo) + { + task.task_error = *pRspInfo; + } + else + { + CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); + memset(&empty_error, 0, sizeof(empty_error)); + task.task_error = empty_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); } - else - { - CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); - memset(&empty_error, 0, sizeof(empty_error)); - task.task_error = empty_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); }; void TdApi::OnRspQryTrade(CSecurityFtdcTradeField *pTrade, CSecurityFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYTRADE; - task.task_data = *pTrade; - if (pRspInfo) + if (pTrade) //手动修改,因为有可能出现pTrade为空指针的情况 { - task.task_error = *pRspInfo; + Task task = Task(); + task.task_name = ONRSPQRYTRADE; + task.task_data = *pTrade; + if (pRspInfo) + { + task.task_error = *pRspInfo; + } + else + { + CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); + memset(&empty_error, 0, sizeof(empty_error)); + task.task_error = empty_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); } - else - { - CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); - memset(&empty_error, 0, sizeof(empty_error)); - task.task_error = empty_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); }; void TdApi::OnRspQryInvestorPosition(CSecurityFtdcInvestorPositionField *pInvestorPosition, CSecurityFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYINVESTORPOSITION; - task.task_data = *pInvestorPosition; - if (pRspInfo) + if (pInvestorPosition) //手动修改,防止空指针 { - task.task_error = *pRspInfo; + Task task = Task(); + task.task_name = ONRSPQRYINVESTORPOSITION; + task.task_data = *pInvestorPosition; + if (pRspInfo) + { + task.task_error = *pRspInfo; + } + else + { + CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); + memset(&empty_error, 0, sizeof(empty_error)); + task.task_error = empty_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); } - else - { - CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); - memset(&empty_error, 0, sizeof(empty_error)); - task.task_error = empty_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); }; void TdApi::OnRtnOrder(CSecurityFtdcOrderField *pOrder) @@ -649,22 +664,25 @@ void TdApi::OnRtnFundInByBank(CSecurityFtdcFundTransferField *pFundTransfer) void TdApi::OnRspQryFundTransferSerial(CSecurityFtdcFundTransferField *pFundTransfer, CSecurityFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYFUNDTRANSFERSERIAL; - task.task_data = *pFundTransfer; - if (pRspInfo) + if (pFundTransfer) //手动修改,防止空指针 { - task.task_error = *pRspInfo; + Task task = Task(); + task.task_name = ONRSPQRYFUNDTRANSFERSERIAL; + task.task_data = *pFundTransfer; + if (pRspInfo) + { + task.task_error = *pRspInfo; + } + else + { + CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); + memset(&empty_error, 0, sizeof(empty_error)); + task.task_error = empty_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); } - else - { - CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); - memset(&empty_error, 0, sizeof(empty_error)); - task.task_error = empty_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); }; void TdApi::OnRspFundInterTransfer(CSecurityFtdcFundInterTransferField *pFundInterTransfer, CSecurityFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) @@ -689,22 +707,25 @@ void TdApi::OnRspFundInterTransfer(CSecurityFtdcFundInterTransferField *pFundInt void TdApi::OnRspQryFundInterTransferSerial(CSecurityFtdcFundInterTransferSerialField *pFundInterTransferSerial, CSecurityFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) { - Task task = Task(); - task.task_name = ONRSPQRYFUNDINTERTRANSFERSERIAL; - task.task_data = *pFundInterTransferSerial; - if (pRspInfo) + if (pFundInterTransferSerial) //手动修改,防止空指针 { - task.task_error = *pRspInfo; + Task task = Task(); + task.task_name = ONRSPQRYFUNDINTERTRANSFERSERIAL; + task.task_data = *pFundInterTransferSerial; + if (pRspInfo) + { + task.task_error = *pRspInfo; + } + else + { + CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); + memset(&empty_error, 0, sizeof(empty_error)); + task.task_error = empty_error; + } + task.task_id = nRequestID; + task.task_last = bIsLast; + this->task_queue.push(task); } - else - { - CSecurityFtdcRspInfoField empty_error = CSecurityFtdcRspInfoField(); - memset(&empty_error, 0, sizeof(empty_error)); - task.task_error = empty_error; - } - task.task_id = nRequestID; - task.task_last = bIsLast; - this->task_queue.push(task); }; void TdApi::OnRtnFundInterTransferSerial(CSecurityFtdcFundInterTransferSerialField *pFundInterTransferSerial) @@ -2208,14 +2229,13 @@ int TdApi::reqUserLogout(dict req, int nRequestID) int TdApi::reqOrderInsert(dict req, int nRequestID) { + //该函数进行了手动编辑,主要因为Direction和CombOffsetFlag两个字段的特殊性 CSecurityFtdcInputOrderField myreq = CSecurityFtdcInputOrderField(); memset(&myreq, 0, sizeof(myreq)); getChar(req, "ContingentCondition", &myreq.ContingentCondition); - getChar(req, "CombOffsetFlag", myreq.CombOffsetFlag); getChar(req, "UserID", myreq.UserID); getChar(req, "LimitPrice", myreq.LimitPrice); getInt(req, "UserForceClose", &myreq.UserForceClose); - getChar(req, "Direction", &myreq.Direction); getInt(req, "VolumeTotalOriginal", &myreq.VolumeTotalOriginal); getChar(req, "OrderPriceType", &myreq.OrderPriceType); getChar(req, "TimeCondition", &myreq.TimeCondition); @@ -2233,6 +2253,33 @@ int TdApi::reqOrderInsert(dict req, int nRequestID) getChar(req, "InvestorID", myreq.InvestorID); getChar(req, "VolumeCondition", &myreq.VolumeCondition); getInt(req, "RequestID", &myreq.RequestID); + + //处理Direction + if (req.has_key("Direction")) + { + object o1 = req["Direction"]; + extract x1(o1); + if (x1.check()) + { + string s1 = x1(); + const char *buffer1 = s1.c_str(); + myreq.Direction = *buffer1; + } + } + + //处理CombOffsetFlag + if (req.has_key("CombOffsetFlag")) + { + object o2 = req["CombOffsetFlag"]; + extract x2(o2); + if (x2.check()) + { + string s2 = x2(); + const char *buffer2 = s2.c_str(); + myreq.CombOffsetFlag[0] = *buffer2; + } + } + int i = this->api->ReqOrderInsert(&myreq, nRequestID); return i; }; @@ -2464,6 +2511,7 @@ int TdApi::reqQryInvestorPosition(dict req, int nRequestID) int TdApi::reqFundOutByLiber(dict req, int nRequestID) { + //手动修改,结构体生成错误 CSecurityFtdcInputFundTransferField myreq = CSecurityFtdcInputFundTransferField(); memset(&myreq, 0, sizeof(myreq)); getChar(req, "UserID", myreq.UserID); @@ -2471,7 +2519,7 @@ int TdApi::reqFundOutByLiber(dict req, int nRequestID) getChar(req, "BrokerID", myreq.BrokerID); getChar(req, "AccountType", &myreq.AccountType); getChar(req, "Password", myreq.Password); - getChar(req, "Password", myreq.Password); + getDouble(req, "TradeAmount", &myreq.TradeAmount); getChar(req, "Digest", myreq.Digest); getChar(req, "AccountID", myreq.AccountID); int i = this->api->ReqFundOutByLiber(&myreq, nRequestID); @@ -2524,236 +2572,550 @@ struct TdApiWrap : TdApi, wrapper < TdApi > { virtual void onFrontConnected() { + //在向python环境中调用回调函数推送数据前,需要先获取全局锁GIL,防止解释器崩溃 PyLock lock; - this->get_override("onFrontConnected")(); + + //以下的try...catch...可以实现捕捉python环境中错误的功能,防止C++直接出现原因未知的崩溃 + try + { + this->get_override("onFrontConnected")(); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onFrontDisconnected(int i) { PyLock lock; - this->get_override("onFrontDisconnected")(i); + + try + { + this->get_override("onFrontDisconnected")(i); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onHeartBeatWarning(int i) { PyLock lock; - this->get_override("onHeartBeatWarning")(i); + + try + { + this->get_override("onHeartBeatWarning")(i); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspError(dict error, int id, bool last) { PyLock lock; - this->get_override("onRspError")(error, id, last); + + try + { + this->get_override("onRspError")(error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspUserLogin(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspUserLogin")(data, error, id, last); + + try + { + this->get_override("onRspUserLogin")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspUserLogout(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspUserLogout")(data, error, id, last); + + try + { + this->get_override("onRspUserLogout")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspOrderInsert(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspOrderInsert")(data, error, id, last); + + try + { + this->get_override("onRspOrderInsert")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspOrderAction(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspOrderAction")(data, error, id, last); + + try + { + this->get_override("onRspOrderAction")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspUserPasswordUpdate(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspUserPasswordUpdate")(data, error, id, last); + + try + { + this->get_override("onRspUserPasswordUpdate")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspTradingAccountPasswordUpdate(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspTradingAccountPasswordUpdate")(data, error, id, last); + + try + { + this->get_override("onRspTradingAccountPasswordUpdate")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryExchange(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryExchange")(data, error, id, last); + + try + { + this->get_override("onRspQryExchange")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryInstrument(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryInstrument")(data, error, id, last); + + try + { + this->get_override("onRspQryInstrument")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryInvestor(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryInvestor")(data, error, id, last); + + try + { + this->get_override("onRspQryInvestor")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryTradingCode(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryTradingCode")(data, error, id, last); + + try + { + this->get_override("onRspQryTradingCode")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryTradingAccount(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryTradingAccount")(data, error, id, last); + + try + { + this->get_override("onRspQryTradingAccount")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryDepthMarketData(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryDepthMarketData")(data, error, id, last); + + try + { + this->get_override("onRspQryDepthMarketData")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryBondInterest(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryBondInterest")(data, error, id, last); + + try + { + this->get_override("onRspQryBondInterest")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryMarketRationInfo(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryMarketRationInfo")(data, error, id, last); + + try + { + this->get_override("onRspQryMarketRationInfo")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryInstrumentCommissionRate(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryInstrumentCommissionRate")(data, error, id, last); + + try + { + this->get_override("onRspQryInstrumentCommissionRate")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryETFInstrument(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryETFInstrument")(data, error, id, last); + + try + { + this->get_override("onRspQryETFInstrument")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryETFBasket(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryETFBasket")(data, error, id, last); + + try + { + this->get_override("onRspQryETFBasket")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryOFInstrument(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryOFInstrument")(data, error, id, last); + + try + { + this->get_override("onRspQryOFInstrument")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQrySFInstrument(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQrySFInstrument")(data, error, id, last); + + try + { + this->get_override("onRspQrySFInstrument")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryOrder(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryOrder")(data, error, id, last); + + try + { + this->get_override("onRspQryOrder")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryTrade(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryTrade")(data, error, id, last); + + try + { + this->get_override("onRspQryTrade")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryInvestorPosition(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryInvestorPosition")(data, error, id, last); + + try + { + this->get_override("onRspQryInvestorPosition")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRtnOrder(dict data) { PyLock lock; - this->get_override("onRtnOrder")(data); + + try + { + this->get_override("onRtnOrder")(data); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRtnTrade(dict data) { PyLock lock; - this->get_override("onRtnTrade")(data); + + try + { + this->get_override("onRtnTrade")(data); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onErrRtnOrderInsert(dict data, dict error) { PyLock lock; - this->get_override("onErrRtnOrderInsert")(data, error); + + try + { + this->get_override("onErrRtnOrderInsert")(data, error); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onErrRtnOrderAction(dict data, dict error) { PyLock lock; - this->get_override("onErrRtnOrderAction")(data, error); + + try + { + this->get_override("onErrRtnOrderAction")(data, error); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspFundOutByLiber(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspFundOutByLiber")(data, error, id, last); + + try + { + this->get_override("onRspFundOutByLiber")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRtnFundOutByLiber(dict data) { PyLock lock; - this->get_override("onRtnFundOutByLiber")(data); + + try + { + this->get_override("onRtnFundOutByLiber")(data); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onErrRtnFundOutByLiber(dict data, dict error) { PyLock lock; - this->get_override("onErrRtnFundOutByLiber")(data, error); + + try + { + this->get_override("onErrRtnFundOutByLiber")(data, error); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRtnFundInByBank(dict data) { PyLock lock; - this->get_override("onRtnFundInByBank")(data); + + try + { + this->get_override("onRtnFundInByBank")(data); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryFundTransferSerial(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryFundTransferSerial")(data, error, id, last); + + try + { + this->get_override("onRspQryFundTransferSerial")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspFundInterTransfer(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspFundInterTransfer")(data, error, id, last); + + try + { + this->get_override("onRspFundInterTransfer")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRspQryFundInterTransferSerial(dict data, dict error, int id, bool last) { PyLock lock; - this->get_override("onRspQryFundInterTransferSerial")(data, error, id, last); + + try + { + this->get_override("onRspQryFundInterTransferSerial")(data, error, id, last); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onRtnFundInterTransferSerial(dict data) { PyLock lock; - this->get_override("onRtnFundInterTransferSerial")(data); + + try + { + this->get_override("onRtnFundInterTransferSerial")(data); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; virtual void onErrRtnFundInterTransfer(dict data, dict error) { PyLock lock; - this->get_override("onErrRtnFundInterTransfer")(data, error); + + try + { + this->get_override("onErrRtnFundInterTransfer")(data, error); + } + catch (error_already_set const &) + { + PyErr_Print(); + } }; }; @@ -2838,4 +3200,4 @@ BOOST_PYTHON_MODULE(vnltstd) .def("onRtnFundInterTransferSerial", pure_virtual(&TdApiWrap::onRtnFundInterTransferSerial)) .def("onErrRtnFundInterTransfer", pure_virtual(&TdApiWrap::onErrRtnFundInterTransfer)) ; -} \ No newline at end of file +} diff --git a/vn.lts/vnltstd/test/lts_data_type.py b/vn.lts/vnltstd/test/lts_data_type.py new file mode 100644 index 00000000..70b07365 --- /dev/null +++ b/vn.lts/vnltstd/test/lts_data_type.py @@ -0,0 +1,2076 @@ +# encoding: UTF-8 + +defineDict = {} +typedefDict = {} + +#////////////////////////////////////////////////////////////////////// +#@company shanghai liber information Technology Co.,Ltd +#@file SecurityFtdcUserApiDataType.h +#@brief 瀹氫箟涓氬姟鏁版嵁绫诲瀷 +#////////////////////////////////////////////////////////////////////// + + + +#////////////////////////////////////////////////////////////////////// +#TFtdcErrorIDType鏄竴涓敊璇唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcErrorIDType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcErrorMsgType鏄竴涓敊璇俊鎭被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcErrorMsgType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcExchangeIDType鏄竴涓氦鏄撴墍浠g爜绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcExchangeIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcExchangeNameType鏄竴涓氦鏄撴墍鍚嶇О绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcExchangeNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcExchangePropertyType鏄竴涓氦鏄撴墍灞炴х被鍨 +#////////////////////////////////////////////////////////////////////// +#姝e父 +defineDict["SECURITY_FTDC_EXP_Normal"] = '0' +#鏍规嵁鎴愪氦鐢熸垚鎶ュ崟 +defineDict["SECURITY_FTDC_EXP_GenOrderByTrade"] = '1' + +typedefDict["TSecurityFtdcExchangePropertyType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcExchangeConnectStatusType鏄竴涓氦鏄撴墍杩炴帴鐘舵佺被鍨 +#////////////////////////////////////////////////////////////////////// +#娌℃湁浠讳綍杩炴帴 +defineDict["SECURITY_FTDC_ECS_NoConnection"] = '1' +#宸茬粡鍙戝嚭鍚堢害鏌ヨ璇锋眰 +defineDict["SECURITY_FTDC_ECS_QryInstrumentSent"] = '2' +#宸茬粡鑾峰彇淇℃伅 +defineDict["SECURITY_FTDC_ECS_GotInformation"] = '9' + +typedefDict["TSecurityFtdcExchangeConnectStatusType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcDateType鏄竴涓棩鏈熺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcDateType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTimeType鏄竴涓椂闂寸被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcTimeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcInstrumentIDType鏄竴涓悎绾︿唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcInstrumentIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcProductNameType鏄竴涓骇鍝佸悕绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcProductNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcProductClassType鏄竴涓骇鍝佺被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鏈熻揣 +defineDict["SECURITY_FTDC_PC_Futures"] = '1' +#鏈熸潈 +defineDict["SECURITY_FTDC_PC_Options"] = '2' +#缁勫悎 +defineDict["SECURITY_FTDC_PC_Combination"] = '3' +#鍗虫湡 +defineDict["SECURITY_FTDC_PC_Spot"] = '4' +#鏈熻浆鐜 +defineDict["SECURITY_FTDC_PC_EFP"] = '5' +#璇佸埜A鑲 +defineDict["SECURITY_FTDC_PC_StockA"] = '6' +#璇佸埜B鑲 +defineDict["SECURITY_FTDC_PC_StockB"] = '7' +#ETF +defineDict["SECURITY_FTDC_PC_ETF"] = '8' +#ETF鐢宠祹 +defineDict["SECURITY_FTDC_PC_ETFPurRed"] = '9' + +typedefDict["TSecurityFtdcProductClassType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVolumeMultipleType鏄竴涓悎绾︽暟閲忎箻鏁扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVolumeMultipleType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPriceType鏄竴涓环鏍肩被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcPriceType"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVolumeType鏄竴涓暟閲忕被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVolumeType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPositionTypeType鏄竴涓寔浠撶被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鍑鎸佷粨 +defineDict["SECURITY_FTDC_PT_Net"] = '1' +#缁煎悎鎸佷粨 +defineDict["SECURITY_FTDC_PT_Gross"] = '2' + +typedefDict["TSecurityFtdcPositionTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPositionDateTypeType鏄竴涓寔浠撴棩鏈熺被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#浣跨敤鍘嗗彶鎸佷粨 +defineDict["SECURITY_FTDC_PDT_UseHistory"] = '1' +#涓嶄娇鐢ㄥ巻鍙叉寔浠 +defineDict["SECURITY_FTDC_PDT_NoUseHistory"] = '2' + +typedefDict["TSecurityFtdcPositionDateTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcExchangeInstIDType鏄竴涓悎绾﹀湪浜ゆ槗鎵鐨勪唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcExchangeInstIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcYearType鏄竴涓勾浠界被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcYearType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcMonthType鏄竴涓湀浠界被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcMonthType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcInstLifePhaseType鏄竴涓悎绾︾敓鍛藉懆鏈熺姸鎬佺被鍨 +#////////////////////////////////////////////////////////////////////// +#鏈笂甯 +defineDict["SECURITY_FTDC_IP_NotStart"] = '0' +#涓婂競 +defineDict["SECURITY_FTDC_IP_Started"] = '1' +#鍋滅墝 +defineDict["SECURITY_FTDC_IP_Pause"] = '2' +#鍒版湡 +defineDict["SECURITY_FTDC_IP_Expired"] = '3' + +typedefDict["TSecurityFtdcInstLifePhaseType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBoolType鏄竴涓竷灏斿瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBoolType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcRightModelIDType鏄竴涓偂绁ㄦ潈闄愭ā鐗堜唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcRightModelIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcRightModelNameType鏄竴涓偂绁ㄦ潈闄愭ā鐗堝悕绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcRightModelNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPosTradeTypeType鏄竴涓寔浠撲氦鏄撶被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#浠婃棩鏂板鎸佷粨鑳藉崠鍑 +defineDict["SECURITY_FTDC_PTT_CanSelTodayPos"] = '1' +#浠婃棩鏂板鎸佷粨涓嶈兘鍗栧嚭 +defineDict["SECURITY_FTDC_PTT_CannotSellTodayPos"] = '2' + +typedefDict["TSecurityFtdcPosTradeTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTraderIDType鏄竴涓氦鏄撴墍浜ゆ槗鍛樹唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcTraderIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcParticipantIDType鏄竴涓細鍛樹唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcParticipantIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPasswordType鏄竴涓瘑鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcPasswordType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBrokerIDType鏄竴涓粡绾叕鍙镐唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBrokerIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOrderLocalIDType鏄竴涓湰鍦版姤鍗曠紪鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcOrderLocalIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBrokerAbbrType鏄竴涓粡绾叕鍙哥畝绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBrokerAbbrType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBrokerNameType鏄竴涓粡绾叕鍙稿悕绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBrokerNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcInvestorIDType鏄竴涓姇璧勮呬唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcInvestorIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPartyNameType鏄竴涓弬涓庝汉鍚嶇О绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcPartyNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcIdCardTypeType鏄竴涓瘉浠剁被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#缁勭粐鏈烘瀯浠g爜 +defineDict["SECURITY_FTDC_ICT_EID"] = '0' +#韬唤璇 +defineDict["SECURITY_FTDC_ICT_IDCard"] = '1' +#鍐涘畼璇 +defineDict["SECURITY_FTDC_ICT_OfficerIDCard"] = '2' +#璀﹀畼璇 +defineDict["SECURITY_FTDC_ICT_PoliceIDCard"] = '3' +#澹叺璇 +defineDict["SECURITY_FTDC_ICT_SoldierIDCard"] = '4' +#鎴峰彛绨 +defineDict["SECURITY_FTDC_ICT_HouseholdRegister"] = '5' +#鎶ょ収 +defineDict["SECURITY_FTDC_ICT_Passport"] = '6' +#鍙拌優璇 +defineDict["SECURITY_FTDC_ICT_TaiwanCompatriotIDCard"] = '7' +#鍥炰埂璇 +defineDict["SECURITY_FTDC_ICT_HomeComingCard"] = '8' +#钀ヤ笟鎵х収鍙 +defineDict["SECURITY_FTDC_ICT_LicenseNo"] = '9' +#绋庡姟鐧昏鍙 +defineDict["SECURITY_FTDC_ICT_TaxNo"] = 'A' +#鍏朵粬璇佷欢 +defineDict["SECURITY_FTDC_ICT_OtherCard"] = 'x' + +typedefDict["TSecurityFtdcIdCardTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcIdentifiedCardNoType鏄竴涓瘉浠跺彿鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcIdentifiedCardNoType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcClientIDType鏄竴涓氦鏄撶紪鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcClientIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcAccountIDType鏄竴涓姇璧勮呭笎鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcAccountIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcClientTypeType鏄竴涓氦鏄撶紪鐮佺被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鏅 +defineDict["SECURITY_FTDC_CLT_Normal"] = '1' +#淇$敤浜ゆ槗 +defineDict["SECURITY_FTDC_CLT_Credit"] = '2' +#琛嶇敓鍝佽处鎴 +defineDict["SECURITY_FTDC_CLT_Derive"] = '3' +#鍏朵粬绫诲瀷 +defineDict["SECURITY_FTDC_CLT_Other"] = '4' + +typedefDict["TSecurityFtdcClientTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcInvestorGroupNameType鏄竴涓姇璧勮呭垎缁勫悕绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcInvestorGroupNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcUserIDType鏄竴涓敤鎴蜂唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcUserIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcUserNameType鏄竴涓敤鎴峰悕绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcUserNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFunctionCodeType鏄竴涓姛鑳戒唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +#寮哄埗鐢ㄦ埛鐧诲嚭 +defineDict["SECURITY_FTDC_FC_ForceUserLogout"] = '2' +#鍙樻洿绠$悊鐢ㄦ埛鍙d护 +defineDict["SECURITY_FTDC_FC_UserPasswordUpdate"] = '3' +#鍙樻洿缁忕邯鍏徃鍙d护 +defineDict["SECURITY_FTDC_FC_BrokerPasswordUpdate"] = '4' +#鍙樻洿鎶曡祫鑰呭彛浠 +defineDict["SECURITY_FTDC_FC_InvestorPasswordUpdate"] = '5' +#鎶ュ崟鎻掑叆 +defineDict["SECURITY_FTDC_FC_OrderInsert"] = '6' +#鎶ュ崟鎿嶄綔 +defineDict["SECURITY_FTDC_FC_OrderAction"] = '7' +#鍚屾绯荤粺鏁版嵁 +defineDict["SECURITY_FTDC_FC_SyncSystemData"] = '8' +#鍚屾缁忕邯鍏徃鏁版嵁 +defineDict["SECURITY_FTDC_FC_SyncBrokerData"] = '9' +#瓒呯骇鏌ヨ +defineDict["SECURITY_FTDC_FC_SuperQuery"] = 'B' +#鎶ュ崟鎻掑叆 +defineDict["SECURITY_FTDC_FC_ParkedOrderInsert"] = 'C' +#鎶ュ崟鎿嶄綔 +defineDict["SECURITY_FTDC_FC_ParkedOrderAction"] = 'D' +#鍚屾鍔ㄦ佷护鐗 +defineDict["SECURITY_FTDC_FC_SyncOTP"] = 'E' +#鏈煡鍗曟搷浣 +defineDict["SECURITY_FTDC_FC_UnkownOrderAction"] = 'F' +#杞墭绠 +defineDict["SECURITY_FTDC_FC_DepositoryTransfer"] = 'G' +#浣欏埜鍒掕浆 +defineDict["SECURITY_FTDC_FC_ExcessStockTransfer"] = 'H' + +typedefDict["TSecurityFtdcFunctionCodeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcUserTypeType鏄竴涓敤鎴风被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鎶曡祫鑰 +defineDict["SECURITY_FTDC_UT_Investor"] = '0' +#鎿嶄綔鍛 +defineDict["SECURITY_FTDC_UT_Operator"] = '1' +#绠$悊鍛 +defineDict["SECURITY_FTDC_UT_SuperUser"] = '2' + +typedefDict["TSecurityFtdcUserTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBrokerFunctionCodeType鏄竴涓粡绾叕鍙稿姛鑳戒唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +#寮哄埗鐢ㄦ埛鐧诲嚭 +defineDict["SECURITY_FTDC_BFC_ForceUserLogout"] = '1' +#鍙樻洿鐢ㄦ埛鍙d护 +defineDict["SECURITY_FTDC_BFC_UserPasswordUpdate"] = '2' +#鍚屾缁忕邯鍏徃鏁版嵁 +defineDict["SECURITY_FTDC_BFC_SyncBrokerData"] = '3' +#鎶ュ崟鎻掑叆 +defineDict["SECURITY_FTDC_BFC_OrderInsert"] = '5' +#鎶ュ崟鎿嶄綔 +defineDict["SECURITY_FTDC_BFC_OrderAction"] = '6' +#鍏ㄩ儴鏌ヨ +defineDict["SECURITY_FTDC_BFC_AllQuery"] = '7' +#鏈煡鍗曟搷浣 +defineDict["SECURITY_FTDC_BFC_UnkownOrderAction"] = '8' +#杞墭绠 +defineDict["SECURITY_FTDC_BFC_DepositoryTransfer"] = '9' +#浣欏埜鍒掕浆 +defineDict["SECURITY_FTDC_BFC_ExcessStockTransfer"] = 'A' +#璧勯噾鍐呰浆 +defineDict["SECURITY_FTDC_BFC_FundInterTransfer"] = 'B' +#绯荤粺鍔熻兘锛氱櫥鍏/鐧诲嚭/淇敼瀵嗙爜绛 +defineDict["SECURITY_FTDC_BFC_log"] = 'a' +#鍩烘湰鏌ヨ锛氭煡璇㈠熀纭鏁版嵁锛屽鍚堢害锛屼氦鏄撴墍绛夊父閲 +defineDict["SECURITY_FTDC_BFC_BaseQry"] = 'b' +#浜ゆ槗鏌ヨ锛氬鏌ユ垚浜わ紝濮旀墭 +defineDict["SECURITY_FTDC_BFC_TradeQry"] = 'c' +#浜ゆ槗鍔熻兘锛氭姤鍗曪紝鎾ゅ崟 +defineDict["SECURITY_FTDC_BFC_Trade"] = 'd' +#杞处 +defineDict["SECURITY_FTDC_BFC_Virement"] = 'e' +#鏌ヨ/绠$悊锛氭煡璇細璇濓紝韪汉绛 +defineDict["SECURITY_FTDC_BFC_Session"] = 'g' +#鍚屾鍔ㄦ佷护鐗 +defineDict["SECURITY_FTDC_BFC_SyncOTP"] = 'E' + +typedefDict["TSecurityFtdcBrokerFunctionCodeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCurrencyCodeType鏄竴涓竵绉嶇被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCurrencyCodeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcMoneyType鏄竴涓祫閲戠被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcMoneyType"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcRatioType鏄竴涓瘮鐜囩被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcRatioType"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcAccountTypeType鏄竴涓处鎴风被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鏅氳处鎴 +defineDict["SECURITY_FTDC_AcT_Normal"] = '1' +#淇$敤璐︽埛 +defineDict["SECURITY_FTDC_AcT_Credit"] = '2' +#琛嶇敓鍝佽处鎴 +defineDict["SECURITY_FTDC_AcT_Derive"] = '3' +#鍏朵粬绫诲瀷 +defineDict["SECURITY_FTDC_AcT_Other"] = '4' + +typedefDict["TSecurityFtdcAccountTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcDepartmentRangeType鏄竴涓姇璧勮呰寖鍥寸被鍨 +#////////////////////////////////////////////////////////////////////// +#鎵鏈 +defineDict["SECURITY_FTDC_DR_All"] = '1' +#缁勭粐鏋舵瀯 +defineDict["SECURITY_FTDC_DR_Group"] = '2' +#鍗曚竴鎶曡祫鑰 +defineDict["SECURITY_FTDC_DR_Single"] = '3' + +typedefDict["TSecurityFtdcDepartmentRangeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcUserRightTypeType鏄竴涓鎴锋潈闄愮被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鐧诲綍 +defineDict["SECURITY_FTDC_URT_Logon"] = '1' +#閾舵湡杞笎 +defineDict["SECURITY_FTDC_URT_Transfer"] = '2' +#閭瘎缁撶畻鍗 +defineDict["SECURITY_FTDC_URT_EMail"] = '3' +#浼犵湡缁撶畻鍗 +defineDict["SECURITY_FTDC_URT_Fax"] = '4' +#鏉′欢鍗 +defineDict["SECURITY_FTDC_URT_ConditionOrder"] = '5' + +typedefDict["TSecurityFtdcUserRightTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcProductInfoType鏄竴涓骇鍝佷俊鎭被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcProductInfoType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcAuthCodeType鏄竴涓鎴风璁よ瘉鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcAuthCodeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcLargeVolumeType鏄竴涓ぇ棰濇暟閲忕被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcLargeVolumeType"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcMillisecType鏄竴涓椂闂达紙姣锛夌被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcMillisecType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcHedgeFlagType鏄竴涓姇鏈哄淇濇爣蹇楃被鍨 +#////////////////////////////////////////////////////////////////////// +#鎶曟満 +defineDict["SECURITY_FTDC_HF_Speculation"] = '1' +#濂椾繚 +defineDict["SECURITY_FTDC_HF_Hedge"] = '3' + +typedefDict["TSecurityFtdcHedgeFlagType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcDirectionType鏄竴涓拱鍗栨柟鍚戠被鍨 +#////////////////////////////////////////////////////////////////////// +#涔 +defineDict["SECURITY_FTDC_D_Buy"] = '0' +#鍗 +defineDict["SECURITY_FTDC_D_Sell"] = '1' +#ETF鐢宠喘 +defineDict["SECURITY_FTDC_D_ETFPur"] = '2' +#ETF璧庡洖 +defineDict["SECURITY_FTDC_D_ETFRed"] = '3' +#鐜伴噾鏇夸唬锛屽彧鐢ㄤ綔鍥炴姤 +defineDict["SECURITY_FTDC_D_CashIn"] = '4' +#鍊哄埜鍏ュ簱 +defineDict["SECURITY_FTDC_D_PledgeBondIn"] = '5' +#鍊哄埜鍑哄簱 +defineDict["SECURITY_FTDC_D_PledgeBondOut"] = '6' +#閰嶈偂 +defineDict["SECURITY_FTDC_D_Rationed"] = '7' +#杞墭绠 +defineDict["SECURITY_FTDC_D_DepositoryTransfer"] = '8' +#淇$敤璐︽埛閰嶈偂 +defineDict["SECURITY_FTDC_D_CreditRationed"] = '9' +#鎷呬繚鍝佷拱鍏 +defineDict["SECURITY_FTDC_D_BuyCollateral"] = 'A' +#鎷呬繚鍝佸崠鍑 +defineDict["SECURITY_FTDC_D_SellCollateral"] = 'B' +#鎷呬繚鍝佽浆鍏 +defineDict["SECURITY_FTDC_D_CollateralTransferIn"] = 'C' +#鎷呬繚鍝佽浆鍑 +defineDict["SECURITY_FTDC_D_CollateralTransferOut"] = 'D' +#铻嶈祫涔板叆 +defineDict["SECURITY_FTDC_D_MarginTrade"] = 'E' +#铻嶅埜鍗栧嚭 +defineDict["SECURITY_FTDC_D_ShortSell"] = 'F' +#鍗栧埜杩樻 +defineDict["SECURITY_FTDC_D_RepayMargin"] = 'G' +#涔板埜杩樺埜 +defineDict["SECURITY_FTDC_D_RepayStock"] = 'H' +#鐩存帴杩樻 +defineDict["SECURITY_FTDC_D_DirectRepayMargin"] = 'I' +#鐩存帴杩樺埜 +defineDict["SECURITY_FTDC_D_DirectRepayStock"] = 'J' +#浣欏埜鍒掕浆 +defineDict["SECURITY_FTDC_D_ExcessStockTransfer"] = 'K' +#OF鐢宠喘 +defineDict["SECURITY_FTDC_D_OFPur"] = 'L' +#OF璧庡洖 +defineDict["SECURITY_FTDC_D_OFRed"] = 'M' +#SF鎷嗗垎 +defineDict["SECURITY_FTDC_D_SFSplit"] = 'N' +#SF鍚堝苟 +defineDict["SECURITY_FTDC_D_SFMerge"] = 'O' +#澶囧厬 +defineDict["SECURITY_FTDC_D_Covered"] = 'P' +#璇佸埜鍐荤粨(寮)/瑙e喕(骞) +defineDict["SECURITY_FTDC_D_Freeze"] = 'Q' +#琛屾潈 +defineDict["SECURITY_FTDC_D_Execute"] = 'R' + +typedefDict["TSecurityFtdcDirectionType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradeIDType鏄竴涓垚浜ょ紪鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcTradeIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradeTypeType鏄竴涓垚浜ょ被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鏅氭垚浜 +defineDict["SECURITY_FTDC_TRDT_Common"] = '0' +#鏈熸潈鎵ц +defineDict["SECURITY_FTDC_TRDT_OptionsExecution"] = '1' +#OTC鎴愪氦 +defineDict["SECURITY_FTDC_TRDT_OTC"] = '2' +#鏈熻浆鐜拌鐢熸垚浜 +defineDict["SECURITY_FTDC_TRDT_EFPDerived"] = '3' +#缁勫悎琛嶇敓鎴愪氦 +defineDict["SECURITY_FTDC_TRDT_CombinationDerived"] = '4' +#ETF鐢宠喘 +defineDict["SECURITY_FTDC_TRDT_EFTPurchase"] = '5' +#ETF璧庡洖 +defineDict["SECURITY_FTDC_TRDT_EFTRedem"] = '6' + +typedefDict["TSecurityFtdcTradeTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCreationredemptionStatusType鏄竴涓熀閲戝綋澶╃敵璐祹鍥炵姸鎬佺被鍨 +#////////////////////////////////////////////////////////////////////// +#涓嶅厑璁哥敵璐祹鍥 +defineDict["SECURITY_FTDC_CDS_Forbidden"] = '0' +#琛ㄧず鍏佽鐢宠喘鍜岃祹鍥 +defineDict["SECURITY_FTDC_CDS_Allow"] = '1' +#鍏佽鐢宠喘銆佷笉鍏佽璧庡洖 +defineDict["SECURITY_FTDC_CDS_OnlyPurchase"] = '2' +#涓嶅厑璁哥敵璐佸厑璁歌祹鍥 +defineDict["SECURITY_FTDC_CDS_OnlyRedeem"] = '3' + +typedefDict["TSecurityFtdcCreationredemptionStatusType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcETFCurrenceReplaceStatusType鏄竴涓狤TF鐜伴噾鏇夸唬鏍囧織绫诲瀷 +#////////////////////////////////////////////////////////////////////// +#绂佹鐜伴噾鏇夸唬 +defineDict["SECURITY_FTDC_ETFCRS_Forbidden"] = '0' +#鍙互鐜伴噾鏇夸唬 +defineDict["SECURITY_FTDC_ETFCRS_Allow"] = '1' +#蹇呴』鐜伴噾鏇夸唬 +defineDict["SECURITY_FTDC_ETFCRS_Force"] = '2' + +typedefDict["TSecurityFtdcETFCurrenceReplaceStatusType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcInterestType鏄竴涓埄鎭被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcInterestType"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcRepurchaseMaxTimesType鏄竴涓鍥炶喘鏀惧ぇ鍊嶆暟绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcRepurchaseMaxTimesType"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCapitalStockTypeType鏄竴涓偂鏈被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鎬婚氳偂鏈 +defineDict["SECURITY_FTDC_CPTSTOCK_TOTALSTOCK"] = '1' +#娴侀氳偂鏈 +defineDict["SECURITY_FTDC_CPTSTOCK_CIRCULATION"] = '2' + +typedefDict["TSecurityFtdcCapitalStockTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcMarginPriceTypeType鏄竴涓繚璇侀噾浠锋牸绫诲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +#鏄ㄧ粨绠椾环 +defineDict["SECURITY_FTDC_MPT_PreSettlementPrice"] = '1' +#鏈鏂颁环 +defineDict["SECURITY_FTDC_MPT_SettlementPrice"] = '2' +#鎴愪氦鍧囦环 +defineDict["SECURITY_FTDC_MPT_AveragePrice"] = '3' +#寮浠撲环 +defineDict["SECURITY_FTDC_MPT_OpenPrice"] = '4' + +typedefDict["TSecurityFtdcMarginPriceTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcAlgorithmType鏄竴涓泩浜忕畻娉曠被鍨 +#////////////////////////////////////////////////////////////////////// +#娴泩娴簭閮借绠 +defineDict["SECURITY_FTDC_AG_All"] = '1' +#娴泩涓嶈锛屾诞浜忚 +defineDict["SECURITY_FTDC_AG_OnlyLost"] = '2' +#娴泩璁★紝娴簭涓嶈 +defineDict["SECURITY_FTDC_AG_OnlyGain"] = '3' +#娴泩娴簭閮戒笉璁$畻 +defineDict["SECURITY_FTDC_AG_None"] = '4' + +typedefDict["TSecurityFtdcAlgorithmType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcIncludeCloseProfitType鏄竴涓槸鍚﹀寘鍚钩浠撶泩鍒╃被鍨 +#////////////////////////////////////////////////////////////////////// +#鍖呭惈骞充粨鐩堝埄 +defineDict["SECURITY_FTDC_ICP_Include"] = '0' +#涓嶅寘鍚钩浠撶泩鍒 +defineDict["SECURITY_FTDC_ICP_NotInclude"] = '2' + +typedefDict["TSecurityFtdcIncludeCloseProfitType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcAllWithoutTradeType鏄竴涓槸鍚﹀彈鍙彁姣斾緥闄愬埗绫诲瀷 +#////////////////////////////////////////////////////////////////////// +#涓嶅彈鍙彁姣斾緥闄愬埗 +defineDict["SECURITY_FTDC_AWT_Enable"] = '0' +#鍙楀彲鎻愭瘮渚嬮檺鍒 +defineDict["SECURITY_FTDC_AWT_Disable"] = '2' +#鏃犱粨涓嶅彈鍙彁姣斾緥闄愬埗 +defineDict["SECURITY_FTDC_AWT_NoHoldEnable"] = '3' + +typedefDict["TSecurityFtdcAllWithoutTradeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcHandlePositionAlgoIDType鏄竴涓寔浠撳鐞嗙畻娉曠紪鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +#鍩烘湰 +defineDict["SECURITY_FTDC_HPA_Base"] = '1' +#闈炰氦鏄 +defineDict["SECURITY_FTDC_HPA_NoneTrade"] = '4' +#璇佸埜 +defineDict["SECURITY_FTDC_HPA_Stock"] = '5' + +typedefDict["TSecurityFtdcHandlePositionAlgoIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradeParamIDType鏄竴涓氦鏄撶郴缁熷弬鏁颁唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +#绯荤粺鍔犲瘑绠楁硶 +defineDict["SECURITY_FTDC_TPID_EncryptionStandard"] = 'E' +#鐢ㄦ埛鏈澶т細璇濇暟 +defineDict["SECURITY_FTDC_TPID_SingleUserSessionMaxNum"] = 'S' +#鏈澶ц繛缁櫥褰曞け璐ユ暟 +defineDict["SECURITY_FTDC_TPID_LoginFailMaxNum"] = 'L' +#鏄惁寮哄埗璁よ瘉 +defineDict["SECURITY_FTDC_TPID_IsAuthForce"] = 'A' +#鏄惁鐢熸垚鐢ㄦ埛浜嬩欢 +defineDict["SECURITY_FTDC_TPID_GenUserEvent"] = 'G' +#璧峰鎶ュ崟鏈湴缂栧彿 +defineDict["SECURITY_FTDC_TPID_StartOrderLocalID"] = 'O' +#铻嶈祫铻嶅埜涔板埜杩樺埜绠楁硶 +defineDict["SECURITY_FTDC_TPID_RepayStockAlgo"] = 'R' +#琛嶇敓鍝佽处鎴疯祫閲戞彁鍙栫嚎 +defineDict["SECURITY_FTDC_TPID_DeriveWithdrawRatio"] = 'D' + +typedefDict["TSecurityFtdcTradeParamIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcSettlementParamValueType鏄竴涓弬鏁颁唬鐮佸肩被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcSettlementParamValueType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcMemoType鏄竴涓娉ㄧ被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcMemoType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPriorityType鏄竴涓紭鍏堢骇绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcPriorityType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOrderRefType鏄竴涓姤鍗曞紩鐢ㄧ被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcOrderRefType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcMarketIDType鏄竴涓競鍦轰唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcMarketIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcMacAddressType鏄竴涓狹ac鍦板潃绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcMacAddressType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcInstrumentNameType鏄竴涓悎绾﹀悕绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcInstrumentNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOrderSysIDType鏄竴涓姤鍗曠紪鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcOrderSysIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcIPAddressType鏄竴涓狪P鍦板潃绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcIPAddressType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcIPPortType鏄竴涓狪P绔彛绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcIPPortType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcProtocolInfoType鏄竴涓崗璁俊鎭被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcProtocolInfoType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcDepositSeqNoType鏄竴涓嚭鍏ラ噾娴佹按鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcDepositSeqNoType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcSystemNameType鏄竴涓郴缁熷悕绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcSystemNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcInvestorRangeType鏄竴涓姇璧勮呰寖鍥寸被鍨 +#////////////////////////////////////////////////////////////////////// +#鎵鏈 +defineDict["SECURITY_FTDC_IR_All"] = '1' +#鎶曡祫鑰呯粍 +defineDict["SECURITY_FTDC_IR_Group"] = '2' +#鍗曚竴鎶曡祫鑰 +defineDict["SECURITY_FTDC_IR_Single"] = '3' + +typedefDict["TSecurityFtdcInvestorRangeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcDataSyncStatusType鏄竴涓暟鎹悓姝ョ姸鎬佺被鍨 +#////////////////////////////////////////////////////////////////////// +#鏈悓姝 +defineDict["SECURITY_FTDC_DS_Asynchronous"] = '1' +#鍚屾涓 +defineDict["SECURITY_FTDC_DS_Synchronizing"] = '2' +#宸插悓姝 +defineDict["SECURITY_FTDC_DS_Synchronized"] = '3' + +typedefDict["TSecurityFtdcDataSyncStatusType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTraderConnectStatusType鏄竴涓氦鏄撴墍浜ゆ槗鍛樿繛鎺ョ姸鎬佺被鍨 +#////////////////////////////////////////////////////////////////////// +#娌℃湁浠讳綍杩炴帴 +defineDict["SECURITY_FTDC_TCS_NotConnected"] = '1' +#宸茬粡杩炴帴 +defineDict["SECURITY_FTDC_TCS_Connected"] = '2' +#宸茬粡鍙戝嚭鍚堢害鏌ヨ璇锋眰 +defineDict["SECURITY_FTDC_TCS_QryInstrumentSent"] = '3' +#璁㈤槄绉佹湁娴 +defineDict["SECURITY_FTDC_TCS_SubPrivateFlow"] = '4' + +typedefDict["TSecurityFtdcTraderConnectStatusType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOrderActionStatusType鏄竴涓姤鍗曟搷浣滅姸鎬佺被鍨 +#////////////////////////////////////////////////////////////////////// +#宸茬粡鎻愪氦 +defineDict["SECURITY_FTDC_OAS_Submitted"] = 'a' +#宸茬粡鎺ュ彈 +defineDict["SECURITY_FTDC_OAS_Accepted"] = 'b' +#宸茬粡琚嫆缁 +defineDict["SECURITY_FTDC_OAS_Rejected"] = 'c' + +typedefDict["TSecurityFtdcOrderActionStatusType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOrderStatusType鏄竴涓姤鍗曠姸鎬佺被鍨 +#////////////////////////////////////////////////////////////////////// +#鍏ㄩ儴鎴愪氦 +defineDict["SECURITY_FTDC_OST_AllTraded"] = '0' +#閮ㄥ垎鎴愪氦杩樺湪闃熷垪涓 +defineDict["SECURITY_FTDC_OST_PartTradedQueueing"] = '1' +#閮ㄥ垎鎴愪氦涓嶅湪闃熷垪涓 +defineDict["SECURITY_FTDC_OST_PartTradedNotQueueing"] = '2' +#鏈垚浜よ繕鍦ㄩ槦鍒椾腑 +defineDict["SECURITY_FTDC_OST_NoTradeQueueing"] = '3' +#鏈垚浜や笉鍦ㄩ槦鍒椾腑 +defineDict["SECURITY_FTDC_OST_NoTradeNotQueueing"] = '4' +#鎾ゅ崟 +defineDict["SECURITY_FTDC_OST_Canceled"] = '5' +#鏈煡 +defineDict["SECURITY_FTDC_OST_Unknown"] = 'a' +#灏氭湭瑙﹀彂 +defineDict["SECURITY_FTDC_OST_NotTouched"] = 'b' +#宸茶Е鍙 +defineDict["SECURITY_FTDC_OST_Touched"] = 'c' + +typedefDict["TSecurityFtdcOrderStatusType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOrderSubmitStatusType鏄竴涓姤鍗曟彁浜ょ姸鎬佺被鍨 +#////////////////////////////////////////////////////////////////////// +#宸茬粡鎻愪氦 +defineDict["SECURITY_FTDC_OSS_InsertSubmitted"] = '0' +#鎾ゅ崟宸茬粡鎻愪氦 +defineDict["SECURITY_FTDC_OSS_CancelSubmitted"] = '1' +#淇敼宸茬粡鎻愪氦 +defineDict["SECURITY_FTDC_OSS_ModifySubmitted"] = '2' +#宸茬粡鎺ュ彈 +defineDict["SECURITY_FTDC_OSS_Accepted"] = '3' +#鎶ュ崟宸茬粡琚嫆缁 +defineDict["SECURITY_FTDC_OSS_InsertRejected"] = '4' +#鎾ゅ崟宸茬粡琚嫆缁 +defineDict["SECURITY_FTDC_OSS_CancelRejected"] = '5' +#鏀瑰崟宸茬粡琚嫆缁 +defineDict["SECURITY_FTDC_OSS_ModifyRejected"] = '6' + +typedefDict["TSecurityFtdcOrderSubmitStatusType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPositionDateType鏄竴涓寔浠撴棩鏈熺被鍨 +#////////////////////////////////////////////////////////////////////// +#浠婃棩鎸佷粨 +defineDict["SECURITY_FTDC_PSD_Today"] = '1' +#鍘嗗彶鎸佷粨 +defineDict["SECURITY_FTDC_PSD_History"] = '2' + +typedefDict["TSecurityFtdcPositionDateType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradingRoleType鏄竴涓氦鏄撹鑹茬被鍨 +#////////////////////////////////////////////////////////////////////// +#浠g悊 +defineDict["SECURITY_FTDC_ER_Broker"] = '1' +#鑷惀 +defineDict["SECURITY_FTDC_ER_Host"] = '2' +#鍋氬競鍟 +defineDict["SECURITY_FTDC_ER_Maker"] = '3' + +typedefDict["TSecurityFtdcTradingRoleType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPosiDirectionType鏄竴涓寔浠撳绌烘柟鍚戠被鍨 +#////////////////////////////////////////////////////////////////////// +#鍑 +defineDict["SECURITY_FTDC_PD_Net"] = '1' +#澶氬ご +defineDict["SECURITY_FTDC_PD_Long"] = '2' +#绌哄ご +defineDict["SECURITY_FTDC_PD_Short"] = '3' +#澶囧厬 +defineDict["SECURITY_FTDC_PD_Covered"] = '4' + +typedefDict["TSecurityFtdcPosiDirectionType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOrderPriceTypeType鏄竴涓姤鍗曚环鏍兼潯浠剁被鍨 +#////////////////////////////////////////////////////////////////////// +#鍗虫椂鎴愪氦鍓╀綑鎾ら攢甯備环鍗 +defineDict["SECURITY_FTDC_OPT_AnyPrice"] = '1' +#闄愪环 +defineDict["SECURITY_FTDC_OPT_LimitPrice"] = '2' +#鏈浼樹簲妗e嵆鏃舵垚浜ゅ墿浣欐挙閿甯備环鍗 +defineDict["SECURITY_FTDC_OPT_BestPrice"] = '3' +#鏈浼樹簲妗e嵆鏃舵垚浜ゅ墿浣欒浆闄愪环甯備环鍗 +defineDict["SECURITY_FTDC_OPT_BestLimitPrice"] = '4' +#鍏ㄩ儴鎴愪氦鎴栨挙閿甯備环鍗 +defineDict["SECURITY_FTDC_OPT_AllPrice"] = '5' +#鏈柟鏈浼樹环鏍煎競浠峰崟 +defineDict["SECURITY_FTDC_OPT_ForwardBestPrice"] = '6' +#瀵规柟鏈浼樹环鏍煎競浠峰崟 +defineDict["SECURITY_FTDC_OPT_ReverseBestPrice"] = '7' +#鍗虫椂鎴愪氦鍓╀綑杞檺浠峰競浠峰崟 +defineDict["SECURITY_FTDC_OPT_Any2LimitPrice"] = '8' +#鍏ㄩ儴鎴愪氦鎴栨挙閿闄愪环鍗 +defineDict["SECURITY_FTDC_OPT_AllLimitPrice"] = '9' +#婵娲籄鑲$綉缁滃瘑鐮佹湇鍔′唬鐮 +defineDict["SECURITY_FTDC_OPT_ActiveANetPassSvrCode"] = 'G' +#娉ㄩ攢A鑲$綉缁滃瘑鐮佹湇鍔′唬鐮 +defineDict["SECURITY_FTDC_OPT_InactiveANetPassSvrCode"] = 'H' +#婵娲籅鑲$綉缁滃瘑鐮佹湇鍔′唬鐮 +defineDict["SECURITY_FTDC_OPT_ActiveBNetPassSvrCode"] = 'I' +#娉ㄩ攢B鑲$綉缁滃瘑鐮佹湇鍔′唬鐮 +defineDict["SECURITY_FTDC_OPT_InactiveBNetPassSvrCode"] = 'J' +#鍥炶喘娉ㄩ攢 +defineDict["SECURITY_FTDC_OPT_Repurchase"] = 'K' +#鎸囧畾鎾ら攢 +defineDict["SECURITY_FTDC_OPT_DesignatedCancel"] = 'L' +#鎸囧畾鐧昏 +defineDict["SECURITY_FTDC_OPT_Designated"] = 'M' +#璇佸埜鍙備笌鐢宠喘 +defineDict["SECURITY_FTDC_OPT_SubscribingShares"] = 'N' +#璇佸埜鍙備笌閰嶈偂 +defineDict["SECURITY_FTDC_OPT_Split"] = 'O' +#瑕佺害鏀惰喘鐧昏 +defineDict["SECURITY_FTDC_OPT_TenderOffer"] = 'P' +#瑕佺害鏀惰喘鎾ら攢 +defineDict["SECURITY_FTDC_OPT_TenderOfferCancel"] = 'Q' +#璇佸埜鎶曠エ +defineDict["SECURITY_FTDC_OPT_Ballot"] = 'R' +#鍙浆鍊鸿浆鎹㈢櫥璁 +defineDict["SECURITY_FTDC_OPT_ConvertibleBondsConvet"] = 'S' +#鍙浆鍊哄洖鍞櫥璁 +defineDict["SECURITY_FTDC_OPT_ConvertibleBondsRepurchase"] = 'T' +#鏉冭瘉琛屾潈 +defineDict["SECURITY_FTDC_OPT_Exercise"] = 'U' +#寮鏀惧紡鍩洪噾鐢宠喘 +defineDict["SECURITY_FTDC_OPT_PurchasingFunds"] = 'V' +#寮鏀惧紡鍩洪噾璧庡洖 +defineDict["SECURITY_FTDC_OPT_RedemingFunds"] = 'W' +#寮鏀惧紡鍩洪噾璁よ喘 +defineDict["SECURITY_FTDC_OPT_SubscribingFunds"] = 'X' +#寮鏀惧紡鍩洪噾杞墭绠¤浆鍑 +defineDict["SECURITY_FTDC_OPT_LOFIssue"] = 'Y' +#寮鏀惧紡鍩洪噾璁剧疆鍒嗙孩鏂瑰紡 +defineDict["SECURITY_FTDC_OPT_LOFSetBonusType"] = 'Z' +#寮鏀惧紡鍩洪噾杞崲涓哄叾浠栧熀閲 +defineDict["SECURITY_FTDC_OPT_LOFConvert"] = 'a' +#鍊哄埜鍏ュ簱 +defineDict["SECURITY_FTDC_OPT_DebentureStockIn"] = 'b' +#鍊哄埜鍑哄簱 +defineDict["SECURITY_FTDC_OPT_DebentureStockOut"] = 'c' +#ETF鐢宠喘 +defineDict["SECURITY_FTDC_OPT_PurchasesETF"] = 'd' +#ETF璧庡洖 +defineDict["SECURITY_FTDC_OPT_RedeemETF"] = 'e' + +typedefDict["TSecurityFtdcOrderPriceTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOffsetFlagType鏄竴涓紑骞虫爣蹇楃被鍨 +#////////////////////////////////////////////////////////////////////// +#寮浠 +defineDict["SECURITY_FTDC_OF_Open"] = '0' +#骞充粨 +defineDict["SECURITY_FTDC_OF_Close"] = '1' +#寮哄钩 +defineDict["SECURITY_FTDC_OF_ForceClose"] = '2' +#骞充粖 +defineDict["SECURITY_FTDC_OF_CloseToday"] = '3' +#骞虫槰 +defineDict["SECURITY_FTDC_OF_CloseYesterday"] = '4' +#寮哄噺 +defineDict["SECURITY_FTDC_OF_ForceOff"] = '5' +#鏈湴寮哄钩 +defineDict["SECURITY_FTDC_OF_LocalForceClose"] = '6' + +typedefDict["TSecurityFtdcOffsetFlagType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcForceCloseReasonType鏄竴涓己骞冲師鍥犵被鍨 +#////////////////////////////////////////////////////////////////////// +#闈炲己骞 +defineDict["SECURITY_FTDC_FCC_NotForceClose"] = '0' +#璧勯噾涓嶈冻 +defineDict["SECURITY_FTDC_FCC_LackDeposit"] = '1' +#瀹㈡埛瓒呬粨 +defineDict["SECURITY_FTDC_FCC_ClientOverPositionLimit"] = '2' +#浼氬憳瓒呬粨 +defineDict["SECURITY_FTDC_FCC_MemberOverPositionLimit"] = '3' +#鎸佷粨闈炴暣鏁板 +defineDict["SECURITY_FTDC_FCC_NotMultiple"] = '4' +#杩濊 +defineDict["SECURITY_FTDC_FCC_Violation"] = '5' +#鍏跺畠 +defineDict["SECURITY_FTDC_FCC_Other"] = '6' +#鑷劧浜轰复杩戜氦鍓 +defineDict["SECURITY_FTDC_FCC_PersonDeliv"] = '7' + +typedefDict["TSecurityFtdcForceCloseReasonType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOrderTypeType鏄竴涓姤鍗曠被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#姝e父 +defineDict["SECURITY_FTDC_ORDT_Normal"] = '0' +#鎶ヤ环琛嶇敓 +defineDict["SECURITY_FTDC_ORDT_DeriveFromQuote"] = '1' +#缁勫悎琛嶇敓 +defineDict["SECURITY_FTDC_ORDT_DeriveFromCombination"] = '2' +#缁勫悎鎶ュ崟 +defineDict["SECURITY_FTDC_ORDT_Combination"] = '3' +#鏉′欢鍗 +defineDict["SECURITY_FTDC_ORDT_ConditionalOrder"] = '4' +#浜掓崲鍗 +defineDict["SECURITY_FTDC_ORDT_Swap"] = '5' + +typedefDict["TSecurityFtdcOrderTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTimeConditionType鏄竴涓湁鏁堟湡绫诲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +#绔嬪嵆瀹屾垚锛屽惁鍒欐挙閿 +defineDict["SECURITY_FTDC_TC_IOC"] = '1' +#鏈妭鏈夋晥 +defineDict["SECURITY_FTDC_TC_GFS"] = '2' +#褰撴棩鏈夋晥 +defineDict["SECURITY_FTDC_TC_GFD"] = '3' +#鎸囧畾鏃ユ湡鍓嶆湁鏁 +defineDict["SECURITY_FTDC_TC_GTD"] = '4' +#鎾ら攢鍓嶆湁鏁 +defineDict["SECURITY_FTDC_TC_GTC"] = '5' +#闆嗗悎绔炰环鏈夋晥 +defineDict["SECURITY_FTDC_TC_GFA"] = '6' + +typedefDict["TSecurityFtdcTimeConditionType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVolumeConditionType鏄竴涓垚浜ら噺绫诲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +#浠讳綍鏁伴噺 +defineDict["SECURITY_FTDC_VC_AV"] = '1' +#鏈灏忔暟閲 +defineDict["SECURITY_FTDC_VC_MV"] = '2' +#鍏ㄩ儴鏁伴噺 +defineDict["SECURITY_FTDC_VC_CV"] = '3' + +typedefDict["TSecurityFtdcVolumeConditionType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcContingentConditionType鏄竴涓Е鍙戞潯浠剁被鍨 +#////////////////////////////////////////////////////////////////////// +#绔嬪嵆 +defineDict["SECURITY_FTDC_CC_Immediately"] = '1' +#姝㈡崯 +defineDict["SECURITY_FTDC_CC_Touch"] = '2' +#姝㈣耽 +defineDict["SECURITY_FTDC_CC_TouchProfit"] = '3' +#棰勫煁鍗 +defineDict["SECURITY_FTDC_CC_ParkedOrder"] = '4' +#鏈鏂颁环澶т簬鏉′欢浠 +defineDict["SECURITY_FTDC_CC_LastPriceGreaterThanStopPrice"] = '5' +#鏈鏂颁环澶т簬绛変簬鏉′欢浠 +defineDict["SECURITY_FTDC_CC_LastPriceGreaterEqualStopPrice"] = '6' +#鏈鏂颁环灏忎簬鏉′欢浠 +defineDict["SECURITY_FTDC_CC_LastPriceLesserThanStopPrice"] = '7' +#鏈鏂颁环灏忎簬绛変簬鏉′欢浠 +defineDict["SECURITY_FTDC_CC_LastPriceLesserEqualStopPrice"] = '8' +#鍗栦竴浠峰ぇ浜庢潯浠朵环 +defineDict["SECURITY_FTDC_CC_AskPriceGreaterThanStopPrice"] = '9' +#鍗栦竴浠峰ぇ浜庣瓑浜庢潯浠朵环 +defineDict["SECURITY_FTDC_CC_AskPriceGreaterEqualStopPrice"] = 'A' +#鍗栦竴浠峰皬浜庢潯浠朵环 +defineDict["SECURITY_FTDC_CC_AskPriceLesserThanStopPrice"] = 'B' +#鍗栦竴浠峰皬浜庣瓑浜庢潯浠朵环 +defineDict["SECURITY_FTDC_CC_AskPriceLesserEqualStopPrice"] = 'C' +#涔颁竴浠峰ぇ浜庢潯浠朵环 +defineDict["SECURITY_FTDC_CC_BidPriceGreaterThanStopPrice"] = 'D' +#涔颁竴浠峰ぇ浜庣瓑浜庢潯浠朵环 +defineDict["SECURITY_FTDC_CC_BidPriceGreaterEqualStopPrice"] = 'E' +#涔颁竴浠峰皬浜庢潯浠朵环 +defineDict["SECURITY_FTDC_CC_BidPriceLesserThanStopPrice"] = 'F' +#涔颁竴浠峰皬浜庣瓑浜庢潯浠朵环 +defineDict["SECURITY_FTDC_CC_BidPriceLesserEqualStopPrice"] = 'H' + +typedefDict["TSecurityFtdcContingentConditionType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcActionFlagType鏄竴涓搷浣滄爣蹇楃被鍨 +#////////////////////////////////////////////////////////////////////// +#鍒犻櫎 +defineDict["SECURITY_FTDC_AF_Delete"] = '0' +#淇敼 +defineDict["SECURITY_FTDC_AF_Modify"] = '3' + +typedefDict["TSecurityFtdcActionFlagType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradingRightType鏄竴涓氦鏄撴潈闄愮被鍨 +#////////////////////////////////////////////////////////////////////// +#鍙互浜ゆ槗 +defineDict["SECURITY_FTDC_TR_Allow"] = '0' +#涓嶈兘浜ゆ槗 +defineDict["SECURITY_FTDC_TR_Forbidden"] = '2' + +typedefDict["TSecurityFtdcTradingRightType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOrderSourceType鏄竴涓姤鍗曟潵婧愮被鍨 +#////////////////////////////////////////////////////////////////////// +#鏉ヨ嚜鍙備笌鑰 +defineDict["SECURITY_FTDC_OSRC_Participant"] = '0' +#鏉ヨ嚜绠$悊鍛 +defineDict["SECURITY_FTDC_OSRC_Administrator"] = '1' + +typedefDict["TSecurityFtdcOrderSourceType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPriceSourceType鏄竴涓垚浜や环鏉ユ簮绫诲瀷 +#////////////////////////////////////////////////////////////////////// +#鍓嶆垚浜や环 +defineDict["SECURITY_FTDC_PSRC_LastPrice"] = '0' +#涔板鎵樹环 +defineDict["SECURITY_FTDC_PSRC_Buy"] = '1' +#鍗栧鎵樹环 +defineDict["SECURITY_FTDC_PSRC_Sell"] = '2' + +typedefDict["TSecurityFtdcPriceSourceType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOrderActionRefType鏄竴涓姤鍗曟搷浣滃紩鐢ㄧ被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcOrderActionRefType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFrontIDType鏄竴涓墠缃紪鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcFrontIDType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcSessionIDType鏄竴涓細璇濈紪鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcSessionIDType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcInstallIDType鏄竴涓畨瑁呯紪鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcInstallIDType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcSequenceNoType鏄竴涓簭鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcSequenceNoType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcRequestIDType鏄竴涓姹傜紪鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcRequestIDType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCombOffsetFlagType鏄竴涓粍鍚堝紑骞虫爣蹇楃被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCombOffsetFlagType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCombHedgeFlagType鏄竴涓粍鍚堟姇鏈哄淇濇爣蹇楃被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCombHedgeFlagType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcSequenceSeriesType鏄竴涓簭鍒楃郴鍒楀彿绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcSequenceSeriesType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCommPhaseNoType鏄竴涓氳鏃舵缂栧彿绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCommPhaseNoType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcUserEventTypeType鏄竴涓敤鎴蜂簨浠剁被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鐧诲綍 +defineDict["SECURITY_FTDC_UET_Login"] = '1' +#鐧诲嚭 +defineDict["SECURITY_FTDC_UET_Logout"] = '2' +#浜ゆ槗鎴愬姛 +defineDict["SECURITY_FTDC_UET_Trading"] = '3' +#浜ゆ槗澶辫触 +defineDict["SECURITY_FTDC_UET_TradingError"] = '4' +#淇敼瀵嗙爜 +defineDict["SECURITY_FTDC_UET_UpdatePassword"] = '5' +#瀹㈡埛绔璇 +defineDict["SECURITY_FTDC_UET_Authenticate"] = '6' +#鍏朵粬 +defineDict["SECURITY_FTDC_UET_Other"] = '9' + +typedefDict["TSecurityFtdcUserEventTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcUserEventInfoType鏄竴涓敤鎴蜂簨浠朵俊鎭被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcUserEventInfoType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOTPTypeType鏄竴涓姩鎬佷护鐗岀被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鏃犲姩鎬佷护鐗 +defineDict["SECURITY_FTDC_OTP_NONE"] = '0' +#鏃堕棿浠ょ墝 +defineDict["SECURITY_FTDC_OTP_TOTP"] = '1' + +typedefDict["TSecurityFtdcOTPTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradeSourceType鏄竴涓垚浜ゆ潵婧愮被鍨 +#////////////////////////////////////////////////////////////////////// +#鏉ヨ嚜浜ゆ槗鎵鏅氬洖鎶 +defineDict["SECURITY_FTDC_TSRC_NORMAL"] = '0' +#鏉ヨ嚜鏌ヨ +defineDict["SECURITY_FTDC_TSRC_QUERY"] = '1' + +typedefDict["TSecurityFtdcTradeSourceType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBranchIDType鏄竴涓惀涓氶儴缂栧彿绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBranchIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcStockPriceType鏄竴涓瘉鍒镐氦鏄撲环鏍肩被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcStockPriceType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcRightModelIDType鏄竴涓偂绁ㄦ潈闄愭ā鐗堜唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcRightModelIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcSerialNumberType鏄竴涓簭鍒楀彿绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcSerialNumberType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcInstrumentRangeType鏄竴涓偂绁ㄦ潈闄愬垎绫荤被鍨 +#////////////////////////////////////////////////////////////////////// +#鎵鏈 +defineDict["SECURITY_FTDC_INR_All"] = '1' +#浜у搧 +defineDict["SECURITY_FTDC_INR_Product"] = '2' +#鑲$エ鏉冮檺妯$増 +defineDict["SECURITY_FTDC_INR_Model"] = '3' +#鑲$エ +defineDict["SECURITY_FTDC_INR_Stock"] = '4' +#甯傚満 +defineDict["SECURITY_FTDC_INR_Market"] = '5' + +typedefDict["TSecurityFtdcInstrumentRangeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBusinessUnitType鏄竴涓笟鍔″崟鍏冪被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBusinessUnitType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOTPVendorsIDType鏄竴涓姩鎬佷护鐗屾彁渚涘晢绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcOTPVendorsIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcLastDriftType鏄竴涓笂娆TP婕傜Щ鍊肩被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcLastDriftType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcLastSuccessType鏄竴涓笂娆TP鎴愬姛鍊肩被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcLastSuccessType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcAuthKeyType鏄竴涓护鐗屽瘑閽ョ被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcAuthKeyType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcUserSessionHashType鏄竴涓敤鎴蜂細璇滺ash鍊肩被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcUserSessionHashType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcStockTradeTypeType鏄竴涓瘉鍒镐氦鏄撶被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鍙氦鏄撹瘉鍒 +defineDict["SECURITY_FTDC_STT_Stock"] = '0' +#涔板叆缃戠粶瀵嗙爜鏈嶅姟 +defineDict["SECURITY_FTDC_STT_BuyNetService"] = '1' +#鍥炶喘娉ㄩ攢 +defineDict["SECURITY_FTDC_STT_CancelRepurchase"] = '2' +#鎸囧畾鎾ら攢 +defineDict["SECURITY_FTDC_STT_CancelRegister"] = '3' +#鎸囧畾鐧昏 +defineDict["SECURITY_FTDC_STT_Register"] = '4' +#涔板叆鍙戣鐢宠喘 +defineDict["SECURITY_FTDC_STT_PurchaseIssue"] = '5' +#鍗栧嚭閰嶈偂 +defineDict["SECURITY_FTDC_STT_Allotment"] = '6' +#鍗栧嚭瑕佺害鏀惰喘 +defineDict["SECURITY_FTDC_STT_SellTender"] = '7' +#涔板叆瑕佺害鏀惰喘 +defineDict["SECURITY_FTDC_STT_BuyTender"] = '8' +#缃戜笂鎶曠エ +defineDict["SECURITY_FTDC_STT_NetVote"] = '9' +#鍗栧嚭鍙浆鍊哄洖鍞 +defineDict["SECURITY_FTDC_STT_SellConvertibleBonds"] = 'a' +#鏉冭瘉琛屾潈浠g爜 +defineDict["SECURITY_FTDC_STT_OptionExecute"] = 'b' +#寮鏀惧紡鍩洪噾鐢宠喘 +defineDict["SECURITY_FTDC_STT_PurchaseOF"] = 'c' +#寮鏀惧紡鍩洪噾璧庡洖 +defineDict["SECURITY_FTDC_STT_RedeemOF"] = 'd' +#寮鏀惧紡鍩洪噾璁よ喘 +defineDict["SECURITY_FTDC_STT_SubscribeOF"] = 'e' +#寮鏀惧紡鍩洪噾杞墭绠¤浆鍑 +defineDict["SECURITY_FTDC_STT_OFCustodianTranfer"] = 'f' +#寮鏀惧紡鍩洪噾鍒嗙孩璁剧疆 +defineDict["SECURITY_FTDC_STT_OFDividendConfig"] = 'g' +#寮鏀惧紡鍩洪噾杞垚鍏朵粬鍩洪噾 +defineDict["SECURITY_FTDC_STT_OFTransfer"] = 'h' +#鍊哄埜鍏ュ簱 +defineDict["SECURITY_FTDC_STT_BondsIn"] = 'i' +#鍊哄埜鍑哄簱 +defineDict["SECURITY_FTDC_STT_BondsOut"] = 'j' +#EFT鐢宠喘 +defineDict["SECURITY_FTDC_STT_PurchaseETF"] = 'k' +#EFT璧庡洖 +defineDict["SECURITY_FTDC_STT_RedeemETF"] = 'l' +#鍙浆鍊哄洖鍞櫥璁 +defineDict["SECURITY_FTDC_STT_ConvertibleRegister"] = 'm' + +typedefDict["TSecurityFtdcStockTradeTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcHandleTradingAccountAlgoIDType鏄竴涓祫閲戝鐞嗙畻娉曠紪鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +#鍩烘湰 +defineDict["SECURITY_FTDC_HTAA_Base"] = '1' + +typedefDict["TSecurityFtdcHandleTradingAccountAlgoIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcStockWthType鏄竴涓偂绁ㄤ娇鐢ㄦ祦姘村彿绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcStockWthType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcStockSeqType鏄竴涓偂绁ㄤ娇鐢ㄦ祦姘村彿绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcStockSeqType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcWTFSType鏄竴涓鎵樻柟寮忕被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcWTFSType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcWTLBType鏄竴涓鎵樼被鍒被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcWTLBType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcWTRQType鏄竴涓鎵樻棩鏈熺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcWTRQType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcINTEGERType鏄竴涓竴鑸暣鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcINTEGERType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcINT3Type鏄竴涓笁浣嶆暟鏁村瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcINT3Type"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcINT6Type鏄竴涓叚浣嶆暟鏁村瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcINT6Type"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcINT12Type鏄竴涓崄浜屼綅鏁版暣鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcINT12Type"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR1Type鏄竴涓竴瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR1Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR2Type鏄竴涓簩瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR2Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR3Type鏄竴涓笁瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR3Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR4Type鏄竴涓洓瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR4Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR5Type鏄竴涓簲瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR5Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR6Type鏄竴涓叚瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR6Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR8Type鏄竴涓叓瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR8Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR10Type鏄竴涓崄瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR10Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR11Type鏄竴涓崄涓瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR11Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR12Type鏄竴涓崄浜屽瓧鑺侰HAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR12Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR13Type鏄竴涓崄涓夊瓧鑺侰HAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR13Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR14Type鏄竴涓崄鍥涘瓧鑺侰HAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR14Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR16Type鏄竴涓崄鍏瓧鑺侰HAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR16Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR19Type鏄竴涓崄涔濆瓧鑺侰HAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR19Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR20Type鏄竴涓簩鍗佸瓧鑺侰HAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR20Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR21Type鏄竴涓簩鍗佷竴瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR21Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR23Type鏄竴涓簩鍗佷笁瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR23Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR30Type鏄竴涓笁鍗佸瓧鑺侰HAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR30Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR32Type鏄竴涓笁鍗佷簩瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR32Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR50Type鏄竴涓簲鍗佸瓧鑺侰HAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR50Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR64Type鏄竴涓叚鍗佸洓瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR64Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCHAR65Type鏄竴涓叚鍗佷簲瀛楄妭CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCHAR65Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR4Type鏄竴涓洓瀛楄妭VCHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR4Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR6Type鏄竴涓叚瀛楄妭VCHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR6Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR8Type鏄竴涓叓瀛楄妭VCHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR8Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR10Type鏄竴涓崄瀛楄妭VCHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR10Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR12Type鏄竴涓崄浜屽瓧鑺俈CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR12Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR16Type鏄竴涓崄鍏瓧鑺俈CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR16Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR20Type鏄竴涓簩鍗佸瓧鑺俈CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR20Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR30Type鏄竴涓笁鍗佸瓧鑺俈CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR30Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR50Type鏄竴涓簲鍗佸瓧鑺俈CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR50Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR60Type鏄竴涓叚鍗佸瓧鑺俈CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR60Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR65Type鏄竴涓叚鍗佷簲瀛楄妭VCHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR65Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR80Type鏄竴涓叓鍗佸瓧鑺俈CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR80Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR84Type鏄竴涓叓鍗佸洓瀛楄妭VCHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR84Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR255Type鏄竴涓簩浜斾簲瀛楄妭VCHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR255Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcVCHAR1024Type鏄竴涓竴闆朵簩鍥涘瓧鑺俈CHAR绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcVCHAR1024Type"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcREAL8P3Type鏄竴涓叓鐐逛笁瀹炲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcREAL8P3Type"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcREAL9P3Type鏄竴涓節鐐逛笁瀹炲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcREAL9P3Type"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcREAL9P6Type鏄竴涓節鐐瑰叚瀹炲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcREAL9P6Type"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcREAL10P4Type鏄竴涓崄鐐瑰洓瀹炲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcREAL10P4Type"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcREAL16P2Type鏄竴涓崄鍏偣浜屽疄鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcREAL16P2Type"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcREAL16P8Type鏄竴涓崄鍏偣鍏疄鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcREAL16P8Type"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcREAL22P2Type鏄竴涓簩鍗佷簩鐐逛簩瀹炲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcREAL22P2Type"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCommandNoType鏄竴涓狣B鍛戒护搴忓彿绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCommandNoType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCommandTypeType鏄竴涓狣B鍛戒护绫诲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCommandTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcSettlementGroupIDType鏄竴涓粨绠楃粍浠g爜绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcSettlementGroupIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFieldNameType鏄竴涓瓧娈靛悕绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcFieldNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFieldContentType鏄竴涓瓧娈靛唴瀹圭被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcFieldContentType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBankIDType鏄竴涓摱琛屼唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBankIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBankNameType鏄竴涓摱琛屽悕绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBankNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBankBrchIDType鏄竴涓摱琛屽垎涓績浠g爜绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBankBrchIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcLiberSerialType鏄竴涓狶iber绯荤粺娴佹按鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcLiberSerialType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcRoleIDType鏄竴涓鑹茬紪鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcRoleIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcRoleNameType鏄竴涓鑹插悕绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcRoleNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcDescriptionType鏄竴涓弿杩扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcDescriptionType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFunctionIDType鏄竴涓姛鑳戒唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcFunctionIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBillNoType鏄竴涓エ鎹彿绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBillNoType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFundIOTypeType鏄竴涓嚭鍏ラ噾绫诲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +#鍑哄叆閲 +defineDict["SECURITY_FTDC_FIOT_FundIO"] = '1' +#閾舵湡杞笎 +defineDict["SECURITY_FTDC_FIOT_Transfer"] = '2' + +typedefDict["TSecurityFtdcFundIOTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFundTypeType鏄竴涓祫閲戠被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#閾惰瀛樻 +defineDict["SECURITY_FTDC_FT_Deposite"] = '1' +#鍒嗛」璧勯噾 +defineDict["SECURITY_FTDC_FT_ItemFund"] = '2' +#鍏徃璋冩暣 +defineDict["SECURITY_FTDC_FT_Company"] = '3' + +typedefDict["TSecurityFtdcFundTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFundDirectionType鏄竴涓嚭鍏ラ噾鏂瑰悜绫诲瀷 +#////////////////////////////////////////////////////////////////////// +#鍏ラ噾 +defineDict["SECURITY_FTDC_FD_In"] = '1' +#鍑洪噾 +defineDict["SECURITY_FTDC_FD_Out"] = '2' + +typedefDict["TSecurityFtdcFundDirectionType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBankFlagType鏄竴涓摱琛岀粺涓鏍囪瘑绫诲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +#宸ュ晢閾惰 +defineDict["SECURITY_FTDC_BF_ICBC"] = '1' +#鍐滀笟閾惰 +defineDict["SECURITY_FTDC_BF_ABC"] = '2' +#涓浗閾惰 +defineDict["SECURITY_FTDC_BF_BC"] = '3' +#寤鸿閾惰 +defineDict["SECURITY_FTDC_BF_CBC"] = '4' +#浜ら氶摱琛 +defineDict["SECURITY_FTDC_BF_BOC"] = '5' +#鍏朵粬閾惰 +defineDict["SECURITY_FTDC_BF_Other"] = 'Z' + +typedefDict["TSecurityFtdcBankFlagType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOperationMemoType鏄竴涓搷浣滄憳瑕佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcOperationMemoType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFundStatusType鏄竴涓祫閲戠姸鎬佺被鍨 +#////////////////////////////////////////////////////////////////////// +#宸插綍鍏 +defineDict["SECURITY_FTDC_FS_Record"] = '1' +#宸插鏍 +defineDict["SECURITY_FTDC_FS_Check"] = '2' +#宸插啿閿 +defineDict["SECURITY_FTDC_FS_Charge"] = '3' + +typedefDict["TSecurityFtdcFundStatusType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFundProjectIDType鏄竴涓祫閲戦」鐩紪鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcFundProjectIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOperatorIDType鏄竴涓搷浣滃憳浠g爜绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcOperatorIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCounterIDType鏄竴涓鏁板櫒浠g爜绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCounterIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFunctionNameType鏄竴涓姛鑳藉悕绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcFunctionNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradeCodeType鏄竴涓氦鏄撲唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcTradeCodeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBrokerBranchIDType鏄竴涓粡绾叕鍙稿垎鏀満鏋勪唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBrokerBranchIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradeDateType鏄竴涓氦鏄撴棩鏈熺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcTradeDateType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradeTimeType鏄竴涓氦鏄撴椂闂寸被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcTradeTimeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBankSerialType鏄竴涓摱琛屾祦姘村彿绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBankSerialType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcSerialType鏄竴涓祦姘村彿绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcSerialType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcLastFragmentType鏄竴涓渶鍚庡垎鐗囨爣蹇楃被鍨 +#////////////////////////////////////////////////////////////////////// +#鏄渶鍚庡垎鐗 +defineDict["SECURITY_FTDC_LF_Yes"] = '0' +#涓嶆槸鏈鍚庡垎鐗 +defineDict["SECURITY_FTDC_LF_No"] = '1' + +typedefDict["TSecurityFtdcLastFragmentType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcIndividualNameType鏄竴涓釜浜哄鍚嶇被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcIndividualNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCustTypeType鏄竴涓鎴风被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鑷劧浜 +defineDict["SECURITY_FTDC_CUSTT_Person"] = '0' +#鏈烘瀯鎴 +defineDict["SECURITY_FTDC_CUSTT_Institution"] = '1' + +typedefDict["TSecurityFtdcCustTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBankAccountType鏄竴涓摱琛岃处鎴风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBankAccountType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcYesNoIndicatorType鏄竴涓槸鎴栧惁鏍囪瘑绫诲瀷 +#////////////////////////////////////////////////////////////////////// +#鏄 +defineDict["SECURITY_FTDC_YNI_Yes"] = '0' +#鍚 +defineDict["SECURITY_FTDC_YNI_No"] = '1' + +typedefDict["TSecurityFtdcYesNoIndicatorType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradeAmountType鏄竴涓氦鏄撻噾棰濓紙鍏冿級绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcTradeAmountType"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCustFeeType鏄竴涓簲鏀跺鎴疯垂鐢紙鍏冿級绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcCustFeeType"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBrokerFeeType鏄竴涓簲鏀剁粡绾叕鍙歌垂鐢紙鍏冿級绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBrokerFeeType"] = "float" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFeePayFlagType鏄竴涓垂鐢ㄦ敮浠樻爣蹇楃被鍨 +#////////////////////////////////////////////////////////////////////// +#鐢卞彈鐩婃柟鏀粯璐圭敤 +defineDict["SECURITY_FTDC_FPF_BEN"] = '0' +#鐢卞彂閫佹柟鏀粯璐圭敤 +defineDict["SECURITY_FTDC_FPF_OUR"] = '1' +#鐢卞彂閫佹柟鏀粯鍙戣捣鐨勮垂鐢紝鍙楃泭鏂规敮浠樻帴鍙楃殑璐圭敤 +defineDict["SECURITY_FTDC_FPF_SHA"] = '2' + +typedefDict["TSecurityFtdcFeePayFlagType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcAddInfoType鏄竴涓檮鍔犱俊鎭被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcAddInfoType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcDigestType鏄竴涓憳瑕佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcDigestType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBankAccTypeType鏄竴涓摱琛屽笎鍙风被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#閾惰瀛樻姌 +defineDict["SECURITY_FTDC_BAT_BankBook"] = '1' +#鍌ㄨ搫鍗 +defineDict["SECURITY_FTDC_BAT_SavingCard"] = '2' +#淇$敤鍗 +defineDict["SECURITY_FTDC_BAT_CreditCard"] = '3' + +typedefDict["TSecurityFtdcBankAccTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcDeviceIDType鏄竴涓笭閬撴爣蹇楃被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcDeviceIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPwdFlagType鏄竴涓瘑鐮佹牳瀵规爣蹇楃被鍨 +#////////////////////////////////////////////////////////////////////// +#涓嶆牳瀵 +defineDict["SECURITY_FTDC_BPWDF_NoCheck"] = '0' +#鏄庢枃鏍稿 +defineDict["SECURITY_FTDC_BPWDF_BlankCheck"] = '1' +#瀵嗘枃鏍稿 +defineDict["SECURITY_FTDC_BPWDF_EncryptCheck"] = '2' + +typedefDict["TSecurityFtdcPwdFlagType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcBankCodingForBrokerType鏄竴涓摱琛屽缁忕邯鍏徃鐨勭紪鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcBankCodingForBrokerType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOperNoType鏄竴涓氦鏄撴煖鍛樼被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcOperNoType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTIDType鏄竴涓氦鏄揑D绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcTIDType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTransferStatusType鏄竴涓浆璐︿氦鏄撶姸鎬佺被鍨 +#////////////////////////////////////////////////////////////////////// +#姝e父 +defineDict["SECURITY_FTDC_TRFS_Normal"] = '0' +#琚啿姝 +defineDict["SECURITY_FTDC_TRFS_Repealed"] = '1' + +typedefDict["TSecurityFtdcTransferStatusType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcPlateSerialType鏄竴涓钩鍙版祦姘村彿绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcPlateSerialType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcAvailabilityFlagType鏄竴涓湁鏁堟爣蹇楃被鍨 +#////////////////////////////////////////////////////////////////////// +#鏈‘璁 +defineDict["SECURITY_FTDC_AVAF_Invalid"] = '0' +#鏈夋晥 +defineDict["SECURITY_FTDC_AVAF_Valid"] = '1' +#鍐叉 +defineDict["SECURITY_FTDC_AVAF_Repeal"] = '2' + +typedefDict["TSecurityFtdcAvailabilityFlagType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcOperatorCodeType鏄竴涓搷浣滃憳绫诲瀷 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcOperatorCodeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcRepayStockAlgoType鏄竴涓拱鍒歌繕鍒哥畻娉曠被鍨 +#////////////////////////////////////////////////////////////////////// +#榛樿绠楁硶 +defineDict["SECURITY_FTDC_RSA_Original"] = '0' +#鎸夎繕鍒告瘮渚嬭绠 +defineDict["SECURITY_FTDC_RSA_Ratio"] = '1' +#Min[1,2] +defineDict["SECURITY_FTDC_RSA_Min"] = '2' + +typedefDict["TSecurityFtdcRepayStockAlgoType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradeSpanType鏄竴涓氦鏄撴椂闂存绫诲瀷绫诲瀷 +#////////////////////////////////////////////////////////////////////// +#鏅氫笟鍔 +defineDict["SECURITY_FTDC_TS_Common"] = '1' +#涓偂鏈熸潈 +defineDict["SECURITY_FTDC_TS_Options"] = '2' + +typedefDict["TSecurityFtdcTradeSpanType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcSettleSystemTypeType鏄竴涓墍灞炵粨绠楃郴缁熺被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#椤剁偣绯荤粺 +defineDict["SECURITY_FTDC_SST_Aboss"] = '1' +#鎭掔敓绯荤粺 +defineDict["SECURITY_FTDC_SST_HS"] = '2' + +typedefDict["TSecurityFtdcSettleSystemTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcLogLevelType鏄竴涓棩蹇楃骇鍒被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcLogLevelType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcProcessNameType鏄竴涓瓨鍌ㄨ繃绋嬪悕绉扮被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcProcessNameType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTemplateIDType鏄竴涓ā鏉夸唬鐮佺被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcTemplateIDType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcTradeIndexType鏄竴涓垚浜ゅ簭鍙风被鍨 +#////////////////////////////////////////////////////////////////////// +typedefDict["TSecurityFtdcTradeIndexType"] = "int" + +#////////////////////////////////////////////////////////////////////// +#TFtdcSplitMergeStatusType鏄竴涓熀閲戝綋澶╂媶鍒嗗悎骞剁姸鎬佺被鍨 +#////////////////////////////////////////////////////////////////////// +#琛ㄧず鍏佽鎷嗗垎鍜屽悎骞 +defineDict["SECURITY_FTDC_SMS_Allow"] = '0' +#鍏佽鎷嗗垎銆佷笉鍏佽鍚堝苟 +defineDict["SECURITY_FTDC_SMS_OnlySplit"] = '1' +#涓嶅厑璁告媶鍒嗐佸厑璁稿悎骞 +defineDict["SECURITY_FTDC_SMS_OnlyMerge"] = '2' +#涓嶅厑璁告媶鍒嗗拰鍚堝苟 +defineDict["SECURITY_FTDC_SMS_Forbidden"] = '3' + +typedefDict["TSecurityFtdcSplitMergeStatusType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcFundInterTransferTypeType鏄竴涓祫閲戝唴杞被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#杞叆 +defineDict["SECURITY_FTDC_FITT_TransferIn"] = '0' +#杞嚭 +defineDict["SECURITY_FTDC_FITT_TransferOut"] = '1' + +typedefDict["TSecurityFtdcFundInterTransferTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcInstrumentTypeType鏄竴涓悎绾︾被鍨嬬被鍨 +#////////////////////////////////////////////////////////////////////// +#鏅 +defineDict["SECURITY_FTDC_IT_Normal"] = '0' +#鐪嬫定鏈熸潈 +defineDict["SECURITY_FTDC_IT_CallOptions"] = '1' +#鐪嬭穼鏈熸潈 +defineDict["SECURITY_FTDC_IT_PutOptions"] = '2' + +typedefDict["TSecurityFtdcInstrumentTypeType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcInvestorLevelType鏄竴涓姇璧勮呮湡鏉冧氦鏄撶瓑绾х被鍨 +#////////////////////////////////////////////////////////////////////// +#涓绾 +defineDict["SECURITY_FTDC_IL_Level_1"] = '0' +#浜岀骇 +defineDict["SECURITY_FTDC_IL_Level_2"] = '1' +#涓夌骇 +defineDict["SECURITY_FTDC_IL_Level_3"] = '2' + +typedefDict["TSecurityFtdcInvestorLevelType"] = "string" + +#////////////////////////////////////////////////////////////////////// +#TFtdcCloseDirectionType鏄竴涓钩浠撴柟鍚戠被鍨 +#////////////////////////////////////////////////////////////////////// +#涔板钩浠 +defineDict["SECURITY_FTDC_CD_CloseBuy"] = '!' +#鍗栧钩浠 +defineDict["SECURITY_FTDC_CD_CloseSell"] = '@' +#澶囧厬骞充粨 +defineDict["SECURITY_FTDC_CD_CloseCover"] = '#' + +typedefDict["TSecurityFtdcCloseDirectionType"] = "string" + diff --git a/vn.lts/vnltstd/PythonTest/securitytraderapi.dll b/vn.lts/vnltstd/test/securitytraderapi.dll similarity index 100% rename from vn.lts/vnltstd/PythonTest/securitytraderapi.dll rename to vn.lts/vnltstd/test/securitytraderapi.dll diff --git a/vn.lts/vnltstd/test/tdtest.py b/vn.lts/vnltstd/test/tdtest.py new file mode 100644 index 00000000..6c438e45 --- /dev/null +++ b/vn.lts/vnltstd/test/tdtest.py @@ -0,0 +1,527 @@ +# encoding: UTF-8 + +import sys +from time import sleep + +from PyQt4 import QtGui + +from vnltstd import * +from lts_data_type import defineDict + +#---------------------------------------------------------------------- +def print_dict(d): + """鎸夌収閿兼墦鍗颁竴涓瓧鍏""" + for key,value in d.items(): + print key + ':' + str(value) + + +#---------------------------------------------------------------------- +def simple_log(func): + """绠鍗曡楗板櫒鐢ㄤ簬杈撳嚭鍑芥暟鍚""" + def wrapper(*args, **kw): + print "" + print str(func.__name__) + return func(*args, **kw) + return wrapper + + +######################################################################## +class TestTdApi(TdApi): + """娴嬭瘯鐢ㄥ疄渚""" + + #---------------------------------------------------------------------- + def __init__(self): + """Constructor""" + super(TestTdApi, self).__init__() + + #---------------------------------------------------------------------- + @simple_log + def onFrontConnected(self): + """鏈嶅姟鍣ㄨ繛鎺""" + pass + + #---------------------------------------------------------------------- + @simple_log + def onFrontDisconnected(self, n): + """鏈嶅姟鍣ㄦ柇寮""" + print n + + #---------------------------------------------------------------------- + @simple_log + def onHeartBeatWarning(self, n): + """蹇冭烦鎶ヨ""" + print n + + #---------------------------------------------------------------------- + @simple_log + def onRspError(self, error, n, last): + """閿欒""" + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspUserLogin(self, data, error, n, last): + """鐧婚檰鍥炴姤""" + print_dict(data) + print_dict(error) + self.brokerID = data['BrokerID'] + self.userID = data['UserID'] + self.frontID = data['FrontID'] + self.sessionID = data['SessionID'] + + #---------------------------------------------------------------------- + @simple_log + def onRspUserLogout(self, data, error, n, last): + """鐧诲嚭鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspOrderInsert(self, data, error, n, last): + """鍙戝崟閿欒锛堟煖鍙帮級""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspOrderAction(self, data, error, n, last): + """鎾ゅ崟閿欒锛堟煖鍙帮級""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspUserPasswordUpdate(self, data, error, n, last): + """鐢ㄦ埛瀵嗙爜鏇存柊閿欒""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspTradingAccountPasswordUpdate(self, data, error, n, last): + """浜ゆ槗璐︽埛瀵嗙爜鏇存柊閿欒""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryExchange(self, data, error, n, last): + """浜ゆ槗鎵鏌ヨ鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryInstrument(self, data, error, n, last): + """鍚堢害鏌ヨ鍥炴姤""" + if len(data['InstrumentID']) == 8 and '510180' in data['ExchangeInstID']: + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryInvestor(self, data, error, n, last): + """鎶曡祫鑰呮煡璇㈠洖鎶""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryTradingCode(self, data, error, n, last): + """浜ゆ槗缂栫爜鏌ヨ鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryTradingAccount(self, data, error, n, last): + """璧勯噾璐︽埛鏌ヨ鍥炴姤""" + print_dict(data) + print_dict(error) + self.accountID = data['AccountID'] + + #---------------------------------------------------------------------- + @simple_log + def onRspQryDepthMarketData(self, data, error, n, last): + """琛屾儏鏌ヨ鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryBondInterest(self, data, error, n, last): + """鍊哄埜鍒╂伅鏌ヨ鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryMarketRationInfo(self, data, error, n, last): + """甯傚奸厤鍞煡璇㈠洖鎶""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryInstrumentCommissionRate(self, data, error, n, last): + """鍚堢害鎵嬬画璐规煡璇㈠洖鎶""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryETFInstrument(self, data, error, n, last): + """ETF鍩洪噾鏌ヨ鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryETFBasket(self, data, error, n, last): + """ETF鑲$エ绡煡璇㈠洖鎶""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryOFInstrument(self, data, error, n, last): + """OF鍚堢害鏌ヨ鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQrySFInstrument(self, data, error, n, last): + """SF鍚堢害鏌ヨ鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryOrder(self, data, error, n, last): + """鎶ュ崟鏌ヨ鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryTrade(self, data, error, n, last): + """鎴愪氦鏌ヨ鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryInvestorPosition(self, data, error, n, last): + """鎸佷粨鏌ヨ鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRtnOrder(self, data): + """鎶ュ崟鍥炴姤""" + print_dict(data) + + #---------------------------------------------------------------------- + @simple_log + def onRtnTrade(self, data): + """鎴愪氦鍥炴姤""" + print_dict(data) + + #---------------------------------------------------------------------- + @simple_log + def onErrRtnOrderInsert(self, data, error): + """鍙戝崟閿欒鍥炴姤锛堜氦鏄撴墍锛""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onErrRtnOrderAction(self, data, error): + """鎾ゅ崟閿欒鍥炴姤锛堜氦鏄撴墍锛""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspFundOutByLiber(self, data, error, n, last): + """LTS鍙戣捣鍑洪噾搴旂瓟""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRtnFundOutByLiber(self, data): + """LTS鍙戣捣鍑洪噾閫氱煡""" + print_dict(data) + + #---------------------------------------------------------------------- + @simple_log + def onErrRtnFundOutByLiber(self, data, error): + """LTS鍙戣捣鍑洪噾閿欒鍥炴姤""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRtnFundInByBank(self, data): + """閾惰鍙戣捣鍏ラ噾閫氱煡""" + print_dict(data) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryFundTransferSerial(self, data, error, n, last): + """璧勯噾杞处鏌ヨ搴旂瓟""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspFundInterTransfer(self, data, error, n, last): + """璧勯噾鍐呰浆搴旂瓟""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRspQryFundInterTransferSerial(self, data, error, n, last): + """璧勯噾鍐呰浆娴佹按鏌ヨ搴旂瓟""" + print_dict(data) + print_dict(error) + + #---------------------------------------------------------------------- + @simple_log + def onRtnFundInterTransferSerial(self, data): + """璧勯噾鍐呰浆娴佹按閫氱煡""" + print_dict(data) + + #---------------------------------------------------------------------- + @simple_log + def onErrRtnFundInterTransfer(self, data, error): + """璧勯噾鍐呰浆閿欒鍥炴姤""" + print_dict(data) + print_dict(error) + + + +#---------------------------------------------------------------------- +def main(): + """涓绘祴璇曞嚱鏁帮紝鍑虹幇鍫靛鏃跺彲浠ヨ冭檻浣跨敤sleep""" + reqid = 0 + + # 鍒涘缓Qt搴旂敤瀵硅薄锛岀敤浜庝簨浠跺惊鐜 + app = QtGui.QApplication(sys.argv) + + # 鍒涘缓API瀵硅薄锛屾祴璇曢氳繃 + api = TestTdApi() + + # 鍦–++鐜涓垱寤篗dApi瀵硅薄锛屼紶鍏ュ弬鏁版槸甯屾湜鐢ㄦ潵淇濆瓨.con鏂囦欢鐨勫湴鍧锛屾祴璇曢氳繃 + api.createFtdcTraderApi('') + + # 璁剧疆鏁版嵁娴侀噸浼犳柟寮忥紝娴嬭瘯閫氳繃 + api.subscribePrivateTopic(1) + api.subscribePublicTopic(1) + + # 娉ㄥ唽鍓嶇疆鏈哄湴鍧锛屾祴璇曢氳繃 + api.registerFront("tcp://211.144.195.163:34505") + + # 鍒濆鍖朼pi锛岃繛鎺ュ墠缃満锛屾祴璇曢氳繃 + api.init() + sleep(0.5) + + # 鐧婚檰锛屾祴璇曢氳繃 + loginReq = {} # 鍒涘缓涓涓┖瀛楀吀 + loginReq['UserID'] = '' # 鍙傛暟浣滀负瀛楀吀閿肩殑鏂瑰紡浼犲叆 + loginReq['Password'] = '' # 閿悕鍜孋++涓殑缁撴瀯浣撴垚鍛樺悕瀵瑰簲 + loginReq['BrokerID'] = '' + reqid = reqid + 1 # 璇锋眰鏁板繀椤讳繚鎸佸敮涓鎬 + i = api.reqUserLogin(loginReq, reqid) + sleep(0.5) + + ## 鐧诲嚭锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #i = api.reqUserLogout({}, 1) + #sleep(0.5) + + ## 鑾峰彇浜ゆ槗鏃ワ紝鐩墠杈撳嚭涓虹┖锛屾祴璇曢氳繃 + #day = api.getTradingDay() + #print 'Trading Day is:' + str(day) + #sleep(0.5) + + ########################################################## + ## 鏌ヨ浜ゆ槗鎵锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #i = api.reqQryExchange({}, reqid) + + ## 鏌ヨ鍚堢害鍒楄〃锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #i = api.reqQryInstrument({}, reqid) + + ## 鏌ヨ鎶曡祫鑰咃紝娴嬭瘯閫氳繃 + #reqid = reqid + 1 + #i = api.reqQryInvestor({}, reqid) + + ## 鏌ヨ浜ゆ槗缂栫爜锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #i = api.reqQryTradingCode({}, reqid) + + ## 鏌ヨ浜ゆ槗璐︽埛锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #i = api.reqQryTradingAccount({}, reqid) + #sleep(1.0) + + ## 鏌ヨ琛屾儏, 娴嬭瘯澶辫触锛孋++鐜涓繑鍥炵┖鎸囬拡 + #reqid = reqid + 1 + #req = {} + #req['InstrumentID'] = '600000' + #i = api.reqQryDepthMarketData(req, reqid) + + ## 鏌ヨ鍊哄埜鍒╃巼锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #i = api.reqQryBondInterest({}, reqid) + + ## 鏌ヨ甯傚奸厤鍞紝娴嬭瘯鏃犲弽搴 + #reqid = reqid + 1 + #i = api.reqQryMarketRationInfo({}, reqid) + + ## 鏌ヨ鎵嬬画璐圭巼, 娴嬭瘯澶辫触锛孋++鐜涓繑鍥炵┖鎸囬拡 + #reqid = reqid + 1 + #req = {} + #req['InstrumentID'] = '600000' + #req['ExchangeID'] = 'SSE' + #req['InvestorID'] = api.userID + #req['BrokerID'] = api.brokerID + #i = api.reqQryInstrumentCommissionRate(req, reqid) + + ## 鏌ヨETF鍚堢害锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #i = api.reqQryETFInstrument({}, reqid) + + ## 鏌ヨETF缁勫悎锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #i = api.reqQryETFBasket({}, reqid) + + ## 鏌ヨOF鍚堢害锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #i = api.reqQryOFInstrument({}, reqid) + + ## 鏌ヨSF鍚堢害锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #i = api.reqQrySFInstrument({}, reqid) + + ###################################################### + # 浠ヤ笅涓変釜鏈祴璇 + ## 鏌ヨ鍙戝崟, 娴嬭瘯閫氳繃 + #reqid = reqid + 1 + #req = {} + #req['BrokerID'] = api.brokerID + #req['InvestorID'] = api.userID + #i = api.reqQryOrder(req, reqid) + #sleep(2.0) + + ## 鏌ヨ鎴愪氦, 娴嬭瘯閫氳繃 + #reqid = reqid + 1 + #req = {} + #req['BrokerID'] = api.brokerID + #req['InvestorID'] = api.userID + #i = api.reqQryTrade(req, reqid) + #sleep(2.0) + + ## 鏌ヨ鎸佷粨锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #req = {} + #req['BrokerID'] = api.brokerID + #req['InvestorID'] = api.userID + #i = api.reqQryInvestorPosition(req, reqid) + #sleep(2.0) + + ################################################ + ## 鏇存柊琛屾儏瀵嗙爜锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #req = {} + #req['UserID'] = api.userID + #req['BrokerID'] = api.brokerID + #req['NewPassword'] = "624001X" + #req['OldPassword'] = "624001X" + #i = api.reqUserPasswordUpdate(req, reqid) + + ## 鏇存柊浜ゆ槗瀵嗙爜锛屾祴璇曟湁鍙嶅簲锛屼絾鎶ラ敊 + ## 搴斿綋鏃犻渶鏇存柊锛屽洜涓虹櫥闄嗙洿鎺ヤ娇鐢╱ser瀵嗙爜 + ## 鑾峰彇api.accountID闇瑕佸厛鏌ヨ浜ゆ槗璐︽埛reqQryTradingAccount + #reqid = reqid + 1 + #req = {} + #req['AccountID'] = api.accountID + #req['BrokerID'] = api.brokerID + #req['NewPassword'] = "624001X" + #req['OldPassword'] = "624001X" + #i = api.reqTradingAccountPasswordUpdate(req, reqid) + + ################################################ + ## 鍙戝崟娴嬭瘯, 娴嬭瘯閫氳繃 + #reqid = reqid + 1 + #req = {} + #req['InvestorID'] = api.userID + #req['UserID'] = api.userID + #req['BrokerID'] = api.brokerID + #req['InstrumentID'] = '11000061' + #req['ExchangeID'] = 'SSE' + #req['OrderPriceType'] = defineDict['SECURITY_FTDC_OPT_LimitPrice'] + #req['LimitPrice'] = '0.1850' + #req['VolumeTotalOriginal'] = 1 + #req['Direction'] = defineDict['SECURITY_FTDC_D_Buy'] + #req['CombOffsetFlag'] = defineDict['SECURITY_FTDC_OF_Open'] + #req['OrderRef'] = '1' + #req['CombHedgeFlag'] = defineDict['SECURITY_FTDC_HF_Speculation'] + #req['ContingentCondition'] = defineDict['SECURITY_FTDC_CC_Immediately'] + #req['ForceCloseReason'] = defineDict['SECURITY_FTDC_FCC_NotForceClose'] + #req['IsAutoSuspend'] = 0 + #req['UserForceClose'] = 0 + #req['TimeCondition'] = defineDict['SECURITY_FTDC_TC_GFD'] + #req['VolumeCondition'] = defineDict['SECURITY_FTDC_VC_AV'] + #req['MinVolume'] = 1 + #i = api.reqOrderInsert(req, reqid) + #sleep(1.0) + + ## 鎾ゅ崟娴嬭瘯锛屾祴璇曢氳繃 + #reqid = reqid + 1 + #req = {} + #req['InstrumentID'] = '11000061' + #req['ExchangeID'] = 'SSE' + #req['OrderRef'] = '1' + #req['ActionFlag'] = defineDict['SECURITY_FTDC_AF_Delete'] + #req['BrokerID'] = api.brokerID + #req['InvestorID'] = api.userID + #req['FrontID'] = api.frontID + #req['SessionID'] = api.sessionID + #i = api.reqOrderAction(req, reqid) + + ################################################ + ## 娴嬭瘯璧勯噾杞嚭锛屾湭娴嬭瘯 + #reqid = reqid + 1 + #i = api.reqFundOutByLiber({}, reqid) + + ## 娴嬭瘯璧勯噾鍐呰浆锛屾湭娴嬭瘯 + #reqid = reqid + 1 + #i = api. reqFundInterTransfer({}, reqid) + + ## 娴嬭瘯鏌ヨ璐︽埛杞处娴佹按锛屾湭娴嬭瘯 + #reqid = reqid + 1 + #i = api.reqQryFundTransferSerial({}, reqid) + + ## 娴嬭瘯鏌ヨ鍐呴儴璐︽埛杞处娴佹按锛屾湭娴嬭瘯 + #reqid = reqid + 1 + #i = api.reqQryFundInterTransferSerial({}, reqid) + + + + + + # 杩炵画杩愯 + app.exec_() + + + +if __name__ == '__main__': + main() diff --git a/vn.lts/vnltstd/test/vnltstd.pyd b/vn.lts/vnltstd/test/vnltstd.pyd new file mode 100644 index 00000000..f33d57e9 Binary files /dev/null and b/vn.lts/vnltstd/test/vnltstd.pyd differ