Skip to content

Commit ef4275c

Browse files
升级 CTP 版本到 6.7.2
升级 native-lib-loader 到 2.5.0
1 parent 5231eaf commit ef4275c

11 files changed

+1448
-8
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
1111
[当前已封装的 CTP 版本](https://search.maven.org/artifact/org.rationalityfrontline/jctp)
1212
```
13+
6.7.2-1.0.5
14+
6.7.2_CP-1.0.5
1315
6.6.9-1.0.5
1416
6.6.9_CP-1.0.5
1517
6.6.1_P1-1.0.5
@@ -57,7 +59,7 @@ repositories {
5759
}
5860

5961
dependencies {
60-
implementation("org.rationalityfrontline:jctp:6.6.9-1.0.5")
62+
implementation("org.rationalityfrontline:jctp:6.7.2-1.0.5")
6163
}
6264
```
6365

@@ -67,7 +69,7 @@ dependencies {
6769
<dependency>
6870
<groupId>org.rationalityfrontline</groupId>
6971
<artifactId>jctp</artifactId>
70-
<version>6.6.9-1.0.5</version>
72+
<version>6.7.2-1.0.5</version>
7173
</dependency>
7274
```
7375
**Jar:**
@@ -77,7 +79,7 @@ dependencies {
7779
使用 Jar 包前请先添加 [native-lib-loader](https://github.com/scijava/native-lib-loader) 依赖:
7880
```kotlin
7981
dependencies {
80-
implementation("org.scijava:native-lib-loader:2.4.0")
82+
implementation("org.scijava:native-lib-loader:2.5.0")
8183
}
8284
```
8385

@@ -118,7 +120,7 @@ https://github.com/scijava/native-lib-loader
118120
JCTP is released under the [Apache 2.0 license](https://github.com/ktrader-tech/jctp/blob/master/LICENSE).
119121

120122
```
121-
Copyright 2020-2023 RationalityFrontline
123+
Copyright 2020-2024 RationalityFrontline
122124
123125
Licensed under the Apache License, Version 2.0 (the "License");
124126
you may not use this file except in compliance with the License.

cpp/src/ThostFtdcTraderApi.h

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,54 @@ class CThostFtdcTraderSpi
450450

451451
///投资者产品SPBM明细查询响应
452452
virtual void OnRspQryInvestorProdSPBMDetail(CThostFtdcInvestorProdSPBMDetailField *pInvestorProdSPBMDetail, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
453+
454+
///投资者商品组SPMM记录查询响应
455+
virtual void OnRspQryInvestorCommoditySPMMMargin(CThostFtdcInvestorCommoditySPMMMarginField *pInvestorCommoditySPMMMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
456+
457+
///投资者商品群SPMM记录查询响应
458+
virtual void OnRspQryInvestorCommodityGroupSPMMMargin(CThostFtdcInvestorCommodityGroupSPMMMarginField *pInvestorCommodityGroupSPMMMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
459+
460+
///SPMM合约参数查询响应
461+
virtual void OnRspQrySPMMInstParam(CThostFtdcSPMMInstParamField *pSPMMInstParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
462+
463+
///SPMM产品参数查询响应
464+
virtual void OnRspQrySPMMProductParam(CThostFtdcSPMMProductParamField *pSPMMProductParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
465+
466+
///SPBM附加跨品种抵扣参数查询响应
467+
virtual void OnRspQrySPBMAddOnInterParameter(CThostFtdcSPBMAddOnInterParameterField *pSPBMAddOnInterParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
468+
469+
///RCAMS产品组合信息查询响应
470+
virtual void OnRspQryRCAMSCombProductInfo(CThostFtdcRCAMSCombProductInfoField *pRCAMSCombProductInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
471+
472+
///RCAMS同合约风险对冲参数查询响应
473+
virtual void OnRspQryRCAMSInstrParameter(CThostFtdcRCAMSInstrParameterField *pRCAMSInstrParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
474+
475+
///RCAMS品种内风险对冲参数查询响应
476+
virtual void OnRspQryRCAMSIntraParameter(CThostFtdcRCAMSIntraParameterField *pRCAMSIntraParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
477+
478+
///RCAMS跨品种风险折抵参数查询响应
479+
virtual void OnRspQryRCAMSInterParameter(CThostFtdcRCAMSInterParameterField *pRCAMSInterParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
480+
481+
///RCAMS空头期权风险调整参数查询响应
482+
virtual void OnRspQryRCAMSShortOptAdjustParam(CThostFtdcRCAMSShortOptAdjustParamField *pRCAMSShortOptAdjustParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
483+
484+
///RCAMS策略组合持仓查询响应
485+
virtual void OnRspQryRCAMSInvestorCombPosition(CThostFtdcRCAMSInvestorCombPositionField *pRCAMSInvestorCombPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
486+
487+
///投资者品种RCAMS保证金查询响应
488+
virtual void OnRspQryInvestorProdRCAMSMargin(CThostFtdcInvestorProdRCAMSMarginField *pInvestorProdRCAMSMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
489+
490+
///RULE合约保证金参数查询响应
491+
virtual void OnRspQryRULEInstrParameter(CThostFtdcRULEInstrParameterField *pRULEInstrParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
492+
493+
///RULE品种内对锁仓折扣参数查询响应
494+
virtual void OnRspQryRULEIntraParameter(CThostFtdcRULEIntraParameterField *pRULEIntraParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
495+
496+
///RULE跨品种抵扣参数查询响应
497+
virtual void OnRspQryRULEInterParameter(CThostFtdcRULEInterParameterField *pRULEInterParameter, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
498+
499+
///投资者产品RULE保证金查询响应
500+
virtual void OnRspQryInvestorProdRULEMargin(CThostFtdcInvestorProdRULEMarginField *pInvestorProdRULEMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
453501
};
454502

455503
class TRADER_API_EXPORT CThostFtdcTraderApi
@@ -811,6 +859,54 @@ class TRADER_API_EXPORT CThostFtdcTraderApi
811859

812860
///投资者产品SPBM明细查询
813861
virtual int ReqQryInvestorProdSPBMDetail(CThostFtdcQryInvestorProdSPBMDetailField *pQryInvestorProdSPBMDetail, int nRequestID) = 0;
862+
863+
///投资者商品组SPMM记录查询
864+
virtual int ReqQryInvestorCommoditySPMMMargin(CThostFtdcQryInvestorCommoditySPMMMarginField *pQryInvestorCommoditySPMMMargin, int nRequestID) = 0;
865+
866+
///投资者商品群SPMM记录查询
867+
virtual int ReqQryInvestorCommodityGroupSPMMMargin(CThostFtdcQryInvestorCommodityGroupSPMMMarginField *pQryInvestorCommodityGroupSPMMMargin, int nRequestID) = 0;
868+
869+
///SPMM合约参数查询
870+
virtual int ReqQrySPMMInstParam(CThostFtdcQrySPMMInstParamField *pQrySPMMInstParam, int nRequestID) = 0;
871+
872+
///SPMM产品参数查询
873+
virtual int ReqQrySPMMProductParam(CThostFtdcQrySPMMProductParamField *pQrySPMMProductParam, int nRequestID) = 0;
874+
875+
///SPBM附加跨品种抵扣参数查询
876+
virtual int ReqQrySPBMAddOnInterParameter(CThostFtdcQrySPBMAddOnInterParameterField *pQrySPBMAddOnInterParameter, int nRequestID) = 0;
877+
878+
///RCAMS产品组合信息查询
879+
virtual int ReqQryRCAMSCombProductInfo(CThostFtdcQryRCAMSCombProductInfoField *pQryRCAMSCombProductInfo, int nRequestID) = 0;
880+
881+
///RCAMS同合约风险对冲参数查询
882+
virtual int ReqQryRCAMSInstrParameter(CThostFtdcQryRCAMSInstrParameterField *pQryRCAMSInstrParameter, int nRequestID) = 0;
883+
884+
///RCAMS品种内风险对冲参数查询
885+
virtual int ReqQryRCAMSIntraParameter(CThostFtdcQryRCAMSIntraParameterField *pQryRCAMSIntraParameter, int nRequestID) = 0;
886+
887+
///RCAMS跨品种风险折抵参数查询
888+
virtual int ReqQryRCAMSInterParameter(CThostFtdcQryRCAMSInterParameterField *pQryRCAMSInterParameter, int nRequestID) = 0;
889+
890+
///RCAMS空头期权风险调整参数查询
891+
virtual int ReqQryRCAMSShortOptAdjustParam(CThostFtdcQryRCAMSShortOptAdjustParamField *pQryRCAMSShortOptAdjustParam, int nRequestID) = 0;
892+
893+
///RCAMS策略组合持仓查询
894+
virtual int ReqQryRCAMSInvestorCombPosition(CThostFtdcQryRCAMSInvestorCombPositionField *pQryRCAMSInvestorCombPosition, int nRequestID) = 0;
895+
896+
///投资者品种RCAMS保证金查询
897+
virtual int ReqQryInvestorProdRCAMSMargin(CThostFtdcQryInvestorProdRCAMSMarginField *pQryInvestorProdRCAMSMargin, int nRequestID) = 0;
898+
899+
///RULE合约保证金参数查询
900+
virtual int ReqQryRULEInstrParameter(CThostFtdcQryRULEInstrParameterField *pQryRULEInstrParameter, int nRequestID) = 0;
901+
902+
///RULE品种内对锁仓折扣参数查询
903+
virtual int ReqQryRULEIntraParameter(CThostFtdcQryRULEIntraParameterField *pQryRULEIntraParameter, int nRequestID) = 0;
904+
905+
///RULE跨品种抵扣参数查询
906+
virtual int ReqQryRULEInterParameter(CThostFtdcQryRULEInterParameterField *pQryRULEInterParameter, int nRequestID) = 0;
907+
908+
///投资者产品RULE保证金查询
909+
virtual int ReqQryInvestorProdRULEMargin(CThostFtdcQryInvestorProdRULEMarginField *pQryInvestorProdRULEMargin, int nRequestID) = 0;
814910
protected:
815911
~CThostFtdcTraderApi(){};
816912
};

cpp/src/ThostFtdcUserApiDataType.h

Lines changed: 153 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2572,9 +2572,9 @@ typedef char TThostFtdcClearbarchIDType[6];
25722572
#define THOST_FTDC_UET_Login '1'
25732573
///登出
25742574
#define THOST_FTDC_UET_Logout '2'
2575-
///交易成功
2575+
///CTP校验通过
25762576
#define THOST_FTDC_UET_Trading '3'
2577-
///交易失败
2577+
///CTP校验失败
25782578
#define THOST_FTDC_UET_TradingError '4'
25792579
///修改密码
25802580
#define THOST_FTDC_UET_UpdatePassword '5'
@@ -6906,6 +6906,12 @@ typedef int TThostFtdcSpreadIdType;
69066906
#define THOST_FTDC_EPF_None '0'
69076907
///SPBM算法
69086908
#define THOST_FTDC_EPF_SPBM '1'
6909+
///RULE算法
6910+
#define THOST_FTDC_EPF_RULE '2'
6911+
///SPMM算法
6912+
#define THOST_FTDC_EPF_SPMM '3'
6913+
///RCAMS算法
6914+
#define THOST_FTDC_EPF_RCAMS '4'
69096915

69106916
typedef char TThostFtdcPortfolioType;
69116917

@@ -6914,4 +6920,149 @@ typedef char TThostFtdcPortfolioType;
69146920
/////////////////////////////////////////////////////////////////////////
69156921
typedef int TThostFtdcPortfolioDefIDType;
69166922

6923+
/////////////////////////////////////////////////////////////////////////
6924+
///TFtdcWithDrawParamIDType是一个可提参数代码类型
6925+
/////////////////////////////////////////////////////////////////////////
6926+
///权利金收支是否可提 1 代表可提 0 不可提
6927+
#define THOST_FTDC_WDPID_CashIn 'C'
6928+
6929+
typedef char TThostFtdcWithDrawParamIDType;
6930+
6931+
/////////////////////////////////////////////////////////////////////////
6932+
///TFtdcWithDrawParamValueType是一个可提控制参数内容类型
6933+
/////////////////////////////////////////////////////////////////////////
6934+
typedef char TThostFtdcWithDrawParamValueType[41];
6935+
6936+
/////////////////////////////////////////////////////////////////////////
6937+
///TFtdcInvstTradingRightType是一个投资者交易权限类型
6938+
/////////////////////////////////////////////////////////////////////////
6939+
///只能平仓
6940+
#define THOST_FTDC_ITR_CloseOnly '1'
6941+
///不能交易
6942+
#define THOST_FTDC_ITR_Forbidden '2'
6943+
6944+
typedef char TThostFtdcInvstTradingRightType;
6945+
6946+
/////////////////////////////////////////////////////////////////////////
6947+
///TFtdcThostFunctionCodeType是一个Thost终端功能代码类型
6948+
/////////////////////////////////////////////////////////////////////////
6949+
typedef int TThostFtdcThostFunctionCodeType;
6950+
6951+
/////////////////////////////////////////////////////////////////////////
6952+
///TFtdcSPMMDiscountRatioType是一个SPMM折扣率类型
6953+
/////////////////////////////////////////////////////////////////////////
6954+
typedef double TThostFtdcSPMMDiscountRatioType;
6955+
6956+
/////////////////////////////////////////////////////////////////////////
6957+
///TFtdcSPMMModelDescType是一个SPMM模板描述类型
6958+
/////////////////////////////////////////////////////////////////////////
6959+
typedef char TThostFtdcSPMMModelDescType[129];
6960+
6961+
/////////////////////////////////////////////////////////////////////////
6962+
///TFtdcSPMMModelIDType是一个SPMM模板ID类型
6963+
/////////////////////////////////////////////////////////////////////////
6964+
typedef char TThostFtdcSPMMModelIDType[33];
6965+
6966+
/////////////////////////////////////////////////////////////////////////
6967+
///TFtdcSPMMProductIDType是一个SPMM商品群商品组ID类型
6968+
/////////////////////////////////////////////////////////////////////////
6969+
typedef char TThostFtdcSPMMProductIDType[41];
6970+
6971+
/////////////////////////////////////////////////////////////////////////
6972+
///TFtdcInstMarginCalIDType是一个SPMM合约保证金算法类型
6973+
/////////////////////////////////////////////////////////////////////////
6974+
///标准算法收取双边
6975+
#define THOST_FTDC_IMID_BothSide '1'
6976+
///单向大边
6977+
#define THOST_FTDC_IMID_MMSA '2'
6978+
///新组保SPMM
6979+
#define THOST_FTDC_IMID_SPMM '3'
6980+
6981+
typedef char TThostFtdcInstMarginCalIDType;
6982+
6983+
/////////////////////////////////////////////////////////////////////////
6984+
///TFtdcProductIDType是一个产品ID类型
6985+
/////////////////////////////////////////////////////////////////////////
6986+
typedef char TThostFtdcProductIDType[41];
6987+
6988+
/////////////////////////////////////////////////////////////////////////
6989+
///TFtdcHedgeRateType是一个HedgeRate类型类型
6990+
/////////////////////////////////////////////////////////////////////////
6991+
typedef double TThostFtdcHedgeRateType;
6992+
6993+
/////////////////////////////////////////////////////////////////////////
6994+
///TFtdcRCAMSPriorityType是一个优先级类型
6995+
/////////////////////////////////////////////////////////////////////////
6996+
typedef int TThostFtdcRCAMSPriorityType;
6997+
6998+
/////////////////////////////////////////////////////////////////////////
6999+
///TFtdcAdjustValueType是一个空头期权风险调整标准类型类型
7000+
/////////////////////////////////////////////////////////////////////////
7001+
typedef double TThostFtdcAdjustValueType;
7002+
7003+
/////////////////////////////////////////////////////////////////////////
7004+
///TFtdcRCAMSCombinationTypeType是一个RCAMS组合类型类型
7005+
/////////////////////////////////////////////////////////////////////////
7006+
///牛市看涨价差组合
7007+
#define THOST_FTDC_ERComb_BUC '0'
7008+
///熊市看涨价差组合
7009+
#define THOST_FTDC_ERComb_BEC '1'
7010+
///熊市看跌价差组合
7011+
#define THOST_FTDC_ERComb_BEP '2'
7012+
///牛市看跌价差组合
7013+
#define THOST_FTDC_ERComb_BUP '3'
7014+
///日历价差组合
7015+
#define THOST_FTDC_ERComb_CAS '4'
7016+
7017+
typedef char TThostFtdcRCAMSCombinationTypeType;
7018+
7019+
/////////////////////////////////////////////////////////////////////////
7020+
///TFtdcRuleIdType是一个策略id类型
7021+
/////////////////////////////////////////////////////////////////////////
7022+
typedef char TThostFtdcRuleIdType[51];
7023+
7024+
/////////////////////////////////////////////////////////////////////////
7025+
///TFtdcPortfTypeType是一个新组保算法启用类型类型
7026+
/////////////////////////////////////////////////////////////////////////
7027+
///使用初版交易所算法
7028+
#define THOST_FTDC_EET_None '0'
7029+
///SPBM算法V1.1.0_附加保证金调整
7030+
#define THOST_FTDC_EET_SPBM_AddOnHedge '1'
7031+
7032+
typedef char TThostFtdcPortfTypeType;
7033+
7034+
/////////////////////////////////////////////////////////////////////////
7035+
///TFtdcInstrumentClassType是一个合约类型类型
7036+
/////////////////////////////////////////////////////////////////////////
7037+
///一般月份合约
7038+
#define THOST_FTDC_EIC_Usual '1'
7039+
///临近交割合约
7040+
#define THOST_FTDC_EIC_Delivery '2'
7041+
///非组合合约
7042+
#define THOST_FTDC_EIC_NonComb '3'
7043+
7044+
typedef char TThostFtdcInstrumentClassType;
7045+
7046+
/////////////////////////////////////////////////////////////////////////
7047+
///TFtdcCommodityGroupIDType是一个商品群号类型
7048+
/////////////////////////////////////////////////////////////////////////
7049+
typedef int TThostFtdcCommodityGroupIDType;
7050+
7051+
/////////////////////////////////////////////////////////////////////////
7052+
///TFtdcStdPositionType是一个标准持仓类型类型
7053+
/////////////////////////////////////////////////////////////////////////
7054+
typedef double TThostFtdcStdPositionType;
7055+
7056+
/////////////////////////////////////////////////////////////////////////
7057+
///TFtdcProdChangeFlagType是一个品种记录改变状态类型
7058+
/////////////////////////////////////////////////////////////////////////
7059+
///持仓量和冻结量均无变化
7060+
#define THOST_FTDC_PCF_None '0'
7061+
///持仓量无变化,冻结量有变化
7062+
#define THOST_FTDC_PCF_OnlyFrozen '1'
7063+
///持仓量有变化
7064+
#define THOST_FTDC_PCF_PositionChange '2'
7065+
7066+
typedef char TThostFtdcProdChangeFlagType;
7067+
69177068
#endif

0 commit comments

Comments
 (0)