XTPTraderAPI_V2.2.27.6: trade/xtp_trader_api.h 源文件
xtp_trader_api.h
浏览该文件的文档.
1 
7 #ifndef _XTP_TRADER_API_H_
8 #define _XTP_TRADER_API_H_
9 
10 #if _MSC_VER > 1000
11 #pragma once
12 #endif // _MSC_VER > 1000
13 
14 #include "xtp_api_struct.h"
15 
16 #if defined(ISLIB) && defined(WIN32)
17 #ifdef LIB_TRADER_API_EXPORT
18 #define TRADER_API_EXPORT __declspec(dllexport)
19 #else
20 #define TRADER_API_EXPORT __declspec(dllimport)
21 #endif
22 #else
23 #define TRADER_API_EXPORT
24 #endif
25 
34 namespace XTP {
35  namespace API {
36 
37  class TraderSpi
38  {
39  public:
40 
45  virtual void OnDisconnected(uint64_t session_id, int reason) {};
46 
50  virtual void OnError(XTPRI *error_info) {};
51 
57  virtual void OnOrderEvent(XTPOrderInfo *order_info, XTPRI *error_info, uint64_t session_id) {};
58 
63  virtual void OnTradeEvent(XTPTradeReport *trade_info, uint64_t session_id) {};
64 
70  virtual void OnCancelOrderError(XTPOrderCancelInfo *cancel_info, XTPRI *error_info, uint64_t session_id) {};
71 
79  virtual void OnQueryOrder(XTPQueryOrderRsp *order_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
80 
90  virtual void OnQueryOrderByPage(XTPQueryOrderRsp *order_info, int64_t req_count, int64_t order_sequence, int64_t query_reference, int request_id, bool is_last, uint64_t session_id) {};
91 
99  virtual void OnQueryTrade(XTPQueryTradeRsp *trade_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
100 
110  virtual void OnQueryTradeByPage(XTPQueryTradeRsp *trade_info, int64_t req_count, int64_t trade_sequence, int64_t query_reference, int request_id, bool is_last, uint64_t session_id) {};
111 
119  virtual void OnQueryPosition(XTPQueryStkPositionRsp *position, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
120 
128  virtual void OnQueryAsset(XTPQueryAssetRsp *asset, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
129 
137  virtual void OnQueryStructuredFund(XTPStructuredFundInfo *fund_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
138 
146  virtual void OnQueryFundTransfer(XTPFundTransferNotice *fund_transfer_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
147 
153  virtual void OnFundTransfer(XTPFundTransferNotice *fund_transfer_info, XTPRI *error_info, uint64_t session_id) {};
154 
161  virtual void OnQueryOtherServerFund(XTPFundQueryRsp *fund_info, XTPRI *error_info, int request_id, uint64_t session_id) {};
162 
170  virtual void OnQueryETF(XTPQueryETFBaseRsp *etf_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
171 
179  virtual void OnQueryETFBasket(XTPQueryETFComponentRsp *etf_component_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
180 
188  virtual void OnQueryIPOInfoList(XTPQueryIPOTickerRsp *ipo_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
189 
197  virtual void OnQueryIPOQuotaInfo(XTPQueryIPOQuotaRsp *quota_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
198 
206  virtual void OnQueryOptionAuctionInfo(XTPQueryOptionAuctionInfoRsp *option_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
207 
213  virtual void OnCreditCashRepay(XTPCrdCashRepayRsp *cash_repay_info, XTPRI *error_info, uint64_t session_id) {};
214 
220  virtual void OnCreditCashRepayDebtInterestFee(XTPCrdCashRepayDebtInterestFeeRsp *cash_repay_info, XTPRI *error_info, uint64_t session_id) {};
221 
229  virtual void OnQueryCreditCashRepayInfo(XTPCrdCashRepayInfo *cash_repay_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
230 
237  virtual void OnQueryCreditFundInfo(XTPCrdFundInfo *fund_info, XTPRI *error_info, int request_id, uint64_t session_id) {};
238 
246  virtual void OnQueryCreditDebtInfo(XTPCrdDebtInfo *debt_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
247 
255  virtual void OnQueryCreditTickerDebtInfo(XTPCrdDebtStockInfo *debt_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
256 
263  virtual void OnQueryCreditAssetDebtInfo(double remain_amount, XTPRI *error_info, int request_id, uint64_t session_id) {};
264 
272  virtual void OnQueryCreditTickerAssignInfo(XTPClientQueryCrdPositionStkInfo *assign_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
273 
280  virtual void OnQueryCreditExcessStock(XTPClientQueryCrdSurplusStkRspInfo* stock_info, XTPRI *error_info, int request_id, uint64_t session_id) {};
281 
289  virtual void OnQueryMulCreditExcessStock(XTPClientQueryCrdSurplusStkRspInfo* stock_info, XTPRI *error_info, int request_id, uint64_t session_id, bool is_last) {};
290 
296  virtual void OnCreditExtendDebtDate(XTPCreditDebtExtendNotice *debt_extend_info, XTPRI *error_info, uint64_t session_id) {};
297 
305  virtual void OnQueryCreditExtendDebtDateOrders(XTPCreditDebtExtendNotice *debt_extend_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
306 
313  virtual void OnQueryCreditFundExtraInfo(XTPCrdFundExtraInfo *fund_info, XTPRI *error_info, int request_id, uint64_t session_id) {};
314 
322  virtual void OnQueryCreditPositionExtraInfo(XTPCrdPositionExtraInfo *fund_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
323 
329  virtual void OnOptionCombinedOrderEvent(XTPOptCombOrderInfo *order_info, XTPRI *error_info, uint64_t session_id) {};
330 
335  virtual void OnOptionCombinedTradeEvent(XTPOptCombTradeReport *trade_info, uint64_t session_id) {};
336 
342  virtual void OnCancelOptionCombinedOrderError(XTPOptCombOrderCancelInfo *cancel_info, XTPRI *error_info, uint64_t session_id) {};
343 
351  virtual void OnQueryOptionCombinedOrders(XTPQueryOptCombOrderRsp *order_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
352 
362  virtual void OnQueryOptionCombinedOrdersByPage(XTPQueryOptCombOrderRsp *order_info, int64_t req_count, int64_t order_sequence, int64_t query_reference, int request_id, bool is_last, uint64_t session_id) {};
363 
371  virtual void OnQueryOptionCombinedTrades(XTPQueryOptCombTradeRsp *trade_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
372 
382  virtual void OnQueryOptionCombinedTradesByPage(XTPQueryOptCombTradeRsp *trade_info, int64_t req_count, int64_t trade_sequence, int64_t query_reference, int request_id, bool is_last, uint64_t session_id) {};
383 
391  virtual void OnQueryOptionCombinedPosition(XTPQueryOptCombPositionRsp *position_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
392 
400  virtual void OnQueryOptionCombinedStrategyInfo(XTPQueryCombineStrategyInfoRsp *strategy_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
401 
409  virtual void OnQueryOptionCombinedExecPosition(XTPQueryOptCombExecPosRsp *position_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id) {};
410 
411  };
412  }
413 }
414 
415 #ifndef WINDOWS
416 #if __GNUC__ >= 4
417 #pragma GCC visibility push(default)
418 #endif
419 #endif
420 
429 namespace XTP {
430  namespace API {
431 
433  {
434  public:
441  static TraderApi *CreateTraderApi(uint8_t client_id, const char *save_file_path, XTP_LOG_LEVEL log_level = XTP_LOG_LEVEL_DEBUG);
442 
445  virtual void Release() = 0;
446 
450  virtual const char *GetTradingDay() = 0;
451 
454  virtual void RegisterSpi(TraderSpi *spi) = 0;
455 
459  virtual XTPRI *GetApiLastError() = 0;
460 
463  virtual const char* GetApiVersion() = 0;
464 
469  virtual uint8_t GetClientIDByXTPID(uint64_t order_xtp_id) = 0;
470 
475  virtual const char* GetAccountByXTPID(uint64_t order_xtp_id) = 0;
476 
483  virtual void SubscribePublicTopic(XTP_TE_RESUME_TYPE resume_type) = 0;
484 
488  virtual void SetSoftwareVersion(const char* version) = 0;
489 
493  virtual void SetSoftwareKey(const char* key) = 0;
494 
498  virtual void SetHeartBeatInterval(uint32_t interval) = 0;
499 
509  virtual uint64_t Login(const char* ip, int port, const char* user, const char* password, XTP_PROTOCOL_TYPE sock_type, const char* local_ip = NULL) = 0;
510 
511 
515  virtual int Logout(uint64_t session_id) = 0;
516 
521  virtual bool IsServerRestart(uint64_t session_id) = 0;
522 
528  virtual int ModifyUserTerminalInfo(const XTPUserTerminalInfoReq* info,uint64_t session_id) = 0;
529 
535  virtual uint64_t InsertOrder(XTPOrderInsertInfo *order, uint64_t session_id) = 0;
536 
542  virtual uint64_t CancelOrder(const uint64_t order_xtp_id, uint64_t session_id) = 0;
543 
549  virtual int QueryOrderByXTPID(const uint64_t order_xtp_id, uint64_t session_id, int request_id) = 0;
550 
557  virtual int QueryOrders(const XTPQueryOrderReq *query_param, uint64_t session_id, int request_id) = 0;
558 
563  virtual int QueryUnfinishedOrders(uint64_t session_id, int request_id) = 0;
564 
571  virtual int QueryOrdersByPage(const XTPQueryOrderByPageReq *query_param, uint64_t session_id, int request_id) = 0;
572 
579  virtual int QueryTradesByXTPID(const uint64_t order_xtp_id, uint64_t session_id, int request_id) = 0;
580 
587  virtual int QueryTrades(XTPQueryTraderReq *query_param, uint64_t session_id, int request_id) = 0;
588 
595  virtual int QueryTradesByPage(const XTPQueryTraderByPageReq *query_param, uint64_t session_id, int request_id) = 0;
596 
604  virtual int QueryPosition(const char *ticker, uint64_t session_id, int request_id, XTP_MARKET_TYPE market = XTP_MKT_INIT) = 0;
605 
610  virtual int QueryAsset(uint64_t session_id, int request_id) = 0;
611 
618  virtual int QueryStructuredFund(XTPQueryStructuredFundInfoReq *query_param, uint64_t session_id, int request_id) = 0;
619 
625  virtual uint64_t FundTransfer(XTPFundTransferReq *fund_transfer, uint64_t session_id) = 0;
626 
632  virtual int QueryFundTransfer(XTPQueryFundTransferLogReq *query_param, uint64_t session_id, int request_id) = 0;
633 
639  virtual int QueryOtherServerFund(XTPFundQueryReq *query_param, uint64_t session_id, int request_id) = 0;
640 
646  virtual int QueryETF(XTPQueryETFBaseReq *query_param, uint64_t session_id, int request_id) = 0;
647 
653  virtual int QueryETFTickerBasket(XTPQueryETFComponentReq *query_param, uint64_t session_id, int request_id) = 0;
654 
659  virtual int QueryIPOInfoList(uint64_t session_id, int request_id) = 0;
660 
665  virtual int QueryIPOQuotaInfo(uint64_t session_id, int request_id) = 0;
666 
672  virtual int QueryOptionAuctionInfo(XTPQueryOptionAuctionInfoReq *query_param, uint64_t session_id, int request_id) = 0;
673 
678  virtual uint64_t CreditCashRepay(double amount, uint64_t session_id) = 0;
679 
685  virtual uint64_t CreditCashRepayDebtInterestFee(const char* debt_id, double amount, uint64_t session_id) = 0;
686 
692  virtual uint64_t CreditSellStockRepayDebtInterestFee(XTPOrderInsertInfo* order, const char* debt_id, uint64_t session_id) = 0;
693 
698  virtual int QueryCreditCashRepayInfo(uint64_t session_id, int request_id) = 0;
699 
700 
705  virtual int QueryCreditFundInfo(uint64_t session_id, int request_id) = 0;
706 
711  virtual int QueryCreditDebtInfo(uint64_t session_id, int request_id) = 0;
712 
718  virtual int QueryCreditTickerDebtInfo(XTPClientQueryCrdDebtStockReq *query_param, uint64_t session_id, int request_id) = 0;
719 
724  virtual int QueryCreditAssetDebtInfo(uint64_t session_id, int request_id) = 0;
725 
731  virtual int QueryCreditTickerAssignInfo(XTPClientQueryCrdPositionStockReq *query_param, uint64_t session_id, int request_id) = 0;
732 
739  virtual int QueryCreditExcessStock(XTPClientQueryCrdSurplusStkReqInfo *query_param, uint64_t session_id, int request_id) = 0;
740 
746  virtual int QueryMulCreditExcessStock(XTPClientQueryCrdSurplusStkReqInfo *query_param, uint64_t session_id, int request_id) = 0;
747 
752  virtual uint64_t CreditExtendDebtDate(XTPCreditDebtExtendReq *debt_extend, uint64_t session_id) = 0;
753 
759  virtual int QueryCreditExtendDebtDateOrders(uint64_t xtp_id, uint64_t session_id, int request_id) = 0;
760 
765  virtual int QueryCreditFundExtraInfo(uint64_t session_id, int request_id) = 0;
766 
772  virtual int QueryCreditPositionExtraInfo(XTPClientQueryCrdPositionStockReq *query_param, uint64_t session_id, int request_id) = 0;
773 
779  virtual uint64_t InsertOptionCombinedOrder(XTPOptCombOrderInsertInfo *order, uint64_t session_id) = 0;
780 
781 
782 
783 
789  virtual uint64_t CancelOptionCombinedOrder(const uint64_t order_xtp_id, uint64_t session_id) = 0;
790 
795  virtual int QueryOptionCombinedUnfinishedOrders(uint64_t session_id, int request_id) = 0;
796 
802  virtual int QueryOptionCombinedOrderByXTPID(const uint64_t order_xtp_id, uint64_t session_id, int request_id) = 0;
803 
810  virtual int QueryOptionCombinedOrders(const XTPQueryOptCombOrderReq *query_param, uint64_t session_id, int request_id) = 0;
811 
818  virtual int QueryOptionCombinedOrdersByPage(const XTPQueryOptCombOrderByPageReq *query_param, uint64_t session_id, int request_id) = 0;
819 
826  virtual int QueryOptionCombinedTradesByXTPID(const uint64_t order_xtp_id, uint64_t session_id, int request_id) = 0;
827 
834  virtual int QueryOptionCombinedTrades(const XTPQueryOptCombTraderReq *query_param, uint64_t session_id, int request_id) = 0;
835 
842  virtual int QueryOptionCombinedTradesByPage(const XTPQueryOptCombTraderByPageReq *query_param, uint64_t session_id, int request_id) = 0;
843 
850  virtual int QueryOptionCombinedPosition(const XTPQueryOptCombPositionReq* query_param, uint64_t session_id, int request_id) = 0;
851 
857  virtual int QueryOptionCombinedStrategyInfo(uint64_t session_id, int request_id) = 0;
858 
865  virtual int QueryOptionCombinedExecPosition(const XTPQueryOptCombExecPosReq* query_param, uint64_t session_id, int request_id) = 0;
866 
867  protected:
869  };
870 
871  }
872 }
873 
874 #ifndef WINDOWS
875 #if __GNUC__ >= 4
876 #pragma GCC visibility pop
877 #endif
878 #endif
879 
880 
881 #endif
查询期权组合策略持仓信息的响应
Definition: xoms_api_struct.h:741
virtual void OnQueryCreditExcessStock(XTPClientQueryCrdSurplusStkRspInfo *stock_info, XTPRI *error_info, int request_id, uint64_t session_id)
Definition: xtp_trader_api.h:280
查询期权行权合并头寸的响应
Definition: xoms_api_struct.h:792
用户资金请求
#define TRADER_API_EXPORT
Definition: xtp_trader_api.h:23
期权组合策略报单成交结构体
virtual void OnCreditCashRepayDebtInterestFee(XTPCrdCashRepayDebtInterestFeeRsp *cash_repay_info, XTPRI *error_info, uint64_t session_id)
Definition: xtp_trader_api.h:220
virtual void OnQueryCreditTickerAssignInfo(XTPClientQueryCrdPositionStkInfo *assign_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:272
virtual void OnQueryCreditDebtInfo(XTPCrdDebtInfo *debt_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:246
查询期权组合策略信息的响应
Definition: xoms_api_struct.h:696
virtual void OnQueryStructuredFund(XTPStructuredFundInfo *fund_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:137
virtual void OnDisconnected(uint64_t session_id, int reason)
Definition: xtp_trader_api.h:45
virtual void OnQueryOptionCombinedPosition(XTPQueryOptCombPositionRsp *position_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:391
virtual void OnQueryCreditFundInfo(XTPCrdFundInfo *fund_info, XTPRI *error_info, int request_id, uint64_t session_id)
Definition: xtp_trader_api.h:237
virtual void OnCancelOrderError(XTPOrderCancelInfo *cancel_info, XTPRI *error_info, uint64_t session_id)
Definition: xtp_trader_api.h:70
virtual void OnOptionCombinedTradeEvent(XTPOptCombTradeReport *trade_info, uint64_t session_id)
Definition: xtp_trader_api.h:335
期权组合策略新订单请求
Definition: xoms_api_struct.h:997
virtual void OnQueryMulCreditExcessStock(XTPClientQueryCrdSurplusStkRspInfo *stock_info, XTPRI *error_info, int request_id, uint64_t session_id, bool is_last)
Definition: xtp_trader_api.h:289
virtual void OnQueryETF(XTPQueryETFBaseRsp *etf_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:170
查询期权竞价交易业务参考信息
Definition: xoms_api_struct.h:628
virtual void OnQueryOptionAuctionInfo(XTPQueryOptionAuctionInfoRsp *option_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:206
XTP_TE_RESUME_TYPE
XTP_TE_RESUME_TYPE是公有流(订单响应、成交回报)重传方式
查询期权组合策略持仓情况请求结构体
Definition: xoms_api_struct.h:731
报单成交结构体
Definition: xoms_api_struct.h:126
用户展期请求的通知
Definition: xoms_api_struct.h:379
virtual void OnQueryOtherServerFund(XTPFundQueryRsp *fund_info, XTPRI *error_info, int request_id, uint64_t session_id)
Definition: xtp_trader_api.h:161
virtual void OnQueryCreditFundExtraInfo(XTPCrdFundExtraInfo *fund_info, XTPRI *error_info, int request_id, uint64_t session_id)
Definition: xtp_trader_api.h:313
融券头寸证券信息
Definition: xoms_api_struct.h:924
virtual void OnQueryFundTransfer(XTPFundTransferNotice *fund_transfer_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:146
用户资金查询请求结构体
融资融券特有帐户数据
Definition: xoms_api_struct.h:882
融资融券直接还款响应信息
Definition: xoms_api_struct.h:824
virtual void OnQueryIPOQuotaInfo(XTPQueryIPOQuotaRsp *quota_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:197
查询当日可申购新股信息
Definition: xoms_api_struct.h:556
单条融资融券负债记录信息
Definition: xoms_api_struct.h:859
virtual void OnQueryPosition(XTPQueryStkPositionRsp *position, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:119
用户展期请求
Definition: xoms_api_struct.h:961
单条融资融券直接还款记录信息
Definition: xoms_api_struct.h:846
virtual void OnError(XTPRI *error_info)
Definition: xtp_trader_api.h:50
virtual void OnQueryCreditTickerDebtInfo(XTPCrdDebtStockInfo *debt_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:255
融资融券帐户持仓附加信息
Definition: xoms_api_struct.h:988
virtual void OnCreditCashRepay(XTPCrdCashRepayRsp *cash_repay_info, XTPRI *error_info, uint64_t session_id)
Definition: xtp_trader_api.h:213
XTP_LOG_LEVEL
XTP_LOG_LEVEL是日志输出级别类型
virtual void OnQueryTrade(XTPQueryTradeRsp *trade_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:99
定义业务数据结构
virtual void OnQueryCreditCashRepayInfo(XTPCrdCashRepayInfo *cash_repay_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:229
融资融券帐户附加信息
Definition: xoms_api_struct.h:979
查询期权竞价交易业务参考信息–请求结构体,请求参数为:交易市场+8位期权代码
Definition: xoms_api_struct.h:618
查询分级基金信息响应结构体
Definition: xoms_api_struct.h:432
virtual void OnQueryOptionCombinedOrdersByPage(XTPQueryOptCombOrderRsp *order_info, int64_t req_count, int64_t order_sequence, int64_t query_reference, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:362
查询期权组合策略成交回报请求-分页查询
查询期权组合策略订单请求-分页查询
融资融券现金还息费响应信息
Definition: xoms_api_struct.h:834
virtual void OnQueryOptionCombinedOrders(XTPQueryOptCombOrderRsp *order_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:351
virtual void OnQueryCreditExtendDebtDateOrders(XTPCreditDebtExtendNotice *debt_extend_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:305
查询股票ETF合约基本情况–响应结构体
Definition: xoms_api_struct.h:464
响应信息
XTP_MARKET_TYPE
XTP_MARKET_TYPE市场类型,交易里使用
virtual void OnQueryOptionCombinedExecPosition(XTPQueryOptCombExecPosRsp *position_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:409
资金内转流水查询请求与响应
Definition: xoms_api_struct.h:409
信用业务余券查询请求结构体
Definition: xoms_api_struct.h:938
查询用户申购额度-包含创业板额度
Definition: xoms_api_struct.h:589
融资融券指定证券上的负债未还数量请求结构体
Definition: xoms_api_struct.h:895
新订单请求
Definition: xoms_api_struct.h:17
查询股票ETF合约成分股信息–请求结构体,请求参数为:交易市场+ETF买卖代码
Definition: xoms_api_struct.h:484
查询订单请求-分页查询
Definition: xoms_api_struct.h:194
期权组合策略报单查询 /////////////////////////////////////////////////////////////////////// 期权组合策略报单查询请求-条件查询 ...
申报用户的ip和mac等信息,仅限授权用户使用
Definition: xoms_api_struct.h:603
virtual void OnQueryAsset(XTPQueryAssetRsp *asset, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:128
virtual void OnFundTransfer(XTPFundTransferNotice *fund_transfer_info, XTPRI *error_info, uint64_t session_id)
Definition: xtp_trader_api.h:153
查询期权组合策略成交回报请求-查询条件
查询期权行权合并头寸请求结构体
Definition: xoms_api_struct.h:780
virtual void OnQueryOrderByPage(XTPQueryOrderRsp *order_info, int64_t req_count, int64_t order_sequence, int64_t query_reference, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:90
virtual void OnQueryOptionCombinedTrades(XTPQueryOptCombTradeRsp *trade_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:371
virtual void OnCreditExtendDebtDate(XTPCreditDebtExtendNotice *debt_extend_info, XTPRI *error_info, uint64_t session_id)
Definition: xtp_trader_api.h:296
查询成交回报请求-查询条件
Definition: xoms_api_struct.h:217
virtual void OnQueryOrder(XTPQueryOrderRsp *order_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:79
初始化值或者未知
查询分级基金信息结构体
Definition: xoms_api_struct.h:423
报单响应结构体
Definition: xoms_api_struct.h:65
期权组合策略报单响应结构体
virtual void OnQueryCreditPositionExtraInfo(XTPCrdPositionExtraInfo *fund_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:322
virtual void OnQueryTradeByPage(XTPQueryTradeRsp *trade_info, int64_t req_count, int64_t trade_sequence, int64_t query_reference, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:110
用户资金查询响应结构体
virtual void OnQueryCreditAssetDebtInfo(double remain_amount, XTPRI *error_info, int request_id, uint64_t session_id)
Definition: xtp_trader_api.h:263
报单查询 /////////////////////////////////////////////////////////////////////// 报单查询请求-条件查询 ...
Definition: xoms_api_struct.h:179
资金内转流水通知
Definition: xoms_api_struct.h:390
融资融券指定证券的融券负债相关信息
Definition: xoms_api_struct.h:904
查询成交回报请求-分页查询
Definition: xoms_api_struct.h:231
账户资金查询响应结构体
Definition: xoms_api_struct.h:244
virtual void OnQueryOptionCombinedStrategyInfo(XTPQueryCombineStrategyInfoRsp *strategy_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:400
交易接口类
Definition: xtp_trader_api.h:432
XTP_PROTOCOL_TYPE
XTP_PROTOCOL_TYPE是通讯传输协议方式
virtual void OnQueryOptionCombinedTradesByPage(XTPQueryOptCombTradeRsp *trade_info, int64_t req_count, int64_t trade_sequence, int64_t query_reference, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:382
查询股票持仓情况
Definition: xoms_api_struct.h:327
信用业务余券信息
Definition: xoms_api_struct.h:947
virtual void OnQueryIPOInfoList(XTPQueryIPOTickerRsp *ipo_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:188
virtual void OnQueryETFBasket(XTPQueryETFComponentRsp *etf_component_info, XTPRI *error_info, int request_id, bool is_last, uint64_t session_id)
Definition: xtp_trader_api.h:179
撤单失败响应消息
Definition: xoms_api_struct.h:55
virtual void OnOptionCombinedOrderEvent(XTPOptCombOrderInfo *order_info, XTPRI *error_info, uint64_t session_id)
Definition: xtp_trader_api.h:329
交易接口响应类
Definition: xtp_trader_api.h:37
融券头寸证券查询请求结构体
Definition: xoms_api_struct.h:915
virtual void OnTradeEvent(XTPTradeReport *trade_info, uint64_t session_id)
Definition: xtp_trader_api.h:63
查询股票ETF成分股信息–响应结构体
Definition: xoms_api_struct.h:522
virtual void OnCancelOptionCombinedOrderError(XTPOptCombOrderCancelInfo *cancel_info, XTPRI *error_info, uint64_t session_id)
Definition: xtp_trader_api.h:342
virtual void OnOrderEvent(XTPOrderInfo *order_info, XTPRI *error_info, uint64_t session_id)
Definition: xtp_trader_api.h:57

XTP极速交易平台是由中泰证券股份有限公司完全自主研发的股票交易平台
技术交流QQ群: 188500929
地址:上海市浦东新区浦电路360号
市场有风险,投资需谨慎
Copyright © 2015 All Rights Reserved.版权所有 中泰证券股份有限公司    本网站支持IPv6