汾ţv6.5.1_20200908_tradeapi
̨汾V6.5.1
ע⣺V6.5.1APICTP̨ΪV6.5.0ϰ汾V6.5.1APIV6.5.0̨V6.5.1¼ӽӿڲ֧ʹãӿʹã
           CTPV6.5.1̨ϵͳϾɰ汾API루V6.5.1°汾ΪҪ֧IPv6Windows汾Ҫvistaϵ64λ汾ϵͳ

˵ն˳̸п

1Ϊִ֧ĳϺԼԭȵĺԼֶ30ֽѾҪԺԼֶν

ԼΪ80ֽڣԭĺԼ͸ΪTThostFtdcOldInstrumentIDTypeԭĺԼͶӦֶθĳɱֶҲддϵͳԣ

///TFtdcInstrumentIDTypeһԼ
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcInstrumentIDType[81];

/////////////////////////////////////////////////////////////////////////
///TFtdcOldInstrumentIDTypeһԼ
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcOldInstrumentIDType[31];

TThostFtdcOldInstrumentIDType	reserve1
TThostFtdcOldExchangeInstIDType	reserve2;
TThostFtdcOldInstrumentIDType	reserve3


2Ϊ֧ԺIPv6ipַȣipַ

IPַΪ32ֽڣԭipַ͸ΪTThostFtdcOldIPAddressTypeԭipַͶӦֶθĳɱֶҲддϵͳԣ

/////////////////////////////////////////////////////////////////////////
///TFtdcOldIPAddressTypeһIPַ
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcOldIPAddressType[16];

/////////////////////////////////////////////////////////////////////////
///TFtdcIPAddressTypeһIPַ
/////////////////////////////////////////////////////////////////////////
typedef char TThostFtdcIPAddressType[33];

TThostFtdcOldIPAddressType	reserve2


3ѯŻݲӿ
ȨϣOPLȨֱ۲ϣBLSȨֱ۲ϣBES۲ϣCASȨڻϣBFOı֤㹫ʽҪԱ֤Żݱ
ñɽնҪϵı֤𣬿ͨӿڲѯϺԼŻݲXֵŻݲĿǰͶױ˲ѯͶ־CombHedgeFlagֶΪͶ͡
֤㹫ʽ£

1ȨOPL֤ȡΪX*Ȩ֤
2Ȩֱ۲ϣBLS֤ȡΪX*Ȩ֤
3Ȩֱ۲ϣBES֤ȡΪmin(ִм۸֮*׵λͷȨ֤)
4۲ϣCAS֤ȡΪX*Ȩ֤
5ȨڻϣBFO֤ȡΪX*ڻ֤
 
ѯŻݲӿ£ԼҪϺԼ룺
///Żݱ
virtual int ReqQryCombPromotionParam(CThostFtdcQryCombPromotionParamField *pQryCombPromotionParam, int nRequestID);

///ѯŻݱ
struct CThostFtdcQryCombPromotionParamField
{
 ///
TThostFtdcExchangeIDType ExchangeID;
 ///Լ
TThostFtdcInstrumentIDType InstrumentID;
};

///ŻݱӦ
virtual void OnRspQryCombPromotionParam(CThostFtdcCombPromotionParamField *pCombPromotionParam, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};


///Żݱ
struct CThostFtdcCombPromotionParamField
{
 ///
TThostFtdcExchangeIDType ExchangeID;
 ///Լ
TThostFtdcInstrumentIDType InstrumentID;
 ///Ͷױ־
TThostFtdcCombHedgeFlagType CombHedgeFlag;
 ///Ȩϱ֤
TThostFtdcDiscountRatioType Xparameter;
};


4Ȩֱ۲ϺȨֱ۲öֵ

///TFtdcCombinationTypeTypeһ
/////////////////////////////////////////////////////////////////////////
///ڻ
#define THOST_FTDC_COMBT_Future '0'
///ֱ۲BUL
#define THOST_FTDC_COMBT_BUL '1'
///ֱ۲BER
#define THOST_FTDC_COMBT_BER '2'
///ʽ
#define THOST_FTDC_COMBT_STD '3'
///ʽ
#define THOST_FTDC_COMBT_STG '4'
///
#define THOST_FTDC_COMBT_PRT '5'
///ʱ۲
#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'

ԴϽͲʱԼд£
ȨʽϺԼͲ֣STD m1905-c-2700&m1905-p-2700
ȨʽϺԼͲ֣STG m1905-p-2400&m1905-c-2700
ϺԼͲ֣PRT m1905-c-2400&m1905
ڻϺԼͲ֣SP a1903&a1905
ڻƷϺԼͲ֣SPC c1903&cs1909
ڻϺԼͲ֣SP a1903& a1903
ȨϺԼͲ֣OPL m1809-P-3150&m1809-P-3150
Ȩ봹ֱ۲Ͳ֣BLS m1809-P-3150&m1809-P-3100
Ȩֱ۲Ͳ֣BES m1809-P-3350&m1809-P-3150
Ȩ۲Ͳ֣CAS m1807-P-3150&m1809-P-3150
ȨڻͲ֣BFO m1809-P-3150&m1809


5ɶĺȡĹ

ȡĹö١THOST_TERT_NONESubscribePublicTopicʱĬϴӱտʼģSubscribePublicTopicԴΪ׼ͬ˽ڵ¼֮ǰá
///Ĺ

    ///@param nResumeType شʽ  

    ///        THOST_TERT_RESTART:ӱտʼش

    ///        THOST_TERT_RESUME:ϴյ

    ///        THOST_TERT_QUICK:ֻ͵¼󹫹

    ///        THOST_TERT_NONE:ȡĹ

    ///@remark ÷ҪInitǰá򲻻յݡ

    virtual void SubscribePublicTopic(THOST_TE_RESUME_TYPE nResumeType) = 0;

6ѯɽ׺ԼĽӿ

CTPԼϢɷΪɽ׺Լͷǽ׺ԼֻϵĺԼΪǽ׺Լǽ׺ԼռȽϴ
ѯԼӿڿݲѯ͡TradingTypeֶβѯָԼϢ

ѯԼ

  virtual int ReqQryClassifiedInstrument(CThostFtdcQryClassifiedInstrumentField *pQryClassifiedInstrument, int nRequestID) = 0;

ѯԼӦ

virtual void OnRspQryClassifiedInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)

///ѯԼ
struct CThostFtdcQryClassifiedInstrumentField
{
	///Լ
	TThostFtdcInstrumentIDType	InstrumentID;
	///
	TThostFtdcExchangeIDType	ExchangeID;
	///ԼڽĴ
	TThostFtdcExchangeInstIDType	ExchangeInstID;
	///Ʒ
	TThostFtdcInstrumentIDType	ProductID;
	///Լ״̬
	TThostFtdcTradingTypeType	TradingType;
	///Լ
	TThostFtdcClassTypeType	ClassType;
};

кԼTradingTypeΪö١ֵΪ

///״̬
#define TD_ALL '0'
///
#define TD_TRADE '1'
///ǽ
#define TD_UNTRADE '2'

ClassType

///кԼ
#define INS_ALL '0'
///ڻڡת֡TasָԼ
#define INS_FUTURE '1'
///ڻȨֻȨԼ
#define INS_OPTION '2'
///ϺԼ
#define INS_COMB '3' //ӦƷֶProductclass Ϊ


7ѯ󱨵Ľӿ޸ģ޸ĲӰɰ汾V6.5.1°汾APIʹãɰ汾API6.5.1̨ԿʹԭƣCTPV6.5.1̨ϵͳϾɰ汾API롣

'ѯ󱨵'Ľӿ'ReqQueryMaxOrderVolume'޸Ϊ'ReqQryMaxOrderVolume'OnRspQueryMaxOrderVolume޸ΪOnRspQryMaxOrderVolume

    ///ѯ󱨵

virtual int ReqQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, int nRequestID) = 0;
޸Ϊvirtual int ReqQryMaxOrderVolume (CThostFtdcQryMaxOrderVolumeField *pQryMaxOrderVolume, int nRequestID) = 0;

///ѯ󱨵Ӧ

virtual void OnRspQueryMaxOrderVolume(CThostFtdcQueryMaxOrderVolumeField *pQueryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};

޸Ϊvirtual void OnRspQryMaxOrderVolume(CThostFtdcQryMaxOrderVolumeField *pQryMaxOrderVolume, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};


8ѯ۽ӿڣѯָQuoteSysID򷵻ǫ̈̄QuoteSysIDӦıϢɰ汾ָ̨֧QuoteSysIDй˷ء
///ѯ
virtual int ReqQryQuote(CThostFtdcQryQuoteField *pQryQuote, int nRequestID) = 0;



