| Xlight API用户手册 v1.6.0.23 Xlight极速柜台接口文档

载入中...
搜索中...
未找到
xlt_trade_api.h
浏览该文件的文档.
1
8#pragma once
9
10#include <cstdint>
11
12#include "xlt_trade_data_type.h"
13#include "xlt_trade_struct.h"
14#include "xlt_trade_config.h"
15#include "xlt_trade_list.h"
16
17 namespace x1 {
21 class XLTTradeSpi {
22 public:
23 virtual ~XLTTradeSpi() = default;
29 virtual void on_disconnect(uint64_t session_id) {};
36 virtual void on_order_timeout(uint64_t session_id, uint64_t xid) {};
37
38 // *******************************************
39 // 以下开始是请求响应回调
40 // 请求响应回调包含：
41 // uint64_t request_id 此消息响应函数对应的请求ID
42 // const xlt_error_info_t* error_info 发生错误时返回的错误信息，当error_info为空，或者error_info.error_id为0时，表明没有错误。
43 // *******************************************
50 virtual void on_login(uint64_t session_id, uint64_t request_id, const xlt_error_info_t* error_info) {};
58 virtual void on_auth_trade(uint64_t session_id, uint64_t request_id, uint64_t trade_token, const xlt_error_info_t* error_info) {};
67 virtual void on_subscribe_trade_message(uint64_t session_id, uint64_t request_id, uint64_t start_sequence, uint64_t latest_sequence, const xlt_error_info_t* error_info) {};
68
77 virtual void on_rebuild_trade_message(uint64_t session_id, uint64_t request_id, uint64_t start_sequence, uint64_t end_sequence, const xlt_error_info_t* error_info) {};
87 virtual void on_query_positions(uint64_t session_id, uint64_t request_id, const XLTPositionList* positions, bool is_last, const xlt_error_info_t* error_info) {};
97 virtual void on_query_assets(uint64_t session_id, uint64_t request_id, const XLTAssetList* assets, bool is_last, const xlt_error_info_t* error_info) {};
107 virtual void on_query_orders(uint64_t session_id, uint64_t request_id, const XLTOrderList* orders, bool is_last, const xlt_error_info_t* error_info) {};
120 virtual void on_query_orders_by_page(uint64_t session_id, uint64_t request_id, const XLTOrderList* order_infos, uint64_t req_count, uint64_t rsp_count, const xlt_page_query_reference_t* query_reference, bool is_last, const xlt_error_info_t* error_info) {};
130 virtual void on_query_trades(uint64_t session_id, uint64_t request_id, const XLTTradeReportList* trade_reports, bool is_last, const xlt_error_info_t* error_info) {};
131
140 virtual void on_query_init_assets(uint64_t session_id, uint64_t request_id, const XLTInitAssetList* init_assets, bool is_last, const xlt_error_info_t* error_info) {};
149 virtual void on_query_init_positions(uint64_t session_id, uint64_t request_id, const XLTInitPositionList* init_positions, bool is_last, const xlt_error_info_t* error_info) {};
158 virtual void on_query_trade_account_info(uint64_t session_id, uint64_t request_id, const XLTTradeAccountInfoList* trade_account_infos, bool is_last, const xlt_error_info_t* error_info) {};
159
160 // *******************************************
161 // 以下开始是消息推送回调
162 // 当用户调用subscribe_trade_message或rebuild_trade_message接口后，交易系统会根据用户请求的消息类型TradeMessageType和起始序号，推送相应的消息给用户。用户需要在对应的回调函数中处理这些消息。
163 // 消息推送回调包含：
164 // const xlt_msg_desc_t* msg_desc
165 // msg_desc.sequence 消息序号，递增，断点续传标识。为0时，不能作为续传标识。快速订单回报为0。
166 // msg_desc.is_rebuild 是否为重推请求消息，若是通过rebuild_trade_message接口发起则为true，若是通过subscribe_trade_message接口发起则为false
167 //
168 // *******************************************
177 virtual void on_order_response(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_order_response_t* order_response) {};
186 virtual void on_cancel_response(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_cancel_response_t* cancel_response) {};
195 virtual void on_trade_report(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_trade_report_t* trade_report) {};
205 virtual void on_order_error_response(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_order_error_response_t* order_error_response) {};
214 virtual void on_order_end(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_order_end_t* order_end) {};
231 virtual void on_raw_report(uint64_t session_id, const xlt_msg_desc_t* msg_desc, uint8_t client_id, uint64_t xid, char report_id[32], ExchangeIndex exchange_index, uint16_t
232 platform_type, uint16_t gateway_index, uint32_t report_size, char* raw_report) {};
240 virtual void on_counter_fund_transfer_request(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_counter_fund_transfer_request_t* fund_transfer_request) {};
248 virtual void on_counter_fund_transfer_result(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_counter_fund_transfer_result_t* fund_transfer_result) {};
256 virtual void on_cluster_fund_transfer_request(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_cluster_fund_transfer_request_t* cluster_fund_transfer_request) {};
264 virtual void on_cluster_fund_transfer_result(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_cluster_fund_transfer_result_t* cluster_fund_transfer_result) {};
271 virtual void on_order_book_insert(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_order_book_insert_t* order_insert) {};
278 virtual void on_order_book_update(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_order_book_update_t* order_update) {};
285 virtual void on_order_book_error(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_order_book_error_t* order_error) {};
292 virtual void on_asset(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_asset_info_t* asset_info) {};
299 virtual void on_position(uint64_t session_id, const xlt_msg_desc_t* msg_desc, const xlt_position_info_t* position_info) {};
300 };
301
305 class XLTTradeApi {
306 public:
311 static XLTTradeApi* create();
316 static const char* get_api_version();
321 static xlt_error_info_t get_last_error();
328 static uint64_t get_order_sequence(uint64_t xid);
335 bool initialize(XLTTradeConfig* trade_config, XLTTradeSpi* trade_spi);
341 void stop();
352 bool login(uint64_t request_id, uint16_t client_id, const char* account_name, const char* password, const char* pub_key, const xlt_user_terminal_info_t* info=nullptr);
358 bool logout(uint64_t session_id);
369 bool auth_trade(uint64_t session_id, uint64_t request_id, const char* account_name, const char* password, const char* pub_key, const xlt_user_terminal_info_t* info=nullptr);
377 bool deauth_trade(uint64_t session_id, uint64_t request_id, uint64_t trade_token);
378
383 uint32_t get_trading_day();
390 const xlt_init_asset_info_t* get_init_assets(uint64_t session_id, uint64_t trade_token = 0);
397 const XLTInitPositionList* get_init_positions(uint64_t session_id, uint64_t trade_token = 0);
404 uint64_t get_account_index(uint64_t session_id, uint64_t trade_token = 0);
411 void get_xid_sender(uint64_t xid, uint64_t &session_id, uint64_t &trade_token);
418 void get_biz_sender(char *biz_no, uint64_t &session_id, uint64_t &trade_token);
419
430 bool subscribe_trade_message(uint64_t session_id, uint64_t request_id, trade_message_type_t trade_message_type, TradeResumeType resume_type, uint64_t start_sequence);
441 bool rebuild_trade_message(uint64_t session_id, uint64_t request_id, trade_message_type_t trade_message_type, uint64_t start_sequence, uint64_t end_sequence, uint64_t account_index=0);
446 void init_local_send();
457 uint64_t insert_order(uint64_t session_id, xlt_order_insert_info_t* order, uint64_t trade_token = 0);
468 uint64_t cancel_order(uint64_t session_id, xlt_cancel_order_info_t* cancel_order, uint64_t trade_token = 0);
476 bool resend_order_request(uint64_t session_id, uint64_t xid);
487 bool submit_counter_fund_transfer_request(uint64_t session_id, uint64_t request_id, FundTransSide side, amount_t amount, char* biz_no=nullptr, uint64_t trade_token=0);
497 bool submit_cluster_fund_transfer_request(uint64_t session_id, uint64_t request_id, amount_t amount, char* biz_no=nullptr, uint64_t trade_token=0);
505 bool query_assets(uint64_t session_id, uint64_t request_id, uint64_t account_index = 0);
516 bool query_positions(uint64_t session_id, uint64_t request_id, const char* security_code, ExchangeIndex exchange_index = ExchangeIndex::INIT, uint64_t account_index = 0);
527 bool query_orders(uint64_t session_id, uint64_t request_id, const xlt_order_query_param_t* order_query_param, uint64_t account_index = 0);
538 bool query_orders_by_page(uint64_t session_id, uint64_t request_id, uint32_t request_count, const xlt_page_query_reference_t* query_reference, uint64_t account_index = 0);
547 bool query_trades(uint64_t session_id, uint64_t request_id, uint64_t xid, uint64_t account_index = 0);
548
550
558 bool query_init_assets(uint64_t session_id, uint64_t request_id, uint64_t account_index = 0);
568 bool query_init_positions(uint64_t session_id, uint64_t request_id, const char* security_code, ExchangeIndex exchange_index, uint64_t account_index = 0);
569
577 bool query_trade_account_info(uint64_t session_id, uint64_t request_id, uint64_t account_index = 0);
578
579 bool dump_api_performance_info();
580 protected:
581 XLTTradeApi()=default;
582 };
583}
x1::XLTAssetList
只读资金信息列表
定义 xlt_trade_list.h:48
x1::XLTInitAssetList
只读初始资金信息列表
定义 xlt_trade_list.h:26
x1::XLTInitPositionList
只读初始持仓信息列表
定义 xlt_trade_list.h:37
x1::XLTOrderList
只读订单信息列表
定义 xlt_trade_list.h:15
x1::XLTPositionList
只读持仓信息列表
定义 xlt_trade_list.h:59
x1::XLTTradeAccountInfoList
只读交易账号信息列表
定义 xlt_trade_list.h:81
x1::XLTTradeApi
接口类
定义 xlt_trade_api.h:305
x1::XLTTradeApi::get_order_sequence
static uint64_t get_order_sequence(uint64_t xid)
根据订单ID获取订单序列号
x1::XLTTradeApi::get_api_version
static const char * get_api_version()
获取API版本号
x1::XLTTradeApi::submit_counter_fund_transfer_request
bool submit_counter_fund_transfer_request(uint64_t session_id, uint64_t request_id, FundTransSide side, amount_t amount, char *biz_no=nullptr, uint64_t trade_token=0)
提交主柜资金划转请求
x1::XLTTradeApi::query_init_assets
bool query_init_assets(uint64_t session_id, uint64_t request_id, uint64_t account_index=0)
请求查询初始资产
x1::XLTTradeApi::query_trades
bool query_trades(uint64_t session_id, uint64_t request_id, uint64_t xid, uint64_t account_index=0)
请求查询成交回报
x1::XLTTradeApi::get_init_positions
const XLTInitPositionList * get_init_positions(uint64_t session_id, uint64_t trade_token=0)
获取初始持仓信息
x1::XLTTradeApi::insert_order
uint64_t insert_order(uint64_t session_id, xlt_order_insert_info_t *order, uint64_t trade_token=0)
委托 报单录入请求，所有业务统一报单接口，根据业务类型字段区分不同业务。 Xlight接收订单后，会在报单响应函数on_order_response, on_cancel_response,...
x1::XLTTradeApi::subscribe_trade_message
bool subscribe_trade_message(uint64_t session_id, uint64_t request_id, trade_message_type_t trade_message_type, TradeResumeType resume_type, uint64_t start_sequence)
订阅交易数据 每个session_id，仅第一次调用有效。
x1::XLTTradeApi::rebuild_trade_message
bool rebuild_trade_message(uint64_t session_id, uint64_t request_id, trade_message_type_t trade_message_type, uint64_t start_sequence, uint64_t end_sequence, uint64_t account_index=0)
重推消息
x1::XLTTradeApi::login
bool login(uint64_t request_id, uint16_t client_id, const char *account_name, const char *password, const char *pub_key, const xlt_user_terminal_info_t *info=nullptr)
用户登录请求
x1::XLTTradeApi::get_xid_sender
void get_xid_sender(uint64_t xid, uint64_t &session_id, uint64_t &trade_token)
根据订单ID获取订单发送者信息，包括session_id和trade_token
x1::XLTTradeApi::query_assets
bool query_assets(uint64_t session_id, uint64_t request_id, uint64_t account_index=0)
请求查询资产
x1::XLTTradeApi::logout
bool logout(uint64_t session_id)
登出请求
x1::XLTTradeApi::query_orders
bool query_orders(uint64_t session_id, uint64_t request_id, const xlt_order_query_param_t *order_query_param, uint64_t account_index=0)
请求查询订单
x1::XLTTradeApi::query_orders_by_page
bool query_orders_by_page(uint64_t session_id, uint64_t request_id, uint32_t request_count, const xlt_page_query_reference_t *query_reference, uint64_t account_index=0)
分页请求查询报单
x1::XLTTradeApi::deauth_trade
bool deauth_trade(uint64_t session_id, uint64_t request_id, uint64_t trade_token)
解除交易授权认证
x1::XLTTradeApi::dump_api_performance_info
bool dump_api_performance_info()
x1::XLTTradeApi::get_biz_sender
void get_biz_sender(char *biz_no, uint64_t &session_id, uint64_t &trade_token)
根据业务编号获取发送者信息，包括session_id和trade_token
x1::XLTTradeApi::cancel_order
uint64_t cancel_order(uint64_t session_id, xlt_cancel_order_info_t *cancel_order, uint64_t trade_token=0)
撤单 撤单请求。 如果撤单成功，会在报单响应函数on_cancel_response里返回原单部撤或者全撤的消息， 如果不成功，会在on_order_error_response响应函数中返回错误原因。
x1::XLTTradeApi::submit_cluster_fund_transfer_request
bool submit_cluster_fund_transfer_request(uint64_t session_id, uint64_t request_id, amount_t amount, char *biz_no=nullptr, uint64_t trade_token=0)
提交双中心资金划转请求，方向固定为划入
x1::XLTTradeApi::get_trading_day
uint32_t get_trading_day()
获取当前交易日。只有登录成功后,才能得到正确的交易日。
x1::XLTTradeApi::create
static XLTTradeApi * create()
创建实例（只能创建一次）
x1::XLTTradeApi::get_account_index
uint64_t get_account_index(uint64_t session_id, uint64_t trade_token=0)
获取账户索引，只有登录成功后，才能得到正确的资金账户索引
x1::XLTTradeApi::initialize
bool initialize(XLTTradeConfig *trade_config, XLTTradeSpi *trade_spi)
初始化交易，登录之前必须调用此函数，只能初始化一次
x1::XLTTradeApi::query_trade_account_info
bool query_trade_account_info(uint64_t session_id, uint64_t request_id, uint64_t account_index=0)
请求查询交易账户信息
x1::XLTTradeApi::query_positions
bool query_positions(uint64_t session_id, uint64_t request_id, const char *security_code, ExchangeIndex exchange_index=ExchangeIndex::INIT, uint64_t account_index=0)
请求查询投资者持仓
x1::XLTTradeApi::get_init_assets
const xlt_init_asset_info_t * get_init_assets(uint64_t session_id, uint64_t trade_token=0)
获取初始资产信息
x1::XLTTradeApi::stop
void stop()
停止交易API 断开所有交易session连接，清空所有session上的回调指针，停止回调。
x1::XLTTradeApi::auth_trade
bool auth_trade(uint64_t session_id, uint64_t request_id, const char *account_name, const char *password, const char *pub_key, const xlt_user_terminal_info_t *info=nullptr)
交易授权认证
x1::XLTTradeApi::XLTTradeApi
XLTTradeApi()=default
x1::XLTTradeApi::resend_order_request
bool resend_order_request(uint64_t session_id, uint64_t xid)
重发订单请求
x1::XLTTradeApi::init_local_send
void init_local_send()
本地发送初始化函数，预分配本地发送资源，非必须调用。 若不调用，会在首次发送订单时自动进行初始化，故建议在用户线程调用发送接口前调用此函数以避免首次发送订单时的延迟。
x1::XLTTradeApi::get_last_error
static xlt_error_info_t get_last_error()
获取错误信息
x1::XLTTradeApi::query_init_positions
bool query_init_positions(uint64_t session_id, uint64_t request_id, const char *security_code, ExchangeIndex exchange_index, uint64_t account_index=0)
请求查询初始持仓
x1::XLTTradeConfig
定义 xlt_trade_config.h:16
x1::XLTTradeReportList
只读成交回报信息列表
定义 xlt_trade_list.h:70
x1::XLTTradeSpi
交易回调类
定义 xlt_trade_api.h:21
x1::XLTTradeSpi::on_order_timeout
virtual void on_order_timeout(uint64_t session_id, uint64_t xid)
订单超时通知
定义 xlt_trade_api.h:36
x1::XLTTradeSpi::on_cancel_response
virtual void on_cancel_response(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_cancel_response_t *cancel_response)
撤单成功响应 此函数用于处理来自交易系统的撤单成功响应。 subscribe_trade_message或rebuild_trade_message指定消息类型包含TradeMessageType::R...
定义 xlt_trade_api.h:186
x1::XLTTradeSpi::on_order_end
virtual void on_order_end(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_order_end_t *order_end)
订单结束通知 本函数用于接收订单结束通知；当订单状态变为完全成交、撤单成功、废单等终结状态时，交易系统会发送该通知。 subscribe_trade_message或rebuild_trade_mess...
定义 xlt_trade_api.h:214
x1::XLTTradeSpi::on_login
virtual void on_login(uint64_t session_id, uint64_t request_id, const xlt_error_info_t *error_info)
登录通知
定义 xlt_trade_api.h:50
x1::XLTTradeSpi::on_auth_trade
virtual void on_auth_trade(uint64_t session_id, uint64_t request_id, uint64_t trade_token, const xlt_error_info_t *error_info)
认证通知
定义 xlt_trade_api.h:58
x1::XLTTradeSpi::on_query_assets
virtual void on_query_assets(uint64_t session_id, uint64_t request_id, const XLTAssetList *assets, bool is_last, const xlt_error_info_t *error_info)
资金查询响应
定义 xlt_trade_api.h:97
x1::XLTTradeSpi::on_raw_report
virtual void on_raw_report(uint64_t session_id, const xlt_msg_desc_t *msg_desc, uint8_t client_id, uint64_t xid, char report_id[32], ExchangeIndex exchange_index, uint16_t platform_type, uint16_t gateway_index, uint32_t report_size, char *raw_report)
交易所原始订单执行报告（需用户自行解码） 此函数用于接收原始的订单执行报告。报告内容包括但不限于订单状态、执行细节等。 由于报告是原始形式，因此需要用户自行解码以获取具体信息。 subscribe_tr...
定义 xlt_trade_api.h:231
x1::XLTTradeSpi::on_rebuild_trade_message
virtual void on_rebuild_trade_message(uint64_t session_id, uint64_t request_id, uint64_t start_sequence, uint64_t end_sequence, const xlt_error_info_t *error_info)
重推通知响应
定义 xlt_trade_api.h:77
x1::XLTTradeSpi::on_counter_fund_transfer_result
virtual void on_counter_fund_transfer_result(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_counter_fund_transfer_result_t *fund_transfer_result)
主柜资金划拨结果回调 subscribe_trade_message或rebuild_trade_message指定任意消息类型时，交易系统会在收到主柜资金划拨结果时推送该通知。
定义 xlt_trade_api.h:248
x1::XLTTradeSpi::on_query_init_positions
virtual void on_query_init_positions(uint64_t session_id, uint64_t request_id, const XLTInitPositionList *init_positions, bool is_last, const xlt_error_info_t *error_info)
请求查询初始持仓响应
定义 xlt_trade_api.h:149
x1::XLTTradeSpi::on_order_error_response
virtual void on_order_error_response(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_order_error_response_t *order_error_response)
委托失败通知 此函数用于处理来自交易系统的委托失败通知。 包括内部拒单、交易所拒单、废单及撤单失败等情况。 subscribe_trade_message或rebuild_trade_message指定...
定义 xlt_trade_api.h:205
x1::XLTTradeSpi::on_query_orders_by_page
virtual void on_query_orders_by_page(uint64_t session_id, uint64_t request_id, const XLTOrderList *order_infos, uint64_t req_count, uint64_t rsp_count, const xlt_page_query_reference_t *query_reference, bool is_last, const xlt_error_info_t *error_info)
分页请求查询报单响应
定义 xlt_trade_api.h:120
x1::XLTTradeSpi::on_disconnect
virtual void on_disconnect(uint64_t session_id)
断线通知 用户断线之后需要重新调用login方法，建立连接并登录
定义 xlt_trade_api.h:29
x1::XLTTradeSpi::on_query_trades
virtual void on_query_trades(uint64_t session_id, uint64_t request_id, const XLTTradeReportList *trade_reports, bool is_last, const xlt_error_info_t *error_info)
成交回报查询响应
定义 xlt_trade_api.h:130
x1::XLTTradeSpi::on_query_trade_account_info
virtual void on_query_trade_account_info(uint64_t session_id, uint64_t request_id, const XLTTradeAccountInfoList *trade_account_infos, bool is_last, const xlt_error_info_t *error_info)
请求查询交易账号信息响应
定义 xlt_trade_api.h:158
x1::XLTTradeSpi::on_counter_fund_transfer_request
virtual void on_counter_fund_transfer_request(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_counter_fund_transfer_request_t *fund_transfer_request)
主柜资金划拨请求推送 subscribe_trade_message或rebuild_trade_message指定任意消息类型时，交易系统会在收到主柜资金划拨请求时推送该通知。
定义 xlt_trade_api.h:240
x1::XLTTradeSpi::on_query_positions
virtual void on_query_positions(uint64_t session_id, uint64_t request_id, const XLTPositionList *positions, bool is_last, const xlt_error_info_t *error_info)
持仓查询响应
定义 xlt_trade_api.h:87
x1::XLTTradeSpi::on_subscribe_trade_message
virtual void on_subscribe_trade_message(uint64_t session_id, uint64_t request_id, uint64_t start_sequence, uint64_t latest_sequence, const xlt_error_info_t *error_info)
订阅通知响应
定义 xlt_trade_api.h:67
x1::XLTTradeSpi::on_order_book_update
virtual void on_order_book_update(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_order_book_update_t *order_update)
订单簿消息：订单变动通知回调
定义 xlt_trade_api.h:278
x1::XLTTradeSpi::on_order_response
virtual void on_order_response(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_order_response_t *order_response)
新订单申报成功响应 此函数用于处理来自交易系统的申报成功响应。 subscribe_trade_message或rebuild_trade_message指定消息类型包含TradeMessageType...
定义 xlt_trade_api.h:177
x1::XLTTradeSpi::on_query_init_assets
virtual void on_query_init_assets(uint64_t session_id, uint64_t request_id, const XLTInitAssetList *init_assets, bool is_last, const xlt_error_info_t *error_info)
请求查询初始资产响应
定义 xlt_trade_api.h:140
x1::XLTTradeSpi::on_cluster_fund_transfer_result
virtual void on_cluster_fund_transfer_result(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_cluster_fund_transfer_result_t *cluster_fund_transfer_result)
双中心资金划转结果回调 subscribe_trade_message或rebuild_trade_message指定任意消息类型时，交易系统会在收到双中心资金划拨结果时推送该通知。
定义 xlt_trade_api.h:264
x1::XLTTradeSpi::on_cluster_fund_transfer_request
virtual void on_cluster_fund_transfer_request(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_cluster_fund_transfer_request_t *cluster_fund_transfer_request)
双中心资金划拨请求推送 subscribe_trade_message或rebuild_trade_message指定任意消息类型时，交易系统会在收到双中心资金划拨请求时推送该通知。
定义 xlt_trade_api.h:256
x1::XLTTradeSpi::on_order_book_insert
virtual void on_order_book_insert(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_order_book_insert_t *order_insert)
订单簿消息：新订单通知回调
定义 xlt_trade_api.h:271
x1::XLTTradeSpi::on_position
virtual void on_position(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_position_info_t *position_info)
订单簿消息：持仓变动通知回调
定义 xlt_trade_api.h:299
x1::XLTTradeSpi::~XLTTradeSpi
virtual ~XLTTradeSpi()=default
x1::XLTTradeSpi::on_order_book_error
virtual void on_order_book_error(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_order_book_error_t *order_error)
订单簿消息：订单错误通知回调
定义 xlt_trade_api.h:285
x1::XLTTradeSpi::on_asset
virtual void on_asset(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_asset_info_t *asset_info)
订单簿消息：资金变动通知回调
定义 xlt_trade_api.h:292
x1::XLTTradeSpi::on_query_orders
virtual void on_query_orders(uint64_t session_id, uint64_t request_id, const XLTOrderList *orders, bool is_last, const xlt_error_info_t *error_info)
订单查询响应
定义 xlt_trade_api.h:107
x1::XLTTradeSpi::on_trade_report
virtual void on_trade_report(uint64_t session_id, const xlt_msg_desc_t *msg_desc, const xlt_trade_report_t *trade_report)
成交回报通知 此函数用于处理来自交易系统的成交回报通知。 subscribe_trade_message或rebuild_trade_message指定消息类型包含TradeMessageType::R...
定义 xlt_trade_api.h:195
x1
定义 xlt_data_type.h:13
x1::trade_message_type_t
uint32_t trade_message_type_t
交易消息类型
定义 xlt_trade_data_type.h:97
x1::amount_t
int64_t amount_t
金额 类型
定义 xlt_data_type.h:25
x1::ExchangeIndex
ExchangeIndex
交易所编号定义
定义 xlt_data_type.h:57
x1::ExchangeIndex::INIT
@ INIT
初始化值或者未知
x1::FundTransSide
FundTransSide
资金划转方向
定义 xlt_trade_data_type.h:131
x1::TradeResumeType
TradeResumeType
交易消息推送类型
定义 xlt_trade_data_type.h:24
x1::xlt_asset_info_t
账户资金信息
定义 xlt_trade_struct.h:280
x1::xlt_cancel_order_info_t
撤单请求数据结构
定义 xlt_trade_struct.h:31
x1::xlt_cancel_response_t
撤单申报成功响应
定义 xlt_trade_struct.h:93
x1::xlt_cluster_fund_transfer_request_t
双中心资金划转请求
定义 xlt_trade_struct.h:333
x1::xlt_cluster_fund_transfer_result_t
双中心资金划转结果
定义 xlt_trade_struct.h:344
x1::xlt_counter_fund_transfer_request_t
主柜资金划转申请
定义 xlt_trade_struct.h:305
x1::xlt_counter_fund_transfer_result_t
主柜资金划转结果
定义 xlt_trade_struct.h:317
x1::xlt_error_info_t
错误信息
定义 xlt_struct.h:18
x1::xlt_init_asset_info_t
日初资金信息结构体
定义 xlt_trade_struct.h:42
x1::xlt_msg_desc_t
消息推送描述信息
定义 xlt_trade_struct.h:64
x1::xlt_order_book_error_t
订单簿，订单错误通知结构体，包括申报失败、撤单失败等信息
定义 xlt_trade_struct.h:250
x1::xlt_order_book_insert_t
订单簿，新订单通知结构体
定义 xlt_trade_struct.h:197
x1::xlt_order_book_update_t
订单簿，订单变更通知结构体，包括订单状态变更、撤单、成交等信息
定义 xlt_trade_struct.h:222
x1::xlt_order_end_t
订单结束通知
定义 xlt_trade_struct.h:139
x1::xlt_order_error_response_t
申报失败响应（新订单申报失败，撤单失败）
定义 xlt_trade_struct.h:126
x1::xlt_order_insert_info_t
新订单请求数据结构
定义 xlt_trade_struct.h:17
x1::xlt_order_query_param_t
订单查询请求-条件查询
定义 xlt_trade_struct.h:358
x1::xlt_order_response_t
新订单申报成功响应
定义 xlt_trade_struct.h:73
x1::xlt_page_query_reference_t
查询定位结构体 用于记录每个分表的查询位置，用于分页查询
定义 xlt_struct.h:46
x1::xlt_position_info_t
持仓结构体
定义 xlt_trade_struct.h:268
x1::xlt_trade_report_t
成交回报
定义 xlt_trade_struct.h:108
x1::xlt_user_terminal_info_t
申报用户的ip和mac等信息
定义 xlt_struct.h:27
xlt_trade_config.h
本文件定义XLT 交易API配置类
xlt_trade_data_type.h
xlt_trade_list.h
xlt_trade_struct.h
本文件定义XLT交易数据结构体