@hitrading/ctp-node 4.1.2 → 4.1.3-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -1
  3. package/README.zh-CN.md +1 -1
  4. package/binding.gyp +9 -0
  5. package/ctpsdk/macos/thostmduserapi_se.framework/Versions/A/Headers/ThostFtdcMdApi.h +2 -1
  6. package/ctpsdk/macos/thostmduserapi_se.framework/Versions/A/Headers/ThostFtdcUserApiDataType.h +170 -7
  7. package/ctpsdk/macos/thostmduserapi_se.framework/Versions/A/Headers/ThostFtdcUserApiStruct.h +1485 -33
  8. package/ctpsdk/macos/thostmduserapi_se.framework/Versions/A/Resources/demo.txt +58 -0
  9. package/ctpsdk/macos/thostmduserapi_se.framework/Versions/A/Resources/package.des +14 -0
  10. package/ctpsdk/macos/thostmduserapi_se.framework/Versions/A/Resources/readme.txt +2 -0
  11. package/ctpsdk/macos/thostmduserapi_se.framework/Versions/A/_CodeSignature/CodeResources +36 -3
  12. package/ctpsdk/macos/thostmduserapi_se.framework/Versions/A/thostmduserapi_se +0 -0
  13. package/ctpsdk/macos/thosttraderapi_se.framework/Versions/A/Headers/ThostFtdcTraderApi.h +121 -7
  14. package/ctpsdk/macos/thosttraderapi_se.framework/Versions/A/Headers/ThostFtdcUserApiDataType.h +170 -7
  15. package/ctpsdk/macos/thosttraderapi_se.framework/Versions/A/Headers/ThostFtdcUserApiStruct.h +1485 -33
  16. package/ctpsdk/macos/thosttraderapi_se.framework/Versions/A/Resources/demo.txt +58 -0
  17. package/ctpsdk/macos/thosttraderapi_se.framework/Versions/A/Resources/package.des +14 -0
  18. package/ctpsdk/macos/thosttraderapi_se.framework/Versions/A/Resources/readme.txt +2 -0
  19. package/ctpsdk/macos/thosttraderapi_se.framework/Versions/A/_CodeSignature/CodeResources +36 -3
  20. package/ctpsdk/macos/thosttraderapi_se.framework/Versions/A/thosttraderapi_se +0 -0
  21. package/docs/API.md +3 -1
  22. package/docs/API.zh-CN.md +2 -1
  23. package/docs/MIGRATION.md +5 -1
  24. package/docs/troubleshooting.md +2 -1
  25. package/docs/troubleshooting.zh-CN.md +2 -1
  26. package/package.json +3 -2
  27. package/prebuilds/win32-x64/@hitrading+ctp-node.node +0 -0
  28. package/scripts/check-macos-sdk.cjs +80 -0
@@ -0,0 +1,58 @@
1
+ int main(void)
2
+ {
3
+ unsigned char aucAesInPutData[273] = { 0 };
4
+
5
+ aucAesInPutData[0] = 1;
6
+ aucAesInPutData[1] = '0';
7
+ aucAesInPutData[2] = 3;
8
+ aucAesInPutData[3] = 4;
9
+ aucAesInPutData[4] = 5;
10
+ aucAesInPutData[5] = 6;
11
+ aucAesInPutData[7] = 9;
12
+
13
+ memcpy(aucAesInPutData + 8, "HDWDWADHAWNO@DHNAOIDAWOD@DADA", strlen("HDWDWADHAWNO@DHNAOIDAWOD@DADA"));
14
+
15
+ int reallen = 8 + strlen("HDWDWADHAWNO@DHNAOIDAWOD@DADA");
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+ unsigned char aucAesEncodeData[273] = { 0 };
24
+ unsigned char aucAeskey[17] = { 0 };
25
+ GetComm128BitsAesKey(aucAeskey);
26
+
27
+ AES_KEY aes;
28
+
29
+ int result = AES_set_encrypt_key(aucAeskey, 128, &aes);//设置加密密钥
30
+ if (result < 0)//如果设置失败,退出
31
+ return -1;
32
+
33
+
34
+ reallen = (16 - reallen % 16) + reallen;
35
+
36
+ for (int i = 0; i < reallen / 16; ++i)
37
+ {
38
+ AES_ecb_encrypt((unsigned char*)(aucAesInPutData + 16 * i), aucAesEncodeData + 16 * i, &aes, AES_ENCRYPT);
39
+ }
40
+
41
+
42
+
43
+ result = AES_set_decrypt_key(aucAeskey, 128, &aes);//设置加密密钥
44
+ if (result < 0)//如果设置失败,退出
45
+ return -1;
46
+ unsigned char aucAesOutData[273] = { 0 };
47
+
48
+ for (int i = 0; i < reallen / 16; ++i)
49
+ {
50
+ AES_ecb_encrypt((unsigned char*)(aucAesEncodeData + 16 * i), aucAesOutData + 16 * i, &aes, AES_DECRYPT);
51
+ }
52
+
53
+
54
+
55
+
56
+
57
+ return 0;
58
+ }
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="gb2312"?>
2
+ <!DOCTYPE packageDefine SYSTEM "C:\amake\package.dtd">
3
+ <packageDefine name="CommAesKey" version="1" type="cpp" includedir="." platform="all">
4
+ <parameter/>
5
+ <depend>
6
+ </depend>
7
+ <cppfile>
8
+ <file name="CommAesKey.cpp"/>
9
+ </cppfile>
10
+ <headfile>
11
+ <file name="CommAesKey.h"/>
12
+ </headfile>
13
+ <command/>
14
+ </packageDefine>
@@ -0,0 +1,2 @@
1
+ 通用的aes秘钥 适合简单对称加密场景, 不区分红黄区
2
+ 目前用在 微信小程序采集库 和tradeapi上报数据之间的加密
@@ -8,6 +8,18 @@
8
8
  <data>
9
9
  TOE+h5cJeWlDwmJo/Xo5uQQLWvU=
10
10
  </data>
11
+ <key>Resources/demo.txt</key>
12
+ <data>
13
+ 6rxOq+3qQg1borsuR7Ac321LS+E=
14
+ </data>
15
+ <key>Resources/package.des</key>
16
+ <data>
17
+ jrbZMIOlX3HAhwEAlKH6eoboUTE=
18
+ </data>
19
+ <key>Resources/readme.txt</key>
20
+ <data>
21
+ 87xms+eK0V0empcfgo58JvOJZrc=
22
+ </data>
11
23
  </dict>
12
24
  <key>files2</key>
13
25
  <dict>
@@ -15,21 +27,21 @@
15
27
  <dict>
16
28
  <key>hash2</key>
17
29
  <data>
18
- dEtokAKLUmXyqR3WtDgh7HH7BRJ3Cm9ej7AQVvby1Og=
30
+ Ricmu7dJNW/FVdUd0HOEJn7DEsbgaZnIFQkW6/te+FI=
19
31
  </data>
20
32
  </dict>
21
33
  <key>Headers/ThostFtdcUserApiDataType.h</key>
22
34
  <dict>
23
35
  <key>hash2</key>
24
36
  <data>
25
- jeG/TAar2HshrQ9+4jkob94MKMFWLoH4Xl/HcKjIgww=
37
+ g4JFK88Lt2FgJODNwoC7123C6Ak3xx9PwK3oCcvvY+c=
26
38
  </data>
27
39
  </dict>
28
40
  <key>Headers/ThostFtdcUserApiStruct.h</key>
29
41
  <dict>
30
42
  <key>hash2</key>
31
43
  <data>
32
- E0WAQNGnhA4Om36nesySUQiOWRpOfovob8bEQ0DXibU=
44
+ VrO9rvXwzJ3b9d8xx+CJ+pklJVMSCofxkkFeS+Qua/c=
33
45
  </data>
34
46
  </dict>
35
47
  <key>Resources/Info.plist</key>
@@ -39,6 +51,27 @@
39
51
  W+Y03he/s8YHwth//OW4ntlb03j3ayTRQRuR+s23cWk=
40
52
  </data>
41
53
  </dict>
54
+ <key>Resources/demo.txt</key>
55
+ <dict>
56
+ <key>hash2</key>
57
+ <data>
58
+ Sv/7zVEvIJxPhI6ykmfoynT9luvqXVqastUUyaNWfdg=
59
+ </data>
60
+ </dict>
61
+ <key>Resources/package.des</key>
62
+ <dict>
63
+ <key>hash2</key>
64
+ <data>
65
+ JjdY5xqmxTc+E5YJvqbOVaT+iSdofhuurOan2GO5Eg8=
66
+ </data>
67
+ </dict>
68
+ <key>Resources/readme.txt</key>
69
+ <dict>
70
+ <key>hash2</key>
71
+ <data>
72
+ O9VEXNXxOJY5+eHYiEBPMYxtGDk0l/iJMVZqtSc/sK0=
73
+ </data>
74
+ </dict>
42
75
  </dict>
43
76
  <key>rules</key>
44
77
  <dict>
@@ -48,7 +48,10 @@ public:
48
48
  ///客户端认证响应
49
49
  virtual void OnRspAuthenticate(CThostFtdcRspAuthenticateField *pRspAuthenticateField, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
50
50
 
51
-
51
+ ///该方法在处理私有流之前被调用
52
+ ///@param nSeqNo 即将被处理的私有流的序号
53
+ virtual void OnRtnPrivateSeqNo(int nSeqNo) {};
54
+
52
55
  ///登录请求响应
53
56
  virtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
54
57
 
@@ -145,6 +148,9 @@ public:
145
148
  ///请求查询合约手续费率响应
146
149
  virtual void OnRspQryInstrumentCommissionRate(CThostFtdcInstrumentCommissionRateField *pInstrumentCommissionRate, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
147
150
 
151
+ ///请求查询用户会话响应
152
+ virtual void OnRspQryUserSession(CThostFtdcUserSessionField *pUserSession, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
153
+
148
154
  ///请求查询交易所响应
149
155
  virtual void OnRspQryExchange(CThostFtdcExchangeField *pExchange, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
150
156
 
@@ -499,8 +505,71 @@ public:
499
505
  ///投资者产品RULE保证金查询响应
500
506
  virtual void OnRspQryInvestorProdRULEMargin(CThostFtdcInvestorProdRULEMarginField *pInvestorProdRULEMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
501
507
 
502
- ///投资者投资者新组保设置查询响应
508
+ ///投资者新型组合保证金开关查询响应
503
509
  virtual void OnRspQryInvestorPortfSetting(CThostFtdcInvestorPortfSettingField *pInvestorPortfSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
510
+
511
+ ///投资者申报费阶梯收取记录查询响应
512
+ virtual void OnRspQryInvestorInfoCommRec(CThostFtdcInvestorInfoCommRecField *pInvestorInfoCommRec, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
513
+
514
+ ///组合腿信息查询响应
515
+ virtual void OnRspQryCombLeg(CThostFtdcCombLegField *pCombLeg, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
516
+
517
+ ///对冲设置请求响应
518
+ virtual void OnRspOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
519
+
520
+ ///对冲设置撤销请求响应
521
+ virtual void OnRspCancelOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
522
+
523
+ ///对冲设置通知
524
+ virtual void OnRtnOffsetSetting(CThostFtdcOffsetSettingField *pOffsetSetting) {};
525
+
526
+ ///对冲设置错误回报
527
+ virtual void OnErrRtnOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, CThostFtdcRspInfoField *pRspInfo) {};
528
+
529
+ ///对冲设置撤销错误回报
530
+ virtual void OnErrRtnCancelOffsetSetting(CThostFtdcCancelOffsetSettingField *pCancelOffsetSetting, CThostFtdcRspInfoField *pRspInfo) {};
531
+
532
+ ///投资者对冲设置查询响应
533
+ virtual void OnRspQryOffsetSetting(CThostFtdcOffsetSettingField *pOffsetSetting, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
534
+
535
+ ///申请短信验证码响应
536
+ virtual void OnRspGenSMSCode(CThostFtdcRspGenSMSCodeField *pRspGenSMSCode, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
537
+
538
+ ///套利确认回复
539
+ virtual void OnRspSpdApply(CThostFtdcInputSpdApplyField *pInputSpdApply, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
540
+
541
+ ///套利确认撤销回复
542
+ virtual void OnRspSpdApplyAction(CThostFtdcInputSpdApplyActionField *pInputSpdApplyAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
543
+
544
+ ///套利确认查询回复
545
+ virtual void OnRspQrySpdApply(CThostFtdcSpdApplyField *pSpdApply, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
546
+
547
+ ///套利确认通知
548
+ virtual void OnRtnSpdApply(CThostFtdcSpdApplyField *pSpdApply) {};
549
+
550
+ ///套利申请录入错误回报
551
+ virtual void OnErrRtnSpdApply(CThostFtdcInputSpdApplyField *pInputSpdApply, CThostFtdcRspInfoField *pRspInfo) {};
552
+
553
+ ///套利确认撤销通知
554
+ virtual void OnErrRtnSpdApplyAction(CThostFtdcSpdApplyActionField *pSpdApplyAction, CThostFtdcRspInfoField *pRspInfo) {};
555
+
556
+ ///套保确认回复
557
+ virtual void OnRspHedgeCfm(CThostFtdcInputHedgeCfmField *pInputHedgeCfm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
558
+
559
+ ///套保确认撤销回复
560
+ virtual void OnRspHedgeCfmAction(CThostFtdcInputHedgeCfmActionField *pInputHedgeCfmAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
561
+
562
+ ///套保确认查询回复
563
+ virtual void OnRspQryHedgeCfm(CThostFtdcHedgeCfmField *pHedgeCfm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
564
+
565
+ ///套保确认通知
566
+ virtual void OnRtnHedgeCfm(CThostFtdcHedgeCfmField *pHedgeCfm) {};
567
+
568
+ ///套保额度录入错误回报
569
+ virtual void OnErrRtnHedgeCfm(CThostFtdcInputHedgeCfmField *pInputHedgeCfm, CThostFtdcRspInfoField *pRspInfo) {};
570
+
571
+ ///套保确认撤销通知
572
+ virtual void OnErrRtnHedgeCfmAction(CThostFtdcHedgeCfmActionField *pHedgeCfmAction, CThostFtdcRspInfoField *pRspInfo) {};
504
573
  };
505
574
 
506
575
  class TRADER_API_EXPORT CThostFtdcTraderApi
@@ -508,8 +577,9 @@ class TRADER_API_EXPORT CThostFtdcTraderApi
508
577
  public:
509
578
  ///创建TraderApi
510
579
  ///@param pszFlowPath 存贮订阅信息文件的目录,默认为当前目录
580
+ ///@param bIsProductionMode true:使用生产版本的API false:使用测评版本的API
511
581
  ///@return 创建出的UserApi
512
- static CThostFtdcTraderApi *CreateFtdcTraderApi(const char *pszFlowPath = "");
582
+ static CThostFtdcTraderApi *CreateFtdcTraderApi(const char *pszFlowPath = "", bool bIsProductionMode = true);
513
583
 
514
584
  ///获取API的版本信息
515
585
  ///@retrun 获取到的版本号
@@ -564,8 +634,9 @@ public:
564
634
  /// THOST_TERT_RESTART:从本交易日开始重传
565
635
  /// THOST_TERT_RESUME:从上次收到的续传
566
636
  /// THOST_TERT_QUICK:只传送登录后私有流的内容
567
- ///@remark 该方法要在Init方法前调用。若不调用则不会收到私有流的数据。
568
- virtual void SubscribePrivateTopic(THOST_TE_RESUME_TYPE nResumeType) = 0;
637
+ ///@param nSeqNo 私有流序号,只在THOST_TERT_RESUME_FROM_SEQ_NO模式下有效
638
+ ///@remark 该方法要在Init方法前调用。若不调用则不会收到私有流的数据。
639
+ virtual void SubscribePrivateTopic(THOST_TE_RESUME_TYPE nResumeType, int nSeqNo=1) = 0;
569
640
 
570
641
  ///订阅公共流。
571
642
  ///@param nResumeType 公共流重传方式
@@ -586,9 +657,13 @@ public:
586
657
  ///上报用户终端信息,用于中继服务器操作员登录模式
587
658
  ///操作员登录后,可以多次调用该接口上报客户信息
588
659
  virtual int SubmitUserSystemInfo(CThostFtdcUserSystemInfoField *pUserSystemInfo) = 0;
660
+ ///注册用户终端信息,用于中继服务器多连接模式.用于微信小程序等应用上报信息.
661
+ virtual int RegisterWechatUserSystemInfo(CThostFtdcWechatUserSystemInfoField *pUserSystemInfo) = 0;
662
+ ///上报用户终端信息,用于中继服务器操作员登录模式.用于微信小程序等应用上报信息.
663
+ virtual int SubmitWechatUserSystemInfo(CThostFtdcWechatUserSystemInfoField *pUserSystemInfo) = 0;
589
664
 
590
665
  ///用户登录请求
591
- virtual int ReqUserLogin(CThostFtdcReqUserLoginField *pReqUserLoginField, int nRequestID, TThostFtdcSystemInfoLenType length, TThostFtdcClientSystemInfoType systemInfo) = 0;
666
+ virtual int ReqUserLogin(CThostFtdcReqUserLoginField *pReqUserLoginField, int nRequestID) = 0;
592
667
 
593
668
  ///登出请求
594
669
  virtual int ReqUserLogout(CThostFtdcUserLogoutField *pUserLogout, int nRequestID) = 0;
@@ -692,6 +767,9 @@ public:
692
767
  ///请求查询合约手续费率
693
768
  virtual int ReqQryInstrumentCommissionRate(CThostFtdcQryInstrumentCommissionRateField *pQryInstrumentCommissionRate, int nRequestID) = 0;
694
769
 
770
+ ///请求查询用户会话
771
+ virtual int ReqQryUserSession(CThostFtdcQryUserSessionField *pQryUserSession, int nRequestID) = 0;
772
+
695
773
  ///请求查询交易所
696
774
  virtual int ReqQryExchange(CThostFtdcQryExchangeField *pQryExchange, int nRequestID) = 0;
697
775
 
@@ -917,8 +995,44 @@ public:
917
995
  ///投资者产品RULE保证金查询
918
996
  virtual int ReqQryInvestorProdRULEMargin(CThostFtdcQryInvestorProdRULEMarginField *pQryInvestorProdRULEMargin, int nRequestID) = 0;
919
997
 
920
- ///投资者投资者新组保设置查询
998
+ ///投资者新型组合保证金开关查询
921
999
  virtual int ReqQryInvestorPortfSetting(CThostFtdcQryInvestorPortfSettingField *pQryInvestorPortfSetting, int nRequestID) = 0;
1000
+
1001
+ ///投资者申报费阶梯收取记录查询
1002
+ virtual int ReqQryInvestorInfoCommRec(CThostFtdcQryInvestorInfoCommRecField *pQryInvestorInfoCommRec, int nRequestID) = 0;
1003
+
1004
+ ///组合腿信息查询
1005
+ virtual int ReqQryCombLeg(CThostFtdcQryCombLegField *pQryCombLeg, int nRequestID) = 0;
1006
+
1007
+ ///对冲设置请求
1008
+ virtual int ReqOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, int nRequestID) = 0;
1009
+
1010
+ ///对冲设置撤销请求
1011
+ virtual int ReqCancelOffsetSetting(CThostFtdcInputOffsetSettingField *pInputOffsetSetting, int nRequestID) = 0;
1012
+
1013
+ ///投资者对冲设置查询
1014
+ virtual int ReqQryOffsetSetting(CThostFtdcQryOffsetSettingField *pQryOffsetSetting, int nRequestID) = 0;
1015
+
1016
+ ///申请短信验证码请求
1017
+ virtual int ReqGenSMSCode(CThostFtdcReqGenSMSCodeField *pReqGenSMSCode, int nRequestID) = 0;
1018
+
1019
+ ///套利确认请求
1020
+ virtual int ReqSpdApply(CThostFtdcInputSpdApplyField *pInputSpdApply, int nRequestID) = 0;
1021
+
1022
+ ///套利确认撤销请求
1023
+ virtual int ReqSpdApplyAction(CThostFtdcInputSpdApplyActionField *pInputSpdApplyAction, int nRequestID) = 0;
1024
+
1025
+ ///套利确认查询请求
1026
+ virtual int ReqQrySpdApply(CThostFtdcQrySpdApplyField *pQrySpdApply, int nRequestID) = 0;
1027
+
1028
+ ///套保确认请求
1029
+ virtual int ReqHedgeCfm(CThostFtdcInputHedgeCfmField *pInputHedgeCfm, int nRequestID) = 0;
1030
+
1031
+ ///套保确认撤销请求
1032
+ virtual int ReqHedgeCfmAction(CThostFtdcInputHedgeCfmActionField *pInputHedgeCfmAction, int nRequestID) = 0;
1033
+
1034
+ ///套保确认查询请求
1035
+ virtual int ReqQryHedgeCfm(CThostFtdcQryHedgeCfmField *pQryHedgeCfm, int nRequestID) = 0;
922
1036
  protected:
923
1037
  ~CThostFtdcTraderApi(){};
924
1038
  };
@@ -3,8 +3,8 @@
3
3
  ///@company 上海期货信息技术有限公司
4
4
  ///@file ThostFtdcUserApiDataType.h
5
5
  ///@brief 定义了客户端接口使用的业务数据类型
6
- ///@history
7
- ///20060106 赵鸿昊 创建该文件
6
+ ///@history
7
+ ///20060106 赵鸿昊 创建该文件
8
8
  /////////////////////////////////////////////////////////////////////////
9
9
 
10
10
  #ifndef THOST_FTDCDATATYPE_H
@@ -12,10 +12,11 @@
12
12
 
13
13
  enum THOST_TE_RESUME_TYPE
14
14
  {
15
- THOST_TERT_RESTART = 0,
16
- THOST_TERT_RESUME,
17
- THOST_TERT_QUICK,
18
- THOST_TERT_NONE
15
+ THOST_TERT_RESTART = 0,
16
+ THOST_TERT_RESUME,
17
+ THOST_TERT_QUICK,
18
+ THOST_TERT_NONE,
19
+ THOST_TERT_RESUME_FROM_SEQ_NO
19
20
  };
20
21
 
21
22
  /////////////////////////////////////////////////////////////////////////
@@ -128,6 +129,11 @@ typedef char TThostFtdcExchangeFlagType[2];
128
129
  /////////////////////////////////////////////////////////////////////////
129
130
  typedef char TThostFtdcMacAddressType[21];
130
131
 
132
+ /////////////////////////////////////////////////////////////////////////
133
+ ///TFtdcDeviceTagType是一个客户端机器标识,可填MAC或UUID类型
134
+ /////////////////////////////////////////////////////////////////////////
135
+ typedef char TThostFtdcDeviceTagType[41];
136
+
131
137
  /////////////////////////////////////////////////////////////////////////
132
138
  ///TFtdcSystemIDType是一个系统编号类型
133
139
  /////////////////////////////////////////////////////////////////////////
@@ -547,6 +553,8 @@ typedef char TThostFtdcFunctionCodeType;
547
553
  #define THOST_FTDC_BFC_FBSign 'W'
548
554
  ///银期签约解约
549
555
  #define THOST_FTDC_BFC_FBAccount 'X'
556
+ ///接收短信验证码
557
+ #define THOST_FTDC_BFC_RcvSMSCode 'Y'
550
558
 
551
559
  typedef char TThostFtdcBrokerFunctionCodeType;
552
560
 
@@ -1551,6 +1559,18 @@ typedef char TThostFtdcSystemParamIDType;
1551
1559
  #define THOST_FTDC_TPID_PasswordPeriod 'V'
1552
1560
  ///历史密码重复限制次数
1553
1561
  #define THOST_FTDC_TPID_PwdHistoryCmp 'X'
1562
+ ///转账是否验证预留银行账户
1563
+ #define THOST_FTDC_TPID_TranferChkProperty 'i'
1564
+ ///非交易时间异常报单校验参数
1565
+ #define THOST_FTDC_TPID_TradeChkPhase 'j'
1566
+ ///其他异常报单校验参数(价格和手数)
1567
+ #define THOST_FTDC_TPID_TradeChkPriceVol 'k'
1568
+ ///卖出垂直价差组合新算法
1569
+ #define THOST_FTDC_TPID_NewBESMarginAlgo 'l'
1570
+ ///大商所期货组合平仓冻结算法
1571
+ #define THOST_FTDC_TPID_IsDceFutCloseFrozen 'm'
1572
+ ///是否启用短信验证
1573
+ #define THOST_FTDC_TPID_UseSMSVerify 'n'
1554
1574
 
1555
1575
  typedef char TThostFtdcTradeParamIDType;
1556
1576
 
@@ -6919,7 +6939,7 @@ typedef double TThostFtdcDeltaType;
6919
6939
  typedef int TThostFtdcSpreadIdType;
6920
6940
 
6921
6941
  /////////////////////////////////////////////////////////////////////////
6922
- ///TFtdcPortfolioType是一个新型组保算法类型
6942
+ ///TFtdcPortfolioType是一个组保算法类型
6923
6943
  /////////////////////////////////////////////////////////////////////////
6924
6944
  ///不使用新型组保算法
6925
6945
  #define THOST_FTDC_EPF_None '0'
@@ -7095,7 +7115,150 @@ typedef char TThostFtdcProdChangeFlagType;
7095
7115
  #define THOST_FTDC_PRS_UserUpd '2'
7096
7116
  ///来源于超户修改,很可能来自主席同步数据
7097
7117
  #define THOST_FTDC_PRS_SuperUserUpd '3'
7118
+ ///来源于次席同步的修改
7119
+ #define THOST_FTDC_PRS_SecUpd '4'
7098
7120
 
7099
7121
  typedef char TThostFtdcPwdRcdSrcType;
7100
7122
 
7123
+ /////////////////////////////////////////////////////////////////////////
7124
+ ///TFtdcAddrSrvModeType是一个地址服务类型类型
7125
+ /////////////////////////////////////////////////////////////////////////
7126
+ ///交易地址
7127
+ #define THOST_FTDC_ASM_Trade '0'
7128
+ ///行情地址
7129
+ #define THOST_FTDC_ASM_MarketData '1'
7130
+ ///其他
7131
+ #define THOST_FTDC_ASM_Other '2'
7132
+
7133
+ typedef char TThostFtdcAddrSrvModeType;
7134
+
7135
+ /////////////////////////////////////////////////////////////////////////
7136
+ ///TFtdcAddrVerType是一个地址版本类型
7137
+ /////////////////////////////////////////////////////////////////////////
7138
+ ///IPV4
7139
+ #define THOST_FTDC_ADV_V4 '0'
7140
+ ///IPV6
7141
+ #define THOST_FTDC_ADV_V6 '1'
7142
+
7143
+ typedef char TThostFtdcAddrVerType;
7144
+
7145
+ /////////////////////////////////////////////////////////////////////////
7146
+ ///TFtdcAddrRemarkType是一个地址备注类型
7147
+ /////////////////////////////////////////////////////////////////////////
7148
+ typedef char TThostFtdcAddrRemarkType[161];
7149
+
7150
+ /////////////////////////////////////////////////////////////////////////
7151
+ ///TFtdcAddrNameType是一个地址名称类型
7152
+ /////////////////////////////////////////////////////////////////////////
7153
+ typedef char TThostFtdcAddrNameType[65];
7154
+
7155
+ /////////////////////////////////////////////////////////////////////////
7156
+ ///TFtdcIpAddrType是一个服务地址IP类型
7157
+ /////////////////////////////////////////////////////////////////////////
7158
+ typedef char TThostFtdcIpAddrType[129];
7159
+
7160
+ /////////////////////////////////////////////////////////////////////////
7161
+ ///TFtdcTGSessionQryStatusType是一个TGATE会话查询状态类型
7162
+ /////////////////////////////////////////////////////////////////////////
7163
+ ///查询状态空闲
7164
+ #define THOST_FTDC_TGQS_QryIdle '1'
7165
+ ///查询状态频繁
7166
+ #define THOST_FTDC_TGQS_QryBusy '2'
7167
+
7168
+ typedef char TThostFtdcTGSessionQryStatusType;
7169
+
7170
+ /////////////////////////////////////////////////////////////////////////
7171
+ ///TFtdcOffsetTypeType是一个对冲类型类型
7172
+ /////////////////////////////////////////////////////////////////////////
7173
+ ///期权对冲
7174
+ #define THOST_FTDC_OT_OPT_OFFSET '0'
7175
+ ///期货对冲
7176
+ #define THOST_FTDC_OT_FUT_OFFSET '1'
7177
+ ///行权后期货对冲
7178
+ #define THOST_FTDC_OT_EXEC_OFFSET '2'
7179
+ ///履约后期货对冲
7180
+ #define THOST_FTDC_OT_PERFORM_OFFSET '3'
7181
+
7182
+ typedef char TThostFtdcOffsetTypeType;
7183
+
7184
+ /////////////////////////////////////////////////////////////////////////
7185
+ ///TFtdcSiteType是一个站点类型
7186
+ /////////////////////////////////////////////////////////////////////////
7187
+ typedef char TThostFtdcSiteType[51];
7188
+
7189
+ /////////////////////////////////////////////////////////////////////////
7190
+ ///TFtdcNetOperatorType是一个网络运营商类型
7191
+ /////////////////////////////////////////////////////////////////////////
7192
+ typedef char TThostFtdcNetOperatorType[9];
7193
+
7194
+ /////////////////////////////////////////////////////////////////////////
7195
+ ///TFtdcApplySrcType是一个申请来源类型
7196
+ /////////////////////////////////////////////////////////////////////////
7197
+ ///交易
7198
+ #define THOST_FTDC_AS_Trade '0'
7199
+ ///会服
7200
+ #define THOST_FTDC_AS_Member '1'
7201
+
7202
+ typedef char TThostFtdcApplySrcType;
7203
+
7204
+ /////////////////////////////////////////////////////////////////////////
7205
+ ///TFtdcReserveInfoType是一个预留信息类型
7206
+ /////////////////////////////////////////////////////////////////////////
7207
+ typedef char TThostFtdcReserveInfoType[65];
7208
+
7209
+ /////////////////////////////////////////////////////////////////////////
7210
+ ///TFtdcApplyStatusType是一个套利套保申请状态类型
7211
+ /////////////////////////////////////////////////////////////////////////
7212
+ ///未知
7213
+ #define THOST_FTDC_AS2_Unknown 'a'
7214
+ ///已撤销
7215
+ #define THOST_FTDC_AS2_Canceled '0'
7216
+ ///已挂起
7217
+ #define THOST_FTDC_AS2_Suspended '1'
7218
+ ///申请成功
7219
+ #define THOST_FTDC_AS2_Accepted '3'
7220
+
7221
+ typedef char TThostFtdcApplyStatusType;
7222
+
7223
+ /////////////////////////////////////////////////////////////////////////
7224
+ ///TFtdcCmbTypeType是一个组合定单类型,0类型
7225
+ /////////////////////////////////////////////////////////////////////////
7226
+ ///SPZ
7227
+ #define THOST_FTDC_ZCECT_SPZ '0'
7228
+ ///SPD
7229
+ #define THOST_FTDC_ZCECT_SPD '1'
7230
+ ///IPS
7231
+ #define THOST_FTDC_ZCECT_IPS '2'
7232
+ ///BUL
7233
+ #define THOST_FTDC_ZCECT_BUL '3'
7234
+ ///BER
7235
+ #define THOST_FTDC_ZCECT_BER '4'
7236
+ ///BLT
7237
+ #define THOST_FTDC_ZCECT_BLT '5'
7238
+ ///BRT
7239
+ #define THOST_FTDC_ZCECT_BRT '6'
7240
+ ///STD
7241
+ #define THOST_FTDC_ZCECT_STD '7'
7242
+ ///STG
7243
+ #define THOST_FTDC_ZCECT_STG '8'
7244
+ ///PRT
7245
+ #define THOST_FTDC_ZCECT_PRT '9'
7246
+
7247
+ typedef char TThostFtdcCmbTypeType;
7248
+
7249
+ /////////////////////////////////////////////////////////////////////////
7250
+ ///TFtdcSMSCodeType是一个短信验证码类型
7251
+ /////////////////////////////////////////////////////////////////////////
7252
+ typedef char TThostFtdcSMSCodeType[17];
7253
+
7254
+ /////////////////////////////////////////////////////////////////////////
7255
+ ///TFtdcSMSContentType是一个短信内容类型
7256
+ /////////////////////////////////////////////////////////////////////////
7257
+ typedef char TThostFtdcSMSContentType[129];
7258
+
7259
+ /////////////////////////////////////////////////////////////////////////
7260
+ ///TFtdcSMSPhoneType是一个手机号类型
7261
+ /////////////////////////////////////////////////////////////////////////
7262
+ typedef char TThostFtdcSMSPhoneType[17];
7263
+
7101
7264
  #endif