├── LICENSE ├── README.md ├── examples ├── test1.go └── test2.go └── src ├── c++ ├── ThostFtdcMdApi.h ├── ThostFtdcTraderApi.h ├── ThostFtdcUserApiDataType.h ├── ThostFtdcUserApiStruct.h ├── error.dtd ├── error.xml ├── thostmduserapi.so └── thosttraderapi.so ├── ctp.swig ├── helper ├── helper.cpp └── helper.h └── make.sh /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 woo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ctp 2 | === 3 | ctp ineterface of golang (for linux64) 4 | http://www.citicsf.com/download/ctp/ 5 | 6 | 7 | 8 | Preparing 9 | --------- 10 | install go 11 | install swig 12 | 13 | 14 | Building 15 | -------- 16 | export GOROOT= 17 | cd ./src 18 | ./make.sh 19 | 20 | Tutorial 21 | -------- 22 | package main 23 | 24 | import ( 25 | "ctp" 26 | "fmt" 27 | ) 28 | 29 | var ( 30 | front string = "tcp://asp-sim2-front1.financial-trading-platform.com:26205" 31 | api ctp.CThostFtdcTraderApi 32 | ) 33 | 34 | type TradeApi struct { 35 | ctp.ThostFtdcTraderSpiImplBase 36 | } 37 | 38 | //callback from c++ libararys 39 | func (g *TradeApi) OnFrontConnected() { 40 | fmt.Printf("connected\n") 41 | } 42 | 43 | func main() { 44 | api = ctp.CThostFtdcTraderApiCreateFtdcTraderApi() 45 | api.RegisterSpi(ctp.GTrader(&TradeApi{})) 46 | api.RegisterFront(front) 47 | api.Init() 48 | api.Join() 49 | } 50 | 51 | 52 | More 53 | ---- 54 | 55 | i need a public account to test... 56 | and i don't know how to trade... 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /examples/test1.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "ctp" 5 | "fmt" 6 | ) 7 | 8 | var ( 9 | front string = "tcp://asp-sim2-front1.financial-trading-platform.com:26205" 10 | api ctp.CThostFtdcTraderApi 11 | ) 12 | 13 | type TradeApi struct { 14 | ctp.ThostFtdcTraderSpiImplBase 15 | } 16 | 17 | func (g *TradeApi) OnFrontConnected() { 18 | fmt.Printf("connected\n") 19 | } 20 | 21 | func main() { 22 | api = ctp.CThostFtdcTraderApiCreateFtdcTraderApi() 23 | api.RegisterSpi(ctp.GTrader(&TradeApi{})) 24 | api.RegisterFront(front) 25 | api.Init() 26 | api.Join() 27 | } 28 | -------------------------------------------------------------------------------- /examples/test2.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "ctp" 5 | "fmt" 6 | "log" 7 | "strconv" 8 | ) 9 | 10 | var ( 11 | front string = "tcp://asp-sim2-front1.financial-trading-platform.com:26205" 12 | api ctp.CThostFtdcTraderApi 13 | brokerId string = "2030" 14 | investorId string = "00069" 15 | password string = "888888" 16 | seqId int = 0 17 | ) 18 | 19 | type TradeApi struct { 20 | ctp.ThostFtdcTraderSpiImplBase 21 | } 22 | 23 | func isErrTradeApi(req ctp.CThostFtdcRspInfoField) bool { 24 | if req != nil && req.GetErrorID() != 0 { 25 | log.Printf("errid %d \n", req.GetErrorID()) 26 | return true 27 | } 28 | return false 29 | } 30 | 31 | func (g *TradeApi) OnFrontConnected() { 32 | fmt.Printf("connected\n") 33 | req := ctp.NewCThostFtdcReqUserLoginField() 34 | req.SetBrokerID(brokerId) 35 | req.SetUserID(investorId) 36 | req.SetPassword(password) 37 | result := api.ReqUserLogin(req, seqId) 38 | seqId += 1 39 | fmt.Printf("result %d\n", result) 40 | } 41 | 42 | func (g *TradeApi) OnRspUserLogin(lf ctp.CThostFtdcRspUserLoginField, rf ctp.CThostFtdcRspInfoField, n int, isLast bool) { 43 | if isLast && !isErrTradeApi(rf) { 44 | frontId := lf.GetFrontID() 45 | sessionId := lf.GetSessionID() 46 | log.Printf("front id %s , session %d\n", frontId, sessionId) 47 | nextRef, _ := strconv.Atoi(lf.GetMaxOrderRef()) 48 | nextRef += 1 49 | 50 | req := ctp.NewCThostFtdcSettlementInfoConfirmField() 51 | req.SetBrokerID(brokerId) 52 | req.SetInvestorID(investorId) 53 | api.ReqSettlementInfoConfirm(req, seqId) 54 | seqId += 1 55 | } 56 | } 57 | 58 | func (g *TradeApi) OnRspSettlementInfoConfirm(arg2 ctp.CThostFtdcSettlementInfoConfirmField, arg3 ctp.CThostFtdcRspInfoField, arg4 int, arg5 bool) { 59 | log.Printf("on confirm\n") 60 | } 61 | 62 | func main() { 63 | api = ctp.CThostFtdcTraderApiCreateFtdcTraderApi() 64 | api.RegisterSpi(ctp.GTrader(&TradeApi{})) 65 | api.RegisterFront(front) 66 | api.Init() 67 | api.Join() 68 | } 69 | -------------------------------------------------------------------------------- /src/c++/ThostFtdcMdApi.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////// 2 | ///@system 新一代交易所系统 3 | ///@company 上海期货信息技术有限公司 4 | ///@file ThostFtdcMdApi.h 5 | ///@brief 定义了客户端接口 6 | ///@history 7 | ///20060106 赵鸿昊 创建该文件 8 | ///////////////////////////////////////////////////////////////////////// 9 | 10 | #if !defined(THOST_FTDCMDAPI_H) 11 | #define THOST_FTDCMDAPI_H 12 | 13 | #if _MSC_VER > 1000 14 | #pragma once 15 | #endif // _MSC_VER > 1000 16 | 17 | #include "ThostFtdcUserApiStruct.h" 18 | 19 | #if defined(ISLIB) && defined(WIN32) 20 | #ifdef LIB_MD_API_EXPORT 21 | #define MD_API_EXPORT __declspec(dllexport) 22 | #else 23 | #define MD_API_EXPORT __declspec(dllimport) 24 | #endif 25 | #else 26 | #define MD_API_EXPORT 27 | #endif 28 | 29 | class CThostFtdcMdSpi 30 | { 31 | public: 32 | ///当客户端与交易后台建立起通信连接时(还未登录前),该方法被调用。 33 | virtual void OnFrontConnected(){}; 34 | 35 | ///当客户端与交易后台通信连接断开时,该方法被调用。当发生这个情况后,API会自动重新连接,客户端可不做处理。 36 | ///@param nReason 错误原因 37 | /// 0x1001 网络读失败 38 | /// 0x1002 网络写失败 39 | /// 0x2001 接收心跳超时 40 | /// 0x2002 发送心跳失败 41 | /// 0x2003 收到错误报文 42 | virtual void OnFrontDisconnected(int nReason){}; 43 | 44 | ///心跳超时警告。当长时间未收到报文时,该方法被调用。 45 | ///@param nTimeLapse 距离上次接收报文的时间 46 | virtual void OnHeartBeatWarning(int nTimeLapse){}; 47 | 48 | 49 | ///登录请求响应 50 | virtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 51 | 52 | ///登出请求响应 53 | virtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 54 | 55 | ///错误应答 56 | virtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 57 | 58 | ///订阅行情应答 59 | virtual void OnRspSubMarketData(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 60 | 61 | ///取消订阅行情应答 62 | virtual void OnRspUnSubMarketData(CThostFtdcSpecificInstrumentField *pSpecificInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 63 | 64 | ///深度行情通知 65 | virtual void OnRtnDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData) {}; 66 | }; 67 | 68 | class MD_API_EXPORT CThostFtdcMdApi 69 | { 70 | public: 71 | ///创建MdApi 72 | ///@param pszFlowPath 存贮订阅信息文件的目录,默认为当前目录 73 | ///@return 创建出的UserApi 74 | ///modify for udp marketdata 75 | static CThostFtdcMdApi *CreateFtdcMdApi(const char *pszFlowPath = "", const bool bIsUsingUdp=false); 76 | 77 | ///删除接口对象本身 78 | ///@remark 不再使用本接口对象时,调用该函数删除接口对象 79 | virtual void Release() = 0; 80 | 81 | ///初始化 82 | ///@remark 初始化运行环境,只有调用后,接口才开始工作 83 | virtual void Init() = 0; 84 | 85 | ///等待接口线程结束运行 86 | ///@return 线程退出代码 87 | virtual int Join() = 0; 88 | 89 | ///获取当前交易日 90 | ///@retrun 获取到的交易日 91 | ///@remark 只有登录成功后,才能得到正确的交易日 92 | virtual const char *GetTradingDay() = 0; 93 | 94 | ///注册前置机网络地址 95 | ///@param pszFrontAddress:前置机网络地址。 96 | ///@remark 网络地址的格式为:“protocol://ipaddress:port”,如:”tcp://127.0.0.1:17001”。 97 | ///@remark “tcp”代表传输协议,“127.0.0.1”代表服务器地址。”17001”代表服务器端口号。 98 | virtual void RegisterFront(char *pszFrontAddress) = 0; 99 | 100 | ///注册名字服务器网络地址 101 | ///@param pszNsAddress:名字服务器网络地址。 102 | ///@remark 网络地址的格式为:“protocol://ipaddress:port”,如:”tcp://127.0.0.1:12001”。 103 | ///@remark “tcp”代表传输协议,“127.0.0.1”代表服务器地址。”12001”代表服务器端口号。 104 | ///@remark RegisterNameServer优先于RegisterFront 105 | virtual void RegisterNameServer(char *pszNsAddress) = 0; 106 | 107 | ///注册回调接口 108 | ///@param pSpi 派生自回调接口类的实例 109 | virtual void RegisterSpi(CThostFtdcMdSpi *pSpi) = 0; 110 | 111 | ///订阅行情。 112 | ///@param ppInstrumentID 合约ID 113 | ///@param nCount 要订阅/退订行情的合约个数 114 | ///@remark 115 | virtual int SubscribeMarketData(char *ppInstrumentID[], int nCount) = 0; 116 | 117 | ///退订行情。 118 | ///@param ppInstrumentID 合约ID 119 | ///@param nCount 要订阅/退订行情的合约个数 120 | ///@remark 121 | virtual int UnSubscribeMarketData(char *ppInstrumentID[], int nCount) = 0; 122 | 123 | ///用户登录请求 124 | virtual int ReqUserLogin(CThostFtdcReqUserLoginField *pReqUserLoginField, int nRequestID) = 0; 125 | 126 | 127 | ///登出请求 128 | virtual int ReqUserLogout(CThostFtdcUserLogoutField *pUserLogout, int nRequestID) = 0; 129 | protected: 130 | ~CThostFtdcMdApi(){}; 131 | }; 132 | 133 | #endif 134 | -------------------------------------------------------------------------------- /src/c++/ThostFtdcTraderApi.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////// 2 | ///@system 新一代交易所系统 3 | ///@company 上海期货信息技术有限公司 4 | ///@file ThostFtdcTraderApi.h 5 | ///@brief 定义了客户端接口 6 | ///@history 7 | ///20060106 赵鸿昊 创建该文件 8 | ///////////////////////////////////////////////////////////////////////// 9 | 10 | #if !defined(THOST_FTDCTRADERAPI_H) 11 | #define THOST_FTDCTRADERAPI_H 12 | 13 | #if _MSC_VER > 1000 14 | #pragma once 15 | #endif // _MSC_VER > 1000 16 | 17 | #include "ThostFtdcUserApiStruct.h" 18 | 19 | #if defined(ISLIB) && defined(WIN32) 20 | #ifdef LIB_TRADER_API_EXPORT 21 | #define TRADER_API_EXPORT __declspec(dllexport) 22 | #else 23 | #define TRADER_API_EXPORT __declspec(dllimport) 24 | #endif 25 | #else 26 | #define TRADER_API_EXPORT 27 | #endif 28 | 29 | class CThostFtdcTraderSpi 30 | { 31 | public: 32 | ///当客户端与交易后台建立起通信连接时(还未登录前),该方法被调用。 33 | virtual void OnFrontConnected(){}; 34 | 35 | ///当客户端与交易后台通信连接断开时,该方法被调用。当发生这个情况后,API会自动重新连接,客户端可不做处理。 36 | ///@param nReason 错误原因 37 | /// 0x1001 网络读失败 38 | /// 0x1002 网络写失败 39 | /// 0x2001 接收心跳超时 40 | /// 0x2002 发送心跳失败 41 | /// 0x2003 收到错误报文 42 | virtual void OnFrontDisconnected(int nReason){}; 43 | 44 | ///心跳超时警告。当长时间未收到报文时,该方法被调用。 45 | ///@param nTimeLapse 距离上次接收报文的时间 46 | virtual void OnHeartBeatWarning(int nTimeLapse){}; 47 | 48 | ///客户端认证响应 49 | virtual void OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 50 | 51 | 52 | ///登录请求响应 53 | virtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 54 | 55 | ///登出请求响应 56 | virtual void OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 57 | 58 | ///用户口令更新请求响应 59 | virtual void OnRspUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 60 | 61 | ///资金账户口令更新请求响应 62 | virtual void OnRspTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 63 | 64 | ///报单录入请求响应 65 | virtual void OnRspOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 66 | 67 | ///预埋单录入请求响应 68 | virtual void OnRspParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 69 | 70 | ///预埋撤单录入请求响应 71 | virtual void OnRspParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 72 | 73 | ///报单操作请求响应 74 | virtual void OnRspOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 75 | 76 | ///查询最大报单数量响应 77 | virtual void OnRspQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 78 | 79 | ///投资者结算结果确认响应 80 | virtual void OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 81 | 82 | ///删除预埋单响应 83 | virtual void OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 84 | 85 | ///删除预埋撤单响应 86 | virtual void OnRspRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 87 | 88 | ///请求查询报单响应 89 | virtual void OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 90 | 91 | ///请求查询成交响应 92 | virtual void OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 93 | 94 | ///请求查询投资者持仓响应 95 | virtual void OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 96 | 97 | ///请求查询资金账户响应 98 | virtual void OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 99 | 100 | ///请求查询投资者响应 101 | virtual void OnRspQryInvestor(CThostFtdcInvestorField *pInvestor, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 102 | 103 | ///请求查询交易编码响应 104 | virtual void OnRspQryTradingCode(CThostFtdcTradingCodeField *pTradingCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 105 | 106 | ///请求查询合约保证金率响应 107 | virtual void OnRspQryInstrumentMarginRate(CThostFtdcInstrumentMarginRateField *pInstrumentMarginRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 108 | 109 | ///请求查询合约手续费率响应 110 | virtual void OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 111 | 112 | ///请求查询交易所响应 113 | virtual void OnRspQryExchange(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 114 | 115 | ///请求查询合约响应 116 | virtual void OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 117 | 118 | ///请求查询行情响应 119 | virtual void OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 120 | 121 | ///请求查询投资者结算结果响应 122 | virtual void OnRspQrySettlementInfo(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 123 | 124 | ///请求查询转帐银行响应 125 | virtual void OnRspQryTransferBank(CThostFtdcTransferBankField *pTransferBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 126 | 127 | ///请求查询投资者持仓明细响应 128 | virtual void OnRspQryInvestorPositionDetail(CThostFtdcInvestorPositionDetailField *pInvestorPositionDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 129 | 130 | ///请求查询客户通知响应 131 | virtual void OnRspQryNotice(CThostFtdcNoticeField *pNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 132 | 133 | ///请求查询结算信息确认响应 134 | virtual void OnRspQrySettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 135 | 136 | ///请求查询投资者持仓明细响应 137 | virtual void OnRspQryInvestorPositionCombineDetail(CThostFtdcInvestorPositionCombineDetailField *pInvestorPositionCombineDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 138 | 139 | ///查询保证金监管系统经纪公司资金账户密钥响应 140 | virtual void OnRspQryCFMMCTradingAccountKey(CThostFtdcCFMMCTradingAccountKeyField *pCFMMCTradingAccountKey, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 141 | 142 | ///请求查询仓单折抵信息响应 143 | virtual void OnRspQryEWarrantOffset(CThostFtdcEWarrantOffsetField *pEWarrantOffset, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 144 | 145 | ///请求查询转帐流水响应 146 | virtual void OnRspQryTransferSerial(CThostFtdcTransferSerialField *pTransferSerial, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 147 | 148 | ///请求查询银期签约关系响应 149 | virtual void OnRspQryAccountregister(CThostFtdcAccountregisterField *pAccountregister, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 150 | 151 | ///错误应答 152 | virtual void OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 153 | 154 | ///报单通知 155 | virtual void OnRtnOrder(CThostFtdcOrderField *pOrder) {}; 156 | 157 | ///成交通知 158 | virtual void OnRtnTrade(CThostFtdcTradeField *pTrade) {}; 159 | 160 | ///报单录入错误回报 161 | virtual void OnErrRtnOrderInsert(CThostFtdcInputOrderField *pInputOrder, CThostFtdcRspInfoField *pRspInfo) {}; 162 | 163 | ///报单操作错误回报 164 | virtual void OnErrRtnOrderAction(CThostFtdcOrderActionField *pOrderAction, CThostFtdcRspInfoField *pRspInfo) {}; 165 | 166 | ///合约交易状态通知 167 | virtual void OnRtnInstrumentStatus(CThostFtdcInstrumentStatusField *pInstrumentStatus) {}; 168 | 169 | ///交易通知 170 | virtual void OnRtnTradingNotice(CThostFtdcTradingNoticeInfoField *pTradingNoticeInfo) {}; 171 | 172 | ///提示条件单校验错误 173 | virtual void OnRtnErrorConditionalOrder(CThostFtdcErrorConditionalOrderField *pErrorConditionalOrder) {}; 174 | 175 | ///请求查询签约银行响应 176 | virtual void OnRspQryContractBank(CThostFtdcContractBankField *pContractBank, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 177 | 178 | ///请求查询预埋单响应 179 | virtual void OnRspQryParkedOrder(CThostFtdcParkedOrderField *pParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 180 | 181 | ///请求查询预埋撤单响应 182 | virtual void OnRspQryParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 183 | 184 | ///请求查询交易通知响应 185 | virtual void OnRspQryTradingNotice(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 186 | 187 | ///请求查询经纪公司交易参数响应 188 | virtual void OnRspQryBrokerTradingParams(CThostFtdcBrokerTradingParamsField *pBrokerTradingParams, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 189 | 190 | ///请求查询经纪公司交易算法响应 191 | virtual void OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 192 | 193 | ///银行发起银行资金转期货通知 194 | virtual void OnRtnFromBankToFutureByBank(CThostFtdcRspTransferField *pRspTransfer) {}; 195 | 196 | ///银行发起期货资金转银行通知 197 | virtual void OnRtnFromFutureToBankByBank(CThostFtdcRspTransferField *pRspTransfer) {}; 198 | 199 | ///银行发起冲正银行转期货通知 200 | virtual void OnRtnRepealFromBankToFutureByBank(CThostFtdcRspRepealField *pRspRepeal) {}; 201 | 202 | ///银行发起冲正期货转银行通知 203 | virtual void OnRtnRepealFromFutureToBankByBank(CThostFtdcRspRepealField *pRspRepeal) {}; 204 | 205 | ///期货发起银行资金转期货通知 206 | virtual void OnRtnFromBankToFutureByFuture(CThostFtdcRspTransferField *pRspTransfer) {}; 207 | 208 | ///期货发起期货资金转银行通知 209 | virtual void OnRtnFromFutureToBankByFuture(CThostFtdcRspTransferField *pRspTransfer) {}; 210 | 211 | ///系统运行时期货端手工发起冲正银行转期货请求,银行处理完毕后报盘发回的通知 212 | virtual void OnRtnRepealFromBankToFutureByFutureManual(CThostFtdcRspRepealField *pRspRepeal) {}; 213 | 214 | ///系统运行时期货端手工发起冲正期货转银行请求,银行处理完毕后报盘发回的通知 215 | virtual void OnRtnRepealFromFutureToBankByFutureManual(CThostFtdcRspRepealField *pRspRepeal) {}; 216 | 217 | ///期货发起查询银行余额通知 218 | virtual void OnRtnQueryBankBalanceByFuture(CThostFtdcNotifyQueryAccountField *pNotifyQueryAccount) {}; 219 | 220 | ///期货发起银行资金转期货错误回报 221 | virtual void OnErrRtnBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) {}; 222 | 223 | ///期货发起期货资金转银行错误回报 224 | virtual void OnErrRtnFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo) {}; 225 | 226 | ///系统运行时期货端手工发起冲正银行转期货错误回报 227 | virtual void OnErrRtnRepealBankToFutureByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) {}; 228 | 229 | ///系统运行时期货端手工发起冲正期货转银行错误回报 230 | virtual void OnErrRtnRepealFutureToBankByFutureManual(CThostFtdcReqRepealField *pReqRepeal, CThostFtdcRspInfoField *pRspInfo) {}; 231 | 232 | ///期货发起查询银行余额错误回报 233 | virtual void OnErrRtnQueryBankBalanceByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo) {}; 234 | 235 | ///期货发起冲正银行转期货请求,银行处理完毕后报盘发回的通知 236 | virtual void OnRtnRepealFromBankToFutureByFuture(CThostFtdcRspRepealField *pRspRepeal) {}; 237 | 238 | ///期货发起冲正期货转银行请求,银行处理完毕后报盘发回的通知 239 | virtual void OnRtnRepealFromFutureToBankByFuture(CThostFtdcRspRepealField *pRspRepeal) {}; 240 | 241 | ///期货发起银行资金转期货应答 242 | virtual void OnRspFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 243 | 244 | ///期货发起期货资金转银行应答 245 | virtual void OnRspFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 246 | 247 | ///期货发起查询银行余额应答 248 | virtual void OnRspQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {}; 249 | 250 | ///银行发起银期开户通知 251 | virtual void OnRtnOpenAccountByBank(CThostFtdcOpenAccountField *pOpenAccount) {}; 252 | 253 | ///银行发起银期销户通知 254 | virtual void OnRtnCancelAccountByBank(CThostFtdcCancelAccountField *pCancelAccount) {}; 255 | 256 | ///银行发起变更银行账号通知 257 | virtual void OnRtnChangeAccountByBank(CThostFtdcChangeAccountField *pChangeAccount) {}; 258 | }; 259 | 260 | class TRADER_API_EXPORT CThostFtdcTraderApi 261 | { 262 | public: 263 | ///创建TraderApi 264 | ///@param pszFlowPath 存贮订阅信息文件的目录,默认为当前目录 265 | ///@return 创建出的UserApi 266 | //modify for udp marketdata 267 | static CThostFtdcTraderApi *CreateFtdcTraderApi(const char *pszFlowPath = "", const bool bIsUsingUdp=false); 268 | 269 | ///删除接口对象本身 270 | ///@remark 不再使用本接口对象时,调用该函数删除接口对象 271 | virtual void Release() = 0; 272 | 273 | ///初始化 274 | ///@remark 初始化运行环境,只有调用后,接口才开始工作 275 | virtual void Init() = 0; 276 | 277 | ///等待接口线程结束运行 278 | ///@return 线程退出代码 279 | virtual int Join() = 0; 280 | 281 | ///获取当前交易日 282 | ///@retrun 获取到的交易日 283 | ///@remark 只有登录成功后,才能得到正确的交易日 284 | virtual const char *GetTradingDay() = 0; 285 | 286 | ///注册前置机网络地址 287 | ///@param pszFrontAddress:前置机网络地址。 288 | ///@remark 网络地址的格式为:“protocol://ipaddress:port”,如:”tcp://127.0.0.1:17001”。 289 | ///@remark “tcp”代表传输协议,“127.0.0.1”代表服务器地址。”17001”代表服务器端口号。 290 | virtual void RegisterFront(char *pszFrontAddress) = 0; 291 | 292 | ///注册名字服务器网络地址 293 | ///@param pszNsAddress:名字服务器网络地址。 294 | ///@remark 网络地址的格式为:“protocol://ipaddress:port”,如:”tcp://127.0.0.1:12001”。 295 | ///@remark “tcp”代表传输协议,“127.0.0.1”代表服务器地址。”12001”代表服务器端口号。 296 | ///@remark RegisterNameServer优先于RegisterFront 297 | virtual void RegisterNameServer(char *pszNsAddress) = 0; 298 | 299 | ///注册回调接口 300 | ///@param pSpi 派生自回调接口类的实例 301 | virtual void RegisterSpi(CThostFtdcTraderSpi *pSpi) = 0; 302 | 303 | ///订阅私有流。 304 | ///@param nResumeType 私有流重传方式 305 | /// THOST_TERT_RESTART:从本交易日开始重传 306 | /// THOST_TERT_RESUME:从上次收到的续传 307 | /// THOST_TERT_QUICK:只传送登录后私有流的内容 308 | ///@remark 该方法要在Init方法前调用。若不调用则不会收到私有流的数据。 309 | virtual void SubscribePrivateTopic(THOST_TE_RESUME_TYPE nResumeType) = 0; 310 | 311 | ///订阅公共流。 312 | ///@param nResumeType 公共流重传方式 313 | /// THOST_TERT_RESTART:从本交易日开始重传 314 | /// THOST_TERT_RESUME:从上次收到的续传 315 | /// THOST_TERT_QUICK:只传送登录后公共流的内容 316 | ///@remark 该方法要在Init方法前调用。若不调用则不会收到公共流的数据。 317 | virtual void SubscribePublicTopic(THOST_TE_RESUME_TYPE nResumeType) = 0; 318 | 319 | ///客户端认证请求 320 | virtual int ReqAuthenticate(CThostFtdcReqAuthenticateField *pReqAuthenticateField, int nRequestID) = 0; 321 | 322 | ///用户登录请求 323 | virtual int ReqUserLogin(CThostFtdcReqUserLoginField *pReqUserLoginField, int nRequestID) = 0; 324 | 325 | 326 | ///登出请求 327 | virtual int ReqUserLogout(CThostFtdcUserLogoutField *pUserLogout, int nRequestID) = 0; 328 | 329 | ///用户口令更新请求 330 | virtual int ReqUserPasswordUpdate(CThostFtdcUserPasswordUpdateField *pUserPasswordUpdate, int nRequestID) = 0; 331 | 332 | ///资金账户口令更新请求 333 | virtual int ReqTradingAccountPasswordUpdate(CThostFtdcTradingAccountPasswordUpdateField *pTradingAccountPasswordUpdate, int nRequestID) = 0; 334 | 335 | ///报单录入请求 336 | virtual int ReqOrderInsert(CThostFtdcInputOrderField *pInputOrder, int nRequestID) = 0; 337 | 338 | ///预埋单录入请求 339 | virtual int ReqParkedOrderInsert(CThostFtdcParkedOrderField *pParkedOrder, int nRequestID) = 0; 340 | 341 | ///预埋撤单录入请求 342 | virtual int ReqParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, int nRequestID) = 0; 343 | 344 | ///报单操作请求 345 | virtual int ReqOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, int nRequestID) = 0; 346 | 347 | ///查询最大报单数量请求 348 | virtual int ReqQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, int nRequestID) = 0; 349 | 350 | ///投资者结算结果确认 351 | virtual int ReqSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, int nRequestID) = 0; 352 | 353 | ///请求删除预埋单 354 | virtual int ReqRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, int nRequestID) = 0; 355 | 356 | ///请求删除预埋撤单 357 | virtual int ReqRemoveParkedOrderAction(CThostFtdcRemoveParkedOrderActionField *pRemoveParkedOrderAction, int nRequestID) = 0; 358 | 359 | ///请求查询报单 360 | virtual int ReqQryOrder(CThostFtdcQryOrderField *pQryOrder, int nRequestID) = 0; 361 | 362 | ///请求查询成交 363 | virtual int ReqQryTrade(CThostFtdcQryTradeField *pQryTrade, int nRequestID) = 0; 364 | 365 | ///请求查询投资者持仓 366 | virtual int ReqQryInvestorPosition(CThostFtdcQryInvestorPositionField *pQryInvestorPosition, int nRequestID) = 0; 367 | 368 | ///请求查询资金账户 369 | virtual int ReqQryTradingAccount(CThostFtdcQryTradingAccountField *pQryTradingAccount, int nRequestID) = 0; 370 | 371 | ///请求查询投资者 372 | virtual int ReqQryInvestor(CThostFtdcQryInvestorField *pQryInvestor, int nRequestID) = 0; 373 | 374 | ///请求查询交易编码 375 | virtual int ReqQryTradingCode(CThostFtdcQryTradingCodeField *pQryTradingCode, int nRequestID) = 0; 376 | 377 | ///请求查询合约保证金率 378 | virtual int ReqQryInstrumentMarginRate(CThostFtdcQryInstrumentMarginRateField *pQryInstrumentMarginRate, int nRequestID) = 0; 379 | 380 | ///请求查询合约手续费率 381 | virtual int ReqQryInstrumentCommissionRate(CThostFtdcQryInstrumentCommissionRateField *pQryInstrumentCommissionRate, int nRequestID) = 0; 382 | 383 | ///请求查询交易所 384 | virtual int ReqQryExchange(CThostFtdcQryExchangeField *pQryExchange, int nRequestID) = 0; 385 | 386 | ///请求查询合约 387 | virtual int ReqQryInstrument(CThostFtdcQryInstrumentField *pQryInstrument, int nRequestID) = 0; 388 | 389 | ///请求查询行情 390 | virtual int ReqQryDepthMarketData(CThostFtdcQryDepthMarketDataField *pQryDepthMarketData, int nRequestID) = 0; 391 | 392 | ///请求查询投资者结算结果 393 | virtual int ReqQrySettlementInfo(CThostFtdcQrySettlementInfoField *pQrySettlementInfo, int nRequestID) = 0; 394 | 395 | ///请求查询转帐银行 396 | virtual int ReqQryTransferBank(CThostFtdcQryTransferBankField *pQryTransferBank, int nRequestID) = 0; 397 | 398 | ///请求查询投资者持仓明细 399 | virtual int ReqQryInvestorPositionDetail(CThostFtdcQryInvestorPositionDetailField *pQryInvestorPositionDetail, int nRequestID) = 0; 400 | 401 | ///请求查询客户通知 402 | virtual int ReqQryNotice(CThostFtdcQryNoticeField *pQryNotice, int nRequestID) = 0; 403 | 404 | ///请求查询结算信息确认 405 | virtual int ReqQrySettlementInfoConfirm(CThostFtdcQrySettlementInfoConfirmField *pQrySettlementInfoConfirm, int nRequestID) = 0; 406 | 407 | ///请求查询投资者持仓明细 408 | virtual int ReqQryInvestorPositionCombineDetail(CThostFtdcQryInvestorPositionCombineDetailField *pQryInvestorPositionCombineDetail, int nRequestID) = 0; 409 | 410 | ///请求查询保证金监管系统经纪公司资金账户密钥 411 | virtual int ReqQryCFMMCTradingAccountKey(CThostFtdcQryCFMMCTradingAccountKeyField *pQryCFMMCTradingAccountKey, int nRequestID) = 0; 412 | 413 | ///请求查询仓单折抵信息 414 | virtual int ReqQryEWarrantOffset(CThostFtdcQryEWarrantOffsetField *pQryEWarrantOffset, int nRequestID) = 0; 415 | 416 | ///请求查询转帐流水 417 | virtual int ReqQryTransferSerial(CThostFtdcQryTransferSerialField *pQryTransferSerial, int nRequestID) = 0; 418 | 419 | ///请求查询银期签约关系 420 | virtual int ReqQryAccountregister(CThostFtdcQryAccountregisterField *pQryAccountregister, int nRequestID) = 0; 421 | 422 | ///请求查询签约银行 423 | virtual int ReqQryContractBank(CThostFtdcQryContractBankField *pQryContractBank, int nRequestID) = 0; 424 | 425 | ///请求查询预埋单 426 | virtual int ReqQryParkedOrder(CThostFtdcQryParkedOrderField *pQryParkedOrder, int nRequestID) = 0; 427 | 428 | ///请求查询预埋撤单 429 | virtual int ReqQryParkedOrderAction(CThostFtdcQryParkedOrderActionField *pQryParkedOrderAction, int nRequestID) = 0; 430 | 431 | ///请求查询交易通知 432 | virtual int ReqQryTradingNotice(CThostFtdcQryTradingNoticeField *pQryTradingNotice, int nRequestID) = 0; 433 | 434 | ///请求查询经纪公司交易参数 435 | virtual int ReqQryBrokerTradingParams(CThostFtdcQryBrokerTradingParamsField *pQryBrokerTradingParams, int nRequestID) = 0; 436 | 437 | ///请求查询经纪公司交易算法 438 | virtual int ReqQryBrokerTradingAlgos(CThostFtdcQryBrokerTradingAlgosField *pQryBrokerTradingAlgos, int nRequestID) = 0; 439 | 440 | ///期货发起银行资金转期货请求 441 | virtual int ReqFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, int nRequestID) = 0; 442 | 443 | ///期货发起期货资金转银行请求 444 | virtual int ReqFromFutureToBankByFuture(CThostFtdcReqTransferField *pReqTransfer, int nRequestID) = 0; 445 | 446 | ///期货发起查询银行余额请求 447 | virtual int ReqQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, int nRequestID) = 0; 448 | protected: 449 | ~CThostFtdcTraderApi(){}; 450 | }; 451 | 452 | #endif 453 | -------------------------------------------------------------------------------- /src/c++/ThostFtdcUserApiStruct.h: -------------------------------------------------------------------------------- 1 | ///////////////////////////////////////////////////////////////////////// 2 | ///@system 新一代交易所系统 3 | ///@company 上海期货信息技术有限公司 4 | ///@file ThostFtdcUserApiStruct.h 5 | ///@brief 定义了客户端接口使用的业务数据结构 6 | ///@history 7 | ///20060106 赵鸿昊 创建该文件 8 | ///////////////////////////////////////////////////////////////////////// 9 | 10 | #if !defined(THOST_FTDCSTRUCT_H) 11 | #define THOST_FTDCSTRUCT_H 12 | 13 | #if _MSC_VER > 1000 14 | #pragma once 15 | #endif // _MSC_VER > 1000 16 | 17 | #include "ThostFtdcUserApiDataType.h" 18 | 19 | ///信息分发 20 | struct CThostFtdcDisseminationField 21 | { 22 | ///序列系列号 23 | TThostFtdcSequenceSeriesType SequenceSeries; 24 | ///序列号 25 | TThostFtdcSequenceNoType SequenceNo; 26 | }; 27 | 28 | ///用户登录请求 29 | struct CThostFtdcReqUserLoginField 30 | { 31 | ///交易日 32 | TThostFtdcDateType TradingDay; 33 | ///经纪公司代码 34 | TThostFtdcBrokerIDType BrokerID; 35 | ///用户代码 36 | TThostFtdcUserIDType UserID; 37 | ///密码 38 | TThostFtdcPasswordType Password; 39 | ///用户端产品信息 40 | TThostFtdcProductInfoType UserProductInfo; 41 | ///接口端产品信息 42 | TThostFtdcProductInfoType InterfaceProductInfo; 43 | ///协议信息 44 | TThostFtdcProtocolInfoType ProtocolInfo; 45 | ///Mac地址 46 | TThostFtdcMacAddressType MacAddress; 47 | ///动态密码 48 | TThostFtdcPasswordType OneTimePassword; 49 | ///终端IP地址 50 | TThostFtdcIPAddressType ClientIPAddress; 51 | }; 52 | 53 | ///用户登录应答 54 | struct CThostFtdcRspUserLoginField 55 | { 56 | ///交易日 57 | TThostFtdcDateType TradingDay; 58 | ///登录成功时间 59 | TThostFtdcTimeType LoginTime; 60 | ///经纪公司代码 61 | TThostFtdcBrokerIDType BrokerID; 62 | ///用户代码 63 | TThostFtdcUserIDType UserID; 64 | ///交易系统名称 65 | TThostFtdcSystemNameType SystemName; 66 | ///前置编号 67 | TThostFtdcFrontIDType FrontID; 68 | ///会话编号 69 | TThostFtdcSessionIDType SessionID; 70 | ///最大报单引用 71 | TThostFtdcOrderRefType MaxOrderRef; 72 | ///上期所时间 73 | TThostFtdcTimeType SHFETime; 74 | ///大商所时间 75 | TThostFtdcTimeType DCETime; 76 | ///郑商所时间 77 | TThostFtdcTimeType CZCETime; 78 | ///中金所时间 79 | TThostFtdcTimeType FFEXTime; 80 | }; 81 | 82 | ///用户登出请求 83 | struct CThostFtdcUserLogoutField 84 | { 85 | ///经纪公司代码 86 | TThostFtdcBrokerIDType BrokerID; 87 | ///用户代码 88 | TThostFtdcUserIDType UserID; 89 | }; 90 | 91 | ///强制交易员退出 92 | struct CThostFtdcForceUserLogoutField 93 | { 94 | ///经纪公司代码 95 | TThostFtdcBrokerIDType BrokerID; 96 | ///用户代码 97 | TThostFtdcUserIDType UserID; 98 | }; 99 | 100 | ///客户端认证请求 101 | struct CThostFtdcReqAuthenticateField 102 | { 103 | ///经纪公司代码 104 | TThostFtdcBrokerIDType BrokerID; 105 | ///用户代码 106 | TThostFtdcUserIDType UserID; 107 | ///用户端产品信息 108 | TThostFtdcProductInfoType UserProductInfo; 109 | ///认证码 110 | TThostFtdcAuthCodeType AuthCode; 111 | }; 112 | 113 | ///客户端认证响应 114 | struct CThostFtdcRspAuthenticateField 115 | { 116 | ///经纪公司代码 117 | TThostFtdcBrokerIDType BrokerID; 118 | ///用户代码 119 | TThostFtdcUserIDType UserID; 120 | ///用户端产品信息 121 | TThostFtdcProductInfoType UserProductInfo; 122 | }; 123 | 124 | ///客户端认证信息 125 | struct CThostFtdcAuthenticationInfoField 126 | { 127 | ///经纪公司代码 128 | TThostFtdcBrokerIDType BrokerID; 129 | ///用户代码 130 | TThostFtdcUserIDType UserID; 131 | ///用户端产品信息 132 | TThostFtdcProductInfoType UserProductInfo; 133 | ///认证信息 134 | TThostFtdcAuthInfoType AuthInfo; 135 | ///是否为认证结果 136 | TThostFtdcBoolType IsResult; 137 | }; 138 | 139 | ///银期转帐报文头 140 | struct CThostFtdcTransferHeaderField 141 | { 142 | ///版本号,常量,1.0 143 | TThostFtdcVersionType Version; 144 | ///交易代码,必填 145 | TThostFtdcTradeCodeType TradeCode; 146 | ///交易日期,必填,格式:yyyymmdd 147 | TThostFtdcTradeDateType TradeDate; 148 | ///交易时间,必填,格式:hhmmss 149 | TThostFtdcTradeTimeType TradeTime; 150 | ///发起方流水号,N/A 151 | TThostFtdcTradeSerialType TradeSerial; 152 | ///期货公司代码,必填 153 | TThostFtdcFutureIDType FutureID; 154 | ///银行代码,根据查询银行得到,必填 155 | TThostFtdcBankIDType BankID; 156 | ///银行分中心代码,根据查询银行得到,必填 157 | TThostFtdcBankBrchIDType BankBrchID; 158 | ///操作员,N/A 159 | TThostFtdcOperNoType OperNo; 160 | ///交易设备类型,N/A 161 | TThostFtdcDeviceIDType DeviceID; 162 | ///记录数,N/A 163 | TThostFtdcRecordNumType RecordNum; 164 | ///会话编号,N/A 165 | TThostFtdcSessionIDType SessionID; 166 | ///请求编号,N/A 167 | TThostFtdcRequestIDType RequestID; 168 | }; 169 | 170 | ///银行资金转期货请求,TradeCode=202001 171 | struct CThostFtdcTransferBankToFutureReqField 172 | { 173 | ///期货资金账户 174 | TThostFtdcAccountIDType FutureAccount; 175 | ///密码标志 176 | TThostFtdcFuturePwdFlagType FuturePwdFlag; 177 | ///密码 178 | TThostFtdcFutureAccPwdType FutureAccPwd; 179 | ///转账金额 180 | TThostFtdcMoneyType TradeAmt; 181 | ///客户手续费 182 | TThostFtdcMoneyType CustFee; 183 | ///币种:RMB-人民币 USD-美圆 HKD-港元 184 | TThostFtdcCurrencyCodeType CurrencyCode; 185 | }; 186 | 187 | ///银行资金转期货请求响应 188 | struct CThostFtdcTransferBankToFutureRspField 189 | { 190 | ///响应代码 191 | TThostFtdcRetCodeType RetCode; 192 | ///响应信息 193 | TThostFtdcRetInfoType RetInfo; 194 | ///资金账户 195 | TThostFtdcAccountIDType FutureAccount; 196 | ///转帐金额 197 | TThostFtdcMoneyType TradeAmt; 198 | ///应收客户手续费 199 | TThostFtdcMoneyType CustFee; 200 | ///币种 201 | TThostFtdcCurrencyCodeType CurrencyCode; 202 | }; 203 | 204 | ///期货资金转银行请求,TradeCode=202002 205 | struct CThostFtdcTransferFutureToBankReqField 206 | { 207 | ///期货资金账户 208 | TThostFtdcAccountIDType FutureAccount; 209 | ///密码标志 210 | TThostFtdcFuturePwdFlagType FuturePwdFlag; 211 | ///密码 212 | TThostFtdcFutureAccPwdType FutureAccPwd; 213 | ///转账金额 214 | TThostFtdcMoneyType TradeAmt; 215 | ///客户手续费 216 | TThostFtdcMoneyType CustFee; 217 | ///币种:RMB-人民币 USD-美圆 HKD-港元 218 | TThostFtdcCurrencyCodeType CurrencyCode; 219 | }; 220 | 221 | ///期货资金转银行请求响应 222 | struct CThostFtdcTransferFutureToBankRspField 223 | { 224 | ///响应代码 225 | TThostFtdcRetCodeType RetCode; 226 | ///响应信息 227 | TThostFtdcRetInfoType RetInfo; 228 | ///资金账户 229 | TThostFtdcAccountIDType FutureAccount; 230 | ///转帐金额 231 | TThostFtdcMoneyType TradeAmt; 232 | ///应收客户手续费 233 | TThostFtdcMoneyType CustFee; 234 | ///币种 235 | TThostFtdcCurrencyCodeType CurrencyCode; 236 | }; 237 | 238 | ///查询银行资金请求,TradeCode=204002 239 | struct CThostFtdcTransferQryBankReqField 240 | { 241 | ///期货资金账户 242 | TThostFtdcAccountIDType FutureAccount; 243 | ///密码标志 244 | TThostFtdcFuturePwdFlagType FuturePwdFlag; 245 | ///密码 246 | TThostFtdcFutureAccPwdType FutureAccPwd; 247 | ///币种:RMB-人民币 USD-美圆 HKD-港元 248 | TThostFtdcCurrencyCodeType CurrencyCode; 249 | }; 250 | 251 | ///查询银行资金请求响应 252 | struct CThostFtdcTransferQryBankRspField 253 | { 254 | ///响应代码 255 | TThostFtdcRetCodeType RetCode; 256 | ///响应信息 257 | TThostFtdcRetInfoType RetInfo; 258 | ///资金账户 259 | TThostFtdcAccountIDType FutureAccount; 260 | ///银行余额 261 | TThostFtdcMoneyType TradeAmt; 262 | ///银行可用余额 263 | TThostFtdcMoneyType UseAmt; 264 | ///银行可取余额 265 | TThostFtdcMoneyType FetchAmt; 266 | ///币种 267 | TThostFtdcCurrencyCodeType CurrencyCode; 268 | }; 269 | 270 | ///查询银行交易明细请求,TradeCode=204999 271 | struct CThostFtdcTransferQryDetailReqField 272 | { 273 | ///期货资金账户 274 | TThostFtdcAccountIDType FutureAccount; 275 | }; 276 | 277 | ///查询银行交易明细请求响应 278 | struct CThostFtdcTransferQryDetailRspField 279 | { 280 | ///交易日期 281 | TThostFtdcDateType TradeDate; 282 | ///交易时间 283 | TThostFtdcTradeTimeType TradeTime; 284 | ///交易代码 285 | TThostFtdcTradeCodeType TradeCode; 286 | ///期货流水号 287 | TThostFtdcTradeSerialNoType FutureSerial; 288 | ///期货公司代码 289 | TThostFtdcFutureIDType FutureID; 290 | ///资金帐号 291 | TThostFtdcFutureAccountType FutureAccount; 292 | ///银行流水号 293 | TThostFtdcTradeSerialNoType BankSerial; 294 | ///银行代码 295 | TThostFtdcBankIDType BankID; 296 | ///银行分中心代码 297 | TThostFtdcBankBrchIDType BankBrchID; 298 | ///银行账号 299 | TThostFtdcBankAccountType BankAccount; 300 | ///证件号码 301 | TThostFtdcCertCodeType CertCode; 302 | ///货币代码 303 | TThostFtdcCurrencyCodeType CurrencyCode; 304 | ///发生金额 305 | TThostFtdcMoneyType TxAmount; 306 | ///有效标志 307 | TThostFtdcTransferValidFlagType Flag; 308 | }; 309 | 310 | ///响应信息 311 | struct CThostFtdcRspInfoField 312 | { 313 | ///错误代码 314 | TThostFtdcErrorIDType ErrorID; 315 | ///错误信息 316 | TThostFtdcErrorMsgType ErrorMsg; 317 | }; 318 | 319 | ///交易所 320 | struct CThostFtdcExchangeField 321 | { 322 | ///交易所代码 323 | TThostFtdcExchangeIDType ExchangeID; 324 | ///交易所名称 325 | TThostFtdcExchangeNameType ExchangeName; 326 | ///交易所属性 327 | TThostFtdcExchangePropertyType ExchangeProperty; 328 | }; 329 | 330 | ///产品 331 | struct CThostFtdcProductField 332 | { 333 | ///产品代码 334 | TThostFtdcInstrumentIDType ProductID; 335 | ///产品名称 336 | TThostFtdcProductNameType ProductName; 337 | ///交易所代码 338 | TThostFtdcExchangeIDType ExchangeID; 339 | ///产品类型 340 | TThostFtdcProductClassType ProductClass; 341 | ///合约数量乘数 342 | TThostFtdcVolumeMultipleType VolumeMultiple; 343 | ///最小变动价位 344 | TThostFtdcPriceType PriceTick; 345 | ///市价单最大下单量 346 | TThostFtdcVolumeType MaxMarketOrderVolume; 347 | ///市价单最小下单量 348 | TThostFtdcVolumeType MinMarketOrderVolume; 349 | ///限价单最大下单量 350 | TThostFtdcVolumeType MaxLimitOrderVolume; 351 | ///限价单最小下单量 352 | TThostFtdcVolumeType MinLimitOrderVolume; 353 | ///持仓类型 354 | TThostFtdcPositionTypeType PositionType; 355 | ///持仓日期类型 356 | TThostFtdcPositionDateTypeType PositionDateType; 357 | ///平仓处理类型 358 | TThostFtdcCloseDealTypeType CloseDealType; 359 | }; 360 | 361 | ///合约 362 | struct CThostFtdcInstrumentField 363 | { 364 | ///合约代码 365 | TThostFtdcInstrumentIDType InstrumentID; 366 | ///交易所代码 367 | TThostFtdcExchangeIDType ExchangeID; 368 | ///合约名称 369 | TThostFtdcInstrumentNameType InstrumentName; 370 | ///合约在交易所的代码 371 | TThostFtdcExchangeInstIDType ExchangeInstID; 372 | ///产品代码 373 | TThostFtdcInstrumentIDType ProductID; 374 | ///产品类型 375 | TThostFtdcProductClassType ProductClass; 376 | ///交割年份 377 | TThostFtdcYearType DeliveryYear; 378 | ///交割月 379 | TThostFtdcMonthType DeliveryMonth; 380 | ///市价单最大下单量 381 | TThostFtdcVolumeType MaxMarketOrderVolume; 382 | ///市价单最小下单量 383 | TThostFtdcVolumeType MinMarketOrderVolume; 384 | ///限价单最大下单量 385 | TThostFtdcVolumeType MaxLimitOrderVolume; 386 | ///限价单最小下单量 387 | TThostFtdcVolumeType MinLimitOrderVolume; 388 | ///合约数量乘数 389 | TThostFtdcVolumeMultipleType VolumeMultiple; 390 | ///最小变动价位 391 | TThostFtdcPriceType PriceTick; 392 | ///创建日 393 | TThostFtdcDateType CreateDate; 394 | ///上市日 395 | TThostFtdcDateType OpenDate; 396 | ///到期日 397 | TThostFtdcDateType ExpireDate; 398 | ///开始交割日 399 | TThostFtdcDateType StartDelivDate; 400 | ///结束交割日 401 | TThostFtdcDateType EndDelivDate; 402 | ///合约生命周期状态 403 | TThostFtdcInstLifePhaseType InstLifePhase; 404 | ///当前是否交易 405 | TThostFtdcBoolType IsTrading; 406 | ///持仓类型 407 | TThostFtdcPositionTypeType PositionType; 408 | ///持仓日期类型 409 | TThostFtdcPositionDateTypeType PositionDateType; 410 | ///多头保证金率 411 | TThostFtdcRatioType LongMarginRatio; 412 | ///空头保证金率 413 | TThostFtdcRatioType ShortMarginRatio; 414 | }; 415 | 416 | ///经纪公司 417 | struct CThostFtdcBrokerField 418 | { 419 | ///经纪公司代码 420 | TThostFtdcBrokerIDType BrokerID; 421 | ///经纪公司简称 422 | TThostFtdcBrokerAbbrType BrokerAbbr; 423 | ///经纪公司名称 424 | TThostFtdcBrokerNameType BrokerName; 425 | ///是否活跃 426 | TThostFtdcBoolType IsActive; 427 | }; 428 | 429 | ///交易所交易员 430 | struct CThostFtdcTraderField 431 | { 432 | ///交易所代码 433 | TThostFtdcExchangeIDType ExchangeID; 434 | ///交易所交易员代码 435 | TThostFtdcTraderIDType TraderID; 436 | ///会员代码 437 | TThostFtdcParticipantIDType ParticipantID; 438 | ///密码 439 | TThostFtdcPasswordType Password; 440 | ///安装数量 441 | TThostFtdcInstallCountType InstallCount; 442 | ///经纪公司代码 443 | TThostFtdcBrokerIDType BrokerID; 444 | }; 445 | 446 | ///投资者 447 | struct CThostFtdcInvestorField 448 | { 449 | ///投资者代码 450 | TThostFtdcInvestorIDType InvestorID; 451 | ///经纪公司代码 452 | TThostFtdcBrokerIDType BrokerID; 453 | ///投资者分组代码 454 | TThostFtdcInvestorIDType InvestorGroupID; 455 | ///投资者名称 456 | TThostFtdcPartyNameType InvestorName; 457 | ///证件类型 458 | TThostFtdcIdCardTypeType IdentifiedCardType; 459 | ///证件号码 460 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 461 | ///是否活跃 462 | TThostFtdcBoolType IsActive; 463 | ///联系电话 464 | TThostFtdcTelephoneType Telephone; 465 | ///通讯地址 466 | TThostFtdcAddressType Address; 467 | ///开户日期 468 | TThostFtdcDateType OpenDate; 469 | ///手机 470 | TThostFtdcMobileType Mobile; 471 | ///手续费率模板代码 472 | TThostFtdcInvestorIDType CommModelID; 473 | ///保证金率模板代码 474 | TThostFtdcInvestorIDType MarginModelID; 475 | }; 476 | 477 | ///交易编码 478 | struct CThostFtdcTradingCodeField 479 | { 480 | ///投资者代码 481 | TThostFtdcInvestorIDType InvestorID; 482 | ///经纪公司代码 483 | TThostFtdcBrokerIDType BrokerID; 484 | ///交易所代码 485 | TThostFtdcExchangeIDType ExchangeID; 486 | ///客户代码 487 | TThostFtdcClientIDType ClientID; 488 | ///是否活跃 489 | TThostFtdcBoolType IsActive; 490 | ///交易编码类型 491 | TThostFtdcClientIDTypeType ClientIDType; 492 | }; 493 | 494 | ///会员编码和经纪公司编码对照表 495 | struct CThostFtdcPartBrokerField 496 | { 497 | ///经纪公司代码 498 | TThostFtdcBrokerIDType BrokerID; 499 | ///交易所代码 500 | TThostFtdcExchangeIDType ExchangeID; 501 | ///会员代码 502 | TThostFtdcParticipantIDType ParticipantID; 503 | ///是否活跃 504 | TThostFtdcBoolType IsActive; 505 | }; 506 | 507 | ///管理用户 508 | struct CThostFtdcSuperUserField 509 | { 510 | ///用户代码 511 | TThostFtdcUserIDType UserID; 512 | ///用户名称 513 | TThostFtdcUserNameType UserName; 514 | ///密码 515 | TThostFtdcPasswordType Password; 516 | ///是否活跃 517 | TThostFtdcBoolType IsActive; 518 | }; 519 | 520 | ///管理用户功能权限 521 | struct CThostFtdcSuperUserFunctionField 522 | { 523 | ///用户代码 524 | TThostFtdcUserIDType UserID; 525 | ///功能代码 526 | TThostFtdcFunctionCodeType FunctionCode; 527 | }; 528 | 529 | ///投资者组 530 | struct CThostFtdcInvestorGroupField 531 | { 532 | ///经纪公司代码 533 | TThostFtdcBrokerIDType BrokerID; 534 | ///投资者分组代码 535 | TThostFtdcInvestorIDType InvestorGroupID; 536 | ///投资者分组名称 537 | TThostFtdcInvestorGroupNameType InvestorGroupName; 538 | }; 539 | 540 | ///资金账户 541 | struct CThostFtdcTradingAccountField 542 | { 543 | ///经纪公司代码 544 | TThostFtdcBrokerIDType BrokerID; 545 | ///投资者帐号 546 | TThostFtdcAccountIDType AccountID; 547 | ///上次质押金额 548 | TThostFtdcMoneyType PreMortgage; 549 | ///上次信用额度 550 | TThostFtdcMoneyType PreCredit; 551 | ///上次存款额 552 | TThostFtdcMoneyType PreDeposit; 553 | ///上次结算准备金 554 | TThostFtdcMoneyType PreBalance; 555 | ///上次占用的保证金 556 | TThostFtdcMoneyType PreMargin; 557 | ///利息基数 558 | TThostFtdcMoneyType InterestBase; 559 | ///利息收入 560 | TThostFtdcMoneyType Interest; 561 | ///入金金额 562 | TThostFtdcMoneyType Deposit; 563 | ///出金金额 564 | TThostFtdcMoneyType Withdraw; 565 | ///冻结的保证金 566 | TThostFtdcMoneyType FrozenMargin; 567 | ///冻结的资金 568 | TThostFtdcMoneyType FrozenCash; 569 | ///冻结的手续费 570 | TThostFtdcMoneyType FrozenCommission; 571 | ///当前保证金总额 572 | TThostFtdcMoneyType CurrMargin; 573 | ///资金差额 574 | TThostFtdcMoneyType CashIn; 575 | ///手续费 576 | TThostFtdcMoneyType Commission; 577 | ///平仓盈亏 578 | TThostFtdcMoneyType CloseProfit; 579 | ///持仓盈亏 580 | TThostFtdcMoneyType PositionProfit; 581 | ///期货结算准备金 582 | TThostFtdcMoneyType Balance; 583 | ///可用资金 584 | TThostFtdcMoneyType Available; 585 | ///可取资金 586 | TThostFtdcMoneyType WithdrawQuota; 587 | ///基本准备金 588 | TThostFtdcMoneyType Reserve; 589 | ///交易日 590 | TThostFtdcDateType TradingDay; 591 | ///结算编号 592 | TThostFtdcSettlementIDType SettlementID; 593 | ///信用额度 594 | TThostFtdcMoneyType Credit; 595 | ///质押金额 596 | TThostFtdcMoneyType Mortgage; 597 | ///交易所保证金 598 | TThostFtdcMoneyType ExchangeMargin; 599 | ///投资者交割保证金 600 | TThostFtdcMoneyType DeliveryMargin; 601 | ///交易所交割保证金 602 | TThostFtdcMoneyType ExchangeDeliveryMargin; 603 | }; 604 | 605 | ///投资者持仓 606 | struct CThostFtdcInvestorPositionField 607 | { 608 | ///合约代码 609 | TThostFtdcInstrumentIDType InstrumentID; 610 | ///经纪公司代码 611 | TThostFtdcBrokerIDType BrokerID; 612 | ///投资者代码 613 | TThostFtdcInvestorIDType InvestorID; 614 | ///持仓多空方向 615 | TThostFtdcPosiDirectionType PosiDirection; 616 | ///投机套保标志 617 | TThostFtdcHedgeFlagType HedgeFlag; 618 | ///持仓日期 619 | TThostFtdcPositionDateType PositionDate; 620 | ///上日持仓 621 | TThostFtdcVolumeType YdPosition; 622 | ///今日持仓 623 | TThostFtdcVolumeType Position; 624 | ///多头冻结 625 | TThostFtdcVolumeType LongFrozen; 626 | ///空头冻结 627 | TThostFtdcVolumeType ShortFrozen; 628 | ///开仓冻结金额 629 | TThostFtdcMoneyType LongFrozenAmount; 630 | ///开仓冻结金额 631 | TThostFtdcMoneyType ShortFrozenAmount; 632 | ///开仓量 633 | TThostFtdcVolumeType OpenVolume; 634 | ///平仓量 635 | TThostFtdcVolumeType CloseVolume; 636 | ///开仓金额 637 | TThostFtdcMoneyType OpenAmount; 638 | ///平仓金额 639 | TThostFtdcMoneyType CloseAmount; 640 | ///持仓成本 641 | TThostFtdcMoneyType PositionCost; 642 | ///上次占用的保证金 643 | TThostFtdcMoneyType PreMargin; 644 | ///占用的保证金 645 | TThostFtdcMoneyType UseMargin; 646 | ///冻结的保证金 647 | TThostFtdcMoneyType FrozenMargin; 648 | ///冻结的资金 649 | TThostFtdcMoneyType FrozenCash; 650 | ///冻结的手续费 651 | TThostFtdcMoneyType FrozenCommission; 652 | ///资金差额 653 | TThostFtdcMoneyType CashIn; 654 | ///手续费 655 | TThostFtdcMoneyType Commission; 656 | ///平仓盈亏 657 | TThostFtdcMoneyType CloseProfit; 658 | ///持仓盈亏 659 | TThostFtdcMoneyType PositionProfit; 660 | ///上次结算价 661 | TThostFtdcPriceType PreSettlementPrice; 662 | ///本次结算价 663 | TThostFtdcPriceType SettlementPrice; 664 | ///交易日 665 | TThostFtdcDateType TradingDay; 666 | ///结算编号 667 | TThostFtdcSettlementIDType SettlementID; 668 | ///开仓成本 669 | TThostFtdcMoneyType OpenCost; 670 | ///交易所保证金 671 | TThostFtdcMoneyType ExchangeMargin; 672 | ///组合成交形成的持仓 673 | TThostFtdcVolumeType CombPosition; 674 | ///组合多头冻结 675 | TThostFtdcVolumeType CombLongFrozen; 676 | ///组合空头冻结 677 | TThostFtdcVolumeType CombShortFrozen; 678 | ///逐日盯市平仓盈亏 679 | TThostFtdcMoneyType CloseProfitByDate; 680 | ///逐笔对冲平仓盈亏 681 | TThostFtdcMoneyType CloseProfitByTrade; 682 | ///今日持仓 683 | TThostFtdcVolumeType TodayPosition; 684 | ///保证金率 685 | TThostFtdcRatioType MarginRateByMoney; 686 | ///保证金率(按手数) 687 | TThostFtdcRatioType MarginRateByVolume; 688 | }; 689 | 690 | ///合约保证金率 691 | struct CThostFtdcInstrumentMarginRateField 692 | { 693 | ///合约代码 694 | TThostFtdcInstrumentIDType InstrumentID; 695 | ///投资者范围 696 | TThostFtdcInvestorRangeType InvestorRange; 697 | ///经纪公司代码 698 | TThostFtdcBrokerIDType BrokerID; 699 | ///投资者代码 700 | TThostFtdcInvestorIDType InvestorID; 701 | ///投机套保标志 702 | TThostFtdcHedgeFlagType HedgeFlag; 703 | ///多头保证金率 704 | TThostFtdcRatioType LongMarginRatioByMoney; 705 | ///多头保证金费 706 | TThostFtdcMoneyType LongMarginRatioByVolume; 707 | ///空头保证金率 708 | TThostFtdcRatioType ShortMarginRatioByMoney; 709 | ///空头保证金费 710 | TThostFtdcMoneyType ShortMarginRatioByVolume; 711 | ///是否相对交易所收取 712 | TThostFtdcBoolType IsRelative; 713 | }; 714 | 715 | ///合约手续费率 716 | struct CThostFtdcInstrumentCommissionRateField 717 | { 718 | ///合约代码 719 | TThostFtdcInstrumentIDType InstrumentID; 720 | ///投资者范围 721 | TThostFtdcInvestorRangeType InvestorRange; 722 | ///经纪公司代码 723 | TThostFtdcBrokerIDType BrokerID; 724 | ///投资者代码 725 | TThostFtdcInvestorIDType InvestorID; 726 | ///开仓手续费率 727 | TThostFtdcRatioType OpenRatioByMoney; 728 | ///开仓手续费 729 | TThostFtdcRatioType OpenRatioByVolume; 730 | ///平仓手续费率 731 | TThostFtdcRatioType CloseRatioByMoney; 732 | ///平仓手续费 733 | TThostFtdcRatioType CloseRatioByVolume; 734 | ///平今手续费率 735 | TThostFtdcRatioType CloseTodayRatioByMoney; 736 | ///平今手续费 737 | TThostFtdcRatioType CloseTodayRatioByVolume; 738 | }; 739 | 740 | ///深度行情 741 | struct CThostFtdcDepthMarketDataField 742 | { 743 | ///交易日 744 | TThostFtdcDateType TradingDay; 745 | ///合约代码 746 | TThostFtdcInstrumentIDType InstrumentID; 747 | ///交易所代码 748 | TThostFtdcExchangeIDType ExchangeID; 749 | ///合约在交易所的代码 750 | TThostFtdcExchangeInstIDType ExchangeInstID; 751 | ///最新价 752 | TThostFtdcPriceType LastPrice; 753 | ///上次结算价 754 | TThostFtdcPriceType PreSettlementPrice; 755 | ///昨收盘 756 | TThostFtdcPriceType PreClosePrice; 757 | ///昨持仓量 758 | TThostFtdcLargeVolumeType PreOpenInterest; 759 | ///今开盘 760 | TThostFtdcPriceType OpenPrice; 761 | ///最高价 762 | TThostFtdcPriceType HighestPrice; 763 | ///最低价 764 | TThostFtdcPriceType LowestPrice; 765 | ///数量 766 | TThostFtdcVolumeType Volume; 767 | ///成交金额 768 | TThostFtdcMoneyType Turnover; 769 | ///持仓量 770 | TThostFtdcLargeVolumeType OpenInterest; 771 | ///今收盘 772 | TThostFtdcPriceType ClosePrice; 773 | ///本次结算价 774 | TThostFtdcPriceType SettlementPrice; 775 | ///涨停板价 776 | TThostFtdcPriceType UpperLimitPrice; 777 | ///跌停板价 778 | TThostFtdcPriceType LowerLimitPrice; 779 | ///昨虚实度 780 | TThostFtdcRatioType PreDelta; 781 | ///今虚实度 782 | TThostFtdcRatioType CurrDelta; 783 | ///最后修改时间 784 | TThostFtdcTimeType UpdateTime; 785 | ///最后修改毫秒 786 | TThostFtdcMillisecType UpdateMillisec; 787 | ///申买价一 788 | TThostFtdcPriceType BidPrice1; 789 | ///申买量一 790 | TThostFtdcVolumeType BidVolume1; 791 | ///申卖价一 792 | TThostFtdcPriceType AskPrice1; 793 | ///申卖量一 794 | TThostFtdcVolumeType AskVolume1; 795 | ///申买价二 796 | TThostFtdcPriceType BidPrice2; 797 | ///申买量二 798 | TThostFtdcVolumeType BidVolume2; 799 | ///申卖价二 800 | TThostFtdcPriceType AskPrice2; 801 | ///申卖量二 802 | TThostFtdcVolumeType AskVolume2; 803 | ///申买价三 804 | TThostFtdcPriceType BidPrice3; 805 | ///申买量三 806 | TThostFtdcVolumeType BidVolume3; 807 | ///申卖价三 808 | TThostFtdcPriceType AskPrice3; 809 | ///申卖量三 810 | TThostFtdcVolumeType AskVolume3; 811 | ///申买价四 812 | TThostFtdcPriceType BidPrice4; 813 | ///申买量四 814 | TThostFtdcVolumeType BidVolume4; 815 | ///申卖价四 816 | TThostFtdcPriceType AskPrice4; 817 | ///申卖量四 818 | TThostFtdcVolumeType AskVolume4; 819 | ///申买价五 820 | TThostFtdcPriceType BidPrice5; 821 | ///申买量五 822 | TThostFtdcVolumeType BidVolume5; 823 | ///申卖价五 824 | TThostFtdcPriceType AskPrice5; 825 | ///申卖量五 826 | TThostFtdcVolumeType AskVolume5; 827 | ///当日均价 828 | TThostFtdcPriceType AveragePrice; 829 | }; 830 | 831 | ///投资者合约交易权限 832 | struct CThostFtdcInstrumentTradingRightField 833 | { 834 | ///合约代码 835 | TThostFtdcInstrumentIDType InstrumentID; 836 | ///投资者范围 837 | TThostFtdcInvestorRangeType InvestorRange; 838 | ///经纪公司代码 839 | TThostFtdcBrokerIDType BrokerID; 840 | ///投资者代码 841 | TThostFtdcInvestorIDType InvestorID; 842 | ///交易权限 843 | TThostFtdcTradingRightType TradingRight; 844 | }; 845 | 846 | ///经纪公司用户 847 | struct CThostFtdcBrokerUserField 848 | { 849 | ///经纪公司代码 850 | TThostFtdcBrokerIDType BrokerID; 851 | ///用户代码 852 | TThostFtdcUserIDType UserID; 853 | ///用户名称 854 | TThostFtdcUserNameType UserName; 855 | ///用户类型 856 | TThostFtdcUserTypeType UserType; 857 | ///是否活跃 858 | TThostFtdcBoolType IsActive; 859 | ///是否使用令牌 860 | TThostFtdcBoolType IsUsingOTP; 861 | }; 862 | 863 | ///经纪公司用户口令 864 | struct CThostFtdcBrokerUserPasswordField 865 | { 866 | ///经纪公司代码 867 | TThostFtdcBrokerIDType BrokerID; 868 | ///用户代码 869 | TThostFtdcUserIDType UserID; 870 | ///密码 871 | TThostFtdcPasswordType Password; 872 | }; 873 | 874 | ///经纪公司用户功能权限 875 | struct CThostFtdcBrokerUserFunctionField 876 | { 877 | ///经纪公司代码 878 | TThostFtdcBrokerIDType BrokerID; 879 | ///用户代码 880 | TThostFtdcUserIDType UserID; 881 | ///经纪公司功能代码 882 | TThostFtdcBrokerFunctionCodeType BrokerFunctionCode; 883 | }; 884 | 885 | ///交易所交易员报盘机 886 | struct CThostFtdcTraderOfferField 887 | { 888 | ///交易所代码 889 | TThostFtdcExchangeIDType ExchangeID; 890 | ///交易所交易员代码 891 | TThostFtdcTraderIDType TraderID; 892 | ///会员代码 893 | TThostFtdcParticipantIDType ParticipantID; 894 | ///密码 895 | TThostFtdcPasswordType Password; 896 | ///安装编号 897 | TThostFtdcInstallIDType InstallID; 898 | ///本地报单编号 899 | TThostFtdcOrderLocalIDType OrderLocalID; 900 | ///交易所交易员连接状态 901 | TThostFtdcTraderConnectStatusType TraderConnectStatus; 902 | ///发出连接请求的日期 903 | TThostFtdcDateType ConnectRequestDate; 904 | ///发出连接请求的时间 905 | TThostFtdcTimeType ConnectRequestTime; 906 | ///上次报告日期 907 | TThostFtdcDateType LastReportDate; 908 | ///上次报告时间 909 | TThostFtdcTimeType LastReportTime; 910 | ///完成连接日期 911 | TThostFtdcDateType ConnectDate; 912 | ///完成连接时间 913 | TThostFtdcTimeType ConnectTime; 914 | ///启动日期 915 | TThostFtdcDateType StartDate; 916 | ///启动时间 917 | TThostFtdcTimeType StartTime; 918 | ///交易日 919 | TThostFtdcDateType TradingDay; 920 | ///经纪公司代码 921 | TThostFtdcBrokerIDType BrokerID; 922 | ///本席位最大成交编号 923 | TThostFtdcTradeIDType MaxTradeID; 924 | ///本席位最大报单备拷 925 | TThostFtdcReturnCodeType MaxOrderMessageReference; 926 | }; 927 | 928 | ///投资者结算结果 929 | struct CThostFtdcSettlementInfoField 930 | { 931 | ///交易日 932 | TThostFtdcDateType TradingDay; 933 | ///结算编号 934 | TThostFtdcSettlementIDType SettlementID; 935 | ///经纪公司代码 936 | TThostFtdcBrokerIDType BrokerID; 937 | ///投资者代码 938 | TThostFtdcInvestorIDType InvestorID; 939 | ///序号 940 | TThostFtdcSequenceNoType SequenceNo; 941 | ///消息正文 942 | TThostFtdcContentType Content; 943 | }; 944 | 945 | ///合约保证金率调整 946 | struct CThostFtdcInstrumentMarginRateAdjustField 947 | { 948 | ///合约代码 949 | TThostFtdcInstrumentIDType InstrumentID; 950 | ///投资者范围 951 | TThostFtdcInvestorRangeType InvestorRange; 952 | ///经纪公司代码 953 | TThostFtdcBrokerIDType BrokerID; 954 | ///投资者代码 955 | TThostFtdcInvestorIDType InvestorID; 956 | ///投机套保标志 957 | TThostFtdcHedgeFlagType HedgeFlag; 958 | ///多头保证金率 959 | TThostFtdcRatioType LongMarginRatioByMoney; 960 | ///多头保证金费 961 | TThostFtdcMoneyType LongMarginRatioByVolume; 962 | ///空头保证金率 963 | TThostFtdcRatioType ShortMarginRatioByMoney; 964 | ///空头保证金费 965 | TThostFtdcMoneyType ShortMarginRatioByVolume; 966 | ///是否相对交易所收取 967 | TThostFtdcBoolType IsRelative; 968 | }; 969 | 970 | ///交易所保证金率 971 | struct CThostFtdcExchangeMarginRateField 972 | { 973 | ///经纪公司代码 974 | TThostFtdcBrokerIDType BrokerID; 975 | ///合约代码 976 | TThostFtdcInstrumentIDType InstrumentID; 977 | ///投机套保标志 978 | TThostFtdcHedgeFlagType HedgeFlag; 979 | ///多头保证金率 980 | TThostFtdcRatioType LongMarginRatioByMoney; 981 | ///多头保证金费 982 | TThostFtdcMoneyType LongMarginRatioByVolume; 983 | ///空头保证金率 984 | TThostFtdcRatioType ShortMarginRatioByMoney; 985 | ///空头保证金费 986 | TThostFtdcMoneyType ShortMarginRatioByVolume; 987 | }; 988 | 989 | ///交易所保证金率调整 990 | struct CThostFtdcExchangeMarginRateAdjustField 991 | { 992 | ///经纪公司代码 993 | TThostFtdcBrokerIDType BrokerID; 994 | ///合约代码 995 | TThostFtdcInstrumentIDType InstrumentID; 996 | ///投机套保标志 997 | TThostFtdcHedgeFlagType HedgeFlag; 998 | ///跟随交易所投资者多头保证金率 999 | TThostFtdcRatioType LongMarginRatioByMoney; 1000 | ///跟随交易所投资者多头保证金费 1001 | TThostFtdcMoneyType LongMarginRatioByVolume; 1002 | ///跟随交易所投资者空头保证金率 1003 | TThostFtdcRatioType ShortMarginRatioByMoney; 1004 | ///跟随交易所投资者空头保证金费 1005 | TThostFtdcMoneyType ShortMarginRatioByVolume; 1006 | ///交易所多头保证金率 1007 | TThostFtdcRatioType ExchLongMarginRatioByMoney; 1008 | ///交易所多头保证金费 1009 | TThostFtdcMoneyType ExchLongMarginRatioByVolume; 1010 | ///交易所空头保证金率 1011 | TThostFtdcRatioType ExchShortMarginRatioByMoney; 1012 | ///交易所空头保证金费 1013 | TThostFtdcMoneyType ExchShortMarginRatioByVolume; 1014 | ///不跟随交易所投资者多头保证金率 1015 | TThostFtdcRatioType NoLongMarginRatioByMoney; 1016 | ///不跟随交易所投资者多头保证金费 1017 | TThostFtdcMoneyType NoLongMarginRatioByVolume; 1018 | ///不跟随交易所投资者空头保证金率 1019 | TThostFtdcRatioType NoShortMarginRatioByMoney; 1020 | ///不跟随交易所投资者空头保证金费 1021 | TThostFtdcMoneyType NoShortMarginRatioByVolume; 1022 | }; 1023 | 1024 | ///结算引用 1025 | struct CThostFtdcSettlementRefField 1026 | { 1027 | ///交易日 1028 | TThostFtdcDateType TradingDay; 1029 | ///结算编号 1030 | TThostFtdcSettlementIDType SettlementID; 1031 | }; 1032 | 1033 | ///当前时间 1034 | struct CThostFtdcCurrentTimeField 1035 | { 1036 | ///当前日期 1037 | TThostFtdcDateType CurrDate; 1038 | ///当前时间 1039 | TThostFtdcTimeType CurrTime; 1040 | ///当前时间(毫秒) 1041 | TThostFtdcMillisecType CurrMillisec; 1042 | }; 1043 | 1044 | ///通讯阶段 1045 | struct CThostFtdcCommPhaseField 1046 | { 1047 | ///交易日 1048 | TThostFtdcDateType TradingDay; 1049 | ///通讯时段编号 1050 | TThostFtdcCommPhaseNoType CommPhaseNo; 1051 | }; 1052 | 1053 | ///登录信息 1054 | struct CThostFtdcLoginInfoField 1055 | { 1056 | ///前置编号 1057 | TThostFtdcFrontIDType FrontID; 1058 | ///会话编号 1059 | TThostFtdcSessionIDType SessionID; 1060 | ///经纪公司代码 1061 | TThostFtdcBrokerIDType BrokerID; 1062 | ///用户代码 1063 | TThostFtdcUserIDType UserID; 1064 | ///登录日期 1065 | TThostFtdcDateType LoginDate; 1066 | ///登录时间 1067 | TThostFtdcTimeType LoginTime; 1068 | ///IP地址 1069 | TThostFtdcIPAddressType IPAddress; 1070 | ///用户端产品信息 1071 | TThostFtdcProductInfoType UserProductInfo; 1072 | ///接口端产品信息 1073 | TThostFtdcProductInfoType InterfaceProductInfo; 1074 | ///协议信息 1075 | TThostFtdcProtocolInfoType ProtocolInfo; 1076 | ///系统名称 1077 | TThostFtdcSystemNameType SystemName; 1078 | ///密码 1079 | TThostFtdcPasswordType Password; 1080 | ///最大报单引用 1081 | TThostFtdcOrderRefType MaxOrderRef; 1082 | ///上期所时间 1083 | TThostFtdcTimeType SHFETime; 1084 | ///大商所时间 1085 | TThostFtdcTimeType DCETime; 1086 | ///郑商所时间 1087 | TThostFtdcTimeType CZCETime; 1088 | ///中金所时间 1089 | TThostFtdcTimeType FFEXTime; 1090 | ///Mac地址 1091 | TThostFtdcMacAddressType MacAddress; 1092 | ///动态密码 1093 | TThostFtdcPasswordType OneTimePassword; 1094 | }; 1095 | 1096 | ///登录信息 1097 | struct CThostFtdcLogoutAllField 1098 | { 1099 | ///前置编号 1100 | TThostFtdcFrontIDType FrontID; 1101 | ///会话编号 1102 | TThostFtdcSessionIDType SessionID; 1103 | ///系统名称 1104 | TThostFtdcSystemNameType SystemName; 1105 | }; 1106 | 1107 | ///前置状态 1108 | struct CThostFtdcFrontStatusField 1109 | { 1110 | ///前置编号 1111 | TThostFtdcFrontIDType FrontID; 1112 | ///上次报告日期 1113 | TThostFtdcDateType LastReportDate; 1114 | ///上次报告时间 1115 | TThostFtdcTimeType LastReportTime; 1116 | ///是否活跃 1117 | TThostFtdcBoolType IsActive; 1118 | }; 1119 | 1120 | ///用户口令变更 1121 | struct CThostFtdcUserPasswordUpdateField 1122 | { 1123 | ///经纪公司代码 1124 | TThostFtdcBrokerIDType BrokerID; 1125 | ///用户代码 1126 | TThostFtdcUserIDType UserID; 1127 | ///原来的口令 1128 | TThostFtdcPasswordType OldPassword; 1129 | ///新的口令 1130 | TThostFtdcPasswordType NewPassword; 1131 | }; 1132 | 1133 | ///输入报单 1134 | struct CThostFtdcInputOrderField 1135 | { 1136 | ///经纪公司代码 1137 | TThostFtdcBrokerIDType BrokerID; 1138 | ///投资者代码 1139 | TThostFtdcInvestorIDType InvestorID; 1140 | ///合约代码 1141 | TThostFtdcInstrumentIDType InstrumentID; 1142 | ///报单引用 1143 | TThostFtdcOrderRefType OrderRef; 1144 | ///用户代码 1145 | TThostFtdcUserIDType UserID; 1146 | ///报单价格条件 1147 | TThostFtdcOrderPriceTypeType OrderPriceType; 1148 | ///买卖方向 1149 | TThostFtdcDirectionType Direction; 1150 | ///组合开平标志 1151 | TThostFtdcCombOffsetFlagType CombOffsetFlag; 1152 | ///组合投机套保标志 1153 | TThostFtdcCombHedgeFlagType CombHedgeFlag; 1154 | ///价格 1155 | TThostFtdcPriceType LimitPrice; 1156 | ///数量 1157 | TThostFtdcVolumeType VolumeTotalOriginal; 1158 | ///有效期类型 1159 | TThostFtdcTimeConditionType TimeCondition; 1160 | ///GTD日期 1161 | TThostFtdcDateType GTDDate; 1162 | ///成交量类型 1163 | TThostFtdcVolumeConditionType VolumeCondition; 1164 | ///最小成交量 1165 | TThostFtdcVolumeType MinVolume; 1166 | ///触发条件 1167 | TThostFtdcContingentConditionType ContingentCondition; 1168 | ///止损价 1169 | TThostFtdcPriceType StopPrice; 1170 | ///强平原因 1171 | TThostFtdcForceCloseReasonType ForceCloseReason; 1172 | ///自动挂起标志 1173 | TThostFtdcBoolType IsAutoSuspend; 1174 | ///业务单元 1175 | TThostFtdcBusinessUnitType BusinessUnit; 1176 | ///请求编号 1177 | TThostFtdcRequestIDType RequestID; 1178 | ///用户强评标志 1179 | TThostFtdcBoolType UserForceClose; 1180 | ///互换单标志 1181 | TThostFtdcBoolType IsSwapOrder; 1182 | }; 1183 | 1184 | ///报单 1185 | struct CThostFtdcOrderField 1186 | { 1187 | ///经纪公司代码 1188 | TThostFtdcBrokerIDType BrokerID; 1189 | ///投资者代码 1190 | TThostFtdcInvestorIDType InvestorID; 1191 | ///合约代码 1192 | TThostFtdcInstrumentIDType InstrumentID; 1193 | ///报单引用 1194 | TThostFtdcOrderRefType OrderRef; 1195 | ///用户代码 1196 | TThostFtdcUserIDType UserID; 1197 | ///报单价格条件 1198 | TThostFtdcOrderPriceTypeType OrderPriceType; 1199 | ///买卖方向 1200 | TThostFtdcDirectionType Direction; 1201 | ///组合开平标志 1202 | TThostFtdcCombOffsetFlagType CombOffsetFlag; 1203 | ///组合投机套保标志 1204 | TThostFtdcCombHedgeFlagType CombHedgeFlag; 1205 | ///价格 1206 | TThostFtdcPriceType LimitPrice; 1207 | ///数量 1208 | TThostFtdcVolumeType VolumeTotalOriginal; 1209 | ///有效期类型 1210 | TThostFtdcTimeConditionType TimeCondition; 1211 | ///GTD日期 1212 | TThostFtdcDateType GTDDate; 1213 | ///成交量类型 1214 | TThostFtdcVolumeConditionType VolumeCondition; 1215 | ///最小成交量 1216 | TThostFtdcVolumeType MinVolume; 1217 | ///触发条件 1218 | TThostFtdcContingentConditionType ContingentCondition; 1219 | ///止损价 1220 | TThostFtdcPriceType StopPrice; 1221 | ///强平原因 1222 | TThostFtdcForceCloseReasonType ForceCloseReason; 1223 | ///自动挂起标志 1224 | TThostFtdcBoolType IsAutoSuspend; 1225 | ///业务单元 1226 | TThostFtdcBusinessUnitType BusinessUnit; 1227 | ///请求编号 1228 | TThostFtdcRequestIDType RequestID; 1229 | ///本地报单编号 1230 | TThostFtdcOrderLocalIDType OrderLocalID; 1231 | ///交易所代码 1232 | TThostFtdcExchangeIDType ExchangeID; 1233 | ///会员代码 1234 | TThostFtdcParticipantIDType ParticipantID; 1235 | ///客户代码 1236 | TThostFtdcClientIDType ClientID; 1237 | ///合约在交易所的代码 1238 | TThostFtdcExchangeInstIDType ExchangeInstID; 1239 | ///交易所交易员代码 1240 | TThostFtdcTraderIDType TraderID; 1241 | ///安装编号 1242 | TThostFtdcInstallIDType InstallID; 1243 | ///报单提交状态 1244 | TThostFtdcOrderSubmitStatusType OrderSubmitStatus; 1245 | ///报单提示序号 1246 | TThostFtdcSequenceNoType NotifySequence; 1247 | ///交易日 1248 | TThostFtdcDateType TradingDay; 1249 | ///结算编号 1250 | TThostFtdcSettlementIDType SettlementID; 1251 | ///报单编号 1252 | TThostFtdcOrderSysIDType OrderSysID; 1253 | ///报单来源 1254 | TThostFtdcOrderSourceType OrderSource; 1255 | ///报单状态 1256 | TThostFtdcOrderStatusType OrderStatus; 1257 | ///报单类型 1258 | TThostFtdcOrderTypeType OrderType; 1259 | ///今成交数量 1260 | TThostFtdcVolumeType VolumeTraded; 1261 | ///剩余数量 1262 | TThostFtdcVolumeType VolumeTotal; 1263 | ///报单日期 1264 | TThostFtdcDateType InsertDate; 1265 | ///委托时间 1266 | TThostFtdcTimeType InsertTime; 1267 | ///激活时间 1268 | TThostFtdcTimeType ActiveTime; 1269 | ///挂起时间 1270 | TThostFtdcTimeType SuspendTime; 1271 | ///最后修改时间 1272 | TThostFtdcTimeType UpdateTime; 1273 | ///撤销时间 1274 | TThostFtdcTimeType CancelTime; 1275 | ///最后修改交易所交易员代码 1276 | TThostFtdcTraderIDType ActiveTraderID; 1277 | ///结算会员编号 1278 | TThostFtdcParticipantIDType ClearingPartID; 1279 | ///序号 1280 | TThostFtdcSequenceNoType SequenceNo; 1281 | ///前置编号 1282 | TThostFtdcFrontIDType FrontID; 1283 | ///会话编号 1284 | TThostFtdcSessionIDType SessionID; 1285 | ///用户端产品信息 1286 | TThostFtdcProductInfoType UserProductInfo; 1287 | ///状态信息 1288 | TThostFtdcErrorMsgType StatusMsg; 1289 | ///用户强评标志 1290 | TThostFtdcBoolType UserForceClose; 1291 | ///操作用户代码 1292 | TThostFtdcUserIDType ActiveUserID; 1293 | ///经纪公司报单编号 1294 | TThostFtdcSequenceNoType BrokerOrderSeq; 1295 | ///相关报单 1296 | TThostFtdcOrderSysIDType RelativeOrderSysID; 1297 | ///郑商所成交数量 1298 | TThostFtdcVolumeType ZCETotalTradedVolume; 1299 | ///互换单标志 1300 | TThostFtdcBoolType IsSwapOrder; 1301 | }; 1302 | 1303 | ///交易所报单 1304 | struct CThostFtdcExchangeOrderField 1305 | { 1306 | ///报单价格条件 1307 | TThostFtdcOrderPriceTypeType OrderPriceType; 1308 | ///买卖方向 1309 | TThostFtdcDirectionType Direction; 1310 | ///组合开平标志 1311 | TThostFtdcCombOffsetFlagType CombOffsetFlag; 1312 | ///组合投机套保标志 1313 | TThostFtdcCombHedgeFlagType CombHedgeFlag; 1314 | ///价格 1315 | TThostFtdcPriceType LimitPrice; 1316 | ///数量 1317 | TThostFtdcVolumeType VolumeTotalOriginal; 1318 | ///有效期类型 1319 | TThostFtdcTimeConditionType TimeCondition; 1320 | ///GTD日期 1321 | TThostFtdcDateType GTDDate; 1322 | ///成交量类型 1323 | TThostFtdcVolumeConditionType VolumeCondition; 1324 | ///最小成交量 1325 | TThostFtdcVolumeType MinVolume; 1326 | ///触发条件 1327 | TThostFtdcContingentConditionType ContingentCondition; 1328 | ///止损价 1329 | TThostFtdcPriceType StopPrice; 1330 | ///强平原因 1331 | TThostFtdcForceCloseReasonType ForceCloseReason; 1332 | ///自动挂起标志 1333 | TThostFtdcBoolType IsAutoSuspend; 1334 | ///业务单元 1335 | TThostFtdcBusinessUnitType BusinessUnit; 1336 | ///请求编号 1337 | TThostFtdcRequestIDType RequestID; 1338 | ///本地报单编号 1339 | TThostFtdcOrderLocalIDType OrderLocalID; 1340 | ///交易所代码 1341 | TThostFtdcExchangeIDType ExchangeID; 1342 | ///会员代码 1343 | TThostFtdcParticipantIDType ParticipantID; 1344 | ///客户代码 1345 | TThostFtdcClientIDType ClientID; 1346 | ///合约在交易所的代码 1347 | TThostFtdcExchangeInstIDType ExchangeInstID; 1348 | ///交易所交易员代码 1349 | TThostFtdcTraderIDType TraderID; 1350 | ///安装编号 1351 | TThostFtdcInstallIDType InstallID; 1352 | ///报单提交状态 1353 | TThostFtdcOrderSubmitStatusType OrderSubmitStatus; 1354 | ///报单提示序号 1355 | TThostFtdcSequenceNoType NotifySequence; 1356 | ///交易日 1357 | TThostFtdcDateType TradingDay; 1358 | ///结算编号 1359 | TThostFtdcSettlementIDType SettlementID; 1360 | ///报单编号 1361 | TThostFtdcOrderSysIDType OrderSysID; 1362 | ///报单来源 1363 | TThostFtdcOrderSourceType OrderSource; 1364 | ///报单状态 1365 | TThostFtdcOrderStatusType OrderStatus; 1366 | ///报单类型 1367 | TThostFtdcOrderTypeType OrderType; 1368 | ///今成交数量 1369 | TThostFtdcVolumeType VolumeTraded; 1370 | ///剩余数量 1371 | TThostFtdcVolumeType VolumeTotal; 1372 | ///报单日期 1373 | TThostFtdcDateType InsertDate; 1374 | ///委托时间 1375 | TThostFtdcTimeType InsertTime; 1376 | ///激活时间 1377 | TThostFtdcTimeType ActiveTime; 1378 | ///挂起时间 1379 | TThostFtdcTimeType SuspendTime; 1380 | ///最后修改时间 1381 | TThostFtdcTimeType UpdateTime; 1382 | ///撤销时间 1383 | TThostFtdcTimeType CancelTime; 1384 | ///最后修改交易所交易员代码 1385 | TThostFtdcTraderIDType ActiveTraderID; 1386 | ///结算会员编号 1387 | TThostFtdcParticipantIDType ClearingPartID; 1388 | ///序号 1389 | TThostFtdcSequenceNoType SequenceNo; 1390 | }; 1391 | 1392 | ///交易所报单插入失败 1393 | struct CThostFtdcExchangeOrderInsertErrorField 1394 | { 1395 | ///交易所代码 1396 | TThostFtdcExchangeIDType ExchangeID; 1397 | ///会员代码 1398 | TThostFtdcParticipantIDType ParticipantID; 1399 | ///交易所交易员代码 1400 | TThostFtdcTraderIDType TraderID; 1401 | ///安装编号 1402 | TThostFtdcInstallIDType InstallID; 1403 | ///本地报单编号 1404 | TThostFtdcOrderLocalIDType OrderLocalID; 1405 | ///错误代码 1406 | TThostFtdcErrorIDType ErrorID; 1407 | ///错误信息 1408 | TThostFtdcErrorMsgType ErrorMsg; 1409 | }; 1410 | 1411 | ///输入报单操作 1412 | struct CThostFtdcInputOrderActionField 1413 | { 1414 | ///经纪公司代码 1415 | TThostFtdcBrokerIDType BrokerID; 1416 | ///投资者代码 1417 | TThostFtdcInvestorIDType InvestorID; 1418 | ///报单操作引用 1419 | TThostFtdcOrderActionRefType OrderActionRef; 1420 | ///报单引用 1421 | TThostFtdcOrderRefType OrderRef; 1422 | ///请求编号 1423 | TThostFtdcRequestIDType RequestID; 1424 | ///前置编号 1425 | TThostFtdcFrontIDType FrontID; 1426 | ///会话编号 1427 | TThostFtdcSessionIDType SessionID; 1428 | ///交易所代码 1429 | TThostFtdcExchangeIDType ExchangeID; 1430 | ///报单编号 1431 | TThostFtdcOrderSysIDType OrderSysID; 1432 | ///操作标志 1433 | TThostFtdcActionFlagType ActionFlag; 1434 | ///价格 1435 | TThostFtdcPriceType LimitPrice; 1436 | ///数量变化 1437 | TThostFtdcVolumeType VolumeChange; 1438 | ///用户代码 1439 | TThostFtdcUserIDType UserID; 1440 | ///合约代码 1441 | TThostFtdcInstrumentIDType InstrumentID; 1442 | }; 1443 | 1444 | ///报单操作 1445 | struct CThostFtdcOrderActionField 1446 | { 1447 | ///经纪公司代码 1448 | TThostFtdcBrokerIDType BrokerID; 1449 | ///投资者代码 1450 | TThostFtdcInvestorIDType InvestorID; 1451 | ///报单操作引用 1452 | TThostFtdcOrderActionRefType OrderActionRef; 1453 | ///报单引用 1454 | TThostFtdcOrderRefType OrderRef; 1455 | ///请求编号 1456 | TThostFtdcRequestIDType RequestID; 1457 | ///前置编号 1458 | TThostFtdcFrontIDType FrontID; 1459 | ///会话编号 1460 | TThostFtdcSessionIDType SessionID; 1461 | ///交易所代码 1462 | TThostFtdcExchangeIDType ExchangeID; 1463 | ///报单编号 1464 | TThostFtdcOrderSysIDType OrderSysID; 1465 | ///操作标志 1466 | TThostFtdcActionFlagType ActionFlag; 1467 | ///价格 1468 | TThostFtdcPriceType LimitPrice; 1469 | ///数量变化 1470 | TThostFtdcVolumeType VolumeChange; 1471 | ///操作日期 1472 | TThostFtdcDateType ActionDate; 1473 | ///操作时间 1474 | TThostFtdcTimeType ActionTime; 1475 | ///交易所交易员代码 1476 | TThostFtdcTraderIDType TraderID; 1477 | ///安装编号 1478 | TThostFtdcInstallIDType InstallID; 1479 | ///本地报单编号 1480 | TThostFtdcOrderLocalIDType OrderLocalID; 1481 | ///操作本地编号 1482 | TThostFtdcOrderLocalIDType ActionLocalID; 1483 | ///会员代码 1484 | TThostFtdcParticipantIDType ParticipantID; 1485 | ///客户代码 1486 | TThostFtdcClientIDType ClientID; 1487 | ///业务单元 1488 | TThostFtdcBusinessUnitType BusinessUnit; 1489 | ///报单操作状态 1490 | TThostFtdcOrderActionStatusType OrderActionStatus; 1491 | ///用户代码 1492 | TThostFtdcUserIDType UserID; 1493 | ///状态信息 1494 | TThostFtdcErrorMsgType StatusMsg; 1495 | ///合约代码 1496 | TThostFtdcInstrumentIDType InstrumentID; 1497 | }; 1498 | 1499 | ///交易所报单操作 1500 | struct CThostFtdcExchangeOrderActionField 1501 | { 1502 | ///交易所代码 1503 | TThostFtdcExchangeIDType ExchangeID; 1504 | ///报单编号 1505 | TThostFtdcOrderSysIDType OrderSysID; 1506 | ///操作标志 1507 | TThostFtdcActionFlagType ActionFlag; 1508 | ///价格 1509 | TThostFtdcPriceType LimitPrice; 1510 | ///数量变化 1511 | TThostFtdcVolumeType VolumeChange; 1512 | ///操作日期 1513 | TThostFtdcDateType ActionDate; 1514 | ///操作时间 1515 | TThostFtdcTimeType ActionTime; 1516 | ///交易所交易员代码 1517 | TThostFtdcTraderIDType TraderID; 1518 | ///安装编号 1519 | TThostFtdcInstallIDType InstallID; 1520 | ///本地报单编号 1521 | TThostFtdcOrderLocalIDType OrderLocalID; 1522 | ///操作本地编号 1523 | TThostFtdcOrderLocalIDType ActionLocalID; 1524 | ///会员代码 1525 | TThostFtdcParticipantIDType ParticipantID; 1526 | ///客户代码 1527 | TThostFtdcClientIDType ClientID; 1528 | ///业务单元 1529 | TThostFtdcBusinessUnitType BusinessUnit; 1530 | ///报单操作状态 1531 | TThostFtdcOrderActionStatusType OrderActionStatus; 1532 | ///用户代码 1533 | TThostFtdcUserIDType UserID; 1534 | }; 1535 | 1536 | ///交易所报单操作失败 1537 | struct CThostFtdcExchangeOrderActionErrorField 1538 | { 1539 | ///交易所代码 1540 | TThostFtdcExchangeIDType ExchangeID; 1541 | ///报单编号 1542 | TThostFtdcOrderSysIDType OrderSysID; 1543 | ///交易所交易员代码 1544 | TThostFtdcTraderIDType TraderID; 1545 | ///安装编号 1546 | TThostFtdcInstallIDType InstallID; 1547 | ///本地报单编号 1548 | TThostFtdcOrderLocalIDType OrderLocalID; 1549 | ///操作本地编号 1550 | TThostFtdcOrderLocalIDType ActionLocalID; 1551 | ///错误代码 1552 | TThostFtdcErrorIDType ErrorID; 1553 | ///错误信息 1554 | TThostFtdcErrorMsgType ErrorMsg; 1555 | }; 1556 | 1557 | ///交易所成交 1558 | struct CThostFtdcExchangeTradeField 1559 | { 1560 | ///交易所代码 1561 | TThostFtdcExchangeIDType ExchangeID; 1562 | ///成交编号 1563 | TThostFtdcTradeIDType TradeID; 1564 | ///买卖方向 1565 | TThostFtdcDirectionType Direction; 1566 | ///报单编号 1567 | TThostFtdcOrderSysIDType OrderSysID; 1568 | ///会员代码 1569 | TThostFtdcParticipantIDType ParticipantID; 1570 | ///客户代码 1571 | TThostFtdcClientIDType ClientID; 1572 | ///交易角色 1573 | TThostFtdcTradingRoleType TradingRole; 1574 | ///合约在交易所的代码 1575 | TThostFtdcExchangeInstIDType ExchangeInstID; 1576 | ///开平标志 1577 | TThostFtdcOffsetFlagType OffsetFlag; 1578 | ///投机套保标志 1579 | TThostFtdcHedgeFlagType HedgeFlag; 1580 | ///价格 1581 | TThostFtdcPriceType Price; 1582 | ///数量 1583 | TThostFtdcVolumeType Volume; 1584 | ///成交时期 1585 | TThostFtdcDateType TradeDate; 1586 | ///成交时间 1587 | TThostFtdcTimeType TradeTime; 1588 | ///成交类型 1589 | TThostFtdcTradeTypeType TradeType; 1590 | ///成交价来源 1591 | TThostFtdcPriceSourceType PriceSource; 1592 | ///交易所交易员代码 1593 | TThostFtdcTraderIDType TraderID; 1594 | ///本地报单编号 1595 | TThostFtdcOrderLocalIDType OrderLocalID; 1596 | ///结算会员编号 1597 | TThostFtdcParticipantIDType ClearingPartID; 1598 | ///业务单元 1599 | TThostFtdcBusinessUnitType BusinessUnit; 1600 | ///序号 1601 | TThostFtdcSequenceNoType SequenceNo; 1602 | ///成交来源 1603 | TThostFtdcTradeSourceType TradeSource; 1604 | }; 1605 | 1606 | ///成交 1607 | struct CThostFtdcTradeField 1608 | { 1609 | ///经纪公司代码 1610 | TThostFtdcBrokerIDType BrokerID; 1611 | ///投资者代码 1612 | TThostFtdcInvestorIDType InvestorID; 1613 | ///合约代码 1614 | TThostFtdcInstrumentIDType InstrumentID; 1615 | ///报单引用 1616 | TThostFtdcOrderRefType OrderRef; 1617 | ///用户代码 1618 | TThostFtdcUserIDType UserID; 1619 | ///交易所代码 1620 | TThostFtdcExchangeIDType ExchangeID; 1621 | ///成交编号 1622 | TThostFtdcTradeIDType TradeID; 1623 | ///买卖方向 1624 | TThostFtdcDirectionType Direction; 1625 | ///报单编号 1626 | TThostFtdcOrderSysIDType OrderSysID; 1627 | ///会员代码 1628 | TThostFtdcParticipantIDType ParticipantID; 1629 | ///客户代码 1630 | TThostFtdcClientIDType ClientID; 1631 | ///交易角色 1632 | TThostFtdcTradingRoleType TradingRole; 1633 | ///合约在交易所的代码 1634 | TThostFtdcExchangeInstIDType ExchangeInstID; 1635 | ///开平标志 1636 | TThostFtdcOffsetFlagType OffsetFlag; 1637 | ///投机套保标志 1638 | TThostFtdcHedgeFlagType HedgeFlag; 1639 | ///价格 1640 | TThostFtdcPriceType Price; 1641 | ///数量 1642 | TThostFtdcVolumeType Volume; 1643 | ///成交时期 1644 | TThostFtdcDateType TradeDate; 1645 | ///成交时间 1646 | TThostFtdcTimeType TradeTime; 1647 | ///成交类型 1648 | TThostFtdcTradeTypeType TradeType; 1649 | ///成交价来源 1650 | TThostFtdcPriceSourceType PriceSource; 1651 | ///交易所交易员代码 1652 | TThostFtdcTraderIDType TraderID; 1653 | ///本地报单编号 1654 | TThostFtdcOrderLocalIDType OrderLocalID; 1655 | ///结算会员编号 1656 | TThostFtdcParticipantIDType ClearingPartID; 1657 | ///业务单元 1658 | TThostFtdcBusinessUnitType BusinessUnit; 1659 | ///序号 1660 | TThostFtdcSequenceNoType SequenceNo; 1661 | ///交易日 1662 | TThostFtdcDateType TradingDay; 1663 | ///结算编号 1664 | TThostFtdcSettlementIDType SettlementID; 1665 | ///经纪公司报单编号 1666 | TThostFtdcSequenceNoType BrokerOrderSeq; 1667 | ///成交来源 1668 | TThostFtdcTradeSourceType TradeSource; 1669 | }; 1670 | 1671 | ///用户会话 1672 | struct CThostFtdcUserSessionField 1673 | { 1674 | ///前置编号 1675 | TThostFtdcFrontIDType FrontID; 1676 | ///会话编号 1677 | TThostFtdcSessionIDType SessionID; 1678 | ///经纪公司代码 1679 | TThostFtdcBrokerIDType BrokerID; 1680 | ///用户代码 1681 | TThostFtdcUserIDType UserID; 1682 | ///登录日期 1683 | TThostFtdcDateType LoginDate; 1684 | ///登录时间 1685 | TThostFtdcTimeType LoginTime; 1686 | ///IP地址 1687 | TThostFtdcIPAddressType IPAddress; 1688 | ///用户端产品信息 1689 | TThostFtdcProductInfoType UserProductInfo; 1690 | ///接口端产品信息 1691 | TThostFtdcProductInfoType InterfaceProductInfo; 1692 | ///协议信息 1693 | TThostFtdcProtocolInfoType ProtocolInfo; 1694 | ///Mac地址 1695 | TThostFtdcMacAddressType MacAddress; 1696 | }; 1697 | 1698 | ///查询最大报单数量 1699 | struct CThostFtdcQueryMaxOrderVolumeField 1700 | { 1701 | ///经纪公司代码 1702 | TThostFtdcBrokerIDType BrokerID; 1703 | ///投资者代码 1704 | TThostFtdcInvestorIDType InvestorID; 1705 | ///合约代码 1706 | TThostFtdcInstrumentIDType InstrumentID; 1707 | ///买卖方向 1708 | TThostFtdcDirectionType Direction; 1709 | ///开平标志 1710 | TThostFtdcOffsetFlagType OffsetFlag; 1711 | ///投机套保标志 1712 | TThostFtdcHedgeFlagType HedgeFlag; 1713 | ///最大允许报单数量 1714 | TThostFtdcVolumeType MaxVolume; 1715 | }; 1716 | 1717 | ///投资者结算结果确认信息 1718 | struct CThostFtdcSettlementInfoConfirmField 1719 | { 1720 | ///经纪公司代码 1721 | TThostFtdcBrokerIDType BrokerID; 1722 | ///投资者代码 1723 | TThostFtdcInvestorIDType InvestorID; 1724 | ///确认日期 1725 | TThostFtdcDateType ConfirmDate; 1726 | ///确认时间 1727 | TThostFtdcTimeType ConfirmTime; 1728 | }; 1729 | 1730 | ///出入金同步 1731 | struct CThostFtdcSyncDepositField 1732 | { 1733 | ///出入金流水号 1734 | TThostFtdcDepositSeqNoType DepositSeqNo; 1735 | ///经纪公司代码 1736 | TThostFtdcBrokerIDType BrokerID; 1737 | ///投资者代码 1738 | TThostFtdcInvestorIDType InvestorID; 1739 | ///入金金额 1740 | TThostFtdcMoneyType Deposit; 1741 | ///是否强制进行 1742 | TThostFtdcBoolType IsForce; 1743 | }; 1744 | 1745 | ///经纪公司同步 1746 | struct CThostFtdcBrokerSyncField 1747 | { 1748 | ///经纪公司代码 1749 | TThostFtdcBrokerIDType BrokerID; 1750 | }; 1751 | 1752 | ///正在同步中的投资者 1753 | struct CThostFtdcSyncingInvestorField 1754 | { 1755 | ///投资者代码 1756 | TThostFtdcInvestorIDType InvestorID; 1757 | ///经纪公司代码 1758 | TThostFtdcBrokerIDType BrokerID; 1759 | ///投资者分组代码 1760 | TThostFtdcInvestorIDType InvestorGroupID; 1761 | ///投资者名称 1762 | TThostFtdcPartyNameType InvestorName; 1763 | ///证件类型 1764 | TThostFtdcIdCardTypeType IdentifiedCardType; 1765 | ///证件号码 1766 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 1767 | ///是否活跃 1768 | TThostFtdcBoolType IsActive; 1769 | ///联系电话 1770 | TThostFtdcTelephoneType Telephone; 1771 | ///通讯地址 1772 | TThostFtdcAddressType Address; 1773 | ///开户日期 1774 | TThostFtdcDateType OpenDate; 1775 | ///手机 1776 | TThostFtdcMobileType Mobile; 1777 | ///手续费率模板代码 1778 | TThostFtdcInvestorIDType CommModelID; 1779 | ///保证金率模板代码 1780 | TThostFtdcInvestorIDType MarginModelID; 1781 | }; 1782 | 1783 | ///正在同步中的交易代码 1784 | struct CThostFtdcSyncingTradingCodeField 1785 | { 1786 | ///投资者代码 1787 | TThostFtdcInvestorIDType InvestorID; 1788 | ///经纪公司代码 1789 | TThostFtdcBrokerIDType BrokerID; 1790 | ///交易所代码 1791 | TThostFtdcExchangeIDType ExchangeID; 1792 | ///客户代码 1793 | TThostFtdcClientIDType ClientID; 1794 | ///是否活跃 1795 | TThostFtdcBoolType IsActive; 1796 | ///交易编码类型 1797 | TThostFtdcClientIDTypeType ClientIDType; 1798 | }; 1799 | 1800 | ///正在同步中的投资者分组 1801 | struct CThostFtdcSyncingInvestorGroupField 1802 | { 1803 | ///经纪公司代码 1804 | TThostFtdcBrokerIDType BrokerID; 1805 | ///投资者分组代码 1806 | TThostFtdcInvestorIDType InvestorGroupID; 1807 | ///投资者分组名称 1808 | TThostFtdcInvestorGroupNameType InvestorGroupName; 1809 | }; 1810 | 1811 | ///正在同步中的交易账号 1812 | struct CThostFtdcSyncingTradingAccountField 1813 | { 1814 | ///经纪公司代码 1815 | TThostFtdcBrokerIDType BrokerID; 1816 | ///投资者帐号 1817 | TThostFtdcAccountIDType AccountID; 1818 | ///上次质押金额 1819 | TThostFtdcMoneyType PreMortgage; 1820 | ///上次信用额度 1821 | TThostFtdcMoneyType PreCredit; 1822 | ///上次存款额 1823 | TThostFtdcMoneyType PreDeposit; 1824 | ///上次结算准备金 1825 | TThostFtdcMoneyType PreBalance; 1826 | ///上次占用的保证金 1827 | TThostFtdcMoneyType PreMargin; 1828 | ///利息基数 1829 | TThostFtdcMoneyType InterestBase; 1830 | ///利息收入 1831 | TThostFtdcMoneyType Interest; 1832 | ///入金金额 1833 | TThostFtdcMoneyType Deposit; 1834 | ///出金金额 1835 | TThostFtdcMoneyType Withdraw; 1836 | ///冻结的保证金 1837 | TThostFtdcMoneyType FrozenMargin; 1838 | ///冻结的资金 1839 | TThostFtdcMoneyType FrozenCash; 1840 | ///冻结的手续费 1841 | TThostFtdcMoneyType FrozenCommission; 1842 | ///当前保证金总额 1843 | TThostFtdcMoneyType CurrMargin; 1844 | ///资金差额 1845 | TThostFtdcMoneyType CashIn; 1846 | ///手续费 1847 | TThostFtdcMoneyType Commission; 1848 | ///平仓盈亏 1849 | TThostFtdcMoneyType CloseProfit; 1850 | ///持仓盈亏 1851 | TThostFtdcMoneyType PositionProfit; 1852 | ///期货结算准备金 1853 | TThostFtdcMoneyType Balance; 1854 | ///可用资金 1855 | TThostFtdcMoneyType Available; 1856 | ///可取资金 1857 | TThostFtdcMoneyType WithdrawQuota; 1858 | ///基本准备金 1859 | TThostFtdcMoneyType Reserve; 1860 | ///交易日 1861 | TThostFtdcDateType TradingDay; 1862 | ///结算编号 1863 | TThostFtdcSettlementIDType SettlementID; 1864 | ///信用额度 1865 | TThostFtdcMoneyType Credit; 1866 | ///质押金额 1867 | TThostFtdcMoneyType Mortgage; 1868 | ///交易所保证金 1869 | TThostFtdcMoneyType ExchangeMargin; 1870 | ///投资者交割保证金 1871 | TThostFtdcMoneyType DeliveryMargin; 1872 | ///交易所交割保证金 1873 | TThostFtdcMoneyType ExchangeDeliveryMargin; 1874 | }; 1875 | 1876 | ///正在同步中的投资者持仓 1877 | struct CThostFtdcSyncingInvestorPositionField 1878 | { 1879 | ///合约代码 1880 | TThostFtdcInstrumentIDType InstrumentID; 1881 | ///经纪公司代码 1882 | TThostFtdcBrokerIDType BrokerID; 1883 | ///投资者代码 1884 | TThostFtdcInvestorIDType InvestorID; 1885 | ///持仓多空方向 1886 | TThostFtdcPosiDirectionType PosiDirection; 1887 | ///投机套保标志 1888 | TThostFtdcHedgeFlagType HedgeFlag; 1889 | ///持仓日期 1890 | TThostFtdcPositionDateType PositionDate; 1891 | ///上日持仓 1892 | TThostFtdcVolumeType YdPosition; 1893 | ///今日持仓 1894 | TThostFtdcVolumeType Position; 1895 | ///多头冻结 1896 | TThostFtdcVolumeType LongFrozen; 1897 | ///空头冻结 1898 | TThostFtdcVolumeType ShortFrozen; 1899 | ///开仓冻结金额 1900 | TThostFtdcMoneyType LongFrozenAmount; 1901 | ///开仓冻结金额 1902 | TThostFtdcMoneyType ShortFrozenAmount; 1903 | ///开仓量 1904 | TThostFtdcVolumeType OpenVolume; 1905 | ///平仓量 1906 | TThostFtdcVolumeType CloseVolume; 1907 | ///开仓金额 1908 | TThostFtdcMoneyType OpenAmount; 1909 | ///平仓金额 1910 | TThostFtdcMoneyType CloseAmount; 1911 | ///持仓成本 1912 | TThostFtdcMoneyType PositionCost; 1913 | ///上次占用的保证金 1914 | TThostFtdcMoneyType PreMargin; 1915 | ///占用的保证金 1916 | TThostFtdcMoneyType UseMargin; 1917 | ///冻结的保证金 1918 | TThostFtdcMoneyType FrozenMargin; 1919 | ///冻结的资金 1920 | TThostFtdcMoneyType FrozenCash; 1921 | ///冻结的手续费 1922 | TThostFtdcMoneyType FrozenCommission; 1923 | ///资金差额 1924 | TThostFtdcMoneyType CashIn; 1925 | ///手续费 1926 | TThostFtdcMoneyType Commission; 1927 | ///平仓盈亏 1928 | TThostFtdcMoneyType CloseProfit; 1929 | ///持仓盈亏 1930 | TThostFtdcMoneyType PositionProfit; 1931 | ///上次结算价 1932 | TThostFtdcPriceType PreSettlementPrice; 1933 | ///本次结算价 1934 | TThostFtdcPriceType SettlementPrice; 1935 | ///交易日 1936 | TThostFtdcDateType TradingDay; 1937 | ///结算编号 1938 | TThostFtdcSettlementIDType SettlementID; 1939 | ///开仓成本 1940 | TThostFtdcMoneyType OpenCost; 1941 | ///交易所保证金 1942 | TThostFtdcMoneyType ExchangeMargin; 1943 | ///组合成交形成的持仓 1944 | TThostFtdcVolumeType CombPosition; 1945 | ///组合多头冻结 1946 | TThostFtdcVolumeType CombLongFrozen; 1947 | ///组合空头冻结 1948 | TThostFtdcVolumeType CombShortFrozen; 1949 | ///逐日盯市平仓盈亏 1950 | TThostFtdcMoneyType CloseProfitByDate; 1951 | ///逐笔对冲平仓盈亏 1952 | TThostFtdcMoneyType CloseProfitByTrade; 1953 | ///今日持仓 1954 | TThostFtdcVolumeType TodayPosition; 1955 | ///保证金率 1956 | TThostFtdcRatioType MarginRateByMoney; 1957 | ///保证金率(按手数) 1958 | TThostFtdcRatioType MarginRateByVolume; 1959 | }; 1960 | 1961 | ///正在同步中的合约保证金率 1962 | struct CThostFtdcSyncingInstrumentMarginRateField 1963 | { 1964 | ///合约代码 1965 | TThostFtdcInstrumentIDType InstrumentID; 1966 | ///投资者范围 1967 | TThostFtdcInvestorRangeType InvestorRange; 1968 | ///经纪公司代码 1969 | TThostFtdcBrokerIDType BrokerID; 1970 | ///投资者代码 1971 | TThostFtdcInvestorIDType InvestorID; 1972 | ///投机套保标志 1973 | TThostFtdcHedgeFlagType HedgeFlag; 1974 | ///多头保证金率 1975 | TThostFtdcRatioType LongMarginRatioByMoney; 1976 | ///多头保证金费 1977 | TThostFtdcMoneyType LongMarginRatioByVolume; 1978 | ///空头保证金率 1979 | TThostFtdcRatioType ShortMarginRatioByMoney; 1980 | ///空头保证金费 1981 | TThostFtdcMoneyType ShortMarginRatioByVolume; 1982 | ///是否相对交易所收取 1983 | TThostFtdcBoolType IsRelative; 1984 | }; 1985 | 1986 | ///正在同步中的合约手续费率 1987 | struct CThostFtdcSyncingInstrumentCommissionRateField 1988 | { 1989 | ///合约代码 1990 | TThostFtdcInstrumentIDType InstrumentID; 1991 | ///投资者范围 1992 | TThostFtdcInvestorRangeType InvestorRange; 1993 | ///经纪公司代码 1994 | TThostFtdcBrokerIDType BrokerID; 1995 | ///投资者代码 1996 | TThostFtdcInvestorIDType InvestorID; 1997 | ///开仓手续费率 1998 | TThostFtdcRatioType OpenRatioByMoney; 1999 | ///开仓手续费 2000 | TThostFtdcRatioType OpenRatioByVolume; 2001 | ///平仓手续费率 2002 | TThostFtdcRatioType CloseRatioByMoney; 2003 | ///平仓手续费 2004 | TThostFtdcRatioType CloseRatioByVolume; 2005 | ///平今手续费率 2006 | TThostFtdcRatioType CloseTodayRatioByMoney; 2007 | ///平今手续费 2008 | TThostFtdcRatioType CloseTodayRatioByVolume; 2009 | }; 2010 | 2011 | ///正在同步中的合约交易权限 2012 | struct CThostFtdcSyncingInstrumentTradingRightField 2013 | { 2014 | ///合约代码 2015 | TThostFtdcInstrumentIDType InstrumentID; 2016 | ///投资者范围 2017 | TThostFtdcInvestorRangeType InvestorRange; 2018 | ///经纪公司代码 2019 | TThostFtdcBrokerIDType BrokerID; 2020 | ///投资者代码 2021 | TThostFtdcInvestorIDType InvestorID; 2022 | ///交易权限 2023 | TThostFtdcTradingRightType TradingRight; 2024 | }; 2025 | 2026 | ///查询报单 2027 | struct CThostFtdcQryOrderField 2028 | { 2029 | ///经纪公司代码 2030 | TThostFtdcBrokerIDType BrokerID; 2031 | ///投资者代码 2032 | TThostFtdcInvestorIDType InvestorID; 2033 | ///合约代码 2034 | TThostFtdcInstrumentIDType InstrumentID; 2035 | ///交易所代码 2036 | TThostFtdcExchangeIDType ExchangeID; 2037 | ///报单编号 2038 | TThostFtdcOrderSysIDType OrderSysID; 2039 | ///开始时间 2040 | TThostFtdcTimeType InsertTimeStart; 2041 | ///结束时间 2042 | TThostFtdcTimeType InsertTimeEnd; 2043 | }; 2044 | 2045 | ///查询成交 2046 | struct CThostFtdcQryTradeField 2047 | { 2048 | ///经纪公司代码 2049 | TThostFtdcBrokerIDType BrokerID; 2050 | ///投资者代码 2051 | TThostFtdcInvestorIDType InvestorID; 2052 | ///合约代码 2053 | TThostFtdcInstrumentIDType InstrumentID; 2054 | ///交易所代码 2055 | TThostFtdcExchangeIDType ExchangeID; 2056 | ///成交编号 2057 | TThostFtdcTradeIDType TradeID; 2058 | ///开始时间 2059 | TThostFtdcTimeType TradeTimeStart; 2060 | ///结束时间 2061 | TThostFtdcTimeType TradeTimeEnd; 2062 | }; 2063 | 2064 | ///查询投资者持仓 2065 | struct CThostFtdcQryInvestorPositionField 2066 | { 2067 | ///经纪公司代码 2068 | TThostFtdcBrokerIDType BrokerID; 2069 | ///投资者代码 2070 | TThostFtdcInvestorIDType InvestorID; 2071 | ///合约代码 2072 | TThostFtdcInstrumentIDType InstrumentID; 2073 | }; 2074 | 2075 | ///查询资金账户 2076 | struct CThostFtdcQryTradingAccountField 2077 | { 2078 | ///经纪公司代码 2079 | TThostFtdcBrokerIDType BrokerID; 2080 | ///投资者代码 2081 | TThostFtdcInvestorIDType InvestorID; 2082 | }; 2083 | 2084 | ///查询投资者 2085 | struct CThostFtdcQryInvestorField 2086 | { 2087 | ///经纪公司代码 2088 | TThostFtdcBrokerIDType BrokerID; 2089 | ///投资者代码 2090 | TThostFtdcInvestorIDType InvestorID; 2091 | }; 2092 | 2093 | ///查询交易编码 2094 | struct CThostFtdcQryTradingCodeField 2095 | { 2096 | ///经纪公司代码 2097 | TThostFtdcBrokerIDType BrokerID; 2098 | ///投资者代码 2099 | TThostFtdcInvestorIDType InvestorID; 2100 | ///交易所代码 2101 | TThostFtdcExchangeIDType ExchangeID; 2102 | ///客户代码 2103 | TThostFtdcClientIDType ClientID; 2104 | ///交易编码类型 2105 | TThostFtdcClientIDTypeType ClientIDType; 2106 | }; 2107 | 2108 | ///查询交易编码 2109 | struct CThostFtdcQryInvestorGroupField 2110 | { 2111 | ///经纪公司代码 2112 | TThostFtdcBrokerIDType BrokerID; 2113 | }; 2114 | 2115 | ///查询交易编码 2116 | struct CThostFtdcQryInstrumentMarginRateField 2117 | { 2118 | ///经纪公司代码 2119 | TThostFtdcBrokerIDType BrokerID; 2120 | ///投资者代码 2121 | TThostFtdcInvestorIDType InvestorID; 2122 | ///合约代码 2123 | TThostFtdcInstrumentIDType InstrumentID; 2124 | ///投机套保标志 2125 | TThostFtdcHedgeFlagType HedgeFlag; 2126 | }; 2127 | 2128 | ///查询交易编码 2129 | struct CThostFtdcQryInstrumentCommissionRateField 2130 | { 2131 | ///经纪公司代码 2132 | TThostFtdcBrokerIDType BrokerID; 2133 | ///投资者代码 2134 | TThostFtdcInvestorIDType InvestorID; 2135 | ///合约代码 2136 | TThostFtdcInstrumentIDType InstrumentID; 2137 | }; 2138 | 2139 | ///查询交易编码 2140 | struct CThostFtdcQryInstrumentTradingRightField 2141 | { 2142 | ///经纪公司代码 2143 | TThostFtdcBrokerIDType BrokerID; 2144 | ///投资者代码 2145 | TThostFtdcInvestorIDType InvestorID; 2146 | ///合约代码 2147 | TThostFtdcInstrumentIDType InstrumentID; 2148 | }; 2149 | 2150 | ///查询经纪公司 2151 | struct CThostFtdcQryBrokerField 2152 | { 2153 | ///经纪公司代码 2154 | TThostFtdcBrokerIDType BrokerID; 2155 | }; 2156 | 2157 | ///查询交易员 2158 | struct CThostFtdcQryTraderField 2159 | { 2160 | ///交易所代码 2161 | TThostFtdcExchangeIDType ExchangeID; 2162 | ///会员代码 2163 | TThostFtdcParticipantIDType ParticipantID; 2164 | ///交易所交易员代码 2165 | TThostFtdcTraderIDType TraderID; 2166 | }; 2167 | 2168 | ///查询经纪公司会员代码 2169 | struct CThostFtdcQryPartBrokerField 2170 | { 2171 | ///交易所代码 2172 | TThostFtdcExchangeIDType ExchangeID; 2173 | ///经纪公司代码 2174 | TThostFtdcBrokerIDType BrokerID; 2175 | ///会员代码 2176 | TThostFtdcParticipantIDType ParticipantID; 2177 | }; 2178 | 2179 | ///查询管理用户功能权限 2180 | struct CThostFtdcQrySuperUserFunctionField 2181 | { 2182 | ///用户代码 2183 | TThostFtdcUserIDType UserID; 2184 | }; 2185 | 2186 | ///查询用户会话 2187 | struct CThostFtdcQryUserSessionField 2188 | { 2189 | ///前置编号 2190 | TThostFtdcFrontIDType FrontID; 2191 | ///会话编号 2192 | TThostFtdcSessionIDType SessionID; 2193 | ///经纪公司代码 2194 | TThostFtdcBrokerIDType BrokerID; 2195 | ///用户代码 2196 | TThostFtdcUserIDType UserID; 2197 | }; 2198 | 2199 | ///查询前置状态 2200 | struct CThostFtdcQryFrontStatusField 2201 | { 2202 | ///前置编号 2203 | TThostFtdcFrontIDType FrontID; 2204 | }; 2205 | 2206 | ///查询交易所报单 2207 | struct CThostFtdcQryExchangeOrderField 2208 | { 2209 | ///会员代码 2210 | TThostFtdcParticipantIDType ParticipantID; 2211 | ///客户代码 2212 | TThostFtdcClientIDType ClientID; 2213 | ///合约在交易所的代码 2214 | TThostFtdcExchangeInstIDType ExchangeInstID; 2215 | ///交易所代码 2216 | TThostFtdcExchangeIDType ExchangeID; 2217 | ///交易所交易员代码 2218 | TThostFtdcTraderIDType TraderID; 2219 | }; 2220 | 2221 | ///查询报单操作 2222 | struct CThostFtdcQryOrderActionField 2223 | { 2224 | ///经纪公司代码 2225 | TThostFtdcBrokerIDType BrokerID; 2226 | ///投资者代码 2227 | TThostFtdcInvestorIDType InvestorID; 2228 | ///交易所代码 2229 | TThostFtdcExchangeIDType ExchangeID; 2230 | }; 2231 | 2232 | ///查询交易所报单操作 2233 | struct CThostFtdcQryExchangeOrderActionField 2234 | { 2235 | ///会员代码 2236 | TThostFtdcParticipantIDType ParticipantID; 2237 | ///客户代码 2238 | TThostFtdcClientIDType ClientID; 2239 | ///交易所代码 2240 | TThostFtdcExchangeIDType ExchangeID; 2241 | ///交易所交易员代码 2242 | TThostFtdcTraderIDType TraderID; 2243 | }; 2244 | 2245 | ///查询管理用户 2246 | struct CThostFtdcQrySuperUserField 2247 | { 2248 | ///用户代码 2249 | TThostFtdcUserIDType UserID; 2250 | }; 2251 | 2252 | ///查询交易所 2253 | struct CThostFtdcQryExchangeField 2254 | { 2255 | ///交易所代码 2256 | TThostFtdcExchangeIDType ExchangeID; 2257 | }; 2258 | 2259 | ///查询产品 2260 | struct CThostFtdcQryProductField 2261 | { 2262 | ///产品代码 2263 | TThostFtdcInstrumentIDType ProductID; 2264 | }; 2265 | 2266 | ///查询合约 2267 | struct CThostFtdcQryInstrumentField 2268 | { 2269 | ///合约代码 2270 | TThostFtdcInstrumentIDType InstrumentID; 2271 | ///交易所代码 2272 | TThostFtdcExchangeIDType ExchangeID; 2273 | ///合约在交易所的代码 2274 | TThostFtdcExchangeInstIDType ExchangeInstID; 2275 | ///产品代码 2276 | TThostFtdcInstrumentIDType ProductID; 2277 | }; 2278 | 2279 | ///查询行情 2280 | struct CThostFtdcQryDepthMarketDataField 2281 | { 2282 | ///合约代码 2283 | TThostFtdcInstrumentIDType InstrumentID; 2284 | }; 2285 | 2286 | ///查询经纪公司用户 2287 | struct CThostFtdcQryBrokerUserField 2288 | { 2289 | ///经纪公司代码 2290 | TThostFtdcBrokerIDType BrokerID; 2291 | ///用户代码 2292 | TThostFtdcUserIDType UserID; 2293 | }; 2294 | 2295 | ///查询经纪公司用户权限 2296 | struct CThostFtdcQryBrokerUserFunctionField 2297 | { 2298 | ///经纪公司代码 2299 | TThostFtdcBrokerIDType BrokerID; 2300 | ///用户代码 2301 | TThostFtdcUserIDType UserID; 2302 | }; 2303 | 2304 | ///查询交易员报盘机 2305 | struct CThostFtdcQryTraderOfferField 2306 | { 2307 | ///交易所代码 2308 | TThostFtdcExchangeIDType ExchangeID; 2309 | ///会员代码 2310 | TThostFtdcParticipantIDType ParticipantID; 2311 | ///交易所交易员代码 2312 | TThostFtdcTraderIDType TraderID; 2313 | }; 2314 | 2315 | ///查询出入金流水 2316 | struct CThostFtdcQrySyncDepositField 2317 | { 2318 | ///经纪公司代码 2319 | TThostFtdcBrokerIDType BrokerID; 2320 | ///出入金流水号 2321 | TThostFtdcDepositSeqNoType DepositSeqNo; 2322 | }; 2323 | 2324 | ///查询投资者结算结果 2325 | struct CThostFtdcQrySettlementInfoField 2326 | { 2327 | ///经纪公司代码 2328 | TThostFtdcBrokerIDType BrokerID; 2329 | ///投资者代码 2330 | TThostFtdcInvestorIDType InvestorID; 2331 | ///交易日 2332 | TThostFtdcDateType TradingDay; 2333 | }; 2334 | 2335 | ///查询报单 2336 | struct CThostFtdcQryHisOrderField 2337 | { 2338 | ///经纪公司代码 2339 | TThostFtdcBrokerIDType BrokerID; 2340 | ///投资者代码 2341 | TThostFtdcInvestorIDType InvestorID; 2342 | ///合约代码 2343 | TThostFtdcInstrumentIDType InstrumentID; 2344 | ///交易所代码 2345 | TThostFtdcExchangeIDType ExchangeID; 2346 | ///报单编号 2347 | TThostFtdcOrderSysIDType OrderSysID; 2348 | ///开始时间 2349 | TThostFtdcTimeType InsertTimeStart; 2350 | ///结束时间 2351 | TThostFtdcTimeType InsertTimeEnd; 2352 | ///交易日 2353 | TThostFtdcDateType TradingDay; 2354 | ///结算编号 2355 | TThostFtdcSettlementIDType SettlementID; 2356 | }; 2357 | 2358 | ///市场行情 2359 | struct CThostFtdcMarketDataField 2360 | { 2361 | ///交易日 2362 | TThostFtdcDateType TradingDay; 2363 | ///合约代码 2364 | TThostFtdcInstrumentIDType InstrumentID; 2365 | ///交易所代码 2366 | TThostFtdcExchangeIDType ExchangeID; 2367 | ///合约在交易所的代码 2368 | TThostFtdcExchangeInstIDType ExchangeInstID; 2369 | ///最新价 2370 | TThostFtdcPriceType LastPrice; 2371 | ///上次结算价 2372 | TThostFtdcPriceType PreSettlementPrice; 2373 | ///昨收盘 2374 | TThostFtdcPriceType PreClosePrice; 2375 | ///昨持仓量 2376 | TThostFtdcLargeVolumeType PreOpenInterest; 2377 | ///今开盘 2378 | TThostFtdcPriceType OpenPrice; 2379 | ///最高价 2380 | TThostFtdcPriceType HighestPrice; 2381 | ///最低价 2382 | TThostFtdcPriceType LowestPrice; 2383 | ///数量 2384 | TThostFtdcVolumeType Volume; 2385 | ///成交金额 2386 | TThostFtdcMoneyType Turnover; 2387 | ///持仓量 2388 | TThostFtdcLargeVolumeType OpenInterest; 2389 | ///今收盘 2390 | TThostFtdcPriceType ClosePrice; 2391 | ///本次结算价 2392 | TThostFtdcPriceType SettlementPrice; 2393 | ///涨停板价 2394 | TThostFtdcPriceType UpperLimitPrice; 2395 | ///跌停板价 2396 | TThostFtdcPriceType LowerLimitPrice; 2397 | ///昨虚实度 2398 | TThostFtdcRatioType PreDelta; 2399 | ///今虚实度 2400 | TThostFtdcRatioType CurrDelta; 2401 | ///最后修改时间 2402 | TThostFtdcTimeType UpdateTime; 2403 | ///最后修改毫秒 2404 | TThostFtdcMillisecType UpdateMillisec; 2405 | }; 2406 | 2407 | ///行情基础属性 2408 | struct CThostFtdcMarketDataBaseField 2409 | { 2410 | ///交易日 2411 | TThostFtdcDateType TradingDay; 2412 | ///上次结算价 2413 | TThostFtdcPriceType PreSettlementPrice; 2414 | ///昨收盘 2415 | TThostFtdcPriceType PreClosePrice; 2416 | ///昨持仓量 2417 | TThostFtdcLargeVolumeType PreOpenInterest; 2418 | ///昨虚实度 2419 | TThostFtdcRatioType PreDelta; 2420 | }; 2421 | 2422 | ///行情静态属性 2423 | struct CThostFtdcMarketDataStaticField 2424 | { 2425 | ///今开盘 2426 | TThostFtdcPriceType OpenPrice; 2427 | ///最高价 2428 | TThostFtdcPriceType HighestPrice; 2429 | ///最低价 2430 | TThostFtdcPriceType LowestPrice; 2431 | ///今收盘 2432 | TThostFtdcPriceType ClosePrice; 2433 | ///涨停板价 2434 | TThostFtdcPriceType UpperLimitPrice; 2435 | ///跌停板价 2436 | TThostFtdcPriceType LowerLimitPrice; 2437 | ///本次结算价 2438 | TThostFtdcPriceType SettlementPrice; 2439 | ///今虚实度 2440 | TThostFtdcRatioType CurrDelta; 2441 | }; 2442 | 2443 | ///行情最新成交属性 2444 | struct CThostFtdcMarketDataLastMatchField 2445 | { 2446 | ///最新价 2447 | TThostFtdcPriceType LastPrice; 2448 | ///数量 2449 | TThostFtdcVolumeType Volume; 2450 | ///成交金额 2451 | TThostFtdcMoneyType Turnover; 2452 | ///持仓量 2453 | TThostFtdcLargeVolumeType OpenInterest; 2454 | }; 2455 | 2456 | ///行情最优价属性 2457 | struct CThostFtdcMarketDataBestPriceField 2458 | { 2459 | ///申买价一 2460 | TThostFtdcPriceType BidPrice1; 2461 | ///申买量一 2462 | TThostFtdcVolumeType BidVolume1; 2463 | ///申卖价一 2464 | TThostFtdcPriceType AskPrice1; 2465 | ///申卖量一 2466 | TThostFtdcVolumeType AskVolume1; 2467 | }; 2468 | 2469 | ///行情申买二、三属性 2470 | struct CThostFtdcMarketDataBid23Field 2471 | { 2472 | ///申买价二 2473 | TThostFtdcPriceType BidPrice2; 2474 | ///申买量二 2475 | TThostFtdcVolumeType BidVolume2; 2476 | ///申买价三 2477 | TThostFtdcPriceType BidPrice3; 2478 | ///申买量三 2479 | TThostFtdcVolumeType BidVolume3; 2480 | }; 2481 | 2482 | ///行情申卖二、三属性 2483 | struct CThostFtdcMarketDataAsk23Field 2484 | { 2485 | ///申卖价二 2486 | TThostFtdcPriceType AskPrice2; 2487 | ///申卖量二 2488 | TThostFtdcVolumeType AskVolume2; 2489 | ///申卖价三 2490 | TThostFtdcPriceType AskPrice3; 2491 | ///申卖量三 2492 | TThostFtdcVolumeType AskVolume3; 2493 | }; 2494 | 2495 | ///行情申买四、五属性 2496 | struct CThostFtdcMarketDataBid45Field 2497 | { 2498 | ///申买价四 2499 | TThostFtdcPriceType BidPrice4; 2500 | ///申买量四 2501 | TThostFtdcVolumeType BidVolume4; 2502 | ///申买价五 2503 | TThostFtdcPriceType BidPrice5; 2504 | ///申买量五 2505 | TThostFtdcVolumeType BidVolume5; 2506 | }; 2507 | 2508 | ///行情申卖四、五属性 2509 | struct CThostFtdcMarketDataAsk45Field 2510 | { 2511 | ///申卖价四 2512 | TThostFtdcPriceType AskPrice4; 2513 | ///申卖量四 2514 | TThostFtdcVolumeType AskVolume4; 2515 | ///申卖价五 2516 | TThostFtdcPriceType AskPrice5; 2517 | ///申卖量五 2518 | TThostFtdcVolumeType AskVolume5; 2519 | }; 2520 | 2521 | ///行情更新时间属性 2522 | struct CThostFtdcMarketDataUpdateTimeField 2523 | { 2524 | ///合约代码 2525 | TThostFtdcInstrumentIDType InstrumentID; 2526 | ///最后修改时间 2527 | TThostFtdcTimeType UpdateTime; 2528 | ///最后修改毫秒 2529 | TThostFtdcMillisecType UpdateMillisec; 2530 | }; 2531 | 2532 | ///行情交易所代码属性 2533 | struct CThostFtdcMarketDataExchangeField 2534 | { 2535 | ///交易所代码 2536 | TThostFtdcExchangeIDType ExchangeID; 2537 | }; 2538 | 2539 | ///指定的合约 2540 | struct CThostFtdcSpecificInstrumentField 2541 | { 2542 | ///合约代码 2543 | TThostFtdcInstrumentIDType InstrumentID; 2544 | }; 2545 | 2546 | ///合约状态 2547 | struct CThostFtdcInstrumentStatusField 2548 | { 2549 | ///交易所代码 2550 | TThostFtdcExchangeIDType ExchangeID; 2551 | ///合约在交易所的代码 2552 | TThostFtdcExchangeInstIDType ExchangeInstID; 2553 | ///结算组代码 2554 | TThostFtdcSettlementGroupIDType SettlementGroupID; 2555 | ///合约代码 2556 | TThostFtdcInstrumentIDType InstrumentID; 2557 | ///合约交易状态 2558 | TThostFtdcInstrumentStatusType InstrumentStatus; 2559 | ///交易阶段编号 2560 | TThostFtdcTradingSegmentSNType TradingSegmentSN; 2561 | ///进入本状态时间 2562 | TThostFtdcTimeType EnterTime; 2563 | ///进入本状态原因 2564 | TThostFtdcInstStatusEnterReasonType EnterReason; 2565 | }; 2566 | 2567 | ///查询合约状态 2568 | struct CThostFtdcQryInstrumentStatusField 2569 | { 2570 | ///交易所代码 2571 | TThostFtdcExchangeIDType ExchangeID; 2572 | ///合约在交易所的代码 2573 | TThostFtdcExchangeInstIDType ExchangeInstID; 2574 | }; 2575 | 2576 | ///投资者账户 2577 | struct CThostFtdcInvestorAccountField 2578 | { 2579 | ///经纪公司代码 2580 | TThostFtdcBrokerIDType BrokerID; 2581 | ///投资者代码 2582 | TThostFtdcInvestorIDType InvestorID; 2583 | ///投资者帐号 2584 | TThostFtdcAccountIDType AccountID; 2585 | }; 2586 | 2587 | ///浮动盈亏算法 2588 | struct CThostFtdcPositionProfitAlgorithmField 2589 | { 2590 | ///经纪公司代码 2591 | TThostFtdcBrokerIDType BrokerID; 2592 | ///投资者帐号 2593 | TThostFtdcAccountIDType AccountID; 2594 | ///盈亏算法 2595 | TThostFtdcAlgorithmType Algorithm; 2596 | ///备注 2597 | TThostFtdcMemoType Memo; 2598 | }; 2599 | 2600 | ///会员资金折扣 2601 | struct CThostFtdcDiscountField 2602 | { 2603 | ///经纪公司代码 2604 | TThostFtdcBrokerIDType BrokerID; 2605 | ///投资者范围 2606 | TThostFtdcInvestorRangeType InvestorRange; 2607 | ///投资者代码 2608 | TThostFtdcInvestorIDType InvestorID; 2609 | ///资金折扣比例 2610 | TThostFtdcRatioType Discount; 2611 | }; 2612 | 2613 | ///查询转帐银行 2614 | struct CThostFtdcQryTransferBankField 2615 | { 2616 | ///银行代码 2617 | TThostFtdcBankIDType BankID; 2618 | ///银行分中心代码 2619 | TThostFtdcBankBrchIDType BankBrchID; 2620 | }; 2621 | 2622 | ///转帐银行 2623 | struct CThostFtdcTransferBankField 2624 | { 2625 | ///银行代码 2626 | TThostFtdcBankIDType BankID; 2627 | ///银行分中心代码 2628 | TThostFtdcBankBrchIDType BankBrchID; 2629 | ///银行名称 2630 | TThostFtdcBankNameType BankName; 2631 | ///是否活跃 2632 | TThostFtdcBoolType IsActive; 2633 | }; 2634 | 2635 | ///查询投资者持仓明细 2636 | struct CThostFtdcQryInvestorPositionDetailField 2637 | { 2638 | ///经纪公司代码 2639 | TThostFtdcBrokerIDType BrokerID; 2640 | ///投资者代码 2641 | TThostFtdcInvestorIDType InvestorID; 2642 | ///合约代码 2643 | TThostFtdcInstrumentIDType InstrumentID; 2644 | }; 2645 | 2646 | ///投资者持仓明细 2647 | struct CThostFtdcInvestorPositionDetailField 2648 | { 2649 | ///合约代码 2650 | TThostFtdcInstrumentIDType InstrumentID; 2651 | ///经纪公司代码 2652 | TThostFtdcBrokerIDType BrokerID; 2653 | ///投资者代码 2654 | TThostFtdcInvestorIDType InvestorID; 2655 | ///投机套保标志 2656 | TThostFtdcHedgeFlagType HedgeFlag; 2657 | ///买卖 2658 | TThostFtdcDirectionType Direction; 2659 | ///开仓日期 2660 | TThostFtdcDateType OpenDate; 2661 | ///成交编号 2662 | TThostFtdcTradeIDType TradeID; 2663 | ///数量 2664 | TThostFtdcVolumeType Volume; 2665 | ///开仓价 2666 | TThostFtdcPriceType OpenPrice; 2667 | ///交易日 2668 | TThostFtdcDateType TradingDay; 2669 | ///结算编号 2670 | TThostFtdcSettlementIDType SettlementID; 2671 | ///成交类型 2672 | TThostFtdcTradeTypeType TradeType; 2673 | ///组合合约代码 2674 | TThostFtdcInstrumentIDType CombInstrumentID; 2675 | ///交易所代码 2676 | TThostFtdcExchangeIDType ExchangeID; 2677 | ///逐日盯市平仓盈亏 2678 | TThostFtdcMoneyType CloseProfitByDate; 2679 | ///逐笔对冲平仓盈亏 2680 | TThostFtdcMoneyType CloseProfitByTrade; 2681 | ///逐日盯市持仓盈亏 2682 | TThostFtdcMoneyType PositionProfitByDate; 2683 | ///逐笔对冲持仓盈亏 2684 | TThostFtdcMoneyType PositionProfitByTrade; 2685 | ///投资者保证金 2686 | TThostFtdcMoneyType Margin; 2687 | ///交易所保证金 2688 | TThostFtdcMoneyType ExchMargin; 2689 | ///保证金率 2690 | TThostFtdcRatioType MarginRateByMoney; 2691 | ///保证金率(按手数) 2692 | TThostFtdcRatioType MarginRateByVolume; 2693 | ///昨结算价 2694 | TThostFtdcPriceType LastSettlementPrice; 2695 | ///结算价 2696 | TThostFtdcPriceType SettlementPrice; 2697 | ///平仓量 2698 | TThostFtdcVolumeType CloseVolume; 2699 | ///平仓金额 2700 | TThostFtdcMoneyType CloseAmount; 2701 | }; 2702 | 2703 | ///资金账户口令域 2704 | struct CThostFtdcTradingAccountPasswordField 2705 | { 2706 | ///经纪公司代码 2707 | TThostFtdcBrokerIDType BrokerID; 2708 | ///投资者帐号 2709 | TThostFtdcAccountIDType AccountID; 2710 | ///密码 2711 | TThostFtdcPasswordType Password; 2712 | }; 2713 | 2714 | ///交易所行情报盘机 2715 | struct CThostFtdcMDTraderOfferField 2716 | { 2717 | ///交易所代码 2718 | TThostFtdcExchangeIDType ExchangeID; 2719 | ///交易所交易员代码 2720 | TThostFtdcTraderIDType TraderID; 2721 | ///会员代码 2722 | TThostFtdcParticipantIDType ParticipantID; 2723 | ///密码 2724 | TThostFtdcPasswordType Password; 2725 | ///安装编号 2726 | TThostFtdcInstallIDType InstallID; 2727 | ///本地报单编号 2728 | TThostFtdcOrderLocalIDType OrderLocalID; 2729 | ///交易所交易员连接状态 2730 | TThostFtdcTraderConnectStatusType TraderConnectStatus; 2731 | ///发出连接请求的日期 2732 | TThostFtdcDateType ConnectRequestDate; 2733 | ///发出连接请求的时间 2734 | TThostFtdcTimeType ConnectRequestTime; 2735 | ///上次报告日期 2736 | TThostFtdcDateType LastReportDate; 2737 | ///上次报告时间 2738 | TThostFtdcTimeType LastReportTime; 2739 | ///完成连接日期 2740 | TThostFtdcDateType ConnectDate; 2741 | ///完成连接时间 2742 | TThostFtdcTimeType ConnectTime; 2743 | ///启动日期 2744 | TThostFtdcDateType StartDate; 2745 | ///启动时间 2746 | TThostFtdcTimeType StartTime; 2747 | ///交易日 2748 | TThostFtdcDateType TradingDay; 2749 | ///经纪公司代码 2750 | TThostFtdcBrokerIDType BrokerID; 2751 | ///本席位最大成交编号 2752 | TThostFtdcTradeIDType MaxTradeID; 2753 | ///本席位最大报单备拷 2754 | TThostFtdcReturnCodeType MaxOrderMessageReference; 2755 | }; 2756 | 2757 | ///查询行情报盘机 2758 | struct CThostFtdcQryMDTraderOfferField 2759 | { 2760 | ///交易所代码 2761 | TThostFtdcExchangeIDType ExchangeID; 2762 | ///会员代码 2763 | TThostFtdcParticipantIDType ParticipantID; 2764 | ///交易所交易员代码 2765 | TThostFtdcTraderIDType TraderID; 2766 | }; 2767 | 2768 | ///查询客户通知 2769 | struct CThostFtdcQryNoticeField 2770 | { 2771 | ///经纪公司代码 2772 | TThostFtdcBrokerIDType BrokerID; 2773 | }; 2774 | 2775 | ///客户通知 2776 | struct CThostFtdcNoticeField 2777 | { 2778 | ///经纪公司代码 2779 | TThostFtdcBrokerIDType BrokerID; 2780 | ///消息正文 2781 | TThostFtdcContentType Content; 2782 | ///经纪公司通知内容序列号 2783 | TThostFtdcSequenceLabelType SequenceLabel; 2784 | }; 2785 | 2786 | ///用户权限 2787 | struct CThostFtdcUserRightField 2788 | { 2789 | ///经纪公司代码 2790 | TThostFtdcBrokerIDType BrokerID; 2791 | ///用户代码 2792 | TThostFtdcUserIDType UserID; 2793 | ///客户权限类型 2794 | TThostFtdcUserRightTypeType UserRightType; 2795 | ///是否禁止 2796 | TThostFtdcBoolType IsForbidden; 2797 | }; 2798 | 2799 | ///查询结算信息确认域 2800 | struct CThostFtdcQrySettlementInfoConfirmField 2801 | { 2802 | ///经纪公司代码 2803 | TThostFtdcBrokerIDType BrokerID; 2804 | ///投资者代码 2805 | TThostFtdcInvestorIDType InvestorID; 2806 | }; 2807 | 2808 | ///装载结算信息 2809 | struct CThostFtdcLoadSettlementInfoField 2810 | { 2811 | ///经纪公司代码 2812 | TThostFtdcBrokerIDType BrokerID; 2813 | }; 2814 | 2815 | ///经纪公司可提资金算法表 2816 | struct CThostFtdcBrokerWithdrawAlgorithmField 2817 | { 2818 | ///经纪公司代码 2819 | TThostFtdcBrokerIDType BrokerID; 2820 | ///可提资金算法 2821 | TThostFtdcAlgorithmType WithdrawAlgorithm; 2822 | ///资金使用率 2823 | TThostFtdcRatioType UsingRatio; 2824 | ///可提是否包含平仓盈利 2825 | TThostFtdcIncludeCloseProfitType IncludeCloseProfit; 2826 | ///本日无仓且无成交客户是否受可提比例限制 2827 | TThostFtdcAllWithoutTradeType AllWithoutTrade; 2828 | ///可用是否包含平仓盈利 2829 | TThostFtdcIncludeCloseProfitType AvailIncludeCloseProfit; 2830 | ///是否启用用户事件 2831 | TThostFtdcBoolType IsBrokerUserEvent; 2832 | }; 2833 | 2834 | ///资金账户口令变更域 2835 | struct CThostFtdcTradingAccountPasswordUpdateV1Field 2836 | { 2837 | ///经纪公司代码 2838 | TThostFtdcBrokerIDType BrokerID; 2839 | ///投资者代码 2840 | TThostFtdcInvestorIDType InvestorID; 2841 | ///原来的口令 2842 | TThostFtdcPasswordType OldPassword; 2843 | ///新的口令 2844 | TThostFtdcPasswordType NewPassword; 2845 | }; 2846 | 2847 | ///资金账户口令变更域 2848 | struct CThostFtdcTradingAccountPasswordUpdateField 2849 | { 2850 | ///经纪公司代码 2851 | TThostFtdcBrokerIDType BrokerID; 2852 | ///投资者帐号 2853 | TThostFtdcAccountIDType AccountID; 2854 | ///原来的口令 2855 | TThostFtdcPasswordType OldPassword; 2856 | ///新的口令 2857 | TThostFtdcPasswordType NewPassword; 2858 | }; 2859 | 2860 | ///查询组合合约分腿 2861 | struct CThostFtdcQryCombinationLegField 2862 | { 2863 | ///组合合约代码 2864 | TThostFtdcInstrumentIDType CombInstrumentID; 2865 | ///单腿编号 2866 | TThostFtdcLegIDType LegID; 2867 | ///单腿合约代码 2868 | TThostFtdcInstrumentIDType LegInstrumentID; 2869 | }; 2870 | 2871 | ///查询组合合约分腿 2872 | struct CThostFtdcQrySyncStatusField 2873 | { 2874 | ///交易日 2875 | TThostFtdcDateType TradingDay; 2876 | }; 2877 | 2878 | ///组合交易合约的单腿 2879 | struct CThostFtdcCombinationLegField 2880 | { 2881 | ///组合合约代码 2882 | TThostFtdcInstrumentIDType CombInstrumentID; 2883 | ///单腿编号 2884 | TThostFtdcLegIDType LegID; 2885 | ///单腿合约代码 2886 | TThostFtdcInstrumentIDType LegInstrumentID; 2887 | ///买卖方向 2888 | TThostFtdcDirectionType Direction; 2889 | ///单腿乘数 2890 | TThostFtdcLegMultipleType LegMultiple; 2891 | ///派生层数 2892 | TThostFtdcImplyLevelType ImplyLevel; 2893 | }; 2894 | 2895 | ///数据同步状态 2896 | struct CThostFtdcSyncStatusField 2897 | { 2898 | ///交易日 2899 | TThostFtdcDateType TradingDay; 2900 | ///数据同步状态 2901 | TThostFtdcDataSyncStatusType DataSyncStatus; 2902 | }; 2903 | 2904 | ///查询联系人 2905 | struct CThostFtdcQryLinkManField 2906 | { 2907 | ///经纪公司代码 2908 | TThostFtdcBrokerIDType BrokerID; 2909 | ///投资者代码 2910 | TThostFtdcInvestorIDType InvestorID; 2911 | }; 2912 | 2913 | ///联系人 2914 | struct CThostFtdcLinkManField 2915 | { 2916 | ///经纪公司代码 2917 | TThostFtdcBrokerIDType BrokerID; 2918 | ///投资者代码 2919 | TThostFtdcInvestorIDType InvestorID; 2920 | ///联系人类型 2921 | TThostFtdcPersonTypeType PersonType; 2922 | ///证件类型 2923 | TThostFtdcIdCardTypeType IdentifiedCardType; 2924 | ///证件号码 2925 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 2926 | ///名称 2927 | TThostFtdcPartyNameType PersonName; 2928 | ///联系电话 2929 | TThostFtdcTelephoneType Telephone; 2930 | ///通讯地址 2931 | TThostFtdcAddressType Address; 2932 | ///邮政编码 2933 | TThostFtdcZipCodeType ZipCode; 2934 | ///优先级 2935 | TThostFtdcPriorityType Priority; 2936 | }; 2937 | 2938 | ///查询经纪公司用户事件 2939 | struct CThostFtdcQryBrokerUserEventField 2940 | { 2941 | ///经纪公司代码 2942 | TThostFtdcBrokerIDType BrokerID; 2943 | ///用户代码 2944 | TThostFtdcUserIDType UserID; 2945 | ///用户事件类型 2946 | TThostFtdcUserEventTypeType UserEventType; 2947 | }; 2948 | 2949 | ///查询经纪公司用户事件 2950 | struct CThostFtdcBrokerUserEventField 2951 | { 2952 | ///经纪公司代码 2953 | TThostFtdcBrokerIDType BrokerID; 2954 | ///用户代码 2955 | TThostFtdcUserIDType UserID; 2956 | ///用户事件类型 2957 | TThostFtdcUserEventTypeType UserEventType; 2958 | ///用户事件序号 2959 | TThostFtdcSequenceNoType EventSequenceNo; 2960 | ///事件发生日期 2961 | TThostFtdcDateType EventDate; 2962 | ///事件发生时间 2963 | TThostFtdcTimeType EventTime; 2964 | ///用户事件信息 2965 | TThostFtdcUserEventInfoType UserEventInfo; 2966 | ///投资者代码 2967 | TThostFtdcInvestorIDType InvestorID; 2968 | ///合约代码 2969 | TThostFtdcInstrumentIDType InstrumentID; 2970 | }; 2971 | 2972 | ///查询签约银行请求 2973 | struct CThostFtdcQryContractBankField 2974 | { 2975 | ///经纪公司代码 2976 | TThostFtdcBrokerIDType BrokerID; 2977 | ///银行代码 2978 | TThostFtdcBankIDType BankID; 2979 | ///银行分中心代码 2980 | TThostFtdcBankBrchIDType BankBrchID; 2981 | }; 2982 | 2983 | ///查询签约银行响应 2984 | struct CThostFtdcContractBankField 2985 | { 2986 | ///经纪公司代码 2987 | TThostFtdcBrokerIDType BrokerID; 2988 | ///银行代码 2989 | TThostFtdcBankIDType BankID; 2990 | ///银行分中心代码 2991 | TThostFtdcBankBrchIDType BankBrchID; 2992 | ///银行名称 2993 | TThostFtdcBankNameType BankName; 2994 | }; 2995 | 2996 | ///投资者组合持仓明细 2997 | struct CThostFtdcInvestorPositionCombineDetailField 2998 | { 2999 | ///交易日 3000 | TThostFtdcDateType TradingDay; 3001 | ///开仓日期 3002 | TThostFtdcDateType OpenDate; 3003 | ///交易所代码 3004 | TThostFtdcExchangeIDType ExchangeID; 3005 | ///结算编号 3006 | TThostFtdcSettlementIDType SettlementID; 3007 | ///经纪公司代码 3008 | TThostFtdcBrokerIDType BrokerID; 3009 | ///投资者代码 3010 | TThostFtdcInvestorIDType InvestorID; 3011 | ///组合编号 3012 | TThostFtdcTradeIDType ComTradeID; 3013 | ///撮合编号 3014 | TThostFtdcTradeIDType TradeID; 3015 | ///合约代码 3016 | TThostFtdcInstrumentIDType InstrumentID; 3017 | ///投机套保标志 3018 | TThostFtdcHedgeFlagType HedgeFlag; 3019 | ///买卖 3020 | TThostFtdcDirectionType Direction; 3021 | ///持仓量 3022 | TThostFtdcVolumeType TotalAmt; 3023 | ///投资者保证金 3024 | TThostFtdcMoneyType Margin; 3025 | ///交易所保证金 3026 | TThostFtdcMoneyType ExchMargin; 3027 | ///保证金率 3028 | TThostFtdcRatioType MarginRateByMoney; 3029 | ///保证金率(按手数) 3030 | TThostFtdcRatioType MarginRateByVolume; 3031 | ///单腿编号 3032 | TThostFtdcLegIDType LegID; 3033 | ///单腿乘数 3034 | TThostFtdcLegMultipleType LegMultiple; 3035 | ///组合持仓合约编码 3036 | TThostFtdcInstrumentIDType CombInstrumentID; 3037 | }; 3038 | 3039 | ///预埋单 3040 | struct CThostFtdcParkedOrderField 3041 | { 3042 | ///经纪公司代码 3043 | TThostFtdcBrokerIDType BrokerID; 3044 | ///投资者代码 3045 | TThostFtdcInvestorIDType InvestorID; 3046 | ///合约代码 3047 | TThostFtdcInstrumentIDType InstrumentID; 3048 | ///报单引用 3049 | TThostFtdcOrderRefType OrderRef; 3050 | ///用户代码 3051 | TThostFtdcUserIDType UserID; 3052 | ///报单价格条件 3053 | TThostFtdcOrderPriceTypeType OrderPriceType; 3054 | ///买卖方向 3055 | TThostFtdcDirectionType Direction; 3056 | ///组合开平标志 3057 | TThostFtdcCombOffsetFlagType CombOffsetFlag; 3058 | ///组合投机套保标志 3059 | TThostFtdcCombHedgeFlagType CombHedgeFlag; 3060 | ///价格 3061 | TThostFtdcPriceType LimitPrice; 3062 | ///数量 3063 | TThostFtdcVolumeType VolumeTotalOriginal; 3064 | ///有效期类型 3065 | TThostFtdcTimeConditionType TimeCondition; 3066 | ///GTD日期 3067 | TThostFtdcDateType GTDDate; 3068 | ///成交量类型 3069 | TThostFtdcVolumeConditionType VolumeCondition; 3070 | ///最小成交量 3071 | TThostFtdcVolumeType MinVolume; 3072 | ///触发条件 3073 | TThostFtdcContingentConditionType ContingentCondition; 3074 | ///止损价 3075 | TThostFtdcPriceType StopPrice; 3076 | ///强平原因 3077 | TThostFtdcForceCloseReasonType ForceCloseReason; 3078 | ///自动挂起标志 3079 | TThostFtdcBoolType IsAutoSuspend; 3080 | ///业务单元 3081 | TThostFtdcBusinessUnitType BusinessUnit; 3082 | ///请求编号 3083 | TThostFtdcRequestIDType RequestID; 3084 | ///用户强评标志 3085 | TThostFtdcBoolType UserForceClose; 3086 | ///交易所代码 3087 | TThostFtdcExchangeIDType ExchangeID; 3088 | ///预埋报单编号 3089 | TThostFtdcParkedOrderIDType ParkedOrderID; 3090 | ///用户类型 3091 | TThostFtdcUserTypeType UserType; 3092 | ///预埋单状态 3093 | TThostFtdcParkedOrderStatusType Status; 3094 | ///错误代码 3095 | TThostFtdcErrorIDType ErrorID; 3096 | ///错误信息 3097 | TThostFtdcErrorMsgType ErrorMsg; 3098 | ///互换单标志 3099 | TThostFtdcBoolType IsSwapOrder; 3100 | }; 3101 | 3102 | ///输入预埋单操作 3103 | struct CThostFtdcParkedOrderActionField 3104 | { 3105 | ///经纪公司代码 3106 | TThostFtdcBrokerIDType BrokerID; 3107 | ///投资者代码 3108 | TThostFtdcInvestorIDType InvestorID; 3109 | ///报单操作引用 3110 | TThostFtdcOrderActionRefType OrderActionRef; 3111 | ///报单引用 3112 | TThostFtdcOrderRefType OrderRef; 3113 | ///请求编号 3114 | TThostFtdcRequestIDType RequestID; 3115 | ///前置编号 3116 | TThostFtdcFrontIDType FrontID; 3117 | ///会话编号 3118 | TThostFtdcSessionIDType SessionID; 3119 | ///交易所代码 3120 | TThostFtdcExchangeIDType ExchangeID; 3121 | ///报单编号 3122 | TThostFtdcOrderSysIDType OrderSysID; 3123 | ///操作标志 3124 | TThostFtdcActionFlagType ActionFlag; 3125 | ///价格 3126 | TThostFtdcPriceType LimitPrice; 3127 | ///数量变化 3128 | TThostFtdcVolumeType VolumeChange; 3129 | ///用户代码 3130 | TThostFtdcUserIDType UserID; 3131 | ///合约代码 3132 | TThostFtdcInstrumentIDType InstrumentID; 3133 | ///预埋撤单单编号 3134 | TThostFtdcParkedOrderActionIDType ParkedOrderActionID; 3135 | ///用户类型 3136 | TThostFtdcUserTypeType UserType; 3137 | ///预埋撤单状态 3138 | TThostFtdcParkedOrderStatusType Status; 3139 | ///错误代码 3140 | TThostFtdcErrorIDType ErrorID; 3141 | ///错误信息 3142 | TThostFtdcErrorMsgType ErrorMsg; 3143 | }; 3144 | 3145 | ///查询预埋单 3146 | struct CThostFtdcQryParkedOrderField 3147 | { 3148 | ///经纪公司代码 3149 | TThostFtdcBrokerIDType BrokerID; 3150 | ///投资者代码 3151 | TThostFtdcInvestorIDType InvestorID; 3152 | ///合约代码 3153 | TThostFtdcInstrumentIDType InstrumentID; 3154 | ///交易所代码 3155 | TThostFtdcExchangeIDType ExchangeID; 3156 | }; 3157 | 3158 | ///查询预埋撤单 3159 | struct CThostFtdcQryParkedOrderActionField 3160 | { 3161 | ///经纪公司代码 3162 | TThostFtdcBrokerIDType BrokerID; 3163 | ///投资者代码 3164 | TThostFtdcInvestorIDType InvestorID; 3165 | ///合约代码 3166 | TThostFtdcInstrumentIDType InstrumentID; 3167 | ///交易所代码 3168 | TThostFtdcExchangeIDType ExchangeID; 3169 | }; 3170 | 3171 | ///删除预埋单 3172 | struct CThostFtdcRemoveParkedOrderField 3173 | { 3174 | ///经纪公司代码 3175 | TThostFtdcBrokerIDType BrokerID; 3176 | ///投资者代码 3177 | TThostFtdcInvestorIDType InvestorID; 3178 | ///预埋报单编号 3179 | TThostFtdcParkedOrderIDType ParkedOrderID; 3180 | }; 3181 | 3182 | ///删除预埋撤单 3183 | struct CThostFtdcRemoveParkedOrderActionField 3184 | { 3185 | ///经纪公司代码 3186 | TThostFtdcBrokerIDType BrokerID; 3187 | ///投资者代码 3188 | TThostFtdcInvestorIDType InvestorID; 3189 | ///预埋撤单编号 3190 | TThostFtdcParkedOrderActionIDType ParkedOrderActionID; 3191 | }; 3192 | 3193 | ///经纪公司可提资金算法表 3194 | struct CThostFtdcInvestorWithdrawAlgorithmField 3195 | { 3196 | ///经纪公司代码 3197 | TThostFtdcBrokerIDType BrokerID; 3198 | ///投资者范围 3199 | TThostFtdcInvestorRangeType InvestorRange; 3200 | ///投资者代码 3201 | TThostFtdcInvestorIDType InvestorID; 3202 | ///可提资金比例 3203 | TThostFtdcRatioType UsingRatio; 3204 | }; 3205 | 3206 | ///查询组合持仓明细 3207 | struct CThostFtdcQryInvestorPositionCombineDetailField 3208 | { 3209 | ///经纪公司代码 3210 | TThostFtdcBrokerIDType BrokerID; 3211 | ///投资者代码 3212 | TThostFtdcInvestorIDType InvestorID; 3213 | ///组合持仓合约编码 3214 | TThostFtdcInstrumentIDType CombInstrumentID; 3215 | }; 3216 | 3217 | ///成交均价 3218 | struct CThostFtdcMarketDataAveragePriceField 3219 | { 3220 | ///当日均价 3221 | TThostFtdcPriceType AveragePrice; 3222 | }; 3223 | 3224 | ///校验投资者密码 3225 | struct CThostFtdcVerifyInvestorPasswordField 3226 | { 3227 | ///经纪公司代码 3228 | TThostFtdcBrokerIDType BrokerID; 3229 | ///投资者代码 3230 | TThostFtdcInvestorIDType InvestorID; 3231 | ///密码 3232 | TThostFtdcPasswordType Password; 3233 | }; 3234 | 3235 | ///用户IP 3236 | struct CThostFtdcUserIPField 3237 | { 3238 | ///经纪公司代码 3239 | TThostFtdcBrokerIDType BrokerID; 3240 | ///用户代码 3241 | TThostFtdcUserIDType UserID; 3242 | ///IP地址 3243 | TThostFtdcIPAddressType IPAddress; 3244 | ///IP地址掩码 3245 | TThostFtdcIPAddressType IPMask; 3246 | ///Mac地址 3247 | TThostFtdcMacAddressType MacAddress; 3248 | }; 3249 | 3250 | ///用户事件通知信息 3251 | struct CThostFtdcTradingNoticeInfoField 3252 | { 3253 | ///经纪公司代码 3254 | TThostFtdcBrokerIDType BrokerID; 3255 | ///投资者代码 3256 | TThostFtdcInvestorIDType InvestorID; 3257 | ///发送时间 3258 | TThostFtdcTimeType SendTime; 3259 | ///消息正文 3260 | TThostFtdcContentType FieldContent; 3261 | ///序列系列号 3262 | TThostFtdcSequenceSeriesType SequenceSeries; 3263 | ///序列号 3264 | TThostFtdcSequenceNoType SequenceNo; 3265 | }; 3266 | 3267 | ///用户事件通知 3268 | struct CThostFtdcTradingNoticeField 3269 | { 3270 | ///经纪公司代码 3271 | TThostFtdcBrokerIDType BrokerID; 3272 | ///投资者范围 3273 | TThostFtdcInvestorRangeType InvestorRange; 3274 | ///投资者代码 3275 | TThostFtdcInvestorIDType InvestorID; 3276 | ///序列系列号 3277 | TThostFtdcSequenceSeriesType SequenceSeries; 3278 | ///用户代码 3279 | TThostFtdcUserIDType UserID; 3280 | ///发送时间 3281 | TThostFtdcTimeType SendTime; 3282 | ///序列号 3283 | TThostFtdcSequenceNoType SequenceNo; 3284 | ///消息正文 3285 | TThostFtdcContentType FieldContent; 3286 | }; 3287 | 3288 | ///查询交易事件通知 3289 | struct CThostFtdcQryTradingNoticeField 3290 | { 3291 | ///经纪公司代码 3292 | TThostFtdcBrokerIDType BrokerID; 3293 | ///投资者代码 3294 | TThostFtdcInvestorIDType InvestorID; 3295 | }; 3296 | 3297 | ///查询错误报单 3298 | struct CThostFtdcQryErrOrderField 3299 | { 3300 | ///经纪公司代码 3301 | TThostFtdcBrokerIDType BrokerID; 3302 | ///投资者代码 3303 | TThostFtdcInvestorIDType InvestorID; 3304 | }; 3305 | 3306 | ///错误报单 3307 | struct CThostFtdcErrOrderField 3308 | { 3309 | ///经纪公司代码 3310 | TThostFtdcBrokerIDType BrokerID; 3311 | ///投资者代码 3312 | TThostFtdcInvestorIDType InvestorID; 3313 | ///合约代码 3314 | TThostFtdcInstrumentIDType InstrumentID; 3315 | ///报单引用 3316 | TThostFtdcOrderRefType OrderRef; 3317 | ///用户代码 3318 | TThostFtdcUserIDType UserID; 3319 | ///报单价格条件 3320 | TThostFtdcOrderPriceTypeType OrderPriceType; 3321 | ///买卖方向 3322 | TThostFtdcDirectionType Direction; 3323 | ///组合开平标志 3324 | TThostFtdcCombOffsetFlagType CombOffsetFlag; 3325 | ///组合投机套保标志 3326 | TThostFtdcCombHedgeFlagType CombHedgeFlag; 3327 | ///价格 3328 | TThostFtdcPriceType LimitPrice; 3329 | ///数量 3330 | TThostFtdcVolumeType VolumeTotalOriginal; 3331 | ///有效期类型 3332 | TThostFtdcTimeConditionType TimeCondition; 3333 | ///GTD日期 3334 | TThostFtdcDateType GTDDate; 3335 | ///成交量类型 3336 | TThostFtdcVolumeConditionType VolumeCondition; 3337 | ///最小成交量 3338 | TThostFtdcVolumeType MinVolume; 3339 | ///触发条件 3340 | TThostFtdcContingentConditionType ContingentCondition; 3341 | ///止损价 3342 | TThostFtdcPriceType StopPrice; 3343 | ///强平原因 3344 | TThostFtdcForceCloseReasonType ForceCloseReason; 3345 | ///自动挂起标志 3346 | TThostFtdcBoolType IsAutoSuspend; 3347 | ///业务单元 3348 | TThostFtdcBusinessUnitType BusinessUnit; 3349 | ///请求编号 3350 | TThostFtdcRequestIDType RequestID; 3351 | ///用户强评标志 3352 | TThostFtdcBoolType UserForceClose; 3353 | ///错误代码 3354 | TThostFtdcErrorIDType ErrorID; 3355 | ///错误信息 3356 | TThostFtdcErrorMsgType ErrorMsg; 3357 | ///互换单标志 3358 | TThostFtdcBoolType IsSwapOrder; 3359 | }; 3360 | 3361 | ///查询错误报单操作 3362 | struct CThostFtdcErrorConditionalOrderField 3363 | { 3364 | ///经纪公司代码 3365 | TThostFtdcBrokerIDType BrokerID; 3366 | ///投资者代码 3367 | TThostFtdcInvestorIDType InvestorID; 3368 | ///合约代码 3369 | TThostFtdcInstrumentIDType InstrumentID; 3370 | ///报单引用 3371 | TThostFtdcOrderRefType OrderRef; 3372 | ///用户代码 3373 | TThostFtdcUserIDType UserID; 3374 | ///报单价格条件 3375 | TThostFtdcOrderPriceTypeType OrderPriceType; 3376 | ///买卖方向 3377 | TThostFtdcDirectionType Direction; 3378 | ///组合开平标志 3379 | TThostFtdcCombOffsetFlagType CombOffsetFlag; 3380 | ///组合投机套保标志 3381 | TThostFtdcCombHedgeFlagType CombHedgeFlag; 3382 | ///价格 3383 | TThostFtdcPriceType LimitPrice; 3384 | ///数量 3385 | TThostFtdcVolumeType VolumeTotalOriginal; 3386 | ///有效期类型 3387 | TThostFtdcTimeConditionType TimeCondition; 3388 | ///GTD日期 3389 | TThostFtdcDateType GTDDate; 3390 | ///成交量类型 3391 | TThostFtdcVolumeConditionType VolumeCondition; 3392 | ///最小成交量 3393 | TThostFtdcVolumeType MinVolume; 3394 | ///触发条件 3395 | TThostFtdcContingentConditionType ContingentCondition; 3396 | ///止损价 3397 | TThostFtdcPriceType StopPrice; 3398 | ///强平原因 3399 | TThostFtdcForceCloseReasonType ForceCloseReason; 3400 | ///自动挂起标志 3401 | TThostFtdcBoolType IsAutoSuspend; 3402 | ///业务单元 3403 | TThostFtdcBusinessUnitType BusinessUnit; 3404 | ///请求编号 3405 | TThostFtdcRequestIDType RequestID; 3406 | ///本地报单编号 3407 | TThostFtdcOrderLocalIDType OrderLocalID; 3408 | ///交易所代码 3409 | TThostFtdcExchangeIDType ExchangeID; 3410 | ///会员代码 3411 | TThostFtdcParticipantIDType ParticipantID; 3412 | ///客户代码 3413 | TThostFtdcClientIDType ClientID; 3414 | ///合约在交易所的代码 3415 | TThostFtdcExchangeInstIDType ExchangeInstID; 3416 | ///交易所交易员代码 3417 | TThostFtdcTraderIDType TraderID; 3418 | ///安装编号 3419 | TThostFtdcInstallIDType InstallID; 3420 | ///报单提交状态 3421 | TThostFtdcOrderSubmitStatusType OrderSubmitStatus; 3422 | ///报单提示序号 3423 | TThostFtdcSequenceNoType NotifySequence; 3424 | ///交易日 3425 | TThostFtdcDateType TradingDay; 3426 | ///结算编号 3427 | TThostFtdcSettlementIDType SettlementID; 3428 | ///报单编号 3429 | TThostFtdcOrderSysIDType OrderSysID; 3430 | ///报单来源 3431 | TThostFtdcOrderSourceType OrderSource; 3432 | ///报单状态 3433 | TThostFtdcOrderStatusType OrderStatus; 3434 | ///报单类型 3435 | TThostFtdcOrderTypeType OrderType; 3436 | ///今成交数量 3437 | TThostFtdcVolumeType VolumeTraded; 3438 | ///剩余数量 3439 | TThostFtdcVolumeType VolumeTotal; 3440 | ///报单日期 3441 | TThostFtdcDateType InsertDate; 3442 | ///委托时间 3443 | TThostFtdcTimeType InsertTime; 3444 | ///激活时间 3445 | TThostFtdcTimeType ActiveTime; 3446 | ///挂起时间 3447 | TThostFtdcTimeType SuspendTime; 3448 | ///最后修改时间 3449 | TThostFtdcTimeType UpdateTime; 3450 | ///撤销时间 3451 | TThostFtdcTimeType CancelTime; 3452 | ///最后修改交易所交易员代码 3453 | TThostFtdcTraderIDType ActiveTraderID; 3454 | ///结算会员编号 3455 | TThostFtdcParticipantIDType ClearingPartID; 3456 | ///序号 3457 | TThostFtdcSequenceNoType SequenceNo; 3458 | ///前置编号 3459 | TThostFtdcFrontIDType FrontID; 3460 | ///会话编号 3461 | TThostFtdcSessionIDType SessionID; 3462 | ///用户端产品信息 3463 | TThostFtdcProductInfoType UserProductInfo; 3464 | ///状态信息 3465 | TThostFtdcErrorMsgType StatusMsg; 3466 | ///用户强评标志 3467 | TThostFtdcBoolType UserForceClose; 3468 | ///操作用户代码 3469 | TThostFtdcUserIDType ActiveUserID; 3470 | ///经纪公司报单编号 3471 | TThostFtdcSequenceNoType BrokerOrderSeq; 3472 | ///相关报单 3473 | TThostFtdcOrderSysIDType RelativeOrderSysID; 3474 | ///郑商所成交数量 3475 | TThostFtdcVolumeType ZCETotalTradedVolume; 3476 | ///错误代码 3477 | TThostFtdcErrorIDType ErrorID; 3478 | ///错误信息 3479 | TThostFtdcErrorMsgType ErrorMsg; 3480 | ///互换单标志 3481 | TThostFtdcBoolType IsSwapOrder; 3482 | }; 3483 | 3484 | ///查询错误报单操作 3485 | struct CThostFtdcQryErrOrderActionField 3486 | { 3487 | ///经纪公司代码 3488 | TThostFtdcBrokerIDType BrokerID; 3489 | ///投资者代码 3490 | TThostFtdcInvestorIDType InvestorID; 3491 | }; 3492 | 3493 | ///错误报单操作 3494 | struct CThostFtdcErrOrderActionField 3495 | { 3496 | ///经纪公司代码 3497 | TThostFtdcBrokerIDType BrokerID; 3498 | ///投资者代码 3499 | TThostFtdcInvestorIDType InvestorID; 3500 | ///报单操作引用 3501 | TThostFtdcOrderActionRefType OrderActionRef; 3502 | ///报单引用 3503 | TThostFtdcOrderRefType OrderRef; 3504 | ///请求编号 3505 | TThostFtdcRequestIDType RequestID; 3506 | ///前置编号 3507 | TThostFtdcFrontIDType FrontID; 3508 | ///会话编号 3509 | TThostFtdcSessionIDType SessionID; 3510 | ///交易所代码 3511 | TThostFtdcExchangeIDType ExchangeID; 3512 | ///报单编号 3513 | TThostFtdcOrderSysIDType OrderSysID; 3514 | ///操作标志 3515 | TThostFtdcActionFlagType ActionFlag; 3516 | ///价格 3517 | TThostFtdcPriceType LimitPrice; 3518 | ///数量变化 3519 | TThostFtdcVolumeType VolumeChange; 3520 | ///操作日期 3521 | TThostFtdcDateType ActionDate; 3522 | ///操作时间 3523 | TThostFtdcTimeType ActionTime; 3524 | ///交易所交易员代码 3525 | TThostFtdcTraderIDType TraderID; 3526 | ///安装编号 3527 | TThostFtdcInstallIDType InstallID; 3528 | ///本地报单编号 3529 | TThostFtdcOrderLocalIDType OrderLocalID; 3530 | ///操作本地编号 3531 | TThostFtdcOrderLocalIDType ActionLocalID; 3532 | ///会员代码 3533 | TThostFtdcParticipantIDType ParticipantID; 3534 | ///客户代码 3535 | TThostFtdcClientIDType ClientID; 3536 | ///业务单元 3537 | TThostFtdcBusinessUnitType BusinessUnit; 3538 | ///报单操作状态 3539 | TThostFtdcOrderActionStatusType OrderActionStatus; 3540 | ///用户代码 3541 | TThostFtdcUserIDType UserID; 3542 | ///状态信息 3543 | TThostFtdcErrorMsgType StatusMsg; 3544 | ///合约代码 3545 | TThostFtdcInstrumentIDType InstrumentID; 3546 | ///错误代码 3547 | TThostFtdcErrorIDType ErrorID; 3548 | ///错误信息 3549 | TThostFtdcErrorMsgType ErrorMsg; 3550 | }; 3551 | 3552 | ///查询交易所状态 3553 | struct CThostFtdcQryExchangeSequenceField 3554 | { 3555 | ///交易所代码 3556 | TThostFtdcExchangeIDType ExchangeID; 3557 | }; 3558 | 3559 | ///交易所状态 3560 | struct CThostFtdcExchangeSequenceField 3561 | { 3562 | ///交易所代码 3563 | TThostFtdcExchangeIDType ExchangeID; 3564 | ///序号 3565 | TThostFtdcSequenceNoType SequenceNo; 3566 | ///合约交易状态 3567 | TThostFtdcInstrumentStatusType MarketStatus; 3568 | }; 3569 | 3570 | ///根据价格查询最大报单数量 3571 | struct CThostFtdcQueryMaxOrderVolumeWithPriceField 3572 | { 3573 | ///经纪公司代码 3574 | TThostFtdcBrokerIDType BrokerID; 3575 | ///投资者代码 3576 | TThostFtdcInvestorIDType InvestorID; 3577 | ///合约代码 3578 | TThostFtdcInstrumentIDType InstrumentID; 3579 | ///买卖方向 3580 | TThostFtdcDirectionType Direction; 3581 | ///开平标志 3582 | TThostFtdcOffsetFlagType OffsetFlag; 3583 | ///投机套保标志 3584 | TThostFtdcHedgeFlagType HedgeFlag; 3585 | ///最大允许报单数量 3586 | TThostFtdcVolumeType MaxVolume; 3587 | ///报单价格 3588 | TThostFtdcPriceType Price; 3589 | }; 3590 | 3591 | ///查询经纪公司交易参数 3592 | struct CThostFtdcQryBrokerTradingParamsField 3593 | { 3594 | ///经纪公司代码 3595 | TThostFtdcBrokerIDType BrokerID; 3596 | ///投资者代码 3597 | TThostFtdcInvestorIDType InvestorID; 3598 | }; 3599 | 3600 | ///经纪公司交易参数 3601 | struct CThostFtdcBrokerTradingParamsField 3602 | { 3603 | ///经纪公司代码 3604 | TThostFtdcBrokerIDType BrokerID; 3605 | ///投资者代码 3606 | TThostFtdcInvestorIDType InvestorID; 3607 | ///保证金价格类型 3608 | TThostFtdcMarginPriceTypeType MarginPriceType; 3609 | ///盈亏算法 3610 | TThostFtdcAlgorithmType Algorithm; 3611 | ///可用是否包含平仓盈利 3612 | TThostFtdcIncludeCloseProfitType AvailIncludeCloseProfit; 3613 | }; 3614 | 3615 | ///查询经纪公司交易算法 3616 | struct CThostFtdcQryBrokerTradingAlgosField 3617 | { 3618 | ///经纪公司代码 3619 | TThostFtdcBrokerIDType BrokerID; 3620 | ///交易所代码 3621 | TThostFtdcExchangeIDType ExchangeID; 3622 | ///合约代码 3623 | TThostFtdcInstrumentIDType InstrumentID; 3624 | }; 3625 | 3626 | ///经纪公司交易算法 3627 | struct CThostFtdcBrokerTradingAlgosField 3628 | { 3629 | ///经纪公司代码 3630 | TThostFtdcBrokerIDType BrokerID; 3631 | ///交易所代码 3632 | TThostFtdcExchangeIDType ExchangeID; 3633 | ///合约代码 3634 | TThostFtdcInstrumentIDType InstrumentID; 3635 | ///持仓处理算法编号 3636 | TThostFtdcHandlePositionAlgoIDType HandlePositionAlgoID; 3637 | ///寻找保证金率算法编号 3638 | TThostFtdcFindMarginRateAlgoIDType FindMarginRateAlgoID; 3639 | ///资金处理算法编号 3640 | TThostFtdcHandleTradingAccountAlgoIDType HandleTradingAccountAlgoID; 3641 | }; 3642 | 3643 | ///查询经纪公司资金 3644 | struct CThostFtdcQueryBrokerDepositField 3645 | { 3646 | ///经纪公司代码 3647 | TThostFtdcBrokerIDType BrokerID; 3648 | ///交易所代码 3649 | TThostFtdcExchangeIDType ExchangeID; 3650 | }; 3651 | 3652 | ///经纪公司资金 3653 | struct CThostFtdcBrokerDepositField 3654 | { 3655 | ///交易日期 3656 | TThostFtdcTradeDateType TradingDay; 3657 | ///经纪公司代码 3658 | TThostFtdcBrokerIDType BrokerID; 3659 | ///会员代码 3660 | TThostFtdcParticipantIDType ParticipantID; 3661 | ///交易所代码 3662 | TThostFtdcExchangeIDType ExchangeID; 3663 | ///上次结算准备金 3664 | TThostFtdcMoneyType PreBalance; 3665 | ///当前保证金总额 3666 | TThostFtdcMoneyType CurrMargin; 3667 | ///平仓盈亏 3668 | TThostFtdcMoneyType CloseProfit; 3669 | ///期货结算准备金 3670 | TThostFtdcMoneyType Balance; 3671 | ///入金金额 3672 | TThostFtdcMoneyType Deposit; 3673 | ///出金金额 3674 | TThostFtdcMoneyType Withdraw; 3675 | ///可提资金 3676 | TThostFtdcMoneyType Available; 3677 | ///基本准备金 3678 | TThostFtdcMoneyType Reserve; 3679 | ///冻结的保证金 3680 | TThostFtdcMoneyType FrozenMargin; 3681 | }; 3682 | 3683 | ///查询保证金监管系统经纪公司密钥 3684 | struct CThostFtdcQryCFMMCBrokerKeyField 3685 | { 3686 | ///经纪公司代码 3687 | TThostFtdcBrokerIDType BrokerID; 3688 | }; 3689 | 3690 | ///保证金监管系统经纪公司密钥 3691 | struct CThostFtdcCFMMCBrokerKeyField 3692 | { 3693 | ///经纪公司代码 3694 | TThostFtdcBrokerIDType BrokerID; 3695 | ///经纪公司统一编码 3696 | TThostFtdcParticipantIDType ParticipantID; 3697 | ///密钥生成日期 3698 | TThostFtdcDateType CreateDate; 3699 | ///密钥生成时间 3700 | TThostFtdcTimeType CreateTime; 3701 | ///密钥编号 3702 | TThostFtdcSequenceNoType KeyID; 3703 | ///动态密钥 3704 | TThostFtdcCFMMCKeyType CurrentKey; 3705 | ///动态密钥类型 3706 | TThostFtdcCFMMCKeyKindType KeyKind; 3707 | }; 3708 | 3709 | ///保证金监管系统经纪公司资金账户密钥 3710 | struct CThostFtdcCFMMCTradingAccountKeyField 3711 | { 3712 | ///经纪公司代码 3713 | TThostFtdcBrokerIDType BrokerID; 3714 | ///经纪公司统一编码 3715 | TThostFtdcParticipantIDType ParticipantID; 3716 | ///投资者帐号 3717 | TThostFtdcAccountIDType AccountID; 3718 | ///密钥编号 3719 | TThostFtdcSequenceNoType KeyID; 3720 | ///动态密钥 3721 | TThostFtdcCFMMCKeyType CurrentKey; 3722 | }; 3723 | 3724 | ///请求查询保证金监管系统经纪公司资金账户密钥 3725 | struct CThostFtdcQryCFMMCTradingAccountKeyField 3726 | { 3727 | ///经纪公司代码 3728 | TThostFtdcBrokerIDType BrokerID; 3729 | ///投资者代码 3730 | TThostFtdcInvestorIDType InvestorID; 3731 | }; 3732 | 3733 | ///用户动态令牌参数 3734 | struct CThostFtdcBrokerUserOTPParamField 3735 | { 3736 | ///经纪公司代码 3737 | TThostFtdcBrokerIDType BrokerID; 3738 | ///用户代码 3739 | TThostFtdcUserIDType UserID; 3740 | ///动态令牌提供商 3741 | TThostFtdcOTPVendorsIDType OTPVendorsID; 3742 | ///动态令牌序列号 3743 | TThostFtdcSerialNumberType SerialNumber; 3744 | ///令牌密钥 3745 | TThostFtdcAuthKeyType AuthKey; 3746 | ///漂移值 3747 | TThostFtdcLastDriftType LastDrift; 3748 | ///成功值 3749 | TThostFtdcLastSuccessType LastSuccess; 3750 | ///动态令牌类型 3751 | TThostFtdcOTPTypeType OTPType; 3752 | }; 3753 | 3754 | ///手工同步用户动态令牌 3755 | struct CThostFtdcManualSyncBrokerUserOTPField 3756 | { 3757 | ///经纪公司代码 3758 | TThostFtdcBrokerIDType BrokerID; 3759 | ///用户代码 3760 | TThostFtdcUserIDType UserID; 3761 | ///动态令牌类型 3762 | TThostFtdcOTPTypeType OTPType; 3763 | ///第一个动态密码 3764 | TThostFtdcPasswordType FirstOTP; 3765 | ///第二个动态密码 3766 | TThostFtdcPasswordType SecondOTP; 3767 | }; 3768 | 3769 | ///投资者手续费率模板 3770 | struct CThostFtdcCommRateModelField 3771 | { 3772 | ///经纪公司代码 3773 | TThostFtdcBrokerIDType BrokerID; 3774 | ///手续费率模板代码 3775 | TThostFtdcInvestorIDType CommModelID; 3776 | ///模板名称 3777 | TThostFtdcCommModelNameType CommModelName; 3778 | }; 3779 | 3780 | ///请求查询投资者手续费率模板 3781 | struct CThostFtdcQryCommRateModelField 3782 | { 3783 | ///经纪公司代码 3784 | TThostFtdcBrokerIDType BrokerID; 3785 | ///手续费率模板代码 3786 | TThostFtdcInvestorIDType CommModelID; 3787 | }; 3788 | 3789 | ///投资者保证金率模板 3790 | struct CThostFtdcMarginModelField 3791 | { 3792 | ///经纪公司代码 3793 | TThostFtdcBrokerIDType BrokerID; 3794 | ///保证金率模板代码 3795 | TThostFtdcInvestorIDType MarginModelID; 3796 | ///模板名称 3797 | TThostFtdcCommModelNameType MarginModelName; 3798 | }; 3799 | 3800 | ///请求查询投资者保证金率模板 3801 | struct CThostFtdcQryMarginModelField 3802 | { 3803 | ///经纪公司代码 3804 | TThostFtdcBrokerIDType BrokerID; 3805 | ///保证金率模板代码 3806 | TThostFtdcInvestorIDType MarginModelID; 3807 | }; 3808 | 3809 | ///仓单折抵信息 3810 | struct CThostFtdcEWarrantOffsetField 3811 | { 3812 | ///交易日期 3813 | TThostFtdcTradeDateType TradingDay; 3814 | ///经纪公司代码 3815 | TThostFtdcBrokerIDType BrokerID; 3816 | ///投资者代码 3817 | TThostFtdcInvestorIDType InvestorID; 3818 | ///交易所代码 3819 | TThostFtdcExchangeIDType ExchangeID; 3820 | ///合约代码 3821 | TThostFtdcInstrumentIDType InstrumentID; 3822 | ///买卖方向 3823 | TThostFtdcDirectionType Direction; 3824 | ///投机套保标志 3825 | TThostFtdcHedgeFlagType HedgeFlag; 3826 | ///数量 3827 | TThostFtdcVolumeType Volume; 3828 | }; 3829 | 3830 | ///查询仓单折抵信息 3831 | struct CThostFtdcQryEWarrantOffsetField 3832 | { 3833 | ///经纪公司代码 3834 | TThostFtdcBrokerIDType BrokerID; 3835 | ///投资者代码 3836 | TThostFtdcInvestorIDType InvestorID; 3837 | ///交易所代码 3838 | TThostFtdcExchangeIDType ExchangeID; 3839 | ///合约代码 3840 | TThostFtdcInstrumentIDType InstrumentID; 3841 | }; 3842 | 3843 | ///转帐开户请求 3844 | struct CThostFtdcReqOpenAccountField 3845 | { 3846 | ///业务功能码 3847 | TThostFtdcTradeCodeType TradeCode; 3848 | ///银行代码 3849 | TThostFtdcBankIDType BankID; 3850 | ///银行分支机构代码 3851 | TThostFtdcBankBrchIDType BankBranchID; 3852 | ///期商代码 3853 | TThostFtdcBrokerIDType BrokerID; 3854 | ///期商分支机构代码 3855 | TThostFtdcFutureBranchIDType BrokerBranchID; 3856 | ///交易日期 3857 | TThostFtdcTradeDateType TradeDate; 3858 | ///交易时间 3859 | TThostFtdcTradeTimeType TradeTime; 3860 | ///银行流水号 3861 | TThostFtdcBankSerialType BankSerial; 3862 | ///交易系统日期 3863 | TThostFtdcTradeDateType TradingDay; 3864 | ///银期平台消息流水号 3865 | TThostFtdcSerialType PlateSerial; 3866 | ///最后分片标志 3867 | TThostFtdcLastFragmentType LastFragment; 3868 | ///会话号 3869 | TThostFtdcSessionIDType SessionID; 3870 | ///客户姓名 3871 | TThostFtdcIndividualNameType CustomerName; 3872 | ///证件类型 3873 | TThostFtdcIdCardTypeType IdCardType; 3874 | ///证件号码 3875 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 3876 | ///性别 3877 | TThostFtdcGenderType Gender; 3878 | ///国家代码 3879 | TThostFtdcCountryCodeType CountryCode; 3880 | ///客户类型 3881 | TThostFtdcCustTypeType CustType; 3882 | ///地址 3883 | TThostFtdcAddressType Address; 3884 | ///邮编 3885 | TThostFtdcZipCodeType ZipCode; 3886 | ///电话号码 3887 | TThostFtdcTelephoneType Telephone; 3888 | ///手机 3889 | TThostFtdcMobilePhoneType MobilePhone; 3890 | ///传真 3891 | TThostFtdcFaxType Fax; 3892 | ///电子邮件 3893 | TThostFtdcEMailType EMail; 3894 | ///资金账户状态 3895 | TThostFtdcMoneyAccountStatusType MoneyAccountStatus; 3896 | ///银行帐号 3897 | TThostFtdcBankAccountType BankAccount; 3898 | ///银行密码 3899 | TThostFtdcPasswordType BankPassWord; 3900 | ///投资者帐号 3901 | TThostFtdcAccountIDType AccountID; 3902 | ///期货密码 3903 | TThostFtdcPasswordType Password; 3904 | ///安装编号 3905 | TThostFtdcInstallIDType InstallID; 3906 | ///验证客户证件号码标志 3907 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 3908 | ///币种代码 3909 | TThostFtdcCurrencyIDType CurrencyID; 3910 | ///汇钞标志 3911 | TThostFtdcCashExchangeCodeType CashExchangeCode; 3912 | ///摘要 3913 | TThostFtdcDigestType Digest; 3914 | ///银行帐号类型 3915 | TThostFtdcBankAccTypeType BankAccType; 3916 | ///渠道标志 3917 | TThostFtdcDeviceIDType DeviceID; 3918 | ///期货单位帐号类型 3919 | TThostFtdcBankAccTypeType BankSecuAccType; 3920 | ///期货公司银行编码 3921 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 3922 | ///期货单位帐号 3923 | TThostFtdcBankAccountType BankSecuAcc; 3924 | ///银行密码标志 3925 | TThostFtdcPwdFlagType BankPwdFlag; 3926 | ///期货资金密码核对标志 3927 | TThostFtdcPwdFlagType SecuPwdFlag; 3928 | ///交易柜员 3929 | TThostFtdcOperNoType OperNo; 3930 | ///交易ID 3931 | TThostFtdcTIDType TID; 3932 | ///用户标识 3933 | TThostFtdcUserIDType UserID; 3934 | }; 3935 | 3936 | ///转帐销户请求 3937 | struct CThostFtdcReqCancelAccountField 3938 | { 3939 | ///业务功能码 3940 | TThostFtdcTradeCodeType TradeCode; 3941 | ///银行代码 3942 | TThostFtdcBankIDType BankID; 3943 | ///银行分支机构代码 3944 | TThostFtdcBankBrchIDType BankBranchID; 3945 | ///期商代码 3946 | TThostFtdcBrokerIDType BrokerID; 3947 | ///期商分支机构代码 3948 | TThostFtdcFutureBranchIDType BrokerBranchID; 3949 | ///交易日期 3950 | TThostFtdcTradeDateType TradeDate; 3951 | ///交易时间 3952 | TThostFtdcTradeTimeType TradeTime; 3953 | ///银行流水号 3954 | TThostFtdcBankSerialType BankSerial; 3955 | ///交易系统日期 3956 | TThostFtdcTradeDateType TradingDay; 3957 | ///银期平台消息流水号 3958 | TThostFtdcSerialType PlateSerial; 3959 | ///最后分片标志 3960 | TThostFtdcLastFragmentType LastFragment; 3961 | ///会话号 3962 | TThostFtdcSessionIDType SessionID; 3963 | ///客户姓名 3964 | TThostFtdcIndividualNameType CustomerName; 3965 | ///证件类型 3966 | TThostFtdcIdCardTypeType IdCardType; 3967 | ///证件号码 3968 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 3969 | ///性别 3970 | TThostFtdcGenderType Gender; 3971 | ///国家代码 3972 | TThostFtdcCountryCodeType CountryCode; 3973 | ///客户类型 3974 | TThostFtdcCustTypeType CustType; 3975 | ///地址 3976 | TThostFtdcAddressType Address; 3977 | ///邮编 3978 | TThostFtdcZipCodeType ZipCode; 3979 | ///电话号码 3980 | TThostFtdcTelephoneType Telephone; 3981 | ///手机 3982 | TThostFtdcMobilePhoneType MobilePhone; 3983 | ///传真 3984 | TThostFtdcFaxType Fax; 3985 | ///电子邮件 3986 | TThostFtdcEMailType EMail; 3987 | ///资金账户状态 3988 | TThostFtdcMoneyAccountStatusType MoneyAccountStatus; 3989 | ///银行帐号 3990 | TThostFtdcBankAccountType BankAccount; 3991 | ///银行密码 3992 | TThostFtdcPasswordType BankPassWord; 3993 | ///投资者帐号 3994 | TThostFtdcAccountIDType AccountID; 3995 | ///期货密码 3996 | TThostFtdcPasswordType Password; 3997 | ///安装编号 3998 | TThostFtdcInstallIDType InstallID; 3999 | ///验证客户证件号码标志 4000 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 4001 | ///币种代码 4002 | TThostFtdcCurrencyIDType CurrencyID; 4003 | ///汇钞标志 4004 | TThostFtdcCashExchangeCodeType CashExchangeCode; 4005 | ///摘要 4006 | TThostFtdcDigestType Digest; 4007 | ///银行帐号类型 4008 | TThostFtdcBankAccTypeType BankAccType; 4009 | ///渠道标志 4010 | TThostFtdcDeviceIDType DeviceID; 4011 | ///期货单位帐号类型 4012 | TThostFtdcBankAccTypeType BankSecuAccType; 4013 | ///期货公司银行编码 4014 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4015 | ///期货单位帐号 4016 | TThostFtdcBankAccountType BankSecuAcc; 4017 | ///银行密码标志 4018 | TThostFtdcPwdFlagType BankPwdFlag; 4019 | ///期货资金密码核对标志 4020 | TThostFtdcPwdFlagType SecuPwdFlag; 4021 | ///交易柜员 4022 | TThostFtdcOperNoType OperNo; 4023 | ///交易ID 4024 | TThostFtdcTIDType TID; 4025 | ///用户标识 4026 | TThostFtdcUserIDType UserID; 4027 | }; 4028 | 4029 | ///变更银行账户请求 4030 | struct CThostFtdcReqChangeAccountField 4031 | { 4032 | ///业务功能码 4033 | TThostFtdcTradeCodeType TradeCode; 4034 | ///银行代码 4035 | TThostFtdcBankIDType BankID; 4036 | ///银行分支机构代码 4037 | TThostFtdcBankBrchIDType BankBranchID; 4038 | ///期商代码 4039 | TThostFtdcBrokerIDType BrokerID; 4040 | ///期商分支机构代码 4041 | TThostFtdcFutureBranchIDType BrokerBranchID; 4042 | ///交易日期 4043 | TThostFtdcTradeDateType TradeDate; 4044 | ///交易时间 4045 | TThostFtdcTradeTimeType TradeTime; 4046 | ///银行流水号 4047 | TThostFtdcBankSerialType BankSerial; 4048 | ///交易系统日期 4049 | TThostFtdcTradeDateType TradingDay; 4050 | ///银期平台消息流水号 4051 | TThostFtdcSerialType PlateSerial; 4052 | ///最后分片标志 4053 | TThostFtdcLastFragmentType LastFragment; 4054 | ///会话号 4055 | TThostFtdcSessionIDType SessionID; 4056 | ///客户姓名 4057 | TThostFtdcIndividualNameType CustomerName; 4058 | ///证件类型 4059 | TThostFtdcIdCardTypeType IdCardType; 4060 | ///证件号码 4061 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 4062 | ///性别 4063 | TThostFtdcGenderType Gender; 4064 | ///国家代码 4065 | TThostFtdcCountryCodeType CountryCode; 4066 | ///客户类型 4067 | TThostFtdcCustTypeType CustType; 4068 | ///地址 4069 | TThostFtdcAddressType Address; 4070 | ///邮编 4071 | TThostFtdcZipCodeType ZipCode; 4072 | ///电话号码 4073 | TThostFtdcTelephoneType Telephone; 4074 | ///手机 4075 | TThostFtdcMobilePhoneType MobilePhone; 4076 | ///传真 4077 | TThostFtdcFaxType Fax; 4078 | ///电子邮件 4079 | TThostFtdcEMailType EMail; 4080 | ///资金账户状态 4081 | TThostFtdcMoneyAccountStatusType MoneyAccountStatus; 4082 | ///银行帐号 4083 | TThostFtdcBankAccountType BankAccount; 4084 | ///银行密码 4085 | TThostFtdcPasswordType BankPassWord; 4086 | ///新银行帐号 4087 | TThostFtdcBankAccountType NewBankAccount; 4088 | ///新银行密码 4089 | TThostFtdcPasswordType NewBankPassWord; 4090 | ///投资者帐号 4091 | TThostFtdcAccountIDType AccountID; 4092 | ///期货密码 4093 | TThostFtdcPasswordType Password; 4094 | ///银行帐号类型 4095 | TThostFtdcBankAccTypeType BankAccType; 4096 | ///安装编号 4097 | TThostFtdcInstallIDType InstallID; 4098 | ///验证客户证件号码标志 4099 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 4100 | ///币种代码 4101 | TThostFtdcCurrencyIDType CurrencyID; 4102 | ///期货公司银行编码 4103 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4104 | ///银行密码标志 4105 | TThostFtdcPwdFlagType BankPwdFlag; 4106 | ///期货资金密码核对标志 4107 | TThostFtdcPwdFlagType SecuPwdFlag; 4108 | ///交易ID 4109 | TThostFtdcTIDType TID; 4110 | ///摘要 4111 | TThostFtdcDigestType Digest; 4112 | }; 4113 | 4114 | ///转账请求 4115 | struct CThostFtdcReqTransferField 4116 | { 4117 | ///业务功能码 4118 | TThostFtdcTradeCodeType TradeCode; 4119 | ///银行代码 4120 | TThostFtdcBankIDType BankID; 4121 | ///银行分支机构代码 4122 | TThostFtdcBankBrchIDType BankBranchID; 4123 | ///期商代码 4124 | TThostFtdcBrokerIDType BrokerID; 4125 | ///期商分支机构代码 4126 | TThostFtdcFutureBranchIDType BrokerBranchID; 4127 | ///交易日期 4128 | TThostFtdcTradeDateType TradeDate; 4129 | ///交易时间 4130 | TThostFtdcTradeTimeType TradeTime; 4131 | ///银行流水号 4132 | TThostFtdcBankSerialType BankSerial; 4133 | ///交易系统日期 4134 | TThostFtdcTradeDateType TradingDay; 4135 | ///银期平台消息流水号 4136 | TThostFtdcSerialType PlateSerial; 4137 | ///最后分片标志 4138 | TThostFtdcLastFragmentType LastFragment; 4139 | ///会话号 4140 | TThostFtdcSessionIDType SessionID; 4141 | ///客户姓名 4142 | TThostFtdcIndividualNameType CustomerName; 4143 | ///证件类型 4144 | TThostFtdcIdCardTypeType IdCardType; 4145 | ///证件号码 4146 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 4147 | ///客户类型 4148 | TThostFtdcCustTypeType CustType; 4149 | ///银行帐号 4150 | TThostFtdcBankAccountType BankAccount; 4151 | ///银行密码 4152 | TThostFtdcPasswordType BankPassWord; 4153 | ///投资者帐号 4154 | TThostFtdcAccountIDType AccountID; 4155 | ///期货密码 4156 | TThostFtdcPasswordType Password; 4157 | ///安装编号 4158 | TThostFtdcInstallIDType InstallID; 4159 | ///期货公司流水号 4160 | TThostFtdcFutureSerialType FutureSerial; 4161 | ///用户标识 4162 | TThostFtdcUserIDType UserID; 4163 | ///验证客户证件号码标志 4164 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 4165 | ///币种代码 4166 | TThostFtdcCurrencyIDType CurrencyID; 4167 | ///转帐金额 4168 | TThostFtdcTradeAmountType TradeAmount; 4169 | ///期货可取金额 4170 | TThostFtdcTradeAmountType FutureFetchAmount; 4171 | ///费用支付标志 4172 | TThostFtdcFeePayFlagType FeePayFlag; 4173 | ///应收客户费用 4174 | TThostFtdcCustFeeType CustFee; 4175 | ///应收期货公司费用 4176 | TThostFtdcFutureFeeType BrokerFee; 4177 | ///发送方给接收方的消息 4178 | TThostFtdcAddInfoType Message; 4179 | ///摘要 4180 | TThostFtdcDigestType Digest; 4181 | ///银行帐号类型 4182 | TThostFtdcBankAccTypeType BankAccType; 4183 | ///渠道标志 4184 | TThostFtdcDeviceIDType DeviceID; 4185 | ///期货单位帐号类型 4186 | TThostFtdcBankAccTypeType BankSecuAccType; 4187 | ///期货公司银行编码 4188 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4189 | ///期货单位帐号 4190 | TThostFtdcBankAccountType BankSecuAcc; 4191 | ///银行密码标志 4192 | TThostFtdcPwdFlagType BankPwdFlag; 4193 | ///期货资金密码核对标志 4194 | TThostFtdcPwdFlagType SecuPwdFlag; 4195 | ///交易柜员 4196 | TThostFtdcOperNoType OperNo; 4197 | ///请求编号 4198 | TThostFtdcRequestIDType RequestID; 4199 | ///交易ID 4200 | TThostFtdcTIDType TID; 4201 | ///转账交易状态 4202 | TThostFtdcTransferStatusType TransferStatus; 4203 | }; 4204 | 4205 | ///银行发起银行资金转期货响应 4206 | struct CThostFtdcRspTransferField 4207 | { 4208 | ///业务功能码 4209 | TThostFtdcTradeCodeType TradeCode; 4210 | ///银行代码 4211 | TThostFtdcBankIDType BankID; 4212 | ///银行分支机构代码 4213 | TThostFtdcBankBrchIDType BankBranchID; 4214 | ///期商代码 4215 | TThostFtdcBrokerIDType BrokerID; 4216 | ///期商分支机构代码 4217 | TThostFtdcFutureBranchIDType BrokerBranchID; 4218 | ///交易日期 4219 | TThostFtdcTradeDateType TradeDate; 4220 | ///交易时间 4221 | TThostFtdcTradeTimeType TradeTime; 4222 | ///银行流水号 4223 | TThostFtdcBankSerialType BankSerial; 4224 | ///交易系统日期 4225 | TThostFtdcTradeDateType TradingDay; 4226 | ///银期平台消息流水号 4227 | TThostFtdcSerialType PlateSerial; 4228 | ///最后分片标志 4229 | TThostFtdcLastFragmentType LastFragment; 4230 | ///会话号 4231 | TThostFtdcSessionIDType SessionID; 4232 | ///客户姓名 4233 | TThostFtdcIndividualNameType CustomerName; 4234 | ///证件类型 4235 | TThostFtdcIdCardTypeType IdCardType; 4236 | ///证件号码 4237 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 4238 | ///客户类型 4239 | TThostFtdcCustTypeType CustType; 4240 | ///银行帐号 4241 | TThostFtdcBankAccountType BankAccount; 4242 | ///银行密码 4243 | TThostFtdcPasswordType BankPassWord; 4244 | ///投资者帐号 4245 | TThostFtdcAccountIDType AccountID; 4246 | ///期货密码 4247 | TThostFtdcPasswordType Password; 4248 | ///安装编号 4249 | TThostFtdcInstallIDType InstallID; 4250 | ///期货公司流水号 4251 | TThostFtdcFutureSerialType FutureSerial; 4252 | ///用户标识 4253 | TThostFtdcUserIDType UserID; 4254 | ///验证客户证件号码标志 4255 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 4256 | ///币种代码 4257 | TThostFtdcCurrencyIDType CurrencyID; 4258 | ///转帐金额 4259 | TThostFtdcTradeAmountType TradeAmount; 4260 | ///期货可取金额 4261 | TThostFtdcTradeAmountType FutureFetchAmount; 4262 | ///费用支付标志 4263 | TThostFtdcFeePayFlagType FeePayFlag; 4264 | ///应收客户费用 4265 | TThostFtdcCustFeeType CustFee; 4266 | ///应收期货公司费用 4267 | TThostFtdcFutureFeeType BrokerFee; 4268 | ///发送方给接收方的消息 4269 | TThostFtdcAddInfoType Message; 4270 | ///摘要 4271 | TThostFtdcDigestType Digest; 4272 | ///银行帐号类型 4273 | TThostFtdcBankAccTypeType BankAccType; 4274 | ///渠道标志 4275 | TThostFtdcDeviceIDType DeviceID; 4276 | ///期货单位帐号类型 4277 | TThostFtdcBankAccTypeType BankSecuAccType; 4278 | ///期货公司银行编码 4279 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4280 | ///期货单位帐号 4281 | TThostFtdcBankAccountType BankSecuAcc; 4282 | ///银行密码标志 4283 | TThostFtdcPwdFlagType BankPwdFlag; 4284 | ///期货资金密码核对标志 4285 | TThostFtdcPwdFlagType SecuPwdFlag; 4286 | ///交易柜员 4287 | TThostFtdcOperNoType OperNo; 4288 | ///请求编号 4289 | TThostFtdcRequestIDType RequestID; 4290 | ///交易ID 4291 | TThostFtdcTIDType TID; 4292 | ///转账交易状态 4293 | TThostFtdcTransferStatusType TransferStatus; 4294 | ///错误代码 4295 | TThostFtdcErrorIDType ErrorID; 4296 | ///错误信息 4297 | TThostFtdcErrorMsgType ErrorMsg; 4298 | }; 4299 | 4300 | ///冲正请求 4301 | struct CThostFtdcReqRepealField 4302 | { 4303 | ///冲正时间间隔 4304 | TThostFtdcRepealTimeIntervalType RepealTimeInterval; 4305 | ///已经冲正次数 4306 | TThostFtdcRepealedTimesType RepealedTimes; 4307 | ///银行冲正标志 4308 | TThostFtdcBankRepealFlagType BankRepealFlag; 4309 | ///期商冲正标志 4310 | TThostFtdcBrokerRepealFlagType BrokerRepealFlag; 4311 | ///被冲正平台流水号 4312 | TThostFtdcPlateSerialType PlateRepealSerial; 4313 | ///被冲正银行流水号 4314 | TThostFtdcBankSerialType BankRepealSerial; 4315 | ///被冲正期货流水号 4316 | TThostFtdcFutureSerialType FutureRepealSerial; 4317 | ///业务功能码 4318 | TThostFtdcTradeCodeType TradeCode; 4319 | ///银行代码 4320 | TThostFtdcBankIDType BankID; 4321 | ///银行分支机构代码 4322 | TThostFtdcBankBrchIDType BankBranchID; 4323 | ///期商代码 4324 | TThostFtdcBrokerIDType BrokerID; 4325 | ///期商分支机构代码 4326 | TThostFtdcFutureBranchIDType BrokerBranchID; 4327 | ///交易日期 4328 | TThostFtdcTradeDateType TradeDate; 4329 | ///交易时间 4330 | TThostFtdcTradeTimeType TradeTime; 4331 | ///银行流水号 4332 | TThostFtdcBankSerialType BankSerial; 4333 | ///交易系统日期 4334 | TThostFtdcTradeDateType TradingDay; 4335 | ///银期平台消息流水号 4336 | TThostFtdcSerialType PlateSerial; 4337 | ///最后分片标志 4338 | TThostFtdcLastFragmentType LastFragment; 4339 | ///会话号 4340 | TThostFtdcSessionIDType SessionID; 4341 | ///客户姓名 4342 | TThostFtdcIndividualNameType CustomerName; 4343 | ///证件类型 4344 | TThostFtdcIdCardTypeType IdCardType; 4345 | ///证件号码 4346 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 4347 | ///客户类型 4348 | TThostFtdcCustTypeType CustType; 4349 | ///银行帐号 4350 | TThostFtdcBankAccountType BankAccount; 4351 | ///银行密码 4352 | TThostFtdcPasswordType BankPassWord; 4353 | ///投资者帐号 4354 | TThostFtdcAccountIDType AccountID; 4355 | ///期货密码 4356 | TThostFtdcPasswordType Password; 4357 | ///安装编号 4358 | TThostFtdcInstallIDType InstallID; 4359 | ///期货公司流水号 4360 | TThostFtdcFutureSerialType FutureSerial; 4361 | ///用户标识 4362 | TThostFtdcUserIDType UserID; 4363 | ///验证客户证件号码标志 4364 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 4365 | ///币种代码 4366 | TThostFtdcCurrencyIDType CurrencyID; 4367 | ///转帐金额 4368 | TThostFtdcTradeAmountType TradeAmount; 4369 | ///期货可取金额 4370 | TThostFtdcTradeAmountType FutureFetchAmount; 4371 | ///费用支付标志 4372 | TThostFtdcFeePayFlagType FeePayFlag; 4373 | ///应收客户费用 4374 | TThostFtdcCustFeeType CustFee; 4375 | ///应收期货公司费用 4376 | TThostFtdcFutureFeeType BrokerFee; 4377 | ///发送方给接收方的消息 4378 | TThostFtdcAddInfoType Message; 4379 | ///摘要 4380 | TThostFtdcDigestType Digest; 4381 | ///银行帐号类型 4382 | TThostFtdcBankAccTypeType BankAccType; 4383 | ///渠道标志 4384 | TThostFtdcDeviceIDType DeviceID; 4385 | ///期货单位帐号类型 4386 | TThostFtdcBankAccTypeType BankSecuAccType; 4387 | ///期货公司银行编码 4388 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4389 | ///期货单位帐号 4390 | TThostFtdcBankAccountType BankSecuAcc; 4391 | ///银行密码标志 4392 | TThostFtdcPwdFlagType BankPwdFlag; 4393 | ///期货资金密码核对标志 4394 | TThostFtdcPwdFlagType SecuPwdFlag; 4395 | ///交易柜员 4396 | TThostFtdcOperNoType OperNo; 4397 | ///请求编号 4398 | TThostFtdcRequestIDType RequestID; 4399 | ///交易ID 4400 | TThostFtdcTIDType TID; 4401 | ///转账交易状态 4402 | TThostFtdcTransferStatusType TransferStatus; 4403 | }; 4404 | 4405 | ///冲正响应 4406 | struct CThostFtdcRspRepealField 4407 | { 4408 | ///冲正时间间隔 4409 | TThostFtdcRepealTimeIntervalType RepealTimeInterval; 4410 | ///已经冲正次数 4411 | TThostFtdcRepealedTimesType RepealedTimes; 4412 | ///银行冲正标志 4413 | TThostFtdcBankRepealFlagType BankRepealFlag; 4414 | ///期商冲正标志 4415 | TThostFtdcBrokerRepealFlagType BrokerRepealFlag; 4416 | ///被冲正平台流水号 4417 | TThostFtdcPlateSerialType PlateRepealSerial; 4418 | ///被冲正银行流水号 4419 | TThostFtdcBankSerialType BankRepealSerial; 4420 | ///被冲正期货流水号 4421 | TThostFtdcFutureSerialType FutureRepealSerial; 4422 | ///业务功能码 4423 | TThostFtdcTradeCodeType TradeCode; 4424 | ///银行代码 4425 | TThostFtdcBankIDType BankID; 4426 | ///银行分支机构代码 4427 | TThostFtdcBankBrchIDType BankBranchID; 4428 | ///期商代码 4429 | TThostFtdcBrokerIDType BrokerID; 4430 | ///期商分支机构代码 4431 | TThostFtdcFutureBranchIDType BrokerBranchID; 4432 | ///交易日期 4433 | TThostFtdcTradeDateType TradeDate; 4434 | ///交易时间 4435 | TThostFtdcTradeTimeType TradeTime; 4436 | ///银行流水号 4437 | TThostFtdcBankSerialType BankSerial; 4438 | ///交易系统日期 4439 | TThostFtdcTradeDateType TradingDay; 4440 | ///银期平台消息流水号 4441 | TThostFtdcSerialType PlateSerial; 4442 | ///最后分片标志 4443 | TThostFtdcLastFragmentType LastFragment; 4444 | ///会话号 4445 | TThostFtdcSessionIDType SessionID; 4446 | ///客户姓名 4447 | TThostFtdcIndividualNameType CustomerName; 4448 | ///证件类型 4449 | TThostFtdcIdCardTypeType IdCardType; 4450 | ///证件号码 4451 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 4452 | ///客户类型 4453 | TThostFtdcCustTypeType CustType; 4454 | ///银行帐号 4455 | TThostFtdcBankAccountType BankAccount; 4456 | ///银行密码 4457 | TThostFtdcPasswordType BankPassWord; 4458 | ///投资者帐号 4459 | TThostFtdcAccountIDType AccountID; 4460 | ///期货密码 4461 | TThostFtdcPasswordType Password; 4462 | ///安装编号 4463 | TThostFtdcInstallIDType InstallID; 4464 | ///期货公司流水号 4465 | TThostFtdcFutureSerialType FutureSerial; 4466 | ///用户标识 4467 | TThostFtdcUserIDType UserID; 4468 | ///验证客户证件号码标志 4469 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 4470 | ///币种代码 4471 | TThostFtdcCurrencyIDType CurrencyID; 4472 | ///转帐金额 4473 | TThostFtdcTradeAmountType TradeAmount; 4474 | ///期货可取金额 4475 | TThostFtdcTradeAmountType FutureFetchAmount; 4476 | ///费用支付标志 4477 | TThostFtdcFeePayFlagType FeePayFlag; 4478 | ///应收客户费用 4479 | TThostFtdcCustFeeType CustFee; 4480 | ///应收期货公司费用 4481 | TThostFtdcFutureFeeType BrokerFee; 4482 | ///发送方给接收方的消息 4483 | TThostFtdcAddInfoType Message; 4484 | ///摘要 4485 | TThostFtdcDigestType Digest; 4486 | ///银行帐号类型 4487 | TThostFtdcBankAccTypeType BankAccType; 4488 | ///渠道标志 4489 | TThostFtdcDeviceIDType DeviceID; 4490 | ///期货单位帐号类型 4491 | TThostFtdcBankAccTypeType BankSecuAccType; 4492 | ///期货公司银行编码 4493 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4494 | ///期货单位帐号 4495 | TThostFtdcBankAccountType BankSecuAcc; 4496 | ///银行密码标志 4497 | TThostFtdcPwdFlagType BankPwdFlag; 4498 | ///期货资金密码核对标志 4499 | TThostFtdcPwdFlagType SecuPwdFlag; 4500 | ///交易柜员 4501 | TThostFtdcOperNoType OperNo; 4502 | ///请求编号 4503 | TThostFtdcRequestIDType RequestID; 4504 | ///交易ID 4505 | TThostFtdcTIDType TID; 4506 | ///转账交易状态 4507 | TThostFtdcTransferStatusType TransferStatus; 4508 | ///错误代码 4509 | TThostFtdcErrorIDType ErrorID; 4510 | ///错误信息 4511 | TThostFtdcErrorMsgType ErrorMsg; 4512 | }; 4513 | 4514 | ///查询账户信息请求 4515 | struct CThostFtdcReqQueryAccountField 4516 | { 4517 | ///业务功能码 4518 | TThostFtdcTradeCodeType TradeCode; 4519 | ///银行代码 4520 | TThostFtdcBankIDType BankID; 4521 | ///银行分支机构代码 4522 | TThostFtdcBankBrchIDType BankBranchID; 4523 | ///期商代码 4524 | TThostFtdcBrokerIDType BrokerID; 4525 | ///期商分支机构代码 4526 | TThostFtdcFutureBranchIDType BrokerBranchID; 4527 | ///交易日期 4528 | TThostFtdcTradeDateType TradeDate; 4529 | ///交易时间 4530 | TThostFtdcTradeTimeType TradeTime; 4531 | ///银行流水号 4532 | TThostFtdcBankSerialType BankSerial; 4533 | ///交易系统日期 4534 | TThostFtdcTradeDateType TradingDay; 4535 | ///银期平台消息流水号 4536 | TThostFtdcSerialType PlateSerial; 4537 | ///最后分片标志 4538 | TThostFtdcLastFragmentType LastFragment; 4539 | ///会话号 4540 | TThostFtdcSessionIDType SessionID; 4541 | ///客户姓名 4542 | TThostFtdcIndividualNameType CustomerName; 4543 | ///证件类型 4544 | TThostFtdcIdCardTypeType IdCardType; 4545 | ///证件号码 4546 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 4547 | ///客户类型 4548 | TThostFtdcCustTypeType CustType; 4549 | ///银行帐号 4550 | TThostFtdcBankAccountType BankAccount; 4551 | ///银行密码 4552 | TThostFtdcPasswordType BankPassWord; 4553 | ///投资者帐号 4554 | TThostFtdcAccountIDType AccountID; 4555 | ///期货密码 4556 | TThostFtdcPasswordType Password; 4557 | ///期货公司流水号 4558 | TThostFtdcFutureSerialType FutureSerial; 4559 | ///安装编号 4560 | TThostFtdcInstallIDType InstallID; 4561 | ///用户标识 4562 | TThostFtdcUserIDType UserID; 4563 | ///验证客户证件号码标志 4564 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 4565 | ///币种代码 4566 | TThostFtdcCurrencyIDType CurrencyID; 4567 | ///摘要 4568 | TThostFtdcDigestType Digest; 4569 | ///银行帐号类型 4570 | TThostFtdcBankAccTypeType BankAccType; 4571 | ///渠道标志 4572 | TThostFtdcDeviceIDType DeviceID; 4573 | ///期货单位帐号类型 4574 | TThostFtdcBankAccTypeType BankSecuAccType; 4575 | ///期货公司银行编码 4576 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4577 | ///期货单位帐号 4578 | TThostFtdcBankAccountType BankSecuAcc; 4579 | ///银行密码标志 4580 | TThostFtdcPwdFlagType BankPwdFlag; 4581 | ///期货资金密码核对标志 4582 | TThostFtdcPwdFlagType SecuPwdFlag; 4583 | ///交易柜员 4584 | TThostFtdcOperNoType OperNo; 4585 | ///请求编号 4586 | TThostFtdcRequestIDType RequestID; 4587 | ///交易ID 4588 | TThostFtdcTIDType TID; 4589 | }; 4590 | 4591 | ///查询账户信息响应 4592 | struct CThostFtdcRspQueryAccountField 4593 | { 4594 | ///业务功能码 4595 | TThostFtdcTradeCodeType TradeCode; 4596 | ///银行代码 4597 | TThostFtdcBankIDType BankID; 4598 | ///银行分支机构代码 4599 | TThostFtdcBankBrchIDType BankBranchID; 4600 | ///期商代码 4601 | TThostFtdcBrokerIDType BrokerID; 4602 | ///期商分支机构代码 4603 | TThostFtdcFutureBranchIDType BrokerBranchID; 4604 | ///交易日期 4605 | TThostFtdcTradeDateType TradeDate; 4606 | ///交易时间 4607 | TThostFtdcTradeTimeType TradeTime; 4608 | ///银行流水号 4609 | TThostFtdcBankSerialType BankSerial; 4610 | ///交易系统日期 4611 | TThostFtdcTradeDateType TradingDay; 4612 | ///银期平台消息流水号 4613 | TThostFtdcSerialType PlateSerial; 4614 | ///最后分片标志 4615 | TThostFtdcLastFragmentType LastFragment; 4616 | ///会话号 4617 | TThostFtdcSessionIDType SessionID; 4618 | ///客户姓名 4619 | TThostFtdcIndividualNameType CustomerName; 4620 | ///证件类型 4621 | TThostFtdcIdCardTypeType IdCardType; 4622 | ///证件号码 4623 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 4624 | ///客户类型 4625 | TThostFtdcCustTypeType CustType; 4626 | ///银行帐号 4627 | TThostFtdcBankAccountType BankAccount; 4628 | ///银行密码 4629 | TThostFtdcPasswordType BankPassWord; 4630 | ///投资者帐号 4631 | TThostFtdcAccountIDType AccountID; 4632 | ///期货密码 4633 | TThostFtdcPasswordType Password; 4634 | ///期货公司流水号 4635 | TThostFtdcFutureSerialType FutureSerial; 4636 | ///安装编号 4637 | TThostFtdcInstallIDType InstallID; 4638 | ///用户标识 4639 | TThostFtdcUserIDType UserID; 4640 | ///验证客户证件号码标志 4641 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 4642 | ///币种代码 4643 | TThostFtdcCurrencyIDType CurrencyID; 4644 | ///摘要 4645 | TThostFtdcDigestType Digest; 4646 | ///银行帐号类型 4647 | TThostFtdcBankAccTypeType BankAccType; 4648 | ///渠道标志 4649 | TThostFtdcDeviceIDType DeviceID; 4650 | ///期货单位帐号类型 4651 | TThostFtdcBankAccTypeType BankSecuAccType; 4652 | ///期货公司银行编码 4653 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4654 | ///期货单位帐号 4655 | TThostFtdcBankAccountType BankSecuAcc; 4656 | ///银行密码标志 4657 | TThostFtdcPwdFlagType BankPwdFlag; 4658 | ///期货资金密码核对标志 4659 | TThostFtdcPwdFlagType SecuPwdFlag; 4660 | ///交易柜员 4661 | TThostFtdcOperNoType OperNo; 4662 | ///请求编号 4663 | TThostFtdcRequestIDType RequestID; 4664 | ///交易ID 4665 | TThostFtdcTIDType TID; 4666 | ///银行可用金额 4667 | TThostFtdcTradeAmountType BankUseAmount; 4668 | ///银行可取金额 4669 | TThostFtdcTradeAmountType BankFetchAmount; 4670 | }; 4671 | 4672 | ///期商签到签退 4673 | struct CThostFtdcFutureSignIOField 4674 | { 4675 | ///业务功能码 4676 | TThostFtdcTradeCodeType TradeCode; 4677 | ///银行代码 4678 | TThostFtdcBankIDType BankID; 4679 | ///银行分支机构代码 4680 | TThostFtdcBankBrchIDType BankBranchID; 4681 | ///期商代码 4682 | TThostFtdcBrokerIDType BrokerID; 4683 | ///期商分支机构代码 4684 | TThostFtdcFutureBranchIDType BrokerBranchID; 4685 | ///交易日期 4686 | TThostFtdcTradeDateType TradeDate; 4687 | ///交易时间 4688 | TThostFtdcTradeTimeType TradeTime; 4689 | ///银行流水号 4690 | TThostFtdcBankSerialType BankSerial; 4691 | ///交易系统日期 4692 | TThostFtdcTradeDateType TradingDay; 4693 | ///银期平台消息流水号 4694 | TThostFtdcSerialType PlateSerial; 4695 | ///最后分片标志 4696 | TThostFtdcLastFragmentType LastFragment; 4697 | ///会话号 4698 | TThostFtdcSessionIDType SessionID; 4699 | ///安装编号 4700 | TThostFtdcInstallIDType InstallID; 4701 | ///用户标识 4702 | TThostFtdcUserIDType UserID; 4703 | ///摘要 4704 | TThostFtdcDigestType Digest; 4705 | ///币种代码 4706 | TThostFtdcCurrencyIDType CurrencyID; 4707 | ///渠道标志 4708 | TThostFtdcDeviceIDType DeviceID; 4709 | ///期货公司银行编码 4710 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4711 | ///交易柜员 4712 | TThostFtdcOperNoType OperNo; 4713 | ///请求编号 4714 | TThostFtdcRequestIDType RequestID; 4715 | ///交易ID 4716 | TThostFtdcTIDType TID; 4717 | }; 4718 | 4719 | ///期商签到响应 4720 | struct CThostFtdcRspFutureSignInField 4721 | { 4722 | ///业务功能码 4723 | TThostFtdcTradeCodeType TradeCode; 4724 | ///银行代码 4725 | TThostFtdcBankIDType BankID; 4726 | ///银行分支机构代码 4727 | TThostFtdcBankBrchIDType BankBranchID; 4728 | ///期商代码 4729 | TThostFtdcBrokerIDType BrokerID; 4730 | ///期商分支机构代码 4731 | TThostFtdcFutureBranchIDType BrokerBranchID; 4732 | ///交易日期 4733 | TThostFtdcTradeDateType TradeDate; 4734 | ///交易时间 4735 | TThostFtdcTradeTimeType TradeTime; 4736 | ///银行流水号 4737 | TThostFtdcBankSerialType BankSerial; 4738 | ///交易系统日期 4739 | TThostFtdcTradeDateType TradingDay; 4740 | ///银期平台消息流水号 4741 | TThostFtdcSerialType PlateSerial; 4742 | ///最后分片标志 4743 | TThostFtdcLastFragmentType LastFragment; 4744 | ///会话号 4745 | TThostFtdcSessionIDType SessionID; 4746 | ///安装编号 4747 | TThostFtdcInstallIDType InstallID; 4748 | ///用户标识 4749 | TThostFtdcUserIDType UserID; 4750 | ///摘要 4751 | TThostFtdcDigestType Digest; 4752 | ///币种代码 4753 | TThostFtdcCurrencyIDType CurrencyID; 4754 | ///渠道标志 4755 | TThostFtdcDeviceIDType DeviceID; 4756 | ///期货公司银行编码 4757 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4758 | ///交易柜员 4759 | TThostFtdcOperNoType OperNo; 4760 | ///请求编号 4761 | TThostFtdcRequestIDType RequestID; 4762 | ///交易ID 4763 | TThostFtdcTIDType TID; 4764 | ///错误代码 4765 | TThostFtdcErrorIDType ErrorID; 4766 | ///错误信息 4767 | TThostFtdcErrorMsgType ErrorMsg; 4768 | ///PIN密钥 4769 | TThostFtdcPasswordKeyType PinKey; 4770 | ///MAC密钥 4771 | TThostFtdcPasswordKeyType MacKey; 4772 | }; 4773 | 4774 | ///期商签退请求 4775 | struct CThostFtdcReqFutureSignOutField 4776 | { 4777 | ///业务功能码 4778 | TThostFtdcTradeCodeType TradeCode; 4779 | ///银行代码 4780 | TThostFtdcBankIDType BankID; 4781 | ///银行分支机构代码 4782 | TThostFtdcBankBrchIDType BankBranchID; 4783 | ///期商代码 4784 | TThostFtdcBrokerIDType BrokerID; 4785 | ///期商分支机构代码 4786 | TThostFtdcFutureBranchIDType BrokerBranchID; 4787 | ///交易日期 4788 | TThostFtdcTradeDateType TradeDate; 4789 | ///交易时间 4790 | TThostFtdcTradeTimeType TradeTime; 4791 | ///银行流水号 4792 | TThostFtdcBankSerialType BankSerial; 4793 | ///交易系统日期 4794 | TThostFtdcTradeDateType TradingDay; 4795 | ///银期平台消息流水号 4796 | TThostFtdcSerialType PlateSerial; 4797 | ///最后分片标志 4798 | TThostFtdcLastFragmentType LastFragment; 4799 | ///会话号 4800 | TThostFtdcSessionIDType SessionID; 4801 | ///安装编号 4802 | TThostFtdcInstallIDType InstallID; 4803 | ///用户标识 4804 | TThostFtdcUserIDType UserID; 4805 | ///摘要 4806 | TThostFtdcDigestType Digest; 4807 | ///币种代码 4808 | TThostFtdcCurrencyIDType CurrencyID; 4809 | ///渠道标志 4810 | TThostFtdcDeviceIDType DeviceID; 4811 | ///期货公司银行编码 4812 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4813 | ///交易柜员 4814 | TThostFtdcOperNoType OperNo; 4815 | ///请求编号 4816 | TThostFtdcRequestIDType RequestID; 4817 | ///交易ID 4818 | TThostFtdcTIDType TID; 4819 | }; 4820 | 4821 | ///期商签退响应 4822 | struct CThostFtdcRspFutureSignOutField 4823 | { 4824 | ///业务功能码 4825 | TThostFtdcTradeCodeType TradeCode; 4826 | ///银行代码 4827 | TThostFtdcBankIDType BankID; 4828 | ///银行分支机构代码 4829 | TThostFtdcBankBrchIDType BankBranchID; 4830 | ///期商代码 4831 | TThostFtdcBrokerIDType BrokerID; 4832 | ///期商分支机构代码 4833 | TThostFtdcFutureBranchIDType BrokerBranchID; 4834 | ///交易日期 4835 | TThostFtdcTradeDateType TradeDate; 4836 | ///交易时间 4837 | TThostFtdcTradeTimeType TradeTime; 4838 | ///银行流水号 4839 | TThostFtdcBankSerialType BankSerial; 4840 | ///交易系统日期 4841 | TThostFtdcTradeDateType TradingDay; 4842 | ///银期平台消息流水号 4843 | TThostFtdcSerialType PlateSerial; 4844 | ///最后分片标志 4845 | TThostFtdcLastFragmentType LastFragment; 4846 | ///会话号 4847 | TThostFtdcSessionIDType SessionID; 4848 | ///安装编号 4849 | TThostFtdcInstallIDType InstallID; 4850 | ///用户标识 4851 | TThostFtdcUserIDType UserID; 4852 | ///摘要 4853 | TThostFtdcDigestType Digest; 4854 | ///币种代码 4855 | TThostFtdcCurrencyIDType CurrencyID; 4856 | ///渠道标志 4857 | TThostFtdcDeviceIDType DeviceID; 4858 | ///期货公司银行编码 4859 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 4860 | ///交易柜员 4861 | TThostFtdcOperNoType OperNo; 4862 | ///请求编号 4863 | TThostFtdcRequestIDType RequestID; 4864 | ///交易ID 4865 | TThostFtdcTIDType TID; 4866 | ///错误代码 4867 | TThostFtdcErrorIDType ErrorID; 4868 | ///错误信息 4869 | TThostFtdcErrorMsgType ErrorMsg; 4870 | }; 4871 | 4872 | ///查询指定流水号的交易结果请求 4873 | struct CThostFtdcReqQueryTradeResultBySerialField 4874 | { 4875 | ///业务功能码 4876 | TThostFtdcTradeCodeType TradeCode; 4877 | ///银行代码 4878 | TThostFtdcBankIDType BankID; 4879 | ///银行分支机构代码 4880 | TThostFtdcBankBrchIDType BankBranchID; 4881 | ///期商代码 4882 | TThostFtdcBrokerIDType BrokerID; 4883 | ///期商分支机构代码 4884 | TThostFtdcFutureBranchIDType BrokerBranchID; 4885 | ///交易日期 4886 | TThostFtdcTradeDateType TradeDate; 4887 | ///交易时间 4888 | TThostFtdcTradeTimeType TradeTime; 4889 | ///银行流水号 4890 | TThostFtdcBankSerialType BankSerial; 4891 | ///交易系统日期 4892 | TThostFtdcTradeDateType TradingDay; 4893 | ///银期平台消息流水号 4894 | TThostFtdcSerialType PlateSerial; 4895 | ///最后分片标志 4896 | TThostFtdcLastFragmentType LastFragment; 4897 | ///会话号 4898 | TThostFtdcSessionIDType SessionID; 4899 | ///流水号 4900 | TThostFtdcSerialType Reference; 4901 | ///本流水号发布者的机构类型 4902 | TThostFtdcInstitutionTypeType RefrenceIssureType; 4903 | ///本流水号发布者机构编码 4904 | TThostFtdcOrganCodeType RefrenceIssure; 4905 | ///客户姓名 4906 | TThostFtdcIndividualNameType CustomerName; 4907 | ///证件类型 4908 | TThostFtdcIdCardTypeType IdCardType; 4909 | ///证件号码 4910 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 4911 | ///客户类型 4912 | TThostFtdcCustTypeType CustType; 4913 | ///银行帐号 4914 | TThostFtdcBankAccountType BankAccount; 4915 | ///银行密码 4916 | TThostFtdcPasswordType BankPassWord; 4917 | ///投资者帐号 4918 | TThostFtdcAccountIDType AccountID; 4919 | ///期货密码 4920 | TThostFtdcPasswordType Password; 4921 | ///币种代码 4922 | TThostFtdcCurrencyIDType CurrencyID; 4923 | ///转帐金额 4924 | TThostFtdcTradeAmountType TradeAmount; 4925 | ///摘要 4926 | TThostFtdcDigestType Digest; 4927 | }; 4928 | 4929 | ///查询指定流水号的交易结果响应 4930 | struct CThostFtdcRspQueryTradeResultBySerialField 4931 | { 4932 | ///业务功能码 4933 | TThostFtdcTradeCodeType TradeCode; 4934 | ///银行代码 4935 | TThostFtdcBankIDType BankID; 4936 | ///银行分支机构代码 4937 | TThostFtdcBankBrchIDType BankBranchID; 4938 | ///期商代码 4939 | TThostFtdcBrokerIDType BrokerID; 4940 | ///期商分支机构代码 4941 | TThostFtdcFutureBranchIDType BrokerBranchID; 4942 | ///交易日期 4943 | TThostFtdcTradeDateType TradeDate; 4944 | ///交易时间 4945 | TThostFtdcTradeTimeType TradeTime; 4946 | ///银行流水号 4947 | TThostFtdcBankSerialType BankSerial; 4948 | ///交易系统日期 4949 | TThostFtdcTradeDateType TradingDay; 4950 | ///银期平台消息流水号 4951 | TThostFtdcSerialType PlateSerial; 4952 | ///最后分片标志 4953 | TThostFtdcLastFragmentType LastFragment; 4954 | ///会话号 4955 | TThostFtdcSessionIDType SessionID; 4956 | ///错误代码 4957 | TThostFtdcErrorIDType ErrorID; 4958 | ///错误信息 4959 | TThostFtdcErrorMsgType ErrorMsg; 4960 | ///流水号 4961 | TThostFtdcSerialType Reference; 4962 | ///本流水号发布者的机构类型 4963 | TThostFtdcInstitutionTypeType RefrenceIssureType; 4964 | ///本流水号发布者机构编码 4965 | TThostFtdcOrganCodeType RefrenceIssure; 4966 | ///原始返回代码 4967 | TThostFtdcReturnCodeType OriginReturnCode; 4968 | ///原始返回码描述 4969 | TThostFtdcDescrInfoForReturnCodeType OriginDescrInfoForReturnCode; 4970 | ///银行帐号 4971 | TThostFtdcBankAccountType BankAccount; 4972 | ///银行密码 4973 | TThostFtdcPasswordType BankPassWord; 4974 | ///投资者帐号 4975 | TThostFtdcAccountIDType AccountID; 4976 | ///期货密码 4977 | TThostFtdcPasswordType Password; 4978 | ///币种代码 4979 | TThostFtdcCurrencyIDType CurrencyID; 4980 | ///转帐金额 4981 | TThostFtdcTradeAmountType TradeAmount; 4982 | ///摘要 4983 | TThostFtdcDigestType Digest; 4984 | }; 4985 | 4986 | ///日终文件就绪请求 4987 | struct CThostFtdcReqDayEndFileReadyField 4988 | { 4989 | ///业务功能码 4990 | TThostFtdcTradeCodeType TradeCode; 4991 | ///银行代码 4992 | TThostFtdcBankIDType BankID; 4993 | ///银行分支机构代码 4994 | TThostFtdcBankBrchIDType BankBranchID; 4995 | ///期商代码 4996 | TThostFtdcBrokerIDType BrokerID; 4997 | ///期商分支机构代码 4998 | TThostFtdcFutureBranchIDType BrokerBranchID; 4999 | ///交易日期 5000 | TThostFtdcTradeDateType TradeDate; 5001 | ///交易时间 5002 | TThostFtdcTradeTimeType TradeTime; 5003 | ///银行流水号 5004 | TThostFtdcBankSerialType BankSerial; 5005 | ///交易系统日期 5006 | TThostFtdcTradeDateType TradingDay; 5007 | ///银期平台消息流水号 5008 | TThostFtdcSerialType PlateSerial; 5009 | ///最后分片标志 5010 | TThostFtdcLastFragmentType LastFragment; 5011 | ///会话号 5012 | TThostFtdcSessionIDType SessionID; 5013 | ///文件业务功能 5014 | TThostFtdcFileBusinessCodeType FileBusinessCode; 5015 | ///摘要 5016 | TThostFtdcDigestType Digest; 5017 | }; 5018 | 5019 | ///返回结果 5020 | struct CThostFtdcReturnResultField 5021 | { 5022 | ///返回代码 5023 | TThostFtdcReturnCodeType ReturnCode; 5024 | ///返回码描述 5025 | TThostFtdcDescrInfoForReturnCodeType DescrInfoForReturnCode; 5026 | }; 5027 | 5028 | ///验证期货资金密码 5029 | struct CThostFtdcVerifyFuturePasswordField 5030 | { 5031 | ///业务功能码 5032 | TThostFtdcTradeCodeType TradeCode; 5033 | ///银行代码 5034 | TThostFtdcBankIDType BankID; 5035 | ///银行分支机构代码 5036 | TThostFtdcBankBrchIDType BankBranchID; 5037 | ///期商代码 5038 | TThostFtdcBrokerIDType BrokerID; 5039 | ///期商分支机构代码 5040 | TThostFtdcFutureBranchIDType BrokerBranchID; 5041 | ///交易日期 5042 | TThostFtdcTradeDateType TradeDate; 5043 | ///交易时间 5044 | TThostFtdcTradeTimeType TradeTime; 5045 | ///银行流水号 5046 | TThostFtdcBankSerialType BankSerial; 5047 | ///交易系统日期 5048 | TThostFtdcTradeDateType TradingDay; 5049 | ///银期平台消息流水号 5050 | TThostFtdcSerialType PlateSerial; 5051 | ///最后分片标志 5052 | TThostFtdcLastFragmentType LastFragment; 5053 | ///会话号 5054 | TThostFtdcSessionIDType SessionID; 5055 | ///投资者帐号 5056 | TThostFtdcAccountIDType AccountID; 5057 | ///期货密码 5058 | TThostFtdcPasswordType Password; 5059 | ///银行帐号 5060 | TThostFtdcBankAccountType BankAccount; 5061 | ///银行密码 5062 | TThostFtdcPasswordType BankPassWord; 5063 | ///安装编号 5064 | TThostFtdcInstallIDType InstallID; 5065 | ///交易ID 5066 | TThostFtdcTIDType TID; 5067 | }; 5068 | 5069 | ///验证客户信息 5070 | struct CThostFtdcVerifyCustInfoField 5071 | { 5072 | ///客户姓名 5073 | TThostFtdcIndividualNameType CustomerName; 5074 | ///证件类型 5075 | TThostFtdcIdCardTypeType IdCardType; 5076 | ///证件号码 5077 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 5078 | ///客户类型 5079 | TThostFtdcCustTypeType CustType; 5080 | }; 5081 | 5082 | ///验证期货资金密码和客户信息 5083 | struct CThostFtdcVerifyFuturePasswordAndCustInfoField 5084 | { 5085 | ///客户姓名 5086 | TThostFtdcIndividualNameType CustomerName; 5087 | ///证件类型 5088 | TThostFtdcIdCardTypeType IdCardType; 5089 | ///证件号码 5090 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 5091 | ///客户类型 5092 | TThostFtdcCustTypeType CustType; 5093 | ///投资者帐号 5094 | TThostFtdcAccountIDType AccountID; 5095 | ///期货密码 5096 | TThostFtdcPasswordType Password; 5097 | }; 5098 | 5099 | ///验证期货资金密码和客户信息 5100 | struct CThostFtdcDepositResultInformField 5101 | { 5102 | ///出入金流水号,该流水号为银期报盘返回的流水号 5103 | TThostFtdcDepositSeqNoType DepositSeqNo; 5104 | ///经纪公司代码 5105 | TThostFtdcBrokerIDType BrokerID; 5106 | ///投资者代码 5107 | TThostFtdcInvestorIDType InvestorID; 5108 | ///入金金额 5109 | TThostFtdcMoneyType Deposit; 5110 | ///请求编号 5111 | TThostFtdcRequestIDType RequestID; 5112 | ///返回代码 5113 | TThostFtdcReturnCodeType ReturnCode; 5114 | ///返回码描述 5115 | TThostFtdcDescrInfoForReturnCodeType DescrInfoForReturnCode; 5116 | }; 5117 | 5118 | ///交易核心向银期报盘发出密钥同步请求 5119 | struct CThostFtdcReqSyncKeyField 5120 | { 5121 | ///业务功能码 5122 | TThostFtdcTradeCodeType TradeCode; 5123 | ///银行代码 5124 | TThostFtdcBankIDType BankID; 5125 | ///银行分支机构代码 5126 | TThostFtdcBankBrchIDType BankBranchID; 5127 | ///期商代码 5128 | TThostFtdcBrokerIDType BrokerID; 5129 | ///期商分支机构代码 5130 | TThostFtdcFutureBranchIDType BrokerBranchID; 5131 | ///交易日期 5132 | TThostFtdcTradeDateType TradeDate; 5133 | ///交易时间 5134 | TThostFtdcTradeTimeType TradeTime; 5135 | ///银行流水号 5136 | TThostFtdcBankSerialType BankSerial; 5137 | ///交易系统日期 5138 | TThostFtdcTradeDateType TradingDay; 5139 | ///银期平台消息流水号 5140 | TThostFtdcSerialType PlateSerial; 5141 | ///最后分片标志 5142 | TThostFtdcLastFragmentType LastFragment; 5143 | ///会话号 5144 | TThostFtdcSessionIDType SessionID; 5145 | ///安装编号 5146 | TThostFtdcInstallIDType InstallID; 5147 | ///用户标识 5148 | TThostFtdcUserIDType UserID; 5149 | ///交易核心给银期报盘的消息 5150 | TThostFtdcAddInfoType Message; 5151 | ///渠道标志 5152 | TThostFtdcDeviceIDType DeviceID; 5153 | ///期货公司银行编码 5154 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 5155 | ///交易柜员 5156 | TThostFtdcOperNoType OperNo; 5157 | ///请求编号 5158 | TThostFtdcRequestIDType RequestID; 5159 | ///交易ID 5160 | TThostFtdcTIDType TID; 5161 | }; 5162 | 5163 | ///交易核心向银期报盘发出密钥同步响应 5164 | struct CThostFtdcRspSyncKeyField 5165 | { 5166 | ///业务功能码 5167 | TThostFtdcTradeCodeType TradeCode; 5168 | ///银行代码 5169 | TThostFtdcBankIDType BankID; 5170 | ///银行分支机构代码 5171 | TThostFtdcBankBrchIDType BankBranchID; 5172 | ///期商代码 5173 | TThostFtdcBrokerIDType BrokerID; 5174 | ///期商分支机构代码 5175 | TThostFtdcFutureBranchIDType BrokerBranchID; 5176 | ///交易日期 5177 | TThostFtdcTradeDateType TradeDate; 5178 | ///交易时间 5179 | TThostFtdcTradeTimeType TradeTime; 5180 | ///银行流水号 5181 | TThostFtdcBankSerialType BankSerial; 5182 | ///交易系统日期 5183 | TThostFtdcTradeDateType TradingDay; 5184 | ///银期平台消息流水号 5185 | TThostFtdcSerialType PlateSerial; 5186 | ///最后分片标志 5187 | TThostFtdcLastFragmentType LastFragment; 5188 | ///会话号 5189 | TThostFtdcSessionIDType SessionID; 5190 | ///安装编号 5191 | TThostFtdcInstallIDType InstallID; 5192 | ///用户标识 5193 | TThostFtdcUserIDType UserID; 5194 | ///交易核心给银期报盘的消息 5195 | TThostFtdcAddInfoType Message; 5196 | ///渠道标志 5197 | TThostFtdcDeviceIDType DeviceID; 5198 | ///期货公司银行编码 5199 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 5200 | ///交易柜员 5201 | TThostFtdcOperNoType OperNo; 5202 | ///请求编号 5203 | TThostFtdcRequestIDType RequestID; 5204 | ///交易ID 5205 | TThostFtdcTIDType TID; 5206 | ///错误代码 5207 | TThostFtdcErrorIDType ErrorID; 5208 | ///错误信息 5209 | TThostFtdcErrorMsgType ErrorMsg; 5210 | }; 5211 | 5212 | ///查询账户信息通知 5213 | struct CThostFtdcNotifyQueryAccountField 5214 | { 5215 | ///业务功能码 5216 | TThostFtdcTradeCodeType TradeCode; 5217 | ///银行代码 5218 | TThostFtdcBankIDType BankID; 5219 | ///银行分支机构代码 5220 | TThostFtdcBankBrchIDType BankBranchID; 5221 | ///期商代码 5222 | TThostFtdcBrokerIDType BrokerID; 5223 | ///期商分支机构代码 5224 | TThostFtdcFutureBranchIDType BrokerBranchID; 5225 | ///交易日期 5226 | TThostFtdcTradeDateType TradeDate; 5227 | ///交易时间 5228 | TThostFtdcTradeTimeType TradeTime; 5229 | ///银行流水号 5230 | TThostFtdcBankSerialType BankSerial; 5231 | ///交易系统日期 5232 | TThostFtdcTradeDateType TradingDay; 5233 | ///银期平台消息流水号 5234 | TThostFtdcSerialType PlateSerial; 5235 | ///最后分片标志 5236 | TThostFtdcLastFragmentType LastFragment; 5237 | ///会话号 5238 | TThostFtdcSessionIDType SessionID; 5239 | ///客户姓名 5240 | TThostFtdcIndividualNameType CustomerName; 5241 | ///证件类型 5242 | TThostFtdcIdCardTypeType IdCardType; 5243 | ///证件号码 5244 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 5245 | ///客户类型 5246 | TThostFtdcCustTypeType CustType; 5247 | ///银行帐号 5248 | TThostFtdcBankAccountType BankAccount; 5249 | ///银行密码 5250 | TThostFtdcPasswordType BankPassWord; 5251 | ///投资者帐号 5252 | TThostFtdcAccountIDType AccountID; 5253 | ///期货密码 5254 | TThostFtdcPasswordType Password; 5255 | ///期货公司流水号 5256 | TThostFtdcFutureSerialType FutureSerial; 5257 | ///安装编号 5258 | TThostFtdcInstallIDType InstallID; 5259 | ///用户标识 5260 | TThostFtdcUserIDType UserID; 5261 | ///验证客户证件号码标志 5262 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 5263 | ///币种代码 5264 | TThostFtdcCurrencyIDType CurrencyID; 5265 | ///摘要 5266 | TThostFtdcDigestType Digest; 5267 | ///银行帐号类型 5268 | TThostFtdcBankAccTypeType BankAccType; 5269 | ///渠道标志 5270 | TThostFtdcDeviceIDType DeviceID; 5271 | ///期货单位帐号类型 5272 | TThostFtdcBankAccTypeType BankSecuAccType; 5273 | ///期货公司银行编码 5274 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 5275 | ///期货单位帐号 5276 | TThostFtdcBankAccountType BankSecuAcc; 5277 | ///银行密码标志 5278 | TThostFtdcPwdFlagType BankPwdFlag; 5279 | ///期货资金密码核对标志 5280 | TThostFtdcPwdFlagType SecuPwdFlag; 5281 | ///交易柜员 5282 | TThostFtdcOperNoType OperNo; 5283 | ///请求编号 5284 | TThostFtdcRequestIDType RequestID; 5285 | ///交易ID 5286 | TThostFtdcTIDType TID; 5287 | ///银行可用金额 5288 | TThostFtdcTradeAmountType BankUseAmount; 5289 | ///银行可取金额 5290 | TThostFtdcTradeAmountType BankFetchAmount; 5291 | ///错误代码 5292 | TThostFtdcErrorIDType ErrorID; 5293 | ///错误信息 5294 | TThostFtdcErrorMsgType ErrorMsg; 5295 | }; 5296 | 5297 | ///银期转账交易流水表 5298 | struct CThostFtdcTransferSerialField 5299 | { 5300 | ///平台流水号 5301 | TThostFtdcPlateSerialType PlateSerial; 5302 | ///交易发起方日期 5303 | TThostFtdcTradeDateType TradeDate; 5304 | ///交易日期 5305 | TThostFtdcDateType TradingDay; 5306 | ///交易时间 5307 | TThostFtdcTradeTimeType TradeTime; 5308 | ///交易代码 5309 | TThostFtdcTradeCodeType TradeCode; 5310 | ///会话编号 5311 | TThostFtdcSessionIDType SessionID; 5312 | ///银行编码 5313 | TThostFtdcBankIDType BankID; 5314 | ///银行分支机构编码 5315 | TThostFtdcBankBrchIDType BankBranchID; 5316 | ///银行帐号类型 5317 | TThostFtdcBankAccTypeType BankAccType; 5318 | ///银行帐号 5319 | TThostFtdcBankAccountType BankAccount; 5320 | ///银行流水号 5321 | TThostFtdcBankSerialType BankSerial; 5322 | ///期货公司编码 5323 | TThostFtdcBrokerIDType BrokerID; 5324 | ///期商分支机构代码 5325 | TThostFtdcFutureBranchIDType BrokerBranchID; 5326 | ///期货公司帐号类型 5327 | TThostFtdcFutureAccTypeType FutureAccType; 5328 | ///投资者帐号 5329 | TThostFtdcAccountIDType AccountID; 5330 | ///投资者代码 5331 | TThostFtdcInvestorIDType InvestorID; 5332 | ///期货公司流水号 5333 | TThostFtdcFutureSerialType FutureSerial; 5334 | ///证件类型 5335 | TThostFtdcIdCardTypeType IdCardType; 5336 | ///证件号码 5337 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 5338 | ///币种代码 5339 | TThostFtdcCurrencyIDType CurrencyID; 5340 | ///交易金额 5341 | TThostFtdcTradeAmountType TradeAmount; 5342 | ///应收客户费用 5343 | TThostFtdcCustFeeType CustFee; 5344 | ///应收期货公司费用 5345 | TThostFtdcFutureFeeType BrokerFee; 5346 | ///有效标志 5347 | TThostFtdcAvailabilityFlagType AvailabilityFlag; 5348 | ///操作员 5349 | TThostFtdcOperatorCodeType OperatorCode; 5350 | ///新银行帐号 5351 | TThostFtdcBankAccountType BankNewAccount; 5352 | ///错误代码 5353 | TThostFtdcErrorIDType ErrorID; 5354 | ///错误信息 5355 | TThostFtdcErrorMsgType ErrorMsg; 5356 | }; 5357 | 5358 | ///请求查询转帐流水 5359 | struct CThostFtdcQryTransferSerialField 5360 | { 5361 | ///经纪公司代码 5362 | TThostFtdcBrokerIDType BrokerID; 5363 | ///投资者帐号 5364 | TThostFtdcAccountIDType AccountID; 5365 | ///银行编码 5366 | TThostFtdcBankIDType BankID; 5367 | }; 5368 | 5369 | ///期商签到通知 5370 | struct CThostFtdcNotifyFutureSignInField 5371 | { 5372 | ///业务功能码 5373 | TThostFtdcTradeCodeType TradeCode; 5374 | ///银行代码 5375 | TThostFtdcBankIDType BankID; 5376 | ///银行分支机构代码 5377 | TThostFtdcBankBrchIDType BankBranchID; 5378 | ///期商代码 5379 | TThostFtdcBrokerIDType BrokerID; 5380 | ///期商分支机构代码 5381 | TThostFtdcFutureBranchIDType BrokerBranchID; 5382 | ///交易日期 5383 | TThostFtdcTradeDateType TradeDate; 5384 | ///交易时间 5385 | TThostFtdcTradeTimeType TradeTime; 5386 | ///银行流水号 5387 | TThostFtdcBankSerialType BankSerial; 5388 | ///交易系统日期 5389 | TThostFtdcTradeDateType TradingDay; 5390 | ///银期平台消息流水号 5391 | TThostFtdcSerialType PlateSerial; 5392 | ///最后分片标志 5393 | TThostFtdcLastFragmentType LastFragment; 5394 | ///会话号 5395 | TThostFtdcSessionIDType SessionID; 5396 | ///安装编号 5397 | TThostFtdcInstallIDType InstallID; 5398 | ///用户标识 5399 | TThostFtdcUserIDType UserID; 5400 | ///摘要 5401 | TThostFtdcDigestType Digest; 5402 | ///币种代码 5403 | TThostFtdcCurrencyIDType CurrencyID; 5404 | ///渠道标志 5405 | TThostFtdcDeviceIDType DeviceID; 5406 | ///期货公司银行编码 5407 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 5408 | ///交易柜员 5409 | TThostFtdcOperNoType OperNo; 5410 | ///请求编号 5411 | TThostFtdcRequestIDType RequestID; 5412 | ///交易ID 5413 | TThostFtdcTIDType TID; 5414 | ///错误代码 5415 | TThostFtdcErrorIDType ErrorID; 5416 | ///错误信息 5417 | TThostFtdcErrorMsgType ErrorMsg; 5418 | ///PIN密钥 5419 | TThostFtdcPasswordKeyType PinKey; 5420 | ///MAC密钥 5421 | TThostFtdcPasswordKeyType MacKey; 5422 | }; 5423 | 5424 | ///期商签退通知 5425 | struct CThostFtdcNotifyFutureSignOutField 5426 | { 5427 | ///业务功能码 5428 | TThostFtdcTradeCodeType TradeCode; 5429 | ///银行代码 5430 | TThostFtdcBankIDType BankID; 5431 | ///银行分支机构代码 5432 | TThostFtdcBankBrchIDType BankBranchID; 5433 | ///期商代码 5434 | TThostFtdcBrokerIDType BrokerID; 5435 | ///期商分支机构代码 5436 | TThostFtdcFutureBranchIDType BrokerBranchID; 5437 | ///交易日期 5438 | TThostFtdcTradeDateType TradeDate; 5439 | ///交易时间 5440 | TThostFtdcTradeTimeType TradeTime; 5441 | ///银行流水号 5442 | TThostFtdcBankSerialType BankSerial; 5443 | ///交易系统日期 5444 | TThostFtdcTradeDateType TradingDay; 5445 | ///银期平台消息流水号 5446 | TThostFtdcSerialType PlateSerial; 5447 | ///最后分片标志 5448 | TThostFtdcLastFragmentType LastFragment; 5449 | ///会话号 5450 | TThostFtdcSessionIDType SessionID; 5451 | ///安装编号 5452 | TThostFtdcInstallIDType InstallID; 5453 | ///用户标识 5454 | TThostFtdcUserIDType UserID; 5455 | ///摘要 5456 | TThostFtdcDigestType Digest; 5457 | ///币种代码 5458 | TThostFtdcCurrencyIDType CurrencyID; 5459 | ///渠道标志 5460 | TThostFtdcDeviceIDType DeviceID; 5461 | ///期货公司银行编码 5462 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 5463 | ///交易柜员 5464 | TThostFtdcOperNoType OperNo; 5465 | ///请求编号 5466 | TThostFtdcRequestIDType RequestID; 5467 | ///交易ID 5468 | TThostFtdcTIDType TID; 5469 | ///错误代码 5470 | TThostFtdcErrorIDType ErrorID; 5471 | ///错误信息 5472 | TThostFtdcErrorMsgType ErrorMsg; 5473 | }; 5474 | 5475 | ///交易核心向银期报盘发出密钥同步处理结果的通知 5476 | struct CThostFtdcNotifySyncKeyField 5477 | { 5478 | ///业务功能码 5479 | TThostFtdcTradeCodeType TradeCode; 5480 | ///银行代码 5481 | TThostFtdcBankIDType BankID; 5482 | ///银行分支机构代码 5483 | TThostFtdcBankBrchIDType BankBranchID; 5484 | ///期商代码 5485 | TThostFtdcBrokerIDType BrokerID; 5486 | ///期商分支机构代码 5487 | TThostFtdcFutureBranchIDType BrokerBranchID; 5488 | ///交易日期 5489 | TThostFtdcTradeDateType TradeDate; 5490 | ///交易时间 5491 | TThostFtdcTradeTimeType TradeTime; 5492 | ///银行流水号 5493 | TThostFtdcBankSerialType BankSerial; 5494 | ///交易系统日期 5495 | TThostFtdcTradeDateType TradingDay; 5496 | ///银期平台消息流水号 5497 | TThostFtdcSerialType PlateSerial; 5498 | ///最后分片标志 5499 | TThostFtdcLastFragmentType LastFragment; 5500 | ///会话号 5501 | TThostFtdcSessionIDType SessionID; 5502 | ///安装编号 5503 | TThostFtdcInstallIDType InstallID; 5504 | ///用户标识 5505 | TThostFtdcUserIDType UserID; 5506 | ///交易核心给银期报盘的消息 5507 | TThostFtdcAddInfoType Message; 5508 | ///渠道标志 5509 | TThostFtdcDeviceIDType DeviceID; 5510 | ///期货公司银行编码 5511 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 5512 | ///交易柜员 5513 | TThostFtdcOperNoType OperNo; 5514 | ///请求编号 5515 | TThostFtdcRequestIDType RequestID; 5516 | ///交易ID 5517 | TThostFtdcTIDType TID; 5518 | ///错误代码 5519 | TThostFtdcErrorIDType ErrorID; 5520 | ///错误信息 5521 | TThostFtdcErrorMsgType ErrorMsg; 5522 | }; 5523 | 5524 | ///请求查询银期签约关系 5525 | struct CThostFtdcQryAccountregisterField 5526 | { 5527 | ///经纪公司代码 5528 | TThostFtdcBrokerIDType BrokerID; 5529 | ///投资者帐号 5530 | TThostFtdcAccountIDType AccountID; 5531 | ///银行编码 5532 | TThostFtdcBankIDType BankID; 5533 | }; 5534 | 5535 | ///客户开销户信息表 5536 | struct CThostFtdcAccountregisterField 5537 | { 5538 | ///交易日期 5539 | TThostFtdcTradeDateType TradeDay; 5540 | ///银行编码 5541 | TThostFtdcBankIDType BankID; 5542 | ///银行分支机构编码 5543 | TThostFtdcBankBrchIDType BankBranchID; 5544 | ///银行帐号 5545 | TThostFtdcBankAccountType BankAccount; 5546 | ///期货公司编码 5547 | TThostFtdcBrokerIDType BrokerID; 5548 | ///期货公司分支机构编码 5549 | TThostFtdcFutureBranchIDType BrokerBranchID; 5550 | ///投资者帐号 5551 | TThostFtdcAccountIDType AccountID; 5552 | ///证件类型 5553 | TThostFtdcIdCardTypeType IdCardType; 5554 | ///证件号码 5555 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 5556 | ///客户姓名 5557 | TThostFtdcIndividualNameType CustomerName; 5558 | ///币种代码 5559 | TThostFtdcCurrencyIDType CurrencyID; 5560 | ///开销户类别 5561 | TThostFtdcOpenOrDestroyType OpenOrDestroy; 5562 | ///签约日期 5563 | TThostFtdcTradeDateType RegDate; 5564 | ///解约日期 5565 | TThostFtdcTradeDateType OutDate; 5566 | ///交易ID 5567 | TThostFtdcTIDType TID; 5568 | ///客户类型 5569 | TThostFtdcCustTypeType CustType; 5570 | ///银行帐号类型 5571 | TThostFtdcBankAccTypeType BankAccType; 5572 | }; 5573 | 5574 | ///银期开户信息 5575 | struct CThostFtdcOpenAccountField 5576 | { 5577 | ///业务功能码 5578 | TThostFtdcTradeCodeType TradeCode; 5579 | ///银行代码 5580 | TThostFtdcBankIDType BankID; 5581 | ///银行分支机构代码 5582 | TThostFtdcBankBrchIDType BankBranchID; 5583 | ///期商代码 5584 | TThostFtdcBrokerIDType BrokerID; 5585 | ///期商分支机构代码 5586 | TThostFtdcFutureBranchIDType BrokerBranchID; 5587 | ///交易日期 5588 | TThostFtdcTradeDateType TradeDate; 5589 | ///交易时间 5590 | TThostFtdcTradeTimeType TradeTime; 5591 | ///银行流水号 5592 | TThostFtdcBankSerialType BankSerial; 5593 | ///交易系统日期 5594 | TThostFtdcTradeDateType TradingDay; 5595 | ///银期平台消息流水号 5596 | TThostFtdcSerialType PlateSerial; 5597 | ///最后分片标志 5598 | TThostFtdcLastFragmentType LastFragment; 5599 | ///会话号 5600 | TThostFtdcSessionIDType SessionID; 5601 | ///客户姓名 5602 | TThostFtdcIndividualNameType CustomerName; 5603 | ///证件类型 5604 | TThostFtdcIdCardTypeType IdCardType; 5605 | ///证件号码 5606 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 5607 | ///性别 5608 | TThostFtdcGenderType Gender; 5609 | ///国家代码 5610 | TThostFtdcCountryCodeType CountryCode; 5611 | ///客户类型 5612 | TThostFtdcCustTypeType CustType; 5613 | ///地址 5614 | TThostFtdcAddressType Address; 5615 | ///邮编 5616 | TThostFtdcZipCodeType ZipCode; 5617 | ///电话号码 5618 | TThostFtdcTelephoneType Telephone; 5619 | ///手机 5620 | TThostFtdcMobilePhoneType MobilePhone; 5621 | ///传真 5622 | TThostFtdcFaxType Fax; 5623 | ///电子邮件 5624 | TThostFtdcEMailType EMail; 5625 | ///资金账户状态 5626 | TThostFtdcMoneyAccountStatusType MoneyAccountStatus; 5627 | ///银行帐号 5628 | TThostFtdcBankAccountType BankAccount; 5629 | ///银行密码 5630 | TThostFtdcPasswordType BankPassWord; 5631 | ///投资者帐号 5632 | TThostFtdcAccountIDType AccountID; 5633 | ///期货密码 5634 | TThostFtdcPasswordType Password; 5635 | ///安装编号 5636 | TThostFtdcInstallIDType InstallID; 5637 | ///验证客户证件号码标志 5638 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 5639 | ///币种代码 5640 | TThostFtdcCurrencyIDType CurrencyID; 5641 | ///汇钞标志 5642 | TThostFtdcCashExchangeCodeType CashExchangeCode; 5643 | ///摘要 5644 | TThostFtdcDigestType Digest; 5645 | ///银行帐号类型 5646 | TThostFtdcBankAccTypeType BankAccType; 5647 | ///渠道标志 5648 | TThostFtdcDeviceIDType DeviceID; 5649 | ///期货单位帐号类型 5650 | TThostFtdcBankAccTypeType BankSecuAccType; 5651 | ///期货公司银行编码 5652 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 5653 | ///期货单位帐号 5654 | TThostFtdcBankAccountType BankSecuAcc; 5655 | ///银行密码标志 5656 | TThostFtdcPwdFlagType BankPwdFlag; 5657 | ///期货资金密码核对标志 5658 | TThostFtdcPwdFlagType SecuPwdFlag; 5659 | ///交易柜员 5660 | TThostFtdcOperNoType OperNo; 5661 | ///交易ID 5662 | TThostFtdcTIDType TID; 5663 | ///用户标识 5664 | TThostFtdcUserIDType UserID; 5665 | ///错误代码 5666 | TThostFtdcErrorIDType ErrorID; 5667 | ///错误信息 5668 | TThostFtdcErrorMsgType ErrorMsg; 5669 | }; 5670 | 5671 | ///银期销户信息 5672 | struct CThostFtdcCancelAccountField 5673 | { 5674 | ///业务功能码 5675 | TThostFtdcTradeCodeType TradeCode; 5676 | ///银行代码 5677 | TThostFtdcBankIDType BankID; 5678 | ///银行分支机构代码 5679 | TThostFtdcBankBrchIDType BankBranchID; 5680 | ///期商代码 5681 | TThostFtdcBrokerIDType BrokerID; 5682 | ///期商分支机构代码 5683 | TThostFtdcFutureBranchIDType BrokerBranchID; 5684 | ///交易日期 5685 | TThostFtdcTradeDateType TradeDate; 5686 | ///交易时间 5687 | TThostFtdcTradeTimeType TradeTime; 5688 | ///银行流水号 5689 | TThostFtdcBankSerialType BankSerial; 5690 | ///交易系统日期 5691 | TThostFtdcTradeDateType TradingDay; 5692 | ///银期平台消息流水号 5693 | TThostFtdcSerialType PlateSerial; 5694 | ///最后分片标志 5695 | TThostFtdcLastFragmentType LastFragment; 5696 | ///会话号 5697 | TThostFtdcSessionIDType SessionID; 5698 | ///客户姓名 5699 | TThostFtdcIndividualNameType CustomerName; 5700 | ///证件类型 5701 | TThostFtdcIdCardTypeType IdCardType; 5702 | ///证件号码 5703 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 5704 | ///性别 5705 | TThostFtdcGenderType Gender; 5706 | ///国家代码 5707 | TThostFtdcCountryCodeType CountryCode; 5708 | ///客户类型 5709 | TThostFtdcCustTypeType CustType; 5710 | ///地址 5711 | TThostFtdcAddressType Address; 5712 | ///邮编 5713 | TThostFtdcZipCodeType ZipCode; 5714 | ///电话号码 5715 | TThostFtdcTelephoneType Telephone; 5716 | ///手机 5717 | TThostFtdcMobilePhoneType MobilePhone; 5718 | ///传真 5719 | TThostFtdcFaxType Fax; 5720 | ///电子邮件 5721 | TThostFtdcEMailType EMail; 5722 | ///资金账户状态 5723 | TThostFtdcMoneyAccountStatusType MoneyAccountStatus; 5724 | ///银行帐号 5725 | TThostFtdcBankAccountType BankAccount; 5726 | ///银行密码 5727 | TThostFtdcPasswordType BankPassWord; 5728 | ///投资者帐号 5729 | TThostFtdcAccountIDType AccountID; 5730 | ///期货密码 5731 | TThostFtdcPasswordType Password; 5732 | ///安装编号 5733 | TThostFtdcInstallIDType InstallID; 5734 | ///验证客户证件号码标志 5735 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 5736 | ///币种代码 5737 | TThostFtdcCurrencyIDType CurrencyID; 5738 | ///汇钞标志 5739 | TThostFtdcCashExchangeCodeType CashExchangeCode; 5740 | ///摘要 5741 | TThostFtdcDigestType Digest; 5742 | ///银行帐号类型 5743 | TThostFtdcBankAccTypeType BankAccType; 5744 | ///渠道标志 5745 | TThostFtdcDeviceIDType DeviceID; 5746 | ///期货单位帐号类型 5747 | TThostFtdcBankAccTypeType BankSecuAccType; 5748 | ///期货公司银行编码 5749 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 5750 | ///期货单位帐号 5751 | TThostFtdcBankAccountType BankSecuAcc; 5752 | ///银行密码标志 5753 | TThostFtdcPwdFlagType BankPwdFlag; 5754 | ///期货资金密码核对标志 5755 | TThostFtdcPwdFlagType SecuPwdFlag; 5756 | ///交易柜员 5757 | TThostFtdcOperNoType OperNo; 5758 | ///交易ID 5759 | TThostFtdcTIDType TID; 5760 | ///用户标识 5761 | TThostFtdcUserIDType UserID; 5762 | ///错误代码 5763 | TThostFtdcErrorIDType ErrorID; 5764 | ///错误信息 5765 | TThostFtdcErrorMsgType ErrorMsg; 5766 | }; 5767 | 5768 | ///银期变更银行账号信息 5769 | struct CThostFtdcChangeAccountField 5770 | { 5771 | ///业务功能码 5772 | TThostFtdcTradeCodeType TradeCode; 5773 | ///银行代码 5774 | TThostFtdcBankIDType BankID; 5775 | ///银行分支机构代码 5776 | TThostFtdcBankBrchIDType BankBranchID; 5777 | ///期商代码 5778 | TThostFtdcBrokerIDType BrokerID; 5779 | ///期商分支机构代码 5780 | TThostFtdcFutureBranchIDType BrokerBranchID; 5781 | ///交易日期 5782 | TThostFtdcTradeDateType TradeDate; 5783 | ///交易时间 5784 | TThostFtdcTradeTimeType TradeTime; 5785 | ///银行流水号 5786 | TThostFtdcBankSerialType BankSerial; 5787 | ///交易系统日期 5788 | TThostFtdcTradeDateType TradingDay; 5789 | ///银期平台消息流水号 5790 | TThostFtdcSerialType PlateSerial; 5791 | ///最后分片标志 5792 | TThostFtdcLastFragmentType LastFragment; 5793 | ///会话号 5794 | TThostFtdcSessionIDType SessionID; 5795 | ///客户姓名 5796 | TThostFtdcIndividualNameType CustomerName; 5797 | ///证件类型 5798 | TThostFtdcIdCardTypeType IdCardType; 5799 | ///证件号码 5800 | TThostFtdcIdentifiedCardNoType IdentifiedCardNo; 5801 | ///性别 5802 | TThostFtdcGenderType Gender; 5803 | ///国家代码 5804 | TThostFtdcCountryCodeType CountryCode; 5805 | ///客户类型 5806 | TThostFtdcCustTypeType CustType; 5807 | ///地址 5808 | TThostFtdcAddressType Address; 5809 | ///邮编 5810 | TThostFtdcZipCodeType ZipCode; 5811 | ///电话号码 5812 | TThostFtdcTelephoneType Telephone; 5813 | ///手机 5814 | TThostFtdcMobilePhoneType MobilePhone; 5815 | ///传真 5816 | TThostFtdcFaxType Fax; 5817 | ///电子邮件 5818 | TThostFtdcEMailType EMail; 5819 | ///资金账户状态 5820 | TThostFtdcMoneyAccountStatusType MoneyAccountStatus; 5821 | ///银行帐号 5822 | TThostFtdcBankAccountType BankAccount; 5823 | ///银行密码 5824 | TThostFtdcPasswordType BankPassWord; 5825 | ///新银行帐号 5826 | TThostFtdcBankAccountType NewBankAccount; 5827 | ///新银行密码 5828 | TThostFtdcPasswordType NewBankPassWord; 5829 | ///投资者帐号 5830 | TThostFtdcAccountIDType AccountID; 5831 | ///期货密码 5832 | TThostFtdcPasswordType Password; 5833 | ///银行帐号类型 5834 | TThostFtdcBankAccTypeType BankAccType; 5835 | ///安装编号 5836 | TThostFtdcInstallIDType InstallID; 5837 | ///验证客户证件号码标志 5838 | TThostFtdcYesNoIndicatorType VerifyCertNoFlag; 5839 | ///币种代码 5840 | TThostFtdcCurrencyIDType CurrencyID; 5841 | ///期货公司银行编码 5842 | TThostFtdcBankCodingForFutureType BrokerIDByBank; 5843 | ///银行密码标志 5844 | TThostFtdcPwdFlagType BankPwdFlag; 5845 | ///期货资金密码核对标志 5846 | TThostFtdcPwdFlagType SecuPwdFlag; 5847 | ///交易ID 5848 | TThostFtdcTIDType TID; 5849 | ///摘要 5850 | TThostFtdcDigestType Digest; 5851 | ///错误代码 5852 | TThostFtdcErrorIDType ErrorID; 5853 | ///错误信息 5854 | TThostFtdcErrorMsgType ErrorMsg; 5855 | }; 5856 | 5857 | ///灾备中心交易权限 5858 | struct CThostFtdcUserRightsAssignField 5859 | { 5860 | ///应用单元代码 5861 | TThostFtdcBrokerIDType BrokerID; 5862 | ///用户代码 5863 | TThostFtdcUserIDType UserID; 5864 | ///交易中心代码 5865 | TThostFtdcDRIdentityIDType DRIdentityID; 5866 | }; 5867 | 5868 | ///经济公司是否有在本标示的交易权限 5869 | struct CThostFtdcBrokerUserRightAssignField 5870 | { 5871 | ///应用单元代码 5872 | TThostFtdcBrokerIDType BrokerID; 5873 | ///交易中心代码 5874 | TThostFtdcDRIdentityIDType DRIdentityID; 5875 | ///能否交易 5876 | TThostFtdcBoolType Tradeable; 5877 | }; 5878 | 5879 | ///灾备交易转换报文 5880 | struct CThostFtdcDRTransferField 5881 | { 5882 | ///原交易中心代码 5883 | TThostFtdcDRIdentityIDType OrigDRIdentityID; 5884 | ///目标交易中心代码 5885 | TThostFtdcDRIdentityIDType DestDRIdentityID; 5886 | ///原应用单元代码 5887 | TThostFtdcBrokerIDType OrigBrokerID; 5888 | ///目标易用单元代码 5889 | TThostFtdcBrokerIDType DestBrokerID; 5890 | }; 5891 | 5892 | 5893 | 5894 | #endif 5895 | -------------------------------------------------------------------------------- /src/c++/error.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /src/c++/error.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /src/c++/thostmduserapi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaxxx/ctp/237d042ce79d3f3da25b441fc6b5663346984951/src/c++/thostmduserapi.so -------------------------------------------------------------------------------- /src/c++/thosttraderapi.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gaxxx/ctp/237d042ce79d3f3da25b441fc6b5663346984951/src/c++/thosttraderapi.so -------------------------------------------------------------------------------- /src/ctp.swig: -------------------------------------------------------------------------------- 1 | //name of the resulting GO package 2 | %module ctp %{ 3 | #include "ThostFtdcMdApi.h" 4 | #include "ThostFtdcTraderApi.h" 5 | #include "ThostFtdcUserApiDataType.h" 6 | #include "ThostFtdcUserApiStruct.h" 7 | #include "helper.h" 8 | %} 9 | 10 | %module(directors="1") CThostFtdcTraderSpi 11 | %feature("director") CThostFtdcTraderSpi; 12 | 13 | %insert(go_wrapper) %{ 14 | 15 | type GoThostFtdcTraderSpi struct { 16 | CThostFtdcTraderSpi 17 | } 18 | 19 | func GTrader(impl CThostFtdcTraderSpi) CThostFtdcTraderSpi { 20 | return NewDirectorCThostFtdcTraderSpi(&GoThostFtdcTraderSpi{impl}) 21 | } 22 | 23 | type ThostFtdcTraderSpiImplBase struct{} 24 | func (p *ThostFtdcTraderSpiImplBase) Swigcptr() uintptr { return 0 } 25 | func (p *ThostFtdcTraderSpiImplBase) SwigIsCThostFtdcTraderSpi() { } 26 | func (p *ThostFtdcTraderSpiImplBase) DirectorInterface() interface{} { return nil } 27 | func (p *ThostFtdcTraderSpiImplBase) OnFrontConnected() {} 28 | func (p *ThostFtdcTraderSpiImplBase) OnFrontDisconnected(arg2 int) {} 29 | func (p *ThostFtdcTraderSpiImplBase) OnHeartBeatWarning(arg2 int) {} 30 | func (p *ThostFtdcTraderSpiImplBase) OnRspAuthenticate(arg2 CThostFtdcRspAuthenticateField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 31 | func (p *ThostFtdcTraderSpiImplBase) OnRspUserLogin(arg2 CThostFtdcRspUserLoginField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 32 | func (p *ThostFtdcTraderSpiImplBase) OnRspUserLogout(arg2 CThostFtdcUserLogoutField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 33 | func (p *ThostFtdcTraderSpiImplBase) OnRspUserPasswordUpdate(arg2 CThostFtdcUserPasswordUpdateField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 34 | func (p *ThostFtdcTraderSpiImplBase) OnRspTradingAccountPasswordUpdate(arg2 CThostFtdcTradingAccountPasswordUpdateField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 35 | func (p *ThostFtdcTraderSpiImplBase) OnRspOrderInsert(arg2 CThostFtdcInputOrderField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 36 | func (p *ThostFtdcTraderSpiImplBase) OnRspParkedOrderInsert(arg2 CThostFtdcParkedOrderField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 37 | func (p *ThostFtdcTraderSpiImplBase) OnRspParkedOrderAction(arg2 CThostFtdcParkedOrderActionField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 38 | func (p *ThostFtdcTraderSpiImplBase) OnRspOrderAction(arg2 CThostFtdcInputOrderActionField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 39 | func (p *ThostFtdcTraderSpiImplBase) OnRspQueryMaxOrderVolume(arg2 CThostFtdcQueryMaxOrderVolumeField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 40 | func (p *ThostFtdcTraderSpiImplBase) OnRspSettlementInfoConfirm(arg2 CThostFtdcSettlementInfoConfirmField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 41 | func (p *ThostFtdcTraderSpiImplBase) OnRspRemoveParkedOrder(arg2 CThostFtdcRemoveParkedOrderField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 42 | func (p *ThostFtdcTraderSpiImplBase) OnRspRemoveParkedOrderAction(arg2 CThostFtdcRemoveParkedOrderActionField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 43 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryOrder(arg2 CThostFtdcOrderField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 44 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryTrade(arg2 CThostFtdcTradeField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 45 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryInvestorPosition(arg2 CThostFtdcInvestorPositionField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 46 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryTradingAccount(arg2 CThostFtdcTradingAccountField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool) {} 47 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryInvestor(arg2 CThostFtdcInvestorField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 48 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryTradingCode(arg2 CThostFtdcTradingCodeField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 49 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryInstrumentMarginRate(arg2 CThostFtdcInstrumentMarginRateField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 50 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryInstrumentCommissionRate(arg2 CThostFtdcInstrumentCommissionRateField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 51 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryExchange(arg2 CThostFtdcExchangeField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 52 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryInstrument(arg2 CThostFtdcInstrumentField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 53 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryDepthMarketData(arg2 CThostFtdcDepthMarketDataField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 54 | func (p *ThostFtdcTraderSpiImplBase) OnRspQrySettlementInfo(arg2 CThostFtdcSettlementInfoField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 55 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryTransferBank(arg2 CThostFtdcTransferBankField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 56 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryInvestorPositionDetail(arg2 CThostFtdcInvestorPositionDetailField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 57 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryNotice(arg2 CThostFtdcNoticeField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 58 | func (p *ThostFtdcTraderSpiImplBase) OnRspQrySettlementInfoConfirm(arg2 CThostFtdcSettlementInfoConfirmField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 59 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryInvestorPositionCombineDetail(arg2 CThostFtdcInvestorPositionCombineDetailField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 60 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryCFMMCTradingAccountKey(arg2 CThostFtdcCFMMCTradingAccountKeyField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 61 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryEWarrantOffset(arg2 CThostFtdcEWarrantOffsetField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 62 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryTransferSerial(arg2 CThostFtdcTransferSerialField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 63 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryAccountregister(arg2 CThostFtdcAccountregisterField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 64 | func (p *ThostFtdcTraderSpiImplBase) OnRspError(arg2 CThostFtdcRspInfoField, arg3 int, arg4 bool){} 65 | func (p *ThostFtdcTraderSpiImplBase) OnRtnOrder(arg2 CThostFtdcOrderField){} 66 | func (p *ThostFtdcTraderSpiImplBase) OnRtnTrade(arg2 CThostFtdcTradeField){} 67 | func (p *ThostFtdcTraderSpiImplBase) OnErrRtnOrderInsert(arg2 CThostFtdcInputOrderField, arg3 CThostFtdcRspInfoField){} 68 | func (p *ThostFtdcTraderSpiImplBase) OnErrRtnOrderAction(arg2 CThostFtdcOrderActionField, arg3 CThostFtdcRspInfoField){} 69 | func (p *ThostFtdcTraderSpiImplBase) OnRtnInstrumentStatus(arg2 CThostFtdcInstrumentStatusField){} 70 | func (p *ThostFtdcTraderSpiImplBase) OnRtnTradingNotice(arg2 CThostFtdcTradingNoticeInfoField){} 71 | func (p *ThostFtdcTraderSpiImplBase) OnRtnErrorConditionalOrder(arg2 CThostFtdcErrorConditionalOrderField){} 72 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryContractBank(arg2 CThostFtdcContractBankField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 73 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryParkedOrder(arg2 CThostFtdcParkedOrderField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 74 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryParkedOrderAction(arg2 CThostFtdcParkedOrderActionField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 75 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryTradingNotice(arg2 CThostFtdcTradingNoticeField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 76 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryBrokerTradingParams(arg2 CThostFtdcBrokerTradingParamsField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 77 | func (p *ThostFtdcTraderSpiImplBase) OnRspQryBrokerTradingAlgos(arg2 CThostFtdcBrokerTradingAlgosField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 78 | func (p *ThostFtdcTraderSpiImplBase) OnRtnFromBankToFutureByBank(arg2 CThostFtdcRspTransferField){} 79 | func (p *ThostFtdcTraderSpiImplBase) OnRtnFromFutureToBankByBank(arg2 CThostFtdcRspTransferField){} 80 | func (p *ThostFtdcTraderSpiImplBase) OnRtnRepealFromBankToFutureByBank(arg2 CThostFtdcRspRepealField){} 81 | func (p *ThostFtdcTraderSpiImplBase) OnRtnRepealFromFutureToBankByBank(arg2 CThostFtdcRspRepealField){} 82 | func (p *ThostFtdcTraderSpiImplBase) OnRtnFromBankToFutureByFuture(arg2 CThostFtdcRspTransferField){} 83 | func (p *ThostFtdcTraderSpiImplBase) OnRtnFromFutureToBankByFuture(arg2 CThostFtdcRspTransferField){} 84 | func (p *ThostFtdcTraderSpiImplBase) OnRtnRepealFromBankToFutureByFutureManual(arg2 CThostFtdcRspRepealField){} 85 | func (p *ThostFtdcTraderSpiImplBase) OnRtnRepealFromFutureToBankByFutureManual(arg2 CThostFtdcRspRepealField){} 86 | func (p *ThostFtdcTraderSpiImplBase) OnRtnQueryBankBalanceByFuture(arg2 CThostFtdcNotifyQueryAccountField){} 87 | func (p *ThostFtdcTraderSpiImplBase) OnErrRtnBankToFutureByFuture(arg2 CThostFtdcReqTransferField, arg3 CThostFtdcRspInfoField){} 88 | func (p *ThostFtdcTraderSpiImplBase) OnErrRtnFutureToBankByFuture(arg2 CThostFtdcReqTransferField, arg3 CThostFtdcRspInfoField){} 89 | func (p *ThostFtdcTraderSpiImplBase) OnErrRtnRepealBankToFutureByFutureManual(arg2 CThostFtdcReqRepealField, arg3 CThostFtdcRspInfoField){} 90 | func (p *ThostFtdcTraderSpiImplBase) OnErrRtnRepealFutureToBankByFutureManual(arg2 CThostFtdcReqRepealField, arg3 CThostFtdcRspInfoField){} 91 | func (p *ThostFtdcTraderSpiImplBase) OnErrRtnQueryBankBalanceByFuture(arg2 CThostFtdcReqQueryAccountField, arg3 CThostFtdcRspInfoField){} 92 | func (p *ThostFtdcTraderSpiImplBase) OnRtnRepealFromBankToFutureByFuture(arg2 CThostFtdcRspRepealField){} 93 | func (p *ThostFtdcTraderSpiImplBase) OnRtnRepealFromFutureToBankByFuture(arg2 CThostFtdcRspRepealField){} 94 | func (p *ThostFtdcTraderSpiImplBase) OnRspFromBankToFutureByFuture(arg2 CThostFtdcReqTransferField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 95 | func (p *ThostFtdcTraderSpiImplBase) OnRspFromFutureToBankByFuture(arg2 CThostFtdcReqTransferField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 96 | func (p *ThostFtdcTraderSpiImplBase) OnRspQueryBankAccountMoneyByFuture(arg2 CThostFtdcReqQueryAccountField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 97 | func (p *ThostFtdcTraderSpiImplBase) OnRtnOpenAccountByBank(arg2 CThostFtdcOpenAccountField){} 98 | func (p *ThostFtdcTraderSpiImplBase) OnRtnCancelAccountByBank(arg2 CThostFtdcCancelAccountField){} 99 | func (p *ThostFtdcTraderSpiImplBase) OnRtnChangeAccountByBank(arg2 CThostFtdcChangeAccountField){} 100 | 101 | %} 102 | 103 | 104 | 105 | %module(directors="2") CThostFtdcMdSpi 106 | %feature("director") CThostFtdcMdSpi; 107 | 108 | %insert(go_wrapper) %{ 109 | type GoThostFtdcMdSpi struct { 110 | CThostFtdcMdSpi 111 | } 112 | 113 | func GMd(impl CThostFtdcMdSpi) CThostFtdcMdSpi { 114 | return NewDirectorCThostFtdcMdSpi(&GoThostFtdcMdSpi{impl}) 115 | } 116 | 117 | type ThostFtdcMdSpiImplBase struct {} 118 | 119 | 120 | func (p *ThostFtdcMdSpiImplBase) Swigcptr() uintptr { return 0 } 121 | func (p *ThostFtdcMdSpiImplBase) SwigIsCThostFtdcMdSpi() { } 122 | func (p *ThostFtdcMdSpiImplBase) DirectorInterface() interface{} { return nil } 123 | func (p *ThostFtdcMdSpiImplBase) OnFrontConnected(){} 124 | func (p *ThostFtdcMdSpiImplBase) OnFrontDisconnected(arg2 int){} 125 | func (p *ThostFtdcMdSpiImplBase) OnHeartBeatWarning(arg2 int){} 126 | func (p *ThostFtdcMdSpiImplBase) OnRspUserLogin(arg2 CThostFtdcRspUserLoginField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 127 | func (p *ThostFtdcMdSpiImplBase) OnRspUserLogout(arg2 CThostFtdcUserLogoutField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 128 | func (p *ThostFtdcMdSpiImplBase) OnRspError(arg2 CThostFtdcRspInfoField, arg3 int, arg4 bool){} 129 | func (p *ThostFtdcMdSpiImplBase) OnRspSubMarketData(arg2 CThostFtdcSpecificInstrumentField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 130 | func (p *ThostFtdcMdSpiImplBase) OnRspUnSubMarketData(arg2 CThostFtdcSpecificInstrumentField, arg3 CThostFtdcRspInfoField, arg4 int, arg5 bool){} 131 | func (p *ThostFtdcMdSpiImplBase) OnRtnDepthMarketData(arg2 CThostFtdcDepthMarketDataField){} 132 | %} 133 | 134 | 135 | %include "../c++/ThostFtdcMdApi.h" 136 | %include "../c++/ThostFtdcTraderApi.h" 137 | %include "../c++/ThostFtdcUserApiDataType.h" 138 | %include "../c++/ThostFtdcUserApiStruct.h" 139 | %include "../helper/helper.h" 140 | 141 | -------------------------------------------------------------------------------- /src/helper/helper.cpp: -------------------------------------------------------------------------------- 1 | #include "helper.h" 2 | #include 3 | #include 4 | 5 | int Iconv(char*in,size_t ilen, char* out,size_t olen,char *from,char* to) { 6 | iconv_t cd = iconv_open(to,from); 7 | if (cd == 0) { 8 | return 0; 9 | } 10 | int size = iconv(cd,&in,&ilen,&out,&olen); 11 | memset(out+size,0,2*ilen-size); 12 | if (cd != 0) { 13 | iconv_close(cd); 14 | } 15 | return size; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/helper/helper.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | int Iconv(char*in,size_t ilen, char* out,size_t olen,char *from,char* to); 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/make.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rm -rf build 3 | mkdir build 4 | cd build 5 | 6 | GODST="" 7 | if [ "$GOROOT" != "" ] 8 | then 9 | GODST=$GOROOT 10 | else 11 | echo "you must set GOROOT" 12 | exit 1 13 | fi 14 | 15 | CC=g++ 16 | CXXFLAGS="-Wall -g" 17 | LDFLAGS="-Wall -g" 18 | 19 | cp ../c++/thostmduserapi.so ../c++/thosttraderapi.so /usr/lib/ 20 | 21 | #create share libarary 22 | cp ../ctp.swig ./ 23 | swig -go -c++ -intgosize 64 -soname libctp.so ./ctp.swig 24 | $CC $CXXFLAGS -I../c++/ -I../helper/ -fpic -c ctp_wrap.cxx -o ctp_wrap.o 25 | $CC $CXXFLAGS -I../helper/ -fpic -c ../helper/helper.cpp -o helper.o 26 | $CC $LDFLAGS -shared -o libctp.so ctp_wrap.o helper.o /usr/lib/thostmduserapi.so /usr/lib/thosttraderapi.so 27 | cp ./libctp.so /usr/lib/ 28 | 29 | 30 | #create go stub 31 | go tool 6c -I "$GODST/pkg/linux_amd64" -D _64BIT ctp_gc.c 32 | go tool 6g ctp.go 33 | go tool pack grc ctp.a ctp.6 ctp_gc.6 34 | cp ctp.a $GODST/pkg/linux_amd64/ctp.a 35 | mkdir $GODST/src/pkg/ctp 36 | cp ctp.go $GODST/src/pkg/ctp/ 37 | 38 | 39 | --------------------------------------------------------------------------------