Skip to content

Commit

Permalink
Merge pull request #54 from nooperpudd/feature/6.5.1
Browse files Browse the repository at this point in the history
Feature/6.5.1
  • Loading branch information
nooperpudd authored Jan 15, 2021
2 parents 20a5298 + 9d9d5b0 commit 8aa7428
Show file tree
Hide file tree
Showing 24 changed files with 3,243 additions and 1,848 deletions.
11 changes: 3 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,16 @@ language: python

dist: focal

matrix:
jobs:
include:
# others still work and don't install python3.7
- python: 'pypy3.6-7.3.2'
sudo: required
- python: 'pypy3.7-7.3.2'
sudo: required
- python: 3.6
sudo: required
- python: 3.7
sudo: required
- python: 3.8
sudo: required
- python: 3.9
sudo: required


install:
- python -c "import struct; print(struct.calcsize('P') * 8)"
Expand All @@ -32,7 +27,7 @@ before_deploy: "echo 'ready'"

deploy:
provider: pypi
user: nooperpudd
username: nooperpudd
password:
secure: vdY6WCJCvOS8W0mNC2z/bBDg2OVBss1IFg8BSH25NuziCTBEKbUi3BAwOdq45Ei24r5+2yVjKpAyhXSis8AvdVHBrM84IzpJQHdSLyTVJMexdT/830528IlyIhGVBGROCSIznFXIbfVvcyuTDBhAgBUj4xanjHnLJLMJsqpY8LI52hjGvANWRupp+czpsQTzYL5IVA7WMRoUBvKn7FzBs8ZwtssyeSsv0Ju40r5A942sXW/yjg3mDGF9RWgYaQJMl4VYpYKR7Ck4I0e51axjksZVxggIp1FXpX0jU5e1wt8n9pSl4mN7HSK72ooNlp9uHSAvOuSMvXlbXpHeM+u4HEEYAHJcX/T8DI5E2iAUjjZT3N5mRFR4IuyuvmY1UZ0wm9TvLDHzko3sX9I4JqA2MAILOHxu5rvUqDJ51pb5JCHiYlWpinMLlHVKA8zx6EJcu65TIKEmqqP2gXfJhyWLFLgNVRw3btpmNV51BJFFT7sDDtgKgoP1/glV+BResd0ZGvBQl0hCQtZiUOHQ/naM2+qVa4baysjSoQazwvKvc0D6akedpapQyR8eWPPzUhR0JtQ/qp1qps2DpFEoqAvU6YnYtYQOM1JiZAjRA5Lxyh/Bhh3hQZwWg/EbUnGs1MrUclWlLS9f7zwYzdGnCihPYlEF5cWMoJ+bQsYoYx7UdRo=
distributions: "sdist"
Expand Down
17 changes: 15 additions & 2 deletions ctp/header/ThostFtdcTraderApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class CThostFtdcTraderSpi {
virtual void OnRspOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};

///查询最大报单数量响应
virtual void OnRspQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
virtual void OnRspQryMaxOrderVolume(CThostFtdcQryMaxOrderVolumeField *pQryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};

///投资者结算结果确认响应
virtual void OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
Expand Down Expand Up @@ -410,6 +410,12 @@ class CThostFtdcTraderSpi {

///银行发起变更银行账号通知
virtual void OnRtnChangeAccountByBank(CThostFtdcChangeAccountField *pChangeAccount) {};

///请求查询分类合约响应
virtual void OnRspQryClassifiedInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};

///请求组合优惠比例响应
virtual void OnRspQryCombPromotionParam(CThostFtdcCombPromotionParamField *pCombPromotionParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
};

class TRADER_API_EXPORT CThostFtdcTraderApi {
Expand Down Expand Up @@ -474,6 +480,7 @@ class TRADER_API_EXPORT CThostFtdcTraderApi {
/// THOST_TERT_RESTART:从本交易日开始重传
/// THOST_TERT_RESUME:从上次收到的续传
/// THOST_TERT_QUICK:只传送登录后公共流的内容
/// THOST_TERT_NONE:取消订阅公共流
///@remark 该方法要在Init方法前调用。若不调用则不会收到公共流的数据。
virtual void SubscribePublicTopic(THOST_TE_RESUME_TYPE nResumeType) = 0;

Expand Down Expand Up @@ -531,7 +538,7 @@ class TRADER_API_EXPORT CThostFtdcTraderApi {
virtual int ReqOrderAction(CThostFtdcInputOrderActionField *pInputOrderAction, int nRequestID) = 0;

///查询最大报单数量请求
virtual int ReqQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, int nRequestID) = 0;
virtual int ReqQryMaxOrderVolume(CThostFtdcQryMaxOrderVolumeField *pQryMaxOrderVolume, int nRequestID) = 0;

///投资者结算结果确认
virtual int ReqSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, int nRequestID) = 0;
Expand Down Expand Up @@ -731,6 +738,12 @@ class TRADER_API_EXPORT CThostFtdcTraderApi {
///期货发起查询银行余额请求
virtual int ReqQueryBankAccountMoneyByFuture(CThostFtdcReqQueryAccountField *pReqQueryAccount, int nRequestID) = 0;

///请求查询分类合约
virtual int ReqQryClassifiedInstrument(CThostFtdcQryClassifiedInstrumentField *pQryClassifiedInstrument, int nRequestID) = 0;

///请求组合优惠比例
virtual int ReqQryCombPromotionParam(CThostFtdcQryCombPromotionParamField *pQryCombPromotionParam, int nRequestID) = 0;

protected:
~CThostFtdcTraderApi() {};
};
Expand Down
76 changes: 71 additions & 5 deletions ctp/header/ThostFtdcUserApiDataType.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
enum THOST_TE_RESUME_TYPE {
THOST_TERT_RESTART = 0,
THOST_TERT_RESUME,
THOST_TERT_QUICK
THOST_TERT_QUICK,
THOST_TERT_NONE
};

/////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -41,10 +42,15 @@ typedef char TThostFtdcBrokerAbbrType[9];
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcBrokerNameType[81];

/////////////////////////////////////////////////////////////////////////
///TFtdcOldExchangeInstIDType是一个合约在交易所的代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcOldExchangeInstIDType[31];

/////////////////////////////////////////////////////////////////////////
///TFtdcExchangeInstIDType是一个合约在交易所的代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcExchangeInstIDType[31];
typedef char TThostFtdcExchangeInstIDType[81];

/////////////////////////////////////////////////////////////////////////
///TFtdcOrderRefType是一个报单引用类型
Expand Down Expand Up @@ -74,7 +80,12 @@ typedef char TThostFtdcClientIDType[11];
/////////////////////////////////////////////////////////////////////////
///TFtdcInstrumentIDType是一个合约代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcInstrumentIDType[31];
typedef char TThostFtdcInstrumentIDType[81];

/////////////////////////////////////////////////////////////////////////
///TFtdcOldInstrumentIDType是一个合约代码类型
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcOldInstrumentIDType[31];

/////////////////////////////////////////////////////////////////////////
///TFtdcInstrumentCodeType是一个合约标识码类型
Expand Down Expand Up @@ -171,10 +182,15 @@ typedef char TThostFtdcTradeIDType[21];
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcCommandTypeType[65];

/////////////////////////////////////////////////////////////////////////
///TFtdcOldIPAddressType是一个IP地址类型
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcOldIPAddressType[16];

/////////////////////////////////////////////////////////////////////////
///TFtdcIPAddressType是一个IP地址类型
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcIPAddressType[16];
typedef char TThostFtdcIPAddressType[33];

/////////////////////////////////////////////////////////////////////////
///TFtdcIPPortType是一个IP端口类型
Expand Down Expand Up @@ -1105,6 +1121,11 @@ typedef int TThostFtdcCommandNoType;
/////////////////////////////////////////////////////////////////////////
typedef int TThostFtdcMillisecType;

/////////////////////////////////////////////////////////////////////////
///TFtdcSecType是一个时间(秒)类型
/////////////////////////////////////////////////////////////////////////
typedef int TThostFtdcSecType;

/////////////////////////////////////////////////////////////////////////
///TFtdcVolumeMultipleType是一个合约数量乘数类型
/////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -6229,11 +6250,15 @@ typedef char TThostFtdcStrikeTimeType[13];
///备兑组合
#define THOST_FTDC_COMBT_PRT '5'
///时间价差组合
#define THOST_FTDC_COMBT_CLD '6'
#define THOST_FTDC_COMBT_CAS '6'
///期权对锁组合
#define THOST_FTDC_COMBT_OPL '7'
///买备兑组合
#define THOST_FTDC_COMBT_BFO '8'
///买入期权垂直价差组合
#define THOST_FTDC_COMBT_BLS '9'
///卖出期权垂直价差组合
#define THOST_FTDC_COMBT_BES 'a'

typedef char TThostFtdcCombinationTypeType;

Expand Down Expand Up @@ -6704,4 +6729,45 @@ typedef double TThostFtdcRiskValueType;
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcIDBNameType[100];

/////////////////////////////////////////////////////////////////////////
///TFtdcDiscountRatioType是一个折扣率类型
/////////////////////////////////////////////////////////////////////////
typedef double TThostFtdcDiscountRatioType;

/////////////////////////////////////////////////////////////////////////
///TFtdcAuthTypeType是一个用户终端认证方式类型
/////////////////////////////////////////////////////////////////////////
///白名单校验
#define THOST_FTDC_AU_WHITE '0'
///黑名单校验
#define THOST_FTDC_AU_BLACK '1'

typedef char TThostFtdcAuthTypeType;

/////////////////////////////////////////////////////////////////////////
///TFtdcClassTypeType是一个合约分类方式类型
/////////////////////////////////////////////////////////////////////////
///所有合约
#define THOST_FTDC_INS_ALL '0'
///期货、即期、期转现、Tas、金属指数合约
#define THOST_FTDC_INS_FUTURE '1'
///期货、现货期权合约
#define THOST_FTDC_INS_OPTION '2'
///组合合约
#define THOST_FTDC_INS_COMB '3'

typedef char TThostFtdcClassTypeType;

/////////////////////////////////////////////////////////////////////////
///TFtdcTradingTypeType是一个合约交易状态分类方式类型
/////////////////////////////////////////////////////////////////////////
///所有状态
#define THOST_FTDC_TD_ALL '0'
///交易
#define THOST_FTDC_TD_TRADE '1'
///非交易
#define THOST_FTDC_TD_UNTRADE '2'

typedef char TThostFtdcTradingTypeType;

#endif
Loading

0 comments on commit 8aa7428

Please sign in to comment.