forked from QuantBox/QuantBox_XAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApiEnum.h
230 lines (208 loc) · 2.96 KB
/
ApiEnum.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#ifndef _API_ENUM_H_
#define _API_ENUM_H_
//连接状态枚举
enum ConnectionStatus :char
{
Uninitialized, //未初始化
Initialized, //已经初始化
Disconnected, //连接已经断开
Connecting, //连接中
Connected, //连接成功
Authorizing, //授权中
Authorized, //授权成功
Logining, //登录中
Logined, //登录成功
Confirming, //结算单确认中
Confirmed, //已经确认
Doing,
Done, //完成
Unknown_, //未知
};
enum ApiType :char
{
Nono = 0,
Trade = 1,
MarketData = 2,
Level2 = 4,
QuoteRequest = 8,
HistoricalData = 16,
Instrument = 32,
};
enum DepthLevelType:char
{
L0,
L1,
L5,
L10,
FULL,
};
enum ResumeType :char
{
Restart,
Resume,
Quick,
Undefined,
};
enum PutCall :char
{
Put,
Call,
};
enum OrderStatus :char
{
NotSent,
PendingNew,
New,
Rejected,
PartiallyFilled,
Filled,
PendingCancel,
Cancelled,
Expired,
PendingReplace,
Replaced,
};
enum OrderSide :char
{
Buy,
Sell,
};
enum OrderType :char
{
Market,
Stop,
Limit,
StopLimit,
MarketOnClose,
Pegged,
TrailingStop,
TrailingStopLimit,
};
enum TimeInForce :char
{
ATC,
Day,
GTC,
IOC,
OPG,
OC,
FOK,
GTX,
GTD,
GFS,
AUC,
};
enum PositionSide :char
{
Long,
Short,
};
enum ExecType : char
{
ExecNew,
ExecRejected,
ExecTrade,
ExecPendingCancel,
ExecCancelled,
ExecCancelReject,
ExecPendingReplace,
ExecReplace,
ExecReplaceReject,
};
enum OpenCloseType :char
{
Open,
Close,
CloseToday,
};
enum HedgeFlagType :char
{
Speculation,
Arbitrage,
Hedge,
MarketMaker,
};
enum InstrumentType :char
{
Stock,
Future,
Option,
FutureOption,
Bond,
FX,
Index,
ETF,
MultiLeg,
Synthetic,
};
/*
发现融资融券的只有部分功能加入,还有一些功能缺失
这下回到XAPI的定位问题,到底是一个只服务自动套利交易的API,还是全功能的API
*/
enum SecurityType :char
{
CS, // Common Stock
CB, // Convertible Bond,标记后,深圳卖出当前可转债表示转股
ETF_, // 标记后,买入表示申购,卖出表示赎回
LOF, // 标记后,买入表示申购,卖出表示赎回
SF, // 标记后,买入表示合并,卖出表示分拆
CashMargin, // 标记后,开仓表示"融",平仓表示"还"
};
enum BarType :char
{
Time = 1,
Tick,
Volume,
Range,
Session,
};
enum DataObjetType : char
{
DataObject,
Tick_,
Bid,
Ask,
Trade_,
Quote,
Bar,
Level2_,
Level2Snapshot,
Level2Update,
};
enum IdCardType:char
{
EID,
IDCard,
OfficerIDCard,
PoliceIDCard,
SoldierIDCard,
HouseholdRegister,
Passport,
TaiwanCompatriotIDCard,
HomeComingCard,
LicenseNo,
TaxNo,
HMMainlandTravelPermit,
TwMainlandTravelPermit,
DrivingLicense,
SocialID,
LocalID,
BusinessRegistration,
HKMCIDCard,
AccountsPermits,
OtherCard,
};
enum ExchangeType :char
{
Undefined_,
SHFE, // 上期所
DCE, // 大商所
CZCE, // 郑商所
CFFEX, // 中金所
INE, // 能源中心
SSE, // 上交所
SZE, // 深交所
NEEQ, // 全国中小企业股份转让系统,三板,临时这么写
HKEx,
};
#endif