Xlight API用户手册 v1.7.0.12
Xlight极速柜台接口文档
载入中...
搜索中...
未找到
xlt_privilege_struct.h
浏览该文件的文档.
1
8#pragma once
9
10#include "xlt_data_type.h"
11#include "xlt_trade_struct.h"
12
13namespace x1{
14#pragma pack(push, 1)
18 typedef struct {
19 uint64_t session_id;
20 uint32_t trade_way_index;
21 uint64_t token_id;
24 uint8_t client_id;
25 char terminal_info[CONST_TERMINAL_INFO_LEN];
26 char terminal_info_auto[CONST_TERMINAL_INFO_LEN];
27 char api_version[CONST_API_VERSION_STR_LEN];
29
30
43
44
55
65
77
92
93
94
110
129
138
151
165
176
190
199
208
217
226
247
252 uint64_t flags:54;
253 uint64_t resend_num:10;
254 uint64_t xid;
255 uint64_t auth_id;
256 uint64_t origin_xid;
257 uint8_t client_id;
258 uint64_t account_index;
260
261#pragma pack(pop)
262}
263
定义 xlt_data_type.h:13
struct x1::xlt_fund_avl_frozen_exec_request_t xlt_fund_avl_frozen_exec_request_t
可用资金冻结/解冻执行请求
Side
买卖方向
定义 xlt_data_type.h:66
FundFrozenSide
资金冻结方向
定义 xlt_trade_data_type.h:194
struct x1::xlt_create_algo_account_request_t xlt_create_algo_account_request_t
算法交易账户创建请求
struct x1::xlt_clear_algo_account_result_t xlt_clear_algo_account_result_t
算法交易账户清理结果通知
struct x1::xlt_user_special_cancel_order_t xlt_user_special_cancel_order_t
用户委托的低频业务撤单请求
FundTransExecType
资金划转执行类型
定义 xlt_trade_data_type.h:151
int64_t amount_t
金额 类型
定义 xlt_data_type.h:25
constexpr uint8_t CONST_API_VERSION_STR_LEN
API 版本信息字符串长度
定义 xlt_data_type.h:21
struct x1::xlt_api_head_t xlt_api_head_t
API消息头
FundFrozenStatus
资金冻结状态
定义 xlt_trade_data_type.h:203
BusinessType
业务类型
定义 xlt_trade_data_type.h:48
struct x1::xlt_order_transfer_report_t xlt_order_transfer_report_t
透传回报
ExchangeIndex
交易所编号定义
定义 xlt_data_type.h:57
int64_t price_t
价格 类型
定义 xlt_data_type.h:26
struct x1::xlt_internal_quote_login_info_t xlt_internal_quote_login_info_t
行情登陆流水信息
constexpr uint8_t CONST_STR_SECURITY_CODE_LEN
证券代码长度,含字符串终止符
定义 xlt_data_type.h:15
FundTransStatus
资金划转状态
定义 xlt_trade_data_type.h:141
OrderType
报单价格类型
定义 xlt_trade_data_type.h:34
struct x1::xlt_fund_transfer_exec_result_t xlt_fund_transfer_exec_result_t
资金划转执行结果
int64_t quantity_t
数量 类型
定义 xlt_data_type.h:27
constexpr uint16_t CONST_TERMINAL_INFO_LEN
终端信息的字符串长度
定义 xlt_data_type.h:20
struct x1::xlt_user_special_new_order_t xlt_user_special_new_order_t
用户委托的低频业务委托请求
struct x1::xlt_fund_avl_frozen_exec_result_t xlt_fund_avl_frozen_exec_result_t
可用资金冻结/解冻执行结果
FundTransSide
资金划转方向
定义 xlt_trade_data_type.h:132
struct x1::xlt_fund_transfer_exec_request_t xlt_fund_transfer_exec_request_t
资金划转执行请求
struct x1::xlt_transfer_order_request_header_t xlt_transfer_order_request_header_t
透传订单请求头
struct x1::xlt_clear_algo_account_request_t xlt_clear_algo_account_request_t
算法交易账户清理请求
struct x1::xlt_order_transfer_report_header_t xlt_order_transfer_report_header_t
透传回报头
struct x1::xlt_create_algo_account_result_t xlt_create_algo_account_result_t
算法交易账户创建结果通知
constexpr uint8_t CONST_BIZ_NO_LEN
资金划拨业务流水号长度,含字符串终止符
定义 xlt_trade_data_type.h:19
struct x1::xlt_transfer_order_request_t xlt_transfer_order_request_t
透传订单请求
API消息头
定义 xlt_privilege_struct.h:155
uint64_t session_id
会话ID
定义 xlt_privilege_struct.h:156
uint64_t login_account_index
登录账户索引
定义 xlt_privilege_struct.h:159
uint64_t trade_account_index
请求的目标交易账户索引,如果登录账户是特权管理账号,此字段可以为0,表示请求所有交易账户。
定义 xlt_privilege_struct.h:161
uint8_t login_account_type
登录账户类别
定义 xlt_privilege_struct.h:160
uint64_t auth_id
认证ID,认证响应中返回的账户认证ID
定义 xlt_privilege_struct.h:162
uint64_t request_id
请求ID, 客户自定义
定义 xlt_privilege_struct.h:157
uint64_t auth_token
认证令牌,API认证响应中返回的认证令牌
定义 xlt_privilege_struct.h:163
uint64_t request_seq
请求序号, API生成, 递增, 从0开始
定义 xlt_privilege_struct.h:158
账户资金简要信息
定义 xlt_privilege_struct.h:59
uint64_t account_index
交易账户索引
定义 xlt_privilege_struct.h:60
amount_t deposit_amount
当日划入金额
定义 xlt_privilege_struct.h:63
amount_t withdraw_amount
当日划出金额
定义 xlt_privilege_struct.h:62
amount_t available_amount
可用资金
定义 xlt_privilege_struct.h:61
持仓简要信息
定义 xlt_privilege_struct.h:48
ExchangeIndex exchange_index
交易市场
定义 xlt_privilege_struct.h:51
uint64_t account_index
交易账户索引
定义 xlt_privilege_struct.h:49
quantity_t sellable_quantity
可卖持仓
定义 xlt_privilege_struct.h:53
quantity_t total_quantity
总持仓
定义 xlt_privilege_struct.h:52
算法交易账户清理请求
定义 xlt_privilege_struct.h:133
char origin_biz_no[CONST_BIZ_NO_LEN]
原业务流水号
定义 xlt_privilege_struct.h:136
uint64_t algo_trade_account_index
算法交易账户索引
定义 xlt_privilege_struct.h:134
char biz_no[CONST_BIZ_NO_LEN]
撤销流水号
定义 xlt_privilege_struct.h:135
算法交易账户清理结果通知
定义 xlt_privilege_struct.h:142
int64_t time
操作的时间,格式为YYYYMMDDHHMMSSsss
定义 xlt_privilege_struct.h:147
bool success
清理是否成功,true-成功,false-失败
定义 xlt_privilege_struct.h:148
uint64_t algo_trade_account_index
算法交易账户索引
定义 xlt_privilege_struct.h:143
char biz_no[CONST_BIZ_NO_LEN]
撤销流水号
定义 xlt_privilege_struct.h:144
char origin_biz_no[CONST_BIZ_NO_LEN]
原业务流水号
定义 xlt_privilege_struct.h:145
xlt_error_info_t error_info
如果清理失败将通过该字段返回错误信息
定义 xlt_privilege_struct.h:149
uint64_t refer_login_account_index
关联登录账户索引
定义 xlt_privilege_struct.h:146
算法交易账户创建请求
定义 xlt_privilege_struct.h:98
quantity_t quantity
算法账户初始持仓数量
定义 xlt_privilege_struct.h:108
uint64_t algo_trade_account_index
算法交易账户索引
定义 xlt_privilege_struct.h:101
uint64_t parent_trade_account_index
父交易账户索引
定义 xlt_privilege_struct.h:103
uint64_t algo_type
算法类型
定义 xlt_privilege_struct.h:99
uint64_t refer_login_account_index
关联登录账户索引
定义 xlt_privilege_struct.h:104
char biz_no[CONST_BIZ_NO_LEN]
业务流水号
定义 xlt_privilege_struct.h:102
uint64_t trade_way_index
委托方式索引
定义 xlt_privilege_struct.h:100
amount_t amount
最大可用资金
定义 xlt_privilege_struct.h:105
ExchangeIndex exchange_index
可交易证券代码所属市场索引
定义 xlt_privilege_struct.h:106
char security_code[CONST_STR_SECURITY_CODE_LEN]
可交易证券代码
定义 xlt_privilege_struct.h:107
算法交易账户创建结果通知
定义 xlt_privilege_struct.h:114
uint64_t refer_login_account_index
关联登录账户索引
定义 xlt_privilege_struct.h:120
uint64_t parent_trade_account_index
父交易账户索引
定义 xlt_privilege_struct.h:119
ExchangeIndex exchange_index
可交易证券代码所属市场索引
定义 xlt_privilege_struct.h:122
char biz_no[CONST_BIZ_NO_LEN]
业务流水号
定义 xlt_privilege_struct.h:118
amount_t amount
最大可用资金
定义 xlt_privilege_struct.h:121
bool success
创建是否成功,true-成功,false-失败
定义 xlt_privilege_struct.h:126
xlt_error_info_t error_info
如果创建失败将通过该字段返回错误信息
定义 xlt_privilege_struct.h:127
quantity_t quantity
算法账户初始持仓数量
定义 xlt_privilege_struct.h:124
char security_code[CONST_STR_SECURITY_CODE_LEN]
可交易证券代码
定义 xlt_privilege_struct.h:123
uint64_t trade_way_index
委托方式索引
定义 xlt_privilege_struct.h:116
uint64_t algo_trade_account_index
算法交易账户索引
定义 xlt_privilege_struct.h:117
uint64_t algo_type
算法类型
定义 xlt_privilege_struct.h:115
int64_t time
操作的时间,格式为YYYYMMDDHHMMSSsss
定义 xlt_privilege_struct.h:125
错误信息
定义 xlt_struct.h:18
可用资金冻结/解冻执行请求
定义 xlt_privilege_struct.h:169
uint64_t account_index
交易账号索引
定义 xlt_privilege_struct.h:170
uint8_t check_flag
校验标记,0: 不做任何校验,1: 校验可用资金。
定义 xlt_privilege_struct.h:174
char biz_no[CONST_BIZ_NO_LEN]
资金划转业务流水号,交易API:token_id+序号,管理API:外部系统保证全局唯一
定义 xlt_privilege_struct.h:171
FundFrozenSide side
冻结方向,1: 冻结,2: 解冻。考虑定义为枚举。
定义 xlt_privilege_struct.h:172
amount_t amount
冻结/解冻金额,放大10000倍
定义 xlt_privilege_struct.h:173
可用资金冻结/解冻执行结果
定义 xlt_privilege_struct.h:180
amount_t amount
划转金额,放大10000倍
定义 xlt_privilege_struct.h:184
int64_t time
冻结时间,格式为YYYYMMDDHHMMSSsss
定义 xlt_privilege_struct.h:186
FundFrozenStatus status
冻结状态,DOING-处理中,SUCCESS-成功,FAIL-失败,EXCEPTION-异常。考虑定义为枚举。
定义 xlt_privilege_struct.h:187
uint8_t check_flag
校验标记,0: 不做任何校验,1: 校验可用资金。
定义 xlt_privilege_struct.h:185
uint64_t account_index
交易账号索引
定义 xlt_privilege_struct.h:181
xlt_error_info_t error_info
如果资金划转失败将通过该字段返回错误信息
定义 xlt_privilege_struct.h:188
FundFrozenSide side
冻结方向,1: 冻结,2: 解冻。考虑定义为枚举。
定义 xlt_privilege_struct.h:183
char biz_no[CONST_BIZ_NO_LEN]
资金划转业务流水号,交易API:token_id+序号,管理API:外部系统保证全局唯一
定义 xlt_privilege_struct.h:182
资金划转执行请求
定义 xlt_privilege_struct.h:69
uint64_t account_index
交易账号索引
定义 xlt_privilege_struct.h:70
char biz_no[CONST_BIZ_NO_LEN]
资金划转业务流水号,交易API:token_id+序号,管理API:外部系统保证全局唯一
定义 xlt_privilege_struct.h:71
amount_t amount
划转金额,放大10000倍
定义 xlt_privilege_struct.h:73
uint8_t check_flag
校验标记,0: 不做任何校验,1: 校验可用资金
定义 xlt_privilege_struct.h:74
FundTransSide side
划转方向,IN-划入(从主柜划入到xlight),OUT-划出(从xlight划出到主柜)
定义 xlt_privilege_struct.h:72
FundTransExecType exec_type
资金划转执行类型,NORMAL: 正常处理, ROLLBACK: 回滚
定义 xlt_privilege_struct.h:75
资金划转执行结果
定义 xlt_privilege_struct.h:81
FundTransSide side
划转方向,IN-划入(从主柜划入到xlight),OUT-划出(从xlight划出到主柜)
定义 xlt_privilege_struct.h:84
FundTransExecType exec_type
资金划转执行类型,NORMAL: 正常处理, ROLLBACK: 回滚
定义 xlt_privilege_struct.h:87
xlt_error_info_t error_info
如果资金划转失败将通过该字段返回错误信息
定义 xlt_privilege_struct.h:90
char biz_no[CONST_BIZ_NO_LEN]
资金划转业务流水号,交易API:token_id+序号,管理API:外部系统保证全局唯一
定义 xlt_privilege_struct.h:83
FundTransStatus status
划转状态,DOING-处理中,SUCCESS-成功,FAIL-失败,EXCEPTION-异常
定义 xlt_privilege_struct.h:89
int64_t time
资金划转的时间,格式为YYYYMMDDHHMMSSsss
定义 xlt_privilege_struct.h:88
uint8_t check_flag
校验标记,0: 不做任何校验,1: 校验可用资金
定义 xlt_privilege_struct.h:86
uint64_t account_index
交易账号索引
定义 xlt_privilege_struct.h:82
amount_t amount
划转金额,放大10000倍
定义 xlt_privilege_struct.h:85
行情登陆流水信息
定义 xlt_privilege_struct.h:34
uint16_t client_port
客户端端口号
定义 xlt_privilege_struct.h:39
uint64_t account_index
登录用户索引
定义 xlt_privilege_struct.h:35
char client_ip[46]
客户端IP地址
定义 xlt_privilege_struct.h:38
uint64_t time
明细时间, 格式为 YYYYMMDDHHMMSSsss
定义 xlt_privilege_struct.h:41
uint8_t detail_type
明细类型,0:登录明细,1:登出明细
定义 xlt_privilege_struct.h:40
uint8_t sz_l2_flag
深圳市场l2权限标识(0:无行情权限 1:深圳市场)
定义 xlt_privilege_struct.h:37
uint8_t sh_l2_flag
上海市场l2权限标识(0:无行情权限 1:上海市场)
定义 xlt_privilege_struct.h:36
token信息
定义 xlt_privilege_struct.h:18
uint32_t trade_way_index
委托方式索引
定义 xlt_privilege_struct.h:20
uint64_t session_id
会话ID
定义 xlt_privilege_struct.h:19
uint64_t login_account_index
登录用户索引
定义 xlt_privilege_struct.h:22
uint8_t client_id
登录用户的client_id
定义 xlt_privilege_struct.h:24
uint64_t trade_account_index
交易用户索引
定义 xlt_privilege_struct.h:23
uint64_t token_id
令牌ID
定义 xlt_privilege_struct.h:21
透传回报头
定义 xlt_privilege_struct.h:212
uint16_t gateway_index
网关索引
定义 xlt_privilege_struct.h:214
uint16_t platform_index
平台索引
定义 xlt_privilege_struct.h:215
ExchangeIndex exchange_index
交易所索引
定义 xlt_privilege_struct.h:213
透传回报
定义 xlt_privilege_struct.h:221
uint32_t exchange_report_length
交易所回报长度
定义 xlt_privilege_struct.h:223
xlt_order_transfer_report_header_t head
透传回报头
定义 xlt_privilege_struct.h:222
char exchange_report[0]
交易所回报
定义 xlt_privilege_struct.h:224
透传订单请求头
定义 xlt_privilege_struct.h:194
ExchangeIndex exchange_index
交易所索引
定义 xlt_privilege_struct.h:195
uint16_t platform_index
平台索引
定义 xlt_privilege_struct.h:197
uint16_t gateway_index
网关索引
定义 xlt_privilege_struct.h:196
透传订单请求
定义 xlt_privilege_struct.h:203
char request[0]
透传订单(交易所请求报文格式)
定义 xlt_privilege_struct.h:206
uint32_t request_length
透传订单长度(交易所请求报文格式)
定义 xlt_privilege_struct.h:205
xlt_transfer_order_request_header_t head
透传订单头
定义 xlt_privilege_struct.h:204
用户委托的低频业务撤单请求
定义 xlt_privilege_struct.h:251
uint8_t client_id
委托源标识,用户登录时自定义
定义 xlt_privilege_struct.h:257
uint64_t resend_num
相同xid重发次数,ApiOrderFlag中如果包含RESEND_ORDER时有效
定义 xlt_privilege_struct.h:253
uint64_t account_index
交易账户索引
定义 xlt_privilege_struct.h:258
uint64_t origin_xid
原始报单标识
定义 xlt_privilege_struct.h:256
uint64_t xid
报单标识
定义 xlt_privilege_struct.h:254
uint64_t flags
委托标志 (取值见enum ApiOrderFlag)
定义 xlt_privilege_struct.h:252
uint64_t auth_id
授权ID
定义 xlt_privilege_struct.h:255
用户委托的低频业务委托请求
定义 xlt_privilege_struct.h:230
uint64_t account_index
交易账户索引
定义 xlt_privilege_struct.h:245
uint8_t client_id
委托源标识,用户登录时自定义
定义 xlt_privilege_struct.h:244
BusinessType business_type
业务类型
定义 xlt_privilege_struct.h:241
Side side
买卖方向
定义 xlt_privilege_struct.h:239
quantity_t order_quantity
订单数量
定义 xlt_privilege_struct.h:237
uint32_t security_key
证券代码Key,与证券代码一一对应
定义 xlt_privilege_struct.h:235
uint64_t flags
委托标志 (取值见enum ApiOrderFlag)
定义 xlt_privilege_struct.h:231
char security_code[CONST_STR_SECURITY_CODE_LEN]
证券代码
定义 xlt_privilege_struct.h:243
price_t price
价格
定义 xlt_privilege_struct.h:238
uint32_t security_index
证券索引
定义 xlt_privilege_struct.h:236
ExchangeIndex exchange_index
交易所索引
定义 xlt_privilege_struct.h:242
uint64_t xid
报单标识
定义 xlt_privilege_struct.h:233
OrderType order_type
订单类型
定义 xlt_privilege_struct.h:240
uint64_t auth_id
授权ID
定义 xlt_privilege_struct.h:234
uint64_t resend_num
相同xid重发次数,ApiOrderFlag中如果包含RESEND_ORDER时有效
定义 xlt_privilege_struct.h:232
本文件定义XLT API中使用的基本数据类型和常量
本文件定义XLT交易数据结构体