207 lines
7.0 KiB
C
207 lines
7.0 KiB
C
|
/////////////////////////////////////////////////////////////////////////
|
|||
|
///@author <20><>̩֤ȯ<D6A4>ɷ<EFBFBD><C9B7><EFBFBD><EFBFBD><EFBFBD>˾
|
|||
|
///@file xtp_trader_api.h
|
|||
|
///@brief <20><><EFBFBD><EFBFBD><EFBFBD>ͻ<EFBFBD><CDBB>˽<EFBFBD><CBBD>ӿ<D7BD>
|
|||
|
/////////////////////////////////////////////////////////////////////////
|
|||
|
|
|||
|
#ifndef _XTP_TRADER_API_H_
|
|||
|
#define _XTP_TRADER_API_H_
|
|||
|
|
|||
|
#if _MSC_VER > 1000
|
|||
|
#pragma once
|
|||
|
#endif // _MSC_VER > 1000
|
|||
|
|
|||
|
#include "xtp_api_struct.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 XTP::API::TraderSpi
|
|||
|
*
|
|||
|
* \brief <EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD>
|
|||
|
*
|
|||
|
* \author <EFBFBD><EFBFBD>̩֤ȯ<EFBFBD>ɷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾
|
|||
|
* \date ʮ<EFBFBD><EFBFBD> 2015
|
|||
|
*/
|
|||
|
namespace XTP {
|
|||
|
namespace API {
|
|||
|
|
|||
|
class TraderSpi
|
|||
|
{
|
|||
|
public:
|
|||
|
|
|||
|
///<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>
|
|||
|
///@remark <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ֧<CEB4><D6A7>
|
|||
|
///@param reason <20><><EFBFBD><EFBFBD>ԭ<EFBFBD><D4AD>
|
|||
|
virtual void OnDisconnected(int reason) {};
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6>
|
|||
|
///@param error_info <20><><EFBFBD><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
virtual void OnError(XTPRI *error_info) {};
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD>֪ͨ
|
|||
|
///@param order_info <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
///@param error_info <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܾ<EFBFBD><DCBE><EFBFBD><EFBFBD>߷<EFBFBD><DFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
///@remark ÿ<>ζ<EFBFBD><CEB6><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ᱻ<EFBFBD><E1B1BB><EFBFBD><EFBFBD>
|
|||
|
virtual void OnOrderEvent(XTPOrderInfo *order_info, XTPRI *error_info) {};
|
|||
|
|
|||
|
///<2F>ɽ<EFBFBD>֪ͨ
|
|||
|
///@param trade_info <20>ɽ<EFBFBD><C9BD>ر<EFBFBD><D8B1>ľ<EFBFBD><C4BE><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
///@remark <20><><EFBFBD><EFBFBD><EFBFBD>гɽ<D0B3><C9BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>ᱻ<F2A3ACBB><E1B1BB><EFBFBD><EFBFBD>
|
|||
|
virtual void OnTradeEvent(XTPTradeReport *trade_info) {};
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
///@param cancel_info <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>order_xtp_id
|
|||
|
///@param error_info <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܾ<EFBFBD><DCBE><EFBFBD><EFBFBD>߷<EFBFBD><DFB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
virtual void OnCancelOrderError(XTPOrderCancelInfo *cancel_info, XTPRI *error_info) {};
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
///@param order_info <20><>ѯ<EFBFBD><D1AF><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>
|
|||
|
///@param error_info <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
///@param request_id <20><><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID
|
|||
|
///@param is_last <20><><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊrequest_id<69><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>Ӧ
|
|||
|
///@remark <20><><EFBFBD><EFBFBD>֧<EFBFBD>ַ<EFBFBD>ʱ<EFBFBD>β<EFBFBD>ѯ<EFBFBD><D1AF>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
virtual void OnQueryOrder(XTPQueryOrderRsp *order_info, XTPRI *error_info, int request_id, bool is_last) {};
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD>Ӧ
|
|||
|
///@param trade_info <20><>ѯ<EFBFBD><D1AF><EFBFBD>ijɽ<C4B3><C9BD>ر<EFBFBD>
|
|||
|
///@param error_info <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
///@param request_id <20><><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID
|
|||
|
///@param is_last <20><><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊrequest_id<69><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>Ӧ
|
|||
|
///@remark <20><><EFBFBD><EFBFBD>֧<EFBFBD>ַ<EFBFBD>ʱ<EFBFBD>β<EFBFBD>ѯ<EFBFBD><D1AF>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
virtual void OnQueryTrade(XTPQueryTradeRsp *trade_info, XTPRI *error_info, int request_id, bool is_last) {};
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯͶ<D1AF><CDB6><EFBFBD>ֲ߳<DFB3><D6B2><EFBFBD>Ӧ
|
|||
|
///@param position <20><>ѯ<EFBFBD><D1AF><EFBFBD>ijֲ<C4B3><D6B2><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
///@param error_info <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|||
|
///@param request_id <20><><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID
|
|||
|
///@param is_last <20><><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>Ϊrequest_id<69><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>Ӧ
|
|||
|
///@remark <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD>ܳ<EFBFBD><DCB3>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
virtual void OnQueryPosition(XTPQueryStkPositionRsp *position, XTPRI *error_info, int request_id, bool is_last) {};
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD>ʽ<EFBFBD><CABD>˻<EFBFBD><CBBB><EFBFBD>Ӧ
|
|||
|
virtual void OnQueryAsset(XTPQueryAssetRsp *asset, XTPRI *error_info, int request_id, bool is_last) {};
|
|||
|
|
|||
|
|
|||
|
};
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
/*!
|
|||
|
* \class XTP::API::TraderApi
|
|||
|
*
|
|||
|
* \brief <EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*
|
|||
|
* \author <EFBFBD><EFBFBD>̩֤ȯ<EFBFBD>ɷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾
|
|||
|
* \date ʮ<EFBFBD><EFBFBD> 2015
|
|||
|
*/
|
|||
|
namespace XTP {
|
|||
|
namespace API {
|
|||
|
|
|||
|
class TRADER_API_EXPORT TraderApi
|
|||
|
{
|
|||
|
public:
|
|||
|
///<2F><><EFBFBD><EFBFBD>TraderApi
|
|||
|
///@param save_file_path <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶΣ<D6B6><CEA3><EFBFBD><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 TraderApi *CreateTraderApi(const char *save_file_path = "");
|
|||
|
|
|||
|
///ɾ<><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><C8A1>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
///@return <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><D8B5>ӿ<EFBFBD>
|
|||
|
///@param spi <20><><EFBFBD><EFBFBD><EFBFBD>Իص<D4BB><D8B5>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
|
|||
|
virtual void RegisterSpi(TraderSpi *spi) = 0;
|
|||
|
|
|||
|
///<2F>û<EFBFBD><C3BB><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
|
|||
|
///@return <20><>¼<EFBFBD>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>¼<EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>-1<><31><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-2<><32><EFBFBD><EFBFBD>ʾ<EFBFBD>Ѵ<EFBFBD><D1B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>logout
|
|||
|
///@param ip <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ
|
|||
|
///@param port <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˿ں<CBBF>
|
|||
|
///@param user <20><>¼<EFBFBD>û<EFBFBD><C3BB><EFBFBD>
|
|||
|
///@param password <20><>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>
|
|||
|
///@param sock_type <20><>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>TCP<43><50><EFBFBD><EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD>UDP<44><50>Ŀǰ<C4BF><C7B0>ʱֻ֧<D6BB><D6A7>TCP
|
|||
|
///@param client_id <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶΣ<D6B6><CEA3>ͻ<EFBFBD><CDBB><EFBFBD>id<69><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬһ<CDAC>û<EFBFBD><C3BB>IJ<EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD>
|
|||
|
///@remark <20>˺<EFBFBD><CBBA><EFBFBD>Ϊͬ<CEAA><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD>첽<EFBFBD>ȴ<EFBFBD><C8B4><EFBFBD>¼<EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><D8BC>ɽ<EFBFBD><C9BD>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
virtual int Login(const char* ip, int port, const char* user, const char* password, XTP_PROTOCOL_TYPE sock_type, int client_id = 0) = 0;
|
|||
|
|
|||
|
|
|||
|
///<2F>dz<EFBFBD><C7B3><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
///@return <20>dz<EFBFBD><C7B3>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD>dz<EFBFBD><C7B3>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>-1<><31><EFBFBD><EFBFBD>ʾ<EFBFBD>dz<EFBFBD>ʧ<EFBFBD><CAA7>
|
|||
|
virtual int Logout() = 0;
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
///@return <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>XTPϵͳ<CFB5>е<EFBFBD>ID,<2C><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3>û<EFBFBD><C3BB><EFBFBD>Ҫ<EFBFBD><D2AA>¼<EFBFBD>·<EFBFBD><C2B7>ص<EFBFBD>order_xtp_id
|
|||
|
///@param order <20><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>Ϣ
|
|||
|
virtual uint64_t InsertOrder(XTPOrderInsertInfo *order) = 0;
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
///@return <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>XTPϵͳ<CFB5>е<EFBFBD>ID,<2C><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3>û<EFBFBD><C3BB><EFBFBD>Ҫ<EFBFBD><D2AA>¼<EFBFBD>·<EFBFBD><C2B7>ص<EFBFBD>order_cancel_xtp_id
|
|||
|
///@param order_xtp_id <20><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ί<EFBFBD>е<EFBFBD><D0B5><EFBFBD>XTPϵͳ<CFB5>е<EFBFBD>ID
|
|||
|
virtual uint64_t CancelOrder(const uint64_t order_xtp_id) = 0;
|
|||
|
|
|||
|
///<2F><><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>ID<49><44><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
|
|||
|
///@return <20><>ѯ<EFBFBD>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD>ǡ<EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|||
|
///@param order_xtp_id <20><>Ҫ<EFBFBD><D2AA>ѯ<EFBFBD>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD>xtpϵͳ<CFB5>е<EFBFBD>ID
|
|||
|
///@param request_id <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>λ<EFBFBD><CEBB>ѯ<EFBFBD><D1AF>Ӧ<EFBFBD><D3A6>ID<49><44><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Զ<EFBFBD><D4B6><EFBFBD>
|
|||
|
virtual int QueryOrderByXTPID(const uint64_t order_xtp_id, int request_id) = 0;
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFB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ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>صı<D8B5><C4B1><EFBFBD>
|
|||
|
virtual int QueryOrders(const XTPQueryOrderReq *query_param, int request_id) = 0;
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD>ί<EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD>سɽ<D8B3>
|
|||
|
///@return <20><>ѯ<EFBFBD>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD>ǡ<EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|||
|
///@param order_xtp_id <20><>Ҫ<EFBFBD><D2AA>ѯ<EFBFBD><D1AF>ί<EFBFBD>б<EFBFBD><D0B1><EFBFBD>
|
|||
|
///@param request_id <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>λ<EFBFBD><CEBB>ѯ<EFBFBD><D1AF>Ӧ<EFBFBD><D3A6>ID<49><44><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Զ<EFBFBD><D4B6><EFBFBD>
|
|||
|
///@remark <20>˺<EFBFBD><CBBA><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD>Ӧ<EFBFBD><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧ
|
|||
|
virtual int QueryTradesByXTPID(const uint64_t order_xtp_id, int request_id) = 0;
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<E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BD><EFBFBD>صijɽ<C4B3><C9BD>ر<EFBFBD>
|
|||
|
virtual int QueryTrades(XTPQueryTraderReq *query_param, int request_id) = 0;
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯͶ<D1AF><CDB6><EFBFBD>ֲ߳<DFB3>
|
|||
|
///@return <20><>ѯ<EFBFBD>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD>ǡ<EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|||
|
///@param ticker <20><>Ҫ<EFBFBD><D2AA>ѯ<EFBFBD>ijֲֹ<D6B2>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
|
|||
|
///@param request_id <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>λ<EFBFBD><CEBB>ѯ<EFBFBD><D1AF>Ӧ<EFBFBD><D3A6>ID<49><44><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Զ<EFBFBD><D4B6><EFBFBD>
|
|||
|
///@remark <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ṩ<EFBFBD>˹<EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD>룬<EFBFBD><EBA3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD>˹<EFBFBD>Ʊ<EFBFBD>ijֲ<C4B3><D6B2><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>Ĭ<EFBFBD>ϲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD>гֲ<D0B3><D6B2><EFBFBD>Ϣ
|
|||
|
virtual int QueryPosition(const char *ticker, int request_id) = 0;
|
|||
|
|
|||
|
///<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD>ʲ<EFBFBD>
|
|||
|
///@return <20><>ѯ<EFBFBD>Ƿ<EFBFBD><C7B7>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD>ǡ<EFBFBD>0<EFBFBD><30><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
|||
|
///@param request_id <20><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD>λ<EFBFBD><CEBB>ѯ<EFBFBD><D1AF>Ӧ<EFBFBD><D3A6>ID<49><44><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>Զ<EFBFBD><D4B6><EFBFBD>
|
|||
|
virtual int QueryAsset(int request_id) = 0;
|
|||
|
|
|||
|
protected:
|
|||
|
~TraderApi() {};
|
|||
|
};
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#endif
|