vnpy/vn.api/vn.femas/pyscript/USTPFtdcTraderApi.h

298 lines
11 KiB
C
Raw Normal View History

/////////////////////////////////////////////////////////////////////////
///@system <20><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ϵͳ
///@company CFFEX
///@file USTPFtdcTraderApi.h
///@brief <20><><EFBFBD><EFBFBD><EFBFBD>˿ͻ<CBBF><CDBB>˽ӿ<CBBD>
///@history
///20130520 <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
/////////////////////////////////////////////////////////////////////////
#if !defined(USTP_FTDCTRADERAPI_H)
#define USTP_FTDCTRADERAPI_H
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "USTPFtdcUserApiStruct.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 CUstpFtdcTraderSpi
{
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(CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ϵͳ<CFB5>û<EFBFBD><C3BB><EFBFBD>¼Ӧ<C2BC><D3A6>
virtual void OnRspUserLogin(CUstpFtdcRspUserLoginField *pRspUserLogin, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F>û<EFBFBD><C3BB>˳<EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspUserLogout(CUstpFtdcRspUserLogoutField *pRspUserLogout, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspUserPasswordUpdate(CUstpFtdcUserPasswordUpdateField *pUserPasswordUpdate, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>Ӧ<EFBFBD><D3A6>
virtual void OnRspOrderInsert(CUstpFtdcInputOrderField *pInputOrder, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspOrderAction(CUstpFtdcOrderActionField *pOrderAction, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֪ͨ
virtual void OnRtnFlowMessageCancel(CUstpFtdcFlowMessageCancelField *pFlowMessageCancel) {};
///<2F>ɽ<EFBFBD><C9BD>ر<EFBFBD>
virtual void OnRtnTrade(CUstpFtdcTradeField *pTrade) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
virtual void OnRtnOrder(CUstpFtdcOrderField *pOrder) {};
///<2F><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
virtual void OnErrRtnOrderInsert(CUstpFtdcInputOrderField *pInputOrder, CUstpFtdcRspInfoField *pRspInfo) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
virtual void OnErrRtnOrderAction(CUstpFtdcOrderActionField *pOrderAction, CUstpFtdcRspInfoField *pRspInfo) {};
///<2F><>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD>״̬֪ͨ
virtual void OnRtnInstrumentStatus(CUstpFtdcInstrumentStatusField *pInstrumentStatus) {};
///<2F>˻<EFBFBD><CBBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD>
virtual void OnRtnInvestorAccountDeposit(CUstpFtdcInvestorAccountDepositResField *pInvestorAccountDepositRes) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryOrder(CUstpFtdcOrderField *pOrder, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryTrade(CUstpFtdcTradeField *pTrade, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD><CBBB><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryUserInvestor(CUstpFtdcRspUserInvestorField *pRspUserInvestor, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD>ױ<EFBFBD><D7B1><EFBFBD><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryTradingCode(CUstpFtdcRspTradingCodeField *pRspTradingCode, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///Ͷ<><CDB6><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>˻<EFBFBD><CBBB><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryInvestorAccount(CUstpFtdcRspInvestorAccountField *pRspInvestorAccount, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><>Լ<EFBFBD><D4BC>ѯӦ<D1AF><D3A6>
virtual void OnRspQryInstrument(CUstpFtdcRspInstrumentField *pRspInstrument, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryExchange(CUstpFtdcRspExchangeField *pRspExchange, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///Ͷ<><CDB6><EFBFBD>ֲֲ߳<D6B2>ѯӦ<D1AF><D3A6>
virtual void OnRspQryInvestorPosition(CUstpFtdcRspInvestorPositionField *pRspInvestorPosition, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>
virtual void OnRspSubscribeTopic(CUstpFtdcDisseminationField *pDissemination, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F>Ϲ<EFBFBD><CFB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryComplianceParam(CUstpFtdcRspComplianceParamField *pRspComplianceParam, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryTopic(CUstpFtdcDisseminationField *pDissemination, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///Ͷ<><CDB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʲ<EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryInvestorFee(CUstpFtdcInvestorFeeField *pInvestorFee, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
///Ͷ<><CDB6><EFBFBD>߱<EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ʲ<EFBFBD>ѯӦ<D1AF><D3A6>
virtual void OnRspQryInvestorMargin(CUstpFtdcInvestorMarginField *pInvestorMargin, CUstpFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) {};
};
class TRADER_API_EXPORT CUstpFtdcTraderApi
{
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 CUstpFtdcTraderApi *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(CUstpFtdcTraderSpi *pSpi) = 0;
///<2F><><EFBFBD><EFBFBD>֤<EFBFBD><D6A4>
///@param pszCertFileName <20>û<EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
///@param pszKeyFileName <20>û<EFBFBD>˽Կ<CBBD>ļ<EFBFBD><C4BC><EFBFBD>
///@param pszCaFileName <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>CA֤<41><D6A4><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
///@param pszKeyFilePassword <20>û<EFBFBD>˽Կ<CBBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
///@return 0 <20><><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>
///@return -1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>CA֤<41><D6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
///@return -2 <20>û<EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
///@return -3 <20>û<EFBFBD>˽Կ<CBBD><D4BF><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7>
///@return -4 <20>û<EFBFBD>֤<EFBFBD><D6A4>У<EFBFBD><D0A3>ʧ<EFBFBD><CAA7>
virtual int RegisterCertificateFile(const char *pszCertFileName, const char *pszKeyFileName,
const char *pszCaFileName, const char *pszKeyFilePassword) = 0;
///<2F><><EFBFBD><EFBFBD>˽<EFBFBD><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///@param nResumeType ˽<><CBBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>ʽ
/// USTP_TERT_RESTART:<3A>ӱ<EFBFBD><D3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>ʼ<EFBFBD>ش<EFBFBD>
/// USTP_TERT_RESUME:<3A><><EFBFBD>ϴ<EFBFBD><CFB4>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// USTP_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(USTP_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>ʽ
/// USTP_TERT_RESTART:<3A>ӱ<EFBFBD><D3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>ʼ<EFBFBD>ش<EFBFBD>
/// USTP_TERT_RESUME:<3A><><EFBFBD>ϴ<EFBFBD><CFB4>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// USTP_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(USTP_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>ʽ
/// USTP_TERT_RESTART:<3A>ӱ<EFBFBD><D3B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>տ<EFBFBD>ʼ<EFBFBD>ش<EFBFBD>
/// USTP_TERT_RESUME:<3A><><EFBFBD>ϴ<EFBFBD><CFB4>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// USTP_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(USTP_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><EFBFBD>ǰ<EFBFBD><C7B0>ϵͳ<CFB5>û<EFBFBD><C3BB><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
virtual int ReqUserLogin(CUstpFtdcReqUserLoginField *pReqUserLogin, int nRequestID) = 0;
///<2F>û<EFBFBD><C3BB>˳<EFBFBD><CBB3><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqUserLogout(CUstpFtdcReqUserLogoutField *pReqUserLogout, int nRequestID) = 0;
///<2F>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqUserPasswordUpdate(CUstpFtdcUserPasswordUpdateField *pUserPasswordUpdate, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqOrderInsert(CUstpFtdcInputOrderField *pInputOrder, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqOrderAction(CUstpFtdcOrderActionField *pOrderAction, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryOrder(CUstpFtdcQryOrderField *pQryOrder, int nRequestID) = 0;
///<2F>ɽ<EFBFBD><C9BD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryTrade(CUstpFtdcQryTradeField *pQryTrade, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD><CBBB><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryUserInvestor(CUstpFtdcQryUserInvestorField *pQryUserInvestor, int nRequestID) = 0;
///<2F><><EFBFBD>ױ<EFBFBD><D7B1><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryTradingCode(CUstpFtdcQryTradingCodeField *pQryTradingCode, int nRequestID) = 0;
///Ͷ<><CDB6><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>˻<EFBFBD><CBBB><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryInvestorAccount(CUstpFtdcQryInvestorAccountField *pQryInvestorAccount, int nRequestID) = 0;
///<2F><>Լ<EFBFBD><D4BC>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryInstrument(CUstpFtdcQryInstrumentField *pQryInstrument, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryExchange(CUstpFtdcQryExchangeField *pQryExchange, int nRequestID) = 0;
///Ͷ<><CDB6><EFBFBD>ֲֲ߳<D6B2>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryInvestorPosition(CUstpFtdcQryInvestorPositionField *pQryInvestorPosition, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
virtual int ReqSubscribeTopic(CUstpFtdcDisseminationField *pDissemination, int nRequestID) = 0;
///<2F>Ϲ<EFBFBD><CFB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryComplianceParam(CUstpFtdcQryComplianceParamField *pQryComplianceParam, int nRequestID) = 0;
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryTopic(CUstpFtdcDisseminationField *pDissemination, int nRequestID) = 0;
///Ͷ<><CDB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryInvestorFee(CUstpFtdcQryInvestorFeeField *pQryInvestorFee, int nRequestID) = 0;
///Ͷ<><CDB6><EFBFBD>߱<EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ʲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
virtual int ReqQryInvestorMargin(CUstpFtdcQryInvestorMarginField *pQryInvestorMargin, int nRequestID) = 0;
protected:
~CUstpFtdcTraderApi(){};
};
#endif