Skip to content

Commit

Permalink
Merge pull request #66 from nooperpudd/ctp_6.6.5
Browse files Browse the repository at this point in the history
Ctp 6.6.5
  • Loading branch information
nooperpudd authored Mar 22, 2022
2 parents 8ea7b7c + 92ae62a commit e630b4c
Show file tree
Hide file tree
Showing 25 changed files with 1,047 additions and 693 deletions.
31 changes: 20 additions & 11 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ environment:
# See: http://stackoverflow.com/a/13751649/163740
CMD_IN_ENV: 'cmd /E:ON /V:ON /C .\extra\appveyor\compiler.cmd'
matrix:
- PYTHON_DIR: "C:\\Python36-x64"
PYTHON: "C:\\Python36-x64\\python"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"


- PYTHON_DIR: "C:\\Python37-x64"
PYTHON: "C:\\Python37-x64\\python"
PYTHON_VERSION: "3.7"
Expand All @@ -55,12 +51,17 @@ environment:
PYTHON_VERSION: "3.9"
PYTHON_ARCH: "64"

- PYTHON_DIR: "C:\\Python310-x64"
PYTHON: "C:\\Python310-x64\\python"
PYTHON_VERSION: "3.10"
PYTHON_ARCH: "64"

- PYTHON_DIR: "C:\\pypy3"
PYTHON: "C:\\pypy3\\pypy3"
PYTHON_ARCH: "32"
PYTHON: "C:\\pypy3\\pypy"
PYTHON_ARCH: "64"
PYTHON_PYPY: "pypy3"
PYTHON_VERSION: "3.7"
PYTHON_PYPY_VERSION: "7.3.2"
PYTHON_VERSION: "3.9"
PYTHON_PYPY_VERSION: "7.3.8"


matrix:
Expand All @@ -69,13 +70,21 @@ matrix:

build: off

skip_commits:
files:
- ctp/*
- doc/*
- samples/*
- makefile
- docker/*

install:

- ps: If(($env:PYTHON).Contains("pypy3")) { (New-Object Net.WebClient).DownloadFile('https://downloads.python.org/pypy/pypy3.7-v7.3.2-win32.zip', "$env:appveyor_build_folder\pypy3.zip"); 7z x pypy3.zip | Out-Null; move pypy3.7-v7.3.2-win32 C:\pypy3; }
- ps: If(($env:PYTHON).Contains("pypy3")) { (New-Object Net.WebClient).DownloadFile('https://downloads.python.org/pypy/pypy3.9-v7.3.8-win64.zip', "$env:appveyor_build_folder\pypy3.zip"); 7z x pypy3.zip | Out-Null; move pypy3.9-v7.3.8-win64 C:\pypy3; }

- "SET PATH=%PYTHON_DIR%;%PYTHON_DIR%\\bin;%PYTHON_DIR%\\Scripts;%PATH%"

- ps: If(($env:PYTHON).Contains("pypy3")) { (New-Object Net.WebClient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', "$env:appveyor_build_folder\get-pip.py"); pypy3.exe get-pip.py }
- ps: If(($env:PYTHON).Contains("pypy3")) { (New-Object Net.WebClient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', "$env:appveyor_build_folder\get-pip.py"); pypy.exe get-pip.py }

# Check that we have the expected version and architecture for Python
- cmd: "%PYTHON% --version"
Expand Down
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ dist: focal
jobs:
include:
# others still work and don't install python3.7
- python: 'pypy3.6'
- python: 'pypy3.7'
- python: 3.6
- python: 'pypy3'

- python: 3.7
- python: 3.8
- python: 3.9
- python: 3.10


install:
Expand All @@ -33,4 +33,4 @@ deploy:
distributions: "sdist"
on:
tags: true
python: '3.6'
python: '3.10'
6 changes: 6 additions & 0 deletions ctp/header/ThostFtdcTraderApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ class CThostFtdcTraderSpi {
///请求查询行情响应
virtual void OnRspQryDepthMarketData(CThostFtdcDepthMarketDataField *pDepthMarketData, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};

///请求查询交易员报盘机响应
virtual void OnRspQryTraderOffer(CThostFtdcTraderOfferField *pTraderOffer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};

///请求查询投资者结算结果响应
virtual void OnRspQrySettlementInfo(CThostFtdcSettlementInfoField *pSettlementInfo, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};

Expand Down Expand Up @@ -618,6 +621,9 @@ class TRADER_API_EXPORT CThostFtdcTraderApi {
///请求查询行情
virtual int ReqQryDepthMarketData(CThostFtdcQryDepthMarketDataField *pQryDepthMarketData, int nRequestID) = 0;

///请求查询交易员报盘机
virtual int ReqQryTraderOffer(CThostFtdcQryTraderOfferField *pQryTraderOffer, int nRequestID) = 0;

///请求查询投资者结算结果
virtual int ReqQrySettlementInfo(CThostFtdcQrySettlementInfoField *pQrySettlementInfo, int nRequestID) = 0;

Expand Down
24 changes: 24 additions & 0 deletions ctp/header/ThostFtdcUserApiDataType.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ typedef char TThostFtdcIdentifiedCardNoType[51];
#define THOST_FTDC_ICT_FrgPrmtRdCard 'K'
///资管产品备案函
#define THOST_FTDC_ICT_CptMngPrdLetter 'L'
///港澳台居民身份证
#define THOST_FTDC_ICT_HKMCTwResidencePermit 'M'
///统一社会信用代码
#define THOST_FTDC_ICT_UniformSocialCreditCode 'N'
///机构成立证明文件
Expand Down Expand Up @@ -870,6 +872,8 @@ typedef char TThostFtdcOffsetFlagType;
#define THOST_FTDC_FCC_Other '6'
///自然人临近交割
#define THOST_FTDC_FCC_PersonDeliv '7'
///风控强平不验证资金
#define THOST_FTDC_FCC_Notverifycapital '8'

typedef char TThostFtdcForceCloseReasonType;

Expand Down Expand Up @@ -6811,9 +6815,29 @@ typedef char TThostFtdcSyncDeltaStatusType;

typedef char TThostFtdcActionDirectionType;

/////////////////////////////////////////////////////////////////////////
///TFtdcOrderCancelAlgType是一个撤单时选择席位算法类型
/////////////////////////////////////////////////////////////////////////
///轮询席位撤单
#define THOST_FTDC_OAC_Balance '1'
///优先原报单席位撤单
#define THOST_FTDC_OAC_OrigFirst '2'

typedef char TThostFtdcOrderCancelAlgType;

/////////////////////////////////////////////////////////////////////////
///TFtdcSyncDescriptionType是一个追平描述类型
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcSyncDescriptionType[257];

/////////////////////////////////////////////////////////////////////////
///TFtdcCommonIntType是一个通用int类型类型
/////////////////////////////////////////////////////////////////////////
typedef int TThostFtdcCommonIntType;

/////////////////////////////////////////////////////////////////////////
///TFtdcSysVersionType是一个系统版本类型
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcSysVersionType[41];

#endif
40 changes: 40 additions & 0 deletions ctp/header/ThostFtdcUserApiStruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ struct CThostFtdcRspUserLoginField {
TThostFtdcTimeType FFEXTime;
///能源中心时间
TThostFtdcTimeType INETime;
///后台版本信息
TThostFtdcSysVersionType SysVersion;
};

///用户登出请求
Expand Down Expand Up @@ -505,6 +507,8 @@ struct CThostFtdcTraderField {
TThostFtdcInstallCountType InstallCount;
///经纪公司代码
TThostFtdcBrokerIDType BrokerID;
///撤单时选择席位算法
TThostFtdcOrderCancelAlgType OrderCancelAlg;
};

///投资者
Expand Down Expand Up @@ -1071,6 +1075,8 @@ struct CThostFtdcTraderOfferField {
TThostFtdcTradeIDType MaxTradeID;
///本席位最大报单备拷
TThostFtdcReturnCodeType MaxOrderMessageReference;
///撤单时选择席位算法
TThostFtdcOrderCancelAlgType OrderCancelAlg;
};

///投资者结算结果
Expand Down Expand Up @@ -5617,6 +5623,8 @@ struct CThostFtdcMDTraderOfferField {
TThostFtdcTradeIDType MaxTradeID;
///本席位最大报单备拷
TThostFtdcReturnCodeType MaxOrderMessageReference;
///撤单时选择席位算法
TThostFtdcOrderCancelAlgType OrderCancelAlg;
};

///查询行情报盘机
Expand Down Expand Up @@ -9697,6 +9705,38 @@ struct CThostFtdcCombPromotionParamField {
TThostFtdcDiscountRatioType Xparameter;
};

///国密用户登录请求
struct CThostFtdcReqUserLoginSCField {
///交易日
TThostFtdcDateType TradingDay;
///经纪公司代码
TThostFtdcBrokerIDType BrokerID;
///用户代码
TThostFtdcUserIDType UserID;
///密码
TThostFtdcPasswordType Password;
///用户端产品信息
TThostFtdcProductInfoType UserProductInfo;
///接口端产品信息
TThostFtdcProductInfoType InterfaceProductInfo;
///协议信息
TThostFtdcProtocolInfoType ProtocolInfo;
///Mac地址
TThostFtdcMacAddressType MacAddress;
///动态密码
TThostFtdcPasswordType OneTimePassword;
///终端IP地址
TThostFtdcIPAddressType ClientIPAddress;
///登录备注
TThostFtdcLoginRemarkType LoginRemark;
///终端IP端口
TThostFtdcIPPortType ClientIPPort;
///认证码
TThostFtdcAuthCodeType AuthCode;
///App代码
TThostFtdcAppIDType AppID;
};

///投资者风险结算持仓查询
struct CThostFtdcQryRiskSettleInvstPositionField {
///经纪公司代码
Expand Down
8 changes: 6 additions & 2 deletions ctp/header/error.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by wangzhaodong (ORiON) -->
<!DOCTYPE errors SYSTEM "error.dtd">
<errors>
Expand Down Expand Up @@ -123,6 +123,9 @@
<error id="DEL_COMB_ACTION_TOO_FAST" value="152" prompt="CTP:删除拆分组合指令:原指令需要等待30s 才能删除"/>
<error id="COMB_ACTION_SHORT_MONEY" value="153" prompt="CTP:拆分组合钱不足"/>
<error id="QK_BUSY" value="154" prompt="CTP:查询核心忙 请稍后重试"/>
<error id="CFMMC_NO_CONNECTION" value="155" prompt="CTP:未连接监控中心"/>
<error id="CLOSE_OPTION_NO_MONEY" value="156" prompt="CTP:平期权多头后资金为负(收益小于平仓手续费),只可由风控人员强平"/>
<error id="CANCEL_UNKNOWN_ORDER_UNSUPPORTED" value="157" prompt="CTP:该交易所不支持撤销未知单"/>
<!--转帐系统错误代码 -->
<error id="SEND_INSTITUTION_CODE_ERROR" value="1000" prompt="CTP:银期转账:发送机构代码错误"/>
<error id="NO_GET_PLATFORM_SN" value="1001" prompt="CTP:银期转账:取平台流水号错误"/>
Expand Down Expand Up @@ -207,7 +210,7 @@
<error id="FC_FLOW_CONTROL" value="2067" prompt="建行银期:流量控制(技术错误)"/>
<error id="TL_TECHNICAL_LOGIC" value="2069" prompt="建行银期:技术逻辑(技术错误)"/>
<error id="AT_ABSOLUTE_TECHNIQUE" value="2070" prompt="建行银期:纯技术性错误(技术错误)"/>

~
<!--end 建行新一代银期-->
<!--换汇系统错误代码 bgn-->
<error id="FBE_NO_GET_PLATFORM_SN" value="3001" prompt="CTP:银期换汇:取平台流水号错误"/>
Expand Down Expand Up @@ -250,6 +253,7 @@
<error id="AUTHUSER_CHECK_ERR" value="4043" prompt="CTP:用户与客户端授权验证失败"/>
<error id="QUOTE_WRONG_REPALACE_SYSID" value="4050" prompt="CTP:报价指定的顶单编号不合法(中金所)"/>
<error id="AUTH_IP_FORBIDDEN" value="4060" prompt="CTP:您认证失败次数过多,IP进入认证禁止列表"/>

<error id="SCAPI_SSL_CONNECT_ERR" value="4100" prompt="CTP:SSL Connect Error."/>
<error id="SCAPI_WRONG_USERIDORNAME" value="4101" prompt="CTP:Wrong User ID or Name."/>
<error id="SCAPI_CERT_VERIFY_FAILED" value="4102" prompt="CTP:Cert Verify Failed."/>
Expand Down
Binary file modified ctp/linux/libthostmduserapi_se.so
Binary file not shown.
Binary file modified ctp/linux/libthosttraderapi_se.so
Binary file not shown.
2 changes: 1 addition & 1 deletion ctp/version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
6.6.1_20210406
v6.6.5_20210924_tradeapi
windows-64x
linux-64x
Binary file modified ctp/win/thostmduserapi_se.dll
Binary file not shown.
Binary file modified ctp/win/thostmduserapi_se.lib
Binary file not shown.
Binary file modified ctp/win/thosttraderapi_se.dll
Binary file not shown.
Binary file modified ctp/win/thosttraderapi_se.lib
Binary file not shown.
Loading

0 comments on commit e630b4c

Please sign in to comment.