vnpy/vn.qdp/qdpapi/QdpFtdcTraderApi.h

346 lines
14 KiB
C
Raw Normal View History

/////////////////////////////////////////////////////////////////////////
///@system QuantDo Platform
///@company <20>Ϻ<EFBFBD><CFBA><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD><EFBFBD><EFBFBD>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD>޹<EFBFBD>˾
///@file QdpFtdcTraderApi.h
///@brief <20><><EFBFBD><EFBFBD><EFBFBD>˿ͻ<CBBF><CDBB>˽ӿ<CBBD>
///@history
///20150520 <09><><EFBFBD>һ<EFBFBD> <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
/////////////////////////////////////////////////////////////////////////
#if !defined(QDP_FTDCTRADERAPI_H)
#define QDP_FTDCTRADERAPI_H
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "QdpFtdcUserApiStruct.h"
#if defined(ISLIB) && defined(WIN32)
#ifdef LIB_TRADER_API_EXPORT
#define TRADER_API_EXPORT __declspec(dllexport)
#else
#define TRADER_API_EXPORT __declspec(dllimport)
#endif
#else
#define TRADER_API_EXPORT
#endif
class CQdpFtdcTraderSpi
{
public:
///<2F><><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>׺<EFBFBD>̨<EFBFBD><CCA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>δ<EFBFBD><CEB4>¼ǰ<C2BC><C7B0><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>
virtual void OnFrontConnected(){};
///<2F><><EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>׺<EFBFBD>̨ͨ<CCA8><CDA8><EFBFBD><EFBFBD><EFBFBD>ӶϿ<D3B6>ʱ<EFBFBD><CAB1><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD><C3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>API<50><49><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD><D3A3>ͻ<EFBFBD><CDBB>˿ɲ<CBBF><C9B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///@param nReason <20><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>
/// 0x1001 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
/// 0x1002 <20><><EFBFBD><EFBFBD>дʧ<D0B4><CAA7>
/// 0x2001 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ
/// 0x2002 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
/// 0x2003 <20>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual void OnFrontDisconnected(int nReason){};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><E6A1A3><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>δ<EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>á<EFBFBD>
///@param nTimeLapse <20><><EFBFBD><EFBFBD><EFBFBD>ϴν<CFB4><CEBD>ձ<EFBFBD><D5B1>ĵ<EFBFBD>ʱ<EFBFBD><CAB1>
virtual void OnHeartBeatWarning(int nTimeLapse){};
///<2F><><EFBFBD>Ļص<C4BB><D8B5><EFBFBD>ʼ֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>API<50>յ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><C4BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȵ<EFBFBD><C8B5>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><C8BB><EFBFBD>Ǹ<EFBFBD><C7B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļص<C4BB><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DZ<EFBFBD><C7B1>Ļص<C4BB><D8B5><EFBFBD><EFBFBD><EFBFBD>֪ͨ<CDA8><D6AA>
///@param nTopicID <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3A8>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD>
///@param nSequenceNo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual void OnPackageStart(int nTopicID, int nSequenceNo){};
///<2F><><EFBFBD>Ļص<C4BB><D8B5><EFBFBD><EFBFBD><EFBFBD>֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>API<50>յ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD><C4BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȵ<EFBFBD><C8B5>ñ<EFBFBD><C3B1>Ļص<C4BB><D8B5><EFBFBD>ʼ֪ͨ<CDA8><D6AA>Ȼ<EFBFBD><C8BB><EFBFBD>Ǹ<EFBFBD><C7B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļص<C4BB><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///@param nTopicID <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBA3A8>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȣ<EFBFBD>
///@param nSequenceNo <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual void OnPackageEnd(int nTopicID, int nSequenceNo){};
///<2F><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspError(CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F>û<EFBFBD><C3BB><EFBFBD>¼Ӧ<C2BC><D3A6>
virtual void OnRspUserLogin(CQdpFtdcRspUserLoginField *pRspUserLogin, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F>û<EFBFBD><C3BB>˳<EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspUserLogout(CQdpFtdcRspUserLogoutField *pRspUserLogout, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspUserPasswordUpdate(CQdpFtdcUserPasswordUpdateField *pUserPasswordUpdate, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>
virtual void OnRspOrderInsert(CQdpFtdcInputOrderField *pInputOrder, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspOrderAction(CQdpFtdcOrderActionField *pOrderAction, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>ת<EFBFBD>ڻ<EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspFromBankToFutureByFuture(CQdpFtdcReqTransferField *pReqTransfer, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڻ<EFBFBD><DABB>ʽ<EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspFromFutureToBankByFuture(CQdpFtdcReqTransferField *pReqTransfer, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֪ͨ
virtual void OnRtnFlowMessageCancel(CQdpFtdcFlowMessageCancelField *pFlowMessageCancel) {};
///<2F>ɽ<EFBFBD><C9BD>ر<EFBFBD>
virtual void OnRtnTrade(CQdpFtdcTradeField *pTrade) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
virtual void OnRtnOrder(CQdpFtdcOrderField *pOrder) {};
///<2F><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
virtual void OnErrRtnOrderInsert(CQdpFtdcInputOrderField *pInputOrder, CQdpFtdcRspInfoField *pRspInfo) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
virtual void OnErrRtnOrderAction(CQdpFtdcOrderActionField *pOrderAction, CQdpFtdcRspInfoField *pRspInfo) {};
///<2F><>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD>״̬֪ͨ
virtual void OnRtnInstrumentStatus(CQdpFtdcInstrumentStatusField *pInstrumentStatus) {};
///<2F>˻<EFBFBD><CBBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
virtual void OnRtnInvestorAccountDeposit(CQdpFtdcInvestorAccountDepositResField *pInvestorAccountDepositRes) {};
///QDP<44><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ֪ͨ
virtual void OnRtnMessageNotify(CQdpFtdcMessageNotifyInfoField *pMessageNotifyInfo) {};
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
virtual void OnErrRtnQueryBankBalanceByFuture(CQdpFtdcReqQueryAccountField *pReqQueryAccount, CQdpFtdcRspInfoField *pRspInfo) {};
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>ת<EFBFBD>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
virtual void OnErrRtnBankToFutureByFuture(CQdpFtdcReqTransferField *pReqTransfer, CQdpFtdcRspInfoField *pRspInfo) {};
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڻ<EFBFBD><DABB>ʽ<EFBFBD>ת<EFBFBD><D7AA><EFBFBD>д<EFBFBD><D0B4><EFBFBD><EFBFBD>ر<EFBFBD>
virtual void OnErrRtnFutureToBankByFuture(CQdpFtdcReqTransferField *pReqTransfer, CQdpFtdcRspInfoField *pRspInfo) {};
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֪ͨ
virtual void OnRtnQueryBankBalanceByFuture(CQdpFtdcNotifyQueryAccountField *pNotifyQueryAccount) {};
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>ת<EFBFBD>ڻ<EFBFBD>֪ͨ
virtual void OnRtnFromBankToFutureByFuture(CQdpFtdcRspTransferField *pRspTransfer) {};
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڻ<EFBFBD><DABB>ʽ<EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>֪ͨ
virtual void OnRtnFromFutureToBankByFuture(CQdpFtdcRspTransferField *pRspTransfer) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD>֪ͨ
virtual void OnRtnSGEDeferRate(CQdpFtdcSGEDeferRateField *pSGEDeferRate) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryOrder(CQdpFtdcOrderField *pOrder, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryTrade(CQdpFtdcTradeField *pTrade, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD><CBBB><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryUserInvestor(CQdpFtdcRspUserInvestorField *pRspUserInvestor, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///Ͷ<><CDB6><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>˻<EFBFBD><CBBB><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryInvestorAccount(CQdpFtdcRspInvestorAccountField *pRspInvestorAccount, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><>Լ<EFBFBD><D4BC>ѯӦ<D1AF><D3A6>
virtual void OnRspQryInstrument(CQdpFtdcRspInstrumentField *pRspInstrument, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryExchange(CQdpFtdcRspExchangeField *pRspExchange, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///Ͷ<><CDB6><EFBFBD>ֲֲ߳<D6B2>ѯӦ<D1AF><D3A6>
virtual void OnRspQryInvestorPosition(CQdpFtdcRspInvestorPositionField *pRspInvestorPosition, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspSubscribeTopic(CQdpFtdcDisseminationField *pDissemination, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryTopic(CQdpFtdcDisseminationField *pDissemination, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///Ͷ<><CDB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʲ<EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryInvestorFee(CQdpFtdcInvestorFeeField *pInvestorFee, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///Ͷ<><CDB6><EFBFBD>߱<EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ʲ<EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryInvestorMargin(CQdpFtdcInvestorMarginField *pInvestorMargin, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryExchangeDiffTime(CQdpFtdcRspExchangeDiffTimeField *pRspExchangeDiffTime, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><>ѯǩԼ<C7A9><D4BC><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspQryContractBank(CQdpFtdcContractBankField *pContractBank, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspQueryBankAccountMoneyByFuture(CQdpFtdcReqQueryAccountField *pReqQueryAccount, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><>ѯת<D1AF><D7AA><EFBFBD><EFBFBD>ˮӦ<CBAE><D3A6>
virtual void OnRspQryTransferSerial(CQdpFtdcTransferSerialField *pTransferSerial, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7>ʲ<EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQrySGEDeferRate(CQdpFtdcSGEDeferRateField *pSGEDeferRate, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///ʵʱ<CAB5><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryMarketData(CQdpFtdcMarketDataField *pMarketData, CQdpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
};
class TRADER_API_EXPORT CQdpFtdcTraderApi
{
public:
///<2F><><EFBFBD><EFBFBD>TraderApi
///@param pszFlowPath <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>Ŀ¼<C4BF><C2BC>Ĭ<EFBFBD><C4AC>Ϊ<EFBFBD><CEAA>ǰĿ¼
///@return <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>UserApi
static CQdpFtdcTraderApi *CreateFtdcTraderApi(const char *pszFlowPath = "");
///<2F><>ȡϵͳ<CFB5><EFBFBD><E6B1BE>
///@param nMajorVersion <20><><EFBFBD><EFBFBD><E6B1BE>
///@param nMinorVersion <20>Ӱ汾<D3B0><E6B1BE>
///@return ϵͳ<CFB5><CDB3>ʶ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
static const char *GetVersion(int &nMajorVersion, int &nMinorVersion);
///ɾ<><C9BE><EFBFBD>ӿڶ<D3BF><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///@remark <20><><EFBFBD><EFBFBD>ʹ<EFBFBD>ñ<EFBFBD><C3B1>ӿڶ<D3BF><DAB6><EFBFBD>ʱ,<2C><><EFBFBD>øú<C3B8><C3BA><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>ӿڶ<D3BF><DAB6><EFBFBD>
virtual void Release() = 0;
///<2F><>ʼ<EFBFBD><CABC>
///@remark <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><D0BB><EFBFBD><>е<EFBFBD><D0B5>ú<EFBFBD>,<2C>ӿڲſ<DAB2>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>
virtual void Init() = 0;
///<2F>ȴ<EFBFBD><C8B4>ӿ<EFBFBD><D3BF>߳̽<DFB3><CCBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///@return <20>߳<EFBFBD><DFB3>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>
virtual int Join() = 0;
///<2F><>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///@retrun <20><>ȡ<EFBFBD><C8A1><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD>
///@remark ֻ<>е<EFBFBD>¼<EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD>,<2C><><EFBFBD>ܵõ<DCB5><C3B5><EFBFBD>ȷ<EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD>
virtual const char *GetTradingDay() = 0;
///ע<><D7A2>ǰ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
///@param pszFrontAddress<73><73>ǰ<EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7>
///@remark <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>ĸ<EFBFBD>ʽΪ<CABD><CEAA><EFBFBD><EFBFBD>protocol://ipaddress:port<72><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A3BA>tcp://127.0.0.1:17001<30><31><EFBFBD><EFBFBD>
///@remark <20><>tcp<63><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Э<EFBFBD><EFBFBD><E9A3AC>127.0.0.1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>17001<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿ںš<EFBFBD>
virtual void RegisterFront(char *pszFrontAddress) = 0;
///ע<><D7A2><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
///@param pszNsAddress<73><73><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7>
///@remark <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>ĸ<EFBFBD>ʽΪ<CABD><CEAA><EFBFBD><EFBFBD>protocol://ipaddress:port<72><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A3BA>tcp://127.0.0.1:12001<30><31><EFBFBD><EFBFBD>
///@remark <20><>tcp<63><70><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Э<EFBFBD><EFBFBD><E9A3AC>127.0.0.1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>12001<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿ںš<EFBFBD>
///@remark RegisterFront<6E><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>RegisterNameServer
virtual void RegisterNameServer(char *pszNsAddress) = 0;
///ע<><D7A2><EFBFBD>ص<EFBFBD><D8B5>ӿ<EFBFBD>
///@param pSpi <20><><EFBFBD><EFBFBD><EFBFBD>Իص<D4BB><D8B5>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
virtual void RegisterSpi(CQdpFtdcTraderSpi *pSpi) = 0;
///<2F><><EFBFBD><EFBFBD>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///@param nResumeType ˽<><CBBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>ʽ
/// QDP_TERT_RESTART:<3A>ӱ<EFBFBD><D3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>ʼ<EFBFBD>ش<EFBFBD>
/// QDP_TERT_RESUME:<3A><><EFBFBD>ϴ<EFBFBD><CFB4>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// QDP_TERT_QUICK:ֻ<><D6BB><EFBFBD>͵<EFBFBD>¼<EFBFBD><C2BC>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///@remark <20>÷<EFBFBD><C3B7><EFBFBD>Ҫ<EFBFBD><D2AA>Init<69><74><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>á<EFBFBD><C3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򲻻<EFBFBD><F2B2BBBB>յ<EFBFBD>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>
virtual void SubscribePrivateTopic(QDP_TE_RESUME_TYPE nResumeType) = 0;
///<2F><><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///@param nResumeType <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>ʽ
/// QDP_TERT_RESTART:<3A>ӱ<EFBFBD><D3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>ʼ<EFBFBD>ش<EFBFBD>
/// QDP_TERT_RESUME:<3A><><EFBFBD>ϴ<EFBFBD><CFB4>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// QDP_TERT_QUICK:ֻ<><D6BB><EFBFBD>͵<EFBFBD>¼<EFBFBD>󹫹<EFBFBD><F3B9ABB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///@remark <20>÷<EFBFBD><C3B7><EFBFBD>Ҫ<EFBFBD><D2AA>Init<69><74><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>á<EFBFBD><C3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򲻻<EFBFBD><F2B2BBBB>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>
virtual void SubscribePublicTopic(QDP_TE_RESUME_TYPE nResumeType) = 0;
///<2F><><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>
///@param nResumeType <20><><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>ʽ
/// QDP_TERT_RESTART:<3A>ӱ<EFBFBD><D3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>ʼ<EFBFBD>ش<EFBFBD>
/// QDP_TERT_RESUME:<3A><><EFBFBD>ϴ<EFBFBD><CFB4>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// QDP_TERT_QUICK:ֻ<><D6BB><EFBFBD>͵<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///@remark <20>÷<EFBFBD><C3B7><EFBFBD>Ҫ<EFBFBD><D2AA>Init<69><74><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>á<EFBFBD><C3A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򲻻<EFBFBD><F2B2BBBB>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݡ<EFBFBD>
virtual void SubscribeUserTopic(QDP_TE_RESUME_TYPE nResumeType) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱʱ<CAB1>
///@param timeout <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱʱ<CAB1><CAB1>(<28><>)
virtual void SetHeartbeatTimeout(unsigned int timeout) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD>ļ<EFBFBD>
///@param pszReqLogFileName <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
///@return 0 <20><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>
///@return -1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD>ļ<EFBFBD>ʧ<EFBFBD><CAA7>
virtual int OpenRequestLog(const char *pszReqLogFileName) = 0;
///<2F><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD>־<EFBFBD>ļ<EFBFBD>
///@param pszRspLogFileName Ӧ<><D3A6><EFBFBD><EFBFBD>־<EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
///@return 0 <20><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>
///@return -1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD>ļ<EFBFBD>ʧ<EFBFBD><CAA7>
virtual int OpenResponseLog(const char *pszRspLogFileName) = 0;
///<2F>û<EFBFBD><C3BB><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
virtual int ReqUserLogin(CQdpFtdcReqUserLoginField *pReqUserLogin, int nRequestID) = 0;
///<2F>û<EFBFBD><C3BB>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqUserLogout(CQdpFtdcReqUserLogoutField *pReqUserLogout, int nRequestID) = 0;
///<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqUserPasswordUpdate(CQdpFtdcUserPasswordUpdateField *pUserPasswordUpdate, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqOrderInsert(CQdpFtdcInputOrderField *pInputOrder, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqOrderAction(CQdpFtdcOrderActionField *pOrderAction, int nRequestID) = 0;
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>ת<EFBFBD>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqFromBankToFutureByFuture(CQdpFtdcReqTransferField *pReqTransfer, int nRequestID) = 0;
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڻ<EFBFBD><DABB>ʽ<EFBFBD>ת<EFBFBD><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqFromFutureToBankByFuture(CQdpFtdcReqTransferField *pReqTransfer, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryOrder(CQdpFtdcQryOrderField *pQryOrder, int nRequestID) = 0;
///<2F>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryTrade(CQdpFtdcQryTradeField *pQryTrade, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD><CBBB><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryUserInvestor(CQdpFtdcQryUserInvestorField *pQryUserInvestor, int nRequestID) = 0;
///Ͷ<><CDB6><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>˻<EFBFBD><CBBB><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryInvestorAccount(CQdpFtdcQryInvestorAccountField *pQryInvestorAccount, int nRequestID) = 0;
///<2F><>Լ<EFBFBD><D4BC>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryInstrument(CQdpFtdcQryInstrumentField *pQryInstrument, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryExchange(CQdpFtdcQryExchangeField *pQryExchange, int nRequestID) = 0;
///Ͷ<><CDB6><EFBFBD>ֲֲ߳<D6B2>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryInvestorPosition(CQdpFtdcQryInvestorPositionField *pQryInvestorPosition, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqSubscribeTopic(CQdpFtdcDisseminationField *pDissemination, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryTopic(CQdpFtdcDisseminationField *pDissemination, int nRequestID) = 0;
///Ͷ<><CDB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryInvestorFee(CQdpFtdcQryInvestorFeeField *pQryInvestorFee, int nRequestID) = 0;
///Ͷ<><CDB6><EFBFBD>߱<EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ʲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryInvestorMargin(CQdpFtdcQryInvestorMarginField *pQryInvestorMargin, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>ƫ<EFBFBD><C6AB><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryExchangeDiffTime(CQdpFtdcQryExchangeDiffTimeField *pQryExchangeDiffTime, int nRequestID) = 0;
///<2F><>ѯǩԼ<C7A9><D4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqQryContractBank(CQdpFtdcQryContractBankField *pQryContractBank, int nRequestID) = 0;
///<2F>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqQueryBankAccountMoneyByFuture(CQdpFtdcReqQueryAccountField *pReqQueryAccount, int nRequestID) = 0;
///<2F><>ѯת<D1AF><D7AA><EFBFBD><EFBFBD>ˮ<EFBFBD><CBAE><EFBFBD><EFBFBD>
virtual int ReqQryTransferSerial(CQdpFtdcQryTransferSerialField *pQryTransferSerial, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7>ʲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQrySGEDeferRate(CQdpFtdcQrySGEDeferRateField *pQrySGEDeferRate, int nRequestID) = 0;
///ʵʱ<CAB5><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryMarketData(CQdpFtdcQryMarketDataField *pQryMarketData, int nRequestID) = 0;
protected:
~CQdpFtdcTraderApi(){};
};
#endif