hikyuu 2.6.5__py3-none-win_amd64.whl → 2.6.6__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hikyuu/__init__.py +6 -0
- hikyuu/__init__.pyi +548 -545
- hikyuu/analysis/__init__.pyi +519 -518
- hikyuu/analysis/analysis.pyi +520 -519
- hikyuu/core.pyi +521 -520
- hikyuu/cpp/__init__.pyi +2 -2
- hikyuu/cpp/boost_date_time-mt.dll +0 -0
- hikyuu/cpp/boost_serialization-mt.dll +0 -0
- hikyuu/cpp/boost_wserialization-mt.dll +0 -0
- hikyuu/cpp/core310.pyd +0 -0
- hikyuu/cpp/core310.pyi +35 -25
- hikyuu/cpp/core311.pyd +0 -0
- hikyuu/cpp/core311.pyi +35 -25
- hikyuu/cpp/core312.pyd +0 -0
- hikyuu/cpp/core312.pyi +35 -25
- hikyuu/cpp/core313.pyd +0 -0
- hikyuu/cpp/core313.pyi +35 -25
- hikyuu/cpp/core39.pyd +0 -0
- hikyuu/cpp/core39.pyi +35 -25
- hikyuu/cpp/hikyuu.dll +0 -0
- hikyuu/cpp/hikyuu.lib +0 -0
- hikyuu/cpp/i18n/__init__.py +0 -0
- hikyuu/cpp/i18n/zh_CN.mo +0 -0
- hikyuu/cpp/sqlite3.dll +0 -0
- hikyuu/data/clickhouse_upgrade/__init__.py +1 -0
- hikyuu/data/clickhouse_upgrade/createdb.sql +1085 -0
- hikyuu/data/common_clickhouse.py +512 -0
- hikyuu/data/em_block_to_clickhouse.py +120 -0
- hikyuu/data/hku_config_template.py +58 -3
- hikyuu/data/pytdx_finance_to_clickhouse.py +107 -0
- hikyuu/data/pytdx_to_clickhouse.py +841 -0
- hikyuu/data/pytdx_to_mysql.py +4 -4
- hikyuu/data/pytdx_weight_to_clickhouse.py +191 -0
- hikyuu/data/tdx_to_clickhouse.py +448 -0
- hikyuu/data/zh_bond10_to_clickhouse.py +49 -0
- hikyuu/draw/drawplot/__init__.pyi +9 -9
- hikyuu/draw/drawplot/bokeh_draw.pyi +537 -534
- hikyuu/draw/drawplot/common.pyi +1 -1
- hikyuu/draw/drawplot/echarts_draw.pyi +539 -536
- hikyuu/draw/drawplot/matplotlib_draw.pyi +549 -546
- hikyuu/draw/elder.pyi +11 -11
- hikyuu/draw/kaufman.pyi +18 -18
- hikyuu/draw/volume.pyi +10 -10
- hikyuu/extend.pyi +527 -526
- hikyuu/fetcher/stock/zh_stock_a_pytdx.py +9 -20
- hikyuu/fetcher/stock/zh_stock_a_qmt.py +4 -5
- hikyuu/fetcher/stock/zh_stock_a_sina_qq.py +16 -60
- hikyuu/flat/Spot.py +96 -200
- hikyuu/gui/HikyuuTDX.py +132 -3
- hikyuu/gui/data/ImportBlockInfoTask.py +11 -0
- hikyuu/gui/data/ImportHistoryFinanceTask.py +15 -1
- hikyuu/gui/data/ImportPytdxTimeToH5Task.py +11 -1
- hikyuu/gui/data/ImportPytdxToH5Task.py +13 -1
- hikyuu/gui/data/ImportPytdxTransToH5Task.py +11 -1
- hikyuu/gui/data/ImportTdxToH5Task.py +13 -1
- hikyuu/gui/data/ImportWeightToSqliteTask.py +14 -1
- hikyuu/gui/data/ImportZhBond10Task.py +11 -0
- hikyuu/gui/data/MainWindow.py +76 -12
- hikyuu/gui/data/UsePytdxImportToH5Thread.py +45 -26
- hikyuu/gui/data/UseTdxImportToH5Thread.py +19 -1
- hikyuu/gui/dataserver.py +12 -4
- hikyuu/gui/spot_server.py +30 -40
- hikyuu/gui/start_qmt.py +20 -3
- hikyuu/hub.pyi +6 -6
- hikyuu/include/hikyuu/DataType.h +11 -0
- hikyuu/include/hikyuu/StockManager.h +8 -0
- hikyuu/include/hikyuu/data_driver/kdata/mysql/KRecordTable.h +1 -0
- hikyuu/include/hikyuu/global/GlobalSpotAgent.h +1 -1
- hikyuu/include/hikyuu/global/SpotRecord.h +15 -31
- hikyuu/include/hikyuu/global/agent/spot_generated.h +48 -232
- hikyuu/include/hikyuu/global/schedule/scheduler.h +1 -1
- hikyuu/include/hikyuu/plugin/KDataToHdf5Importer.h +3 -0
- hikyuu/include/hikyuu/plugin/dataserver.h +26 -1
- hikyuu/include/hikyuu/plugin/device.h +2 -1
- hikyuu/include/hikyuu/plugin/interface/DataDriverPluginInterface.h +27 -0
- hikyuu/include/hikyuu/plugin/interface/DataServerPluginInterface.h +2 -1
- hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +1 -1
- hikyuu/include/hikyuu/plugin/interface/ImportKDataToHdf5PluginInterface.h +3 -0
- hikyuu/include/hikyuu/plugin/interface/plugins.h +2 -0
- hikyuu/include/hikyuu/strategy/Strategy.h +0 -9
- hikyuu/include/hikyuu/utilities/config.h +1 -1
- hikyuu/include/hikyuu/utilities/mo/mo.h +30 -14
- hikyuu/include/hikyuu/utilities/os.h +6 -0
- hikyuu/include/hikyuu/version.h +4 -4
- hikyuu/plugin/backtest.dll +0 -0
- hikyuu/plugin/clickhousedriver.dll +0 -0
- hikyuu/plugin/dataserver.dll +0 -0
- hikyuu/plugin/device.dll +0 -0
- hikyuu/plugin/extind.dll +0 -0
- hikyuu/plugin/import2hdf5.dll +0 -0
- hikyuu/plugin/tmreport.dll +0 -0
- hikyuu/trade_manage/__init__.pyi +537 -534
- hikyuu/trade_manage/broker.pyi +3 -3
- hikyuu/trade_manage/broker_easytrader.pyi +1 -1
- hikyuu/trade_manage/trade.pyi +537 -534
- hikyuu/util/__init__.py +1 -0
- hikyuu/util/__init__.pyi +4 -3
- hikyuu/util/check.py +8 -0
- hikyuu/util/check.pyi +5 -1
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/METADATA +2 -2
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/RECORD +106 -95
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/top_level.txt +2 -2
- hikyuu/include/hikyuu/global/agent/hikyuu/__init__.py +0 -1
- hikyuu/include/hikyuu/global/agent/hikyuu/flat/__init__.py +0 -1
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/LICENSE +0 -0
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/WHEEL +0 -0
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/entry_points.txt +0 -0
|
@@ -36,26 +36,10 @@ struct Spot FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
|
|
36
36
|
VT_CLOSE = 20,
|
|
37
37
|
VT_AMOUNT = 22,
|
|
38
38
|
VT_VOLUME = 24,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
VT_BID3 = 34,
|
|
44
|
-
VT_BID3_AMOUNT = 36,
|
|
45
|
-
VT_BID4 = 38,
|
|
46
|
-
VT_BID4_AMOUNT = 40,
|
|
47
|
-
VT_BID5 = 42,
|
|
48
|
-
VT_BID5_AMOUNT = 44,
|
|
49
|
-
VT_ASK1 = 46,
|
|
50
|
-
VT_ASK1_AMOUNT = 48,
|
|
51
|
-
VT_ASK2 = 50,
|
|
52
|
-
VT_ASK2_AMOUNT = 52,
|
|
53
|
-
VT_ASK3 = 54,
|
|
54
|
-
VT_ASK3_AMOUNT = 56,
|
|
55
|
-
VT_ASK4 = 58,
|
|
56
|
-
VT_ASK4_AMOUNT = 60,
|
|
57
|
-
VT_ASK5 = 62,
|
|
58
|
-
VT_ASK5_AMOUNT = 64
|
|
39
|
+
VT_BID = 26,
|
|
40
|
+
VT_BID_AMOUNT = 28,
|
|
41
|
+
VT_ASK = 30,
|
|
42
|
+
VT_ASK_AMOUNT = 32
|
|
59
43
|
};
|
|
60
44
|
const ::flatbuffers::String *market() const {
|
|
61
45
|
return GetPointer<const ::flatbuffers::String *>(VT_MARKET);
|
|
@@ -90,65 +74,17 @@ struct Spot FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
|
|
90
74
|
double volume() const {
|
|
91
75
|
return GetField<double>(VT_VOLUME, 0.0);
|
|
92
76
|
}
|
|
93
|
-
double
|
|
94
|
-
return
|
|
77
|
+
const ::flatbuffers::Vector<double> *bid() const {
|
|
78
|
+
return GetPointer<const ::flatbuffers::Vector<double> *>(VT_BID);
|
|
95
79
|
}
|
|
96
|
-
double
|
|
97
|
-
return
|
|
80
|
+
const ::flatbuffers::Vector<double> *bid_amount() const {
|
|
81
|
+
return GetPointer<const ::flatbuffers::Vector<double> *>(VT_BID_AMOUNT);
|
|
98
82
|
}
|
|
99
|
-
double
|
|
100
|
-
return
|
|
83
|
+
const ::flatbuffers::Vector<double> *ask() const {
|
|
84
|
+
return GetPointer<const ::flatbuffers::Vector<double> *>(VT_ASK);
|
|
101
85
|
}
|
|
102
|
-
double
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
double bid3() const {
|
|
106
|
-
return GetField<double>(VT_BID3, 0.0);
|
|
107
|
-
}
|
|
108
|
-
double bid3_amount() const {
|
|
109
|
-
return GetField<double>(VT_BID3_AMOUNT, 0.0);
|
|
110
|
-
}
|
|
111
|
-
double bid4() const {
|
|
112
|
-
return GetField<double>(VT_BID4, 0.0);
|
|
113
|
-
}
|
|
114
|
-
double bid4_amount() const {
|
|
115
|
-
return GetField<double>(VT_BID4_AMOUNT, 0.0);
|
|
116
|
-
}
|
|
117
|
-
double bid5() const {
|
|
118
|
-
return GetField<double>(VT_BID5, 0.0);
|
|
119
|
-
}
|
|
120
|
-
double bid5_amount() const {
|
|
121
|
-
return GetField<double>(VT_BID5_AMOUNT, 0.0);
|
|
122
|
-
}
|
|
123
|
-
double ask1() const {
|
|
124
|
-
return GetField<double>(VT_ASK1, 0.0);
|
|
125
|
-
}
|
|
126
|
-
double ask1_amount() const {
|
|
127
|
-
return GetField<double>(VT_ASK1_AMOUNT, 0.0);
|
|
128
|
-
}
|
|
129
|
-
double ask2() const {
|
|
130
|
-
return GetField<double>(VT_ASK2, 0.0);
|
|
131
|
-
}
|
|
132
|
-
double ask2_amount() const {
|
|
133
|
-
return GetField<double>(VT_ASK2_AMOUNT, 0.0);
|
|
134
|
-
}
|
|
135
|
-
double ask3() const {
|
|
136
|
-
return GetField<double>(VT_ASK3, 0.0);
|
|
137
|
-
}
|
|
138
|
-
double ask3_amount() const {
|
|
139
|
-
return GetField<double>(VT_ASK3_AMOUNT, 0.0);
|
|
140
|
-
}
|
|
141
|
-
double ask4() const {
|
|
142
|
-
return GetField<double>(VT_ASK4, 0.0);
|
|
143
|
-
}
|
|
144
|
-
double ask4_amount() const {
|
|
145
|
-
return GetField<double>(VT_ASK4_AMOUNT, 0.0);
|
|
146
|
-
}
|
|
147
|
-
double ask5() const {
|
|
148
|
-
return GetField<double>(VT_ASK5, 0.0);
|
|
149
|
-
}
|
|
150
|
-
double ask5_amount() const {
|
|
151
|
-
return GetField<double>(VT_ASK5_AMOUNT, 0.0);
|
|
86
|
+
const ::flatbuffers::Vector<double> *ask_amount() const {
|
|
87
|
+
return GetPointer<const ::flatbuffers::Vector<double> *>(VT_ASK_AMOUNT);
|
|
152
88
|
}
|
|
153
89
|
bool Verify(::flatbuffers::Verifier &verifier) const {
|
|
154
90
|
return VerifyTableStart(verifier) &&
|
|
@@ -167,26 +103,14 @@ struct Spot FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
|
|
167
103
|
VerifyField<double>(verifier, VT_CLOSE, 8) &&
|
|
168
104
|
VerifyField<double>(verifier, VT_AMOUNT, 8) &&
|
|
169
105
|
VerifyField<double>(verifier, VT_VOLUME, 8) &&
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
VerifyField<double>(verifier, VT_BID5, 8) &&
|
|
179
|
-
VerifyField<double>(verifier, VT_BID5_AMOUNT, 8) &&
|
|
180
|
-
VerifyField<double>(verifier, VT_ASK1, 8) &&
|
|
181
|
-
VerifyField<double>(verifier, VT_ASK1_AMOUNT, 8) &&
|
|
182
|
-
VerifyField<double>(verifier, VT_ASK2, 8) &&
|
|
183
|
-
VerifyField<double>(verifier, VT_ASK2_AMOUNT, 8) &&
|
|
184
|
-
VerifyField<double>(verifier, VT_ASK3, 8) &&
|
|
185
|
-
VerifyField<double>(verifier, VT_ASK3_AMOUNT, 8) &&
|
|
186
|
-
VerifyField<double>(verifier, VT_ASK4, 8) &&
|
|
187
|
-
VerifyField<double>(verifier, VT_ASK4_AMOUNT, 8) &&
|
|
188
|
-
VerifyField<double>(verifier, VT_ASK5, 8) &&
|
|
189
|
-
VerifyField<double>(verifier, VT_ASK5_AMOUNT, 8) &&
|
|
106
|
+
VerifyOffset(verifier, VT_BID) &&
|
|
107
|
+
verifier.VerifyVector(bid()) &&
|
|
108
|
+
VerifyOffset(verifier, VT_BID_AMOUNT) &&
|
|
109
|
+
verifier.VerifyVector(bid_amount()) &&
|
|
110
|
+
VerifyOffset(verifier, VT_ASK) &&
|
|
111
|
+
verifier.VerifyVector(ask()) &&
|
|
112
|
+
VerifyOffset(verifier, VT_ASK_AMOUNT) &&
|
|
113
|
+
verifier.VerifyVector(ask_amount()) &&
|
|
190
114
|
verifier.EndTable();
|
|
191
115
|
}
|
|
192
116
|
};
|
|
@@ -228,65 +152,17 @@ struct SpotBuilder {
|
|
|
228
152
|
void add_volume(double volume) {
|
|
229
153
|
fbb_.AddElement<double>(Spot::VT_VOLUME, volume, 0.0);
|
|
230
154
|
}
|
|
231
|
-
void
|
|
232
|
-
fbb_.
|
|
233
|
-
}
|
|
234
|
-
void add_bid1_amount(double bid1_amount) {
|
|
235
|
-
fbb_.AddElement<double>(Spot::VT_BID1_AMOUNT, bid1_amount, 0.0);
|
|
236
|
-
}
|
|
237
|
-
void add_bid2(double bid2) {
|
|
238
|
-
fbb_.AddElement<double>(Spot::VT_BID2, bid2, 0.0);
|
|
239
|
-
}
|
|
240
|
-
void add_bid2_amount(double bid2_amount) {
|
|
241
|
-
fbb_.AddElement<double>(Spot::VT_BID2_AMOUNT, bid2_amount, 0.0);
|
|
242
|
-
}
|
|
243
|
-
void add_bid3(double bid3) {
|
|
244
|
-
fbb_.AddElement<double>(Spot::VT_BID3, bid3, 0.0);
|
|
245
|
-
}
|
|
246
|
-
void add_bid3_amount(double bid3_amount) {
|
|
247
|
-
fbb_.AddElement<double>(Spot::VT_BID3_AMOUNT, bid3_amount, 0.0);
|
|
248
|
-
}
|
|
249
|
-
void add_bid4(double bid4) {
|
|
250
|
-
fbb_.AddElement<double>(Spot::VT_BID4, bid4, 0.0);
|
|
251
|
-
}
|
|
252
|
-
void add_bid4_amount(double bid4_amount) {
|
|
253
|
-
fbb_.AddElement<double>(Spot::VT_BID4_AMOUNT, bid4_amount, 0.0);
|
|
254
|
-
}
|
|
255
|
-
void add_bid5(double bid5) {
|
|
256
|
-
fbb_.AddElement<double>(Spot::VT_BID5, bid5, 0.0);
|
|
257
|
-
}
|
|
258
|
-
void add_bid5_amount(double bid5_amount) {
|
|
259
|
-
fbb_.AddElement<double>(Spot::VT_BID5_AMOUNT, bid5_amount, 0.0);
|
|
260
|
-
}
|
|
261
|
-
void add_ask1(double ask1) {
|
|
262
|
-
fbb_.AddElement<double>(Spot::VT_ASK1, ask1, 0.0);
|
|
263
|
-
}
|
|
264
|
-
void add_ask1_amount(double ask1_amount) {
|
|
265
|
-
fbb_.AddElement<double>(Spot::VT_ASK1_AMOUNT, ask1_amount, 0.0);
|
|
266
|
-
}
|
|
267
|
-
void add_ask2(double ask2) {
|
|
268
|
-
fbb_.AddElement<double>(Spot::VT_ASK2, ask2, 0.0);
|
|
269
|
-
}
|
|
270
|
-
void add_ask2_amount(double ask2_amount) {
|
|
271
|
-
fbb_.AddElement<double>(Spot::VT_ASK2_AMOUNT, ask2_amount, 0.0);
|
|
272
|
-
}
|
|
273
|
-
void add_ask3(double ask3) {
|
|
274
|
-
fbb_.AddElement<double>(Spot::VT_ASK3, ask3, 0.0);
|
|
275
|
-
}
|
|
276
|
-
void add_ask3_amount(double ask3_amount) {
|
|
277
|
-
fbb_.AddElement<double>(Spot::VT_ASK3_AMOUNT, ask3_amount, 0.0);
|
|
278
|
-
}
|
|
279
|
-
void add_ask4(double ask4) {
|
|
280
|
-
fbb_.AddElement<double>(Spot::VT_ASK4, ask4, 0.0);
|
|
155
|
+
void add_bid(::flatbuffers::Offset<::flatbuffers::Vector<double>> bid) {
|
|
156
|
+
fbb_.AddOffset(Spot::VT_BID, bid);
|
|
281
157
|
}
|
|
282
|
-
void
|
|
283
|
-
fbb_.
|
|
158
|
+
void add_bid_amount(::flatbuffers::Offset<::flatbuffers::Vector<double>> bid_amount) {
|
|
159
|
+
fbb_.AddOffset(Spot::VT_BID_AMOUNT, bid_amount);
|
|
284
160
|
}
|
|
285
|
-
void
|
|
286
|
-
fbb_.
|
|
161
|
+
void add_ask(::flatbuffers::Offset<::flatbuffers::Vector<double>> ask) {
|
|
162
|
+
fbb_.AddOffset(Spot::VT_ASK, ask);
|
|
287
163
|
}
|
|
288
|
-
void
|
|
289
|
-
fbb_.
|
|
164
|
+
void add_ask_amount(::flatbuffers::Offset<::flatbuffers::Vector<double>> ask_amount) {
|
|
165
|
+
fbb_.AddOffset(Spot::VT_ASK_AMOUNT, ask_amount);
|
|
290
166
|
}
|
|
291
167
|
explicit SpotBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
|
292
168
|
: fbb_(_fbb) {
|
|
@@ -312,47 +188,11 @@ inline ::flatbuffers::Offset<Spot> CreateSpot(
|
|
|
312
188
|
double close = 0.0,
|
|
313
189
|
double amount = 0.0,
|
|
314
190
|
double volume = 0.0,
|
|
315
|
-
double
|
|
316
|
-
double
|
|
317
|
-
double
|
|
318
|
-
double
|
|
319
|
-
double bid3 = 0.0,
|
|
320
|
-
double bid3_amount = 0.0,
|
|
321
|
-
double bid4 = 0.0,
|
|
322
|
-
double bid4_amount = 0.0,
|
|
323
|
-
double bid5 = 0.0,
|
|
324
|
-
double bid5_amount = 0.0,
|
|
325
|
-
double ask1 = 0.0,
|
|
326
|
-
double ask1_amount = 0.0,
|
|
327
|
-
double ask2 = 0.0,
|
|
328
|
-
double ask2_amount = 0.0,
|
|
329
|
-
double ask3 = 0.0,
|
|
330
|
-
double ask3_amount = 0.0,
|
|
331
|
-
double ask4 = 0.0,
|
|
332
|
-
double ask4_amount = 0.0,
|
|
333
|
-
double ask5 = 0.0,
|
|
334
|
-
double ask5_amount = 0.0) {
|
|
191
|
+
::flatbuffers::Offset<::flatbuffers::Vector<double>> bid = 0,
|
|
192
|
+
::flatbuffers::Offset<::flatbuffers::Vector<double>> bid_amount = 0,
|
|
193
|
+
::flatbuffers::Offset<::flatbuffers::Vector<double>> ask = 0,
|
|
194
|
+
::flatbuffers::Offset<::flatbuffers::Vector<double>> ask_amount = 0) {
|
|
335
195
|
SpotBuilder builder_(_fbb);
|
|
336
|
-
builder_.add_ask5_amount(ask5_amount);
|
|
337
|
-
builder_.add_ask5(ask5);
|
|
338
|
-
builder_.add_ask4_amount(ask4_amount);
|
|
339
|
-
builder_.add_ask4(ask4);
|
|
340
|
-
builder_.add_ask3_amount(ask3_amount);
|
|
341
|
-
builder_.add_ask3(ask3);
|
|
342
|
-
builder_.add_ask2_amount(ask2_amount);
|
|
343
|
-
builder_.add_ask2(ask2);
|
|
344
|
-
builder_.add_ask1_amount(ask1_amount);
|
|
345
|
-
builder_.add_ask1(ask1);
|
|
346
|
-
builder_.add_bid5_amount(bid5_amount);
|
|
347
|
-
builder_.add_bid5(bid5);
|
|
348
|
-
builder_.add_bid4_amount(bid4_amount);
|
|
349
|
-
builder_.add_bid4(bid4);
|
|
350
|
-
builder_.add_bid3_amount(bid3_amount);
|
|
351
|
-
builder_.add_bid3(bid3);
|
|
352
|
-
builder_.add_bid2_amount(bid2_amount);
|
|
353
|
-
builder_.add_bid2(bid2);
|
|
354
|
-
builder_.add_bid1_amount(bid1_amount);
|
|
355
|
-
builder_.add_bid1(bid1);
|
|
356
196
|
builder_.add_volume(volume);
|
|
357
197
|
builder_.add_amount(amount);
|
|
358
198
|
builder_.add_close(close);
|
|
@@ -360,6 +200,10 @@ inline ::flatbuffers::Offset<Spot> CreateSpot(
|
|
|
360
200
|
builder_.add_high(high);
|
|
361
201
|
builder_.add_open(open);
|
|
362
202
|
builder_.add_yesterday_close(yesterday_close);
|
|
203
|
+
builder_.add_ask_amount(ask_amount);
|
|
204
|
+
builder_.add_ask(ask);
|
|
205
|
+
builder_.add_bid_amount(bid_amount);
|
|
206
|
+
builder_.add_bid(bid);
|
|
363
207
|
builder_.add_datetime(datetime);
|
|
364
208
|
builder_.add_name(name);
|
|
365
209
|
builder_.add_code(code);
|
|
@@ -380,30 +224,18 @@ inline ::flatbuffers::Offset<Spot> CreateSpotDirect(
|
|
|
380
224
|
double close = 0.0,
|
|
381
225
|
double amount = 0.0,
|
|
382
226
|
double volume = 0.0,
|
|
383
|
-
double
|
|
384
|
-
double
|
|
385
|
-
double
|
|
386
|
-
double
|
|
387
|
-
double bid3 = 0.0,
|
|
388
|
-
double bid3_amount = 0.0,
|
|
389
|
-
double bid4 = 0.0,
|
|
390
|
-
double bid4_amount = 0.0,
|
|
391
|
-
double bid5 = 0.0,
|
|
392
|
-
double bid5_amount = 0.0,
|
|
393
|
-
double ask1 = 0.0,
|
|
394
|
-
double ask1_amount = 0.0,
|
|
395
|
-
double ask2 = 0.0,
|
|
396
|
-
double ask2_amount = 0.0,
|
|
397
|
-
double ask3 = 0.0,
|
|
398
|
-
double ask3_amount = 0.0,
|
|
399
|
-
double ask4 = 0.0,
|
|
400
|
-
double ask4_amount = 0.0,
|
|
401
|
-
double ask5 = 0.0,
|
|
402
|
-
double ask5_amount = 0.0) {
|
|
227
|
+
const std::vector<double> *bid = nullptr,
|
|
228
|
+
const std::vector<double> *bid_amount = nullptr,
|
|
229
|
+
const std::vector<double> *ask = nullptr,
|
|
230
|
+
const std::vector<double> *ask_amount = nullptr) {
|
|
403
231
|
auto market__ = market ? _fbb.CreateString(market) : 0;
|
|
404
232
|
auto code__ = code ? _fbb.CreateString(code) : 0;
|
|
405
233
|
auto name__ = name ? _fbb.CreateString(name) : 0;
|
|
406
234
|
auto datetime__ = datetime ? _fbb.CreateString(datetime) : 0;
|
|
235
|
+
auto bid__ = bid ? _fbb.CreateVector<double>(*bid) : 0;
|
|
236
|
+
auto bid_amount__ = bid_amount ? _fbb.CreateVector<double>(*bid_amount) : 0;
|
|
237
|
+
auto ask__ = ask ? _fbb.CreateVector<double>(*ask) : 0;
|
|
238
|
+
auto ask_amount__ = ask_amount ? _fbb.CreateVector<double>(*ask_amount) : 0;
|
|
407
239
|
return hikyuu::flat::CreateSpot(
|
|
408
240
|
_fbb,
|
|
409
241
|
market__,
|
|
@@ -417,26 +249,10 @@ inline ::flatbuffers::Offset<Spot> CreateSpotDirect(
|
|
|
417
249
|
close,
|
|
418
250
|
amount,
|
|
419
251
|
volume,
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
bid3,
|
|
425
|
-
bid3_amount,
|
|
426
|
-
bid4,
|
|
427
|
-
bid4_amount,
|
|
428
|
-
bid5,
|
|
429
|
-
bid5_amount,
|
|
430
|
-
ask1,
|
|
431
|
-
ask1_amount,
|
|
432
|
-
ask2,
|
|
433
|
-
ask2_amount,
|
|
434
|
-
ask3,
|
|
435
|
-
ask3_amount,
|
|
436
|
-
ask4,
|
|
437
|
-
ask4_amount,
|
|
438
|
-
ask5,
|
|
439
|
-
ask5_amount);
|
|
252
|
+
bid__,
|
|
253
|
+
bid_amount__,
|
|
254
|
+
ask__,
|
|
255
|
+
ask_amount__);
|
|
440
256
|
}
|
|
441
257
|
|
|
442
258
|
struct SpotList FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
|
@@ -26,6 +26,9 @@ public:
|
|
|
26
26
|
|
|
27
27
|
void updateIndex(const string& market, const string& code, const KQuery::KType& ktype);
|
|
28
28
|
|
|
29
|
+
void remove(const string& market, const string& code, const KQuery::KType& ktype,
|
|
30
|
+
Datetime start);
|
|
31
|
+
|
|
29
32
|
private:
|
|
30
33
|
ImportKDataToHdf5PluginInterface* m_plugin{nullptr};
|
|
31
34
|
};
|
|
@@ -8,11 +8,36 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
#include "hikyuu/DataType.h"
|
|
11
|
+
#include "hikyuu/Stock.h"
|
|
12
|
+
#include "hikyuu/global/SpotRecord.h"
|
|
11
13
|
|
|
12
14
|
namespace hku {
|
|
13
15
|
|
|
14
|
-
void HKU_API startDataServer(const std::string& addr = "tcp://0.0.0.0:9201", size_t work_num = 2
|
|
16
|
+
void HKU_API startDataServer(const std::string& addr = "tcp://0.0.0.0:9201", size_t work_num = 2,
|
|
17
|
+
bool save_tick = false, bool buf_tick = false);
|
|
15
18
|
|
|
16
19
|
void HKU_API stopDataServer();
|
|
17
20
|
|
|
21
|
+
/**
|
|
22
|
+
* 从 dataserver 数据缓存服务器拉取更新最新的缓存数据
|
|
23
|
+
* @param addr 缓存服务地址,如: tcp://192.168.1.1:9201
|
|
24
|
+
* @param stklist 待更新的股票列表
|
|
25
|
+
* @param ktype 指定更新的K线类型
|
|
26
|
+
*/
|
|
27
|
+
void HKU_API getDataFromBufferServer(const std::string& addr, const StockList& stklist,
|
|
28
|
+
const KQuery::KType& ktype);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @brief 从 dataserver 获取指定证券大于等于指定日期的缓存 spot 数据
|
|
32
|
+
* @param addr 缓存服务地址,如: tcp://192.168.1.1:9201
|
|
33
|
+
* @param market 市场代码
|
|
34
|
+
* @param code 证券代码
|
|
35
|
+
* @param datetime 查询时间
|
|
36
|
+
* @return vector<SpotRecord>
|
|
37
|
+
*/
|
|
38
|
+
vector<SpotRecord> HKU_API getSpotFromBufferServer(const std::string& addr,
|
|
39
|
+
const std::string& market,
|
|
40
|
+
const std::string& code,
|
|
41
|
+
const Datetime& datetime);
|
|
42
|
+
|
|
18
43
|
} // namespace hku
|
|
@@ -14,8 +14,9 @@ namespace hku {
|
|
|
14
14
|
/**
|
|
15
15
|
* @brief 激活设备
|
|
16
16
|
* @param active_code 授权码
|
|
17
|
+
* @param replace 超过设备限制时,强制替换最早激活的设备
|
|
17
18
|
*/
|
|
18
|
-
void HKU_API activeDevice(const std::string& active_code);
|
|
19
|
+
void HKU_API activeDevice(const std::string& active_code, bool replace = false);
|
|
19
20
|
|
|
20
21
|
/** 查看授权信息 */
|
|
21
22
|
std::string HKU_API viewLicense();
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 hikyuu.org
|
|
3
|
+
*
|
|
4
|
+
* Created on: 2025-07-01
|
|
5
|
+
* Author: fasiondog
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "hikyuu/data_driver/KDataDriver.h"
|
|
11
|
+
#include "hikyuu/data_driver/BlockInfoDriver.h"
|
|
12
|
+
#include "hikyuu/data_driver/BaseInfoDriver.h"
|
|
13
|
+
#include "hikyuu/utilities/plugin/PluginBase.h"
|
|
14
|
+
|
|
15
|
+
namespace hku {
|
|
16
|
+
|
|
17
|
+
class DataDriverPluginInterface : public PluginBase {
|
|
18
|
+
public:
|
|
19
|
+
DataDriverPluginInterface() = default;
|
|
20
|
+
virtual ~DataDriverPluginInterface() = default;
|
|
21
|
+
|
|
22
|
+
virtual KDataDriverPtr getKDataDriver() = 0;
|
|
23
|
+
virtual BlockInfoDriverPtr getBlockInfoDriver() = 0;
|
|
24
|
+
virtual BaseInfoDriverPtr getBaseInfoDriver() = 0;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
} // namespace hku
|
|
@@ -16,7 +16,8 @@ public:
|
|
|
16
16
|
DataServerPluginInterface() = default;
|
|
17
17
|
virtual ~DataServerPluginInterface() = default;
|
|
18
18
|
|
|
19
|
-
virtual void start(const std::string& addr, size_t work_num
|
|
19
|
+
virtual void start(const std::string& addr, size_t work_num, bool save_tick,
|
|
20
|
+
bool buf_tick) noexcept = 0;
|
|
20
21
|
virtual void stop() noexcept = 0;
|
|
21
22
|
};
|
|
22
23
|
|
|
@@ -16,7 +16,7 @@ public:
|
|
|
16
16
|
DevicePluginInterface() = default;
|
|
17
17
|
virtual ~DevicePluginInterface() = default;
|
|
18
18
|
|
|
19
|
-
virtual void activate(const std::string& active_code) noexcept = 0;
|
|
19
|
+
virtual void activate(const std::string& active_code, bool replace) noexcept = 0;
|
|
20
20
|
virtual std::string viewLicense() noexcept = 0;
|
|
21
21
|
virtual void removeLicense() noexcept = 0;
|
|
22
22
|
virtual std::string fetchTrialLicense(const std::string& email) noexcept = 0;
|
|
@@ -28,6 +28,9 @@ public:
|
|
|
28
28
|
|
|
29
29
|
virtual void updateIndex(const string& market, const string& code,
|
|
30
30
|
const KQuery::KType& ktype) = 0;
|
|
31
|
+
|
|
32
|
+
virtual void remove(const string& market, const string& code, const KQuery::KType& ktype,
|
|
33
|
+
Datetime start) = 0;
|
|
31
34
|
};
|
|
32
35
|
|
|
33
36
|
} // namespace hku
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
#include "ImportKDataToHdf5PluginInterface.h"
|
|
14
14
|
#include "ExtendIndicatorsPluginInterface.h"
|
|
15
15
|
#include "TMReportPluginInterface.h"
|
|
16
|
+
#include "DataDriverPluginInterface.h"
|
|
16
17
|
|
|
17
18
|
namespace hku {
|
|
18
19
|
|
|
@@ -22,5 +23,6 @@ namespace hku {
|
|
|
22
23
|
#define HKU_PLUGIN_IMPORTKDATATOHDF5 "import2hdf5"
|
|
23
24
|
#define HKU_PLUGIN_EXTEND_INDICATOR "extind"
|
|
24
25
|
#define HKU_PLUGIN_TMREPORT "tmreport"
|
|
26
|
+
#define HKU_PLUGIN_CLICKHOUSE_DRIVER "clickhousedriver"
|
|
25
27
|
|
|
26
28
|
}
|
|
@@ -267,14 +267,5 @@ void HKU_API runInStrategy(const PFPtr& pf, const KQuery& query, const OrderBrok
|
|
|
267
267
|
const TradeCostPtr& costfunc,
|
|
268
268
|
const std::vector<OrderBrokerPtr>& other_brokers = {});
|
|
269
269
|
|
|
270
|
-
/**
|
|
271
|
-
* 从 hikyuu 数据缓存服务器拉取更新最新的缓存数据
|
|
272
|
-
* @param addr 缓存服务地址,如: tcp://192.168.1.1:9201
|
|
273
|
-
* @param stklist 待更新的股票列表
|
|
274
|
-
* @param ktype 指定更新的K线类型
|
|
275
|
-
*/
|
|
276
|
-
void HKU_API getDataFromBufferServer(const std::string& addr, const StockList& stklist,
|
|
277
|
-
const KQuery::KType& ktype);
|
|
278
|
-
|
|
279
270
|
/** @} */
|
|
280
271
|
} // namespace hku
|
|
@@ -26,23 +26,39 @@
|
|
|
26
26
|
#endif
|
|
27
27
|
|
|
28
28
|
namespace hku {
|
|
29
|
+
namespace mo {
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* @brief 初始化多语言支持
|
|
33
|
+
* @param path 翻译文件路径
|
|
34
|
+
*/
|
|
35
|
+
void HKU_UTILS_API init(const std::string &path = "i18n");
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @brief 按指定语言获取翻译
|
|
39
|
+
* @param lang
|
|
40
|
+
* @param id
|
|
41
|
+
* @return std::string
|
|
42
|
+
*/
|
|
43
|
+
std::string HKU_UTILS_API translate(const std::string &lang, const char *id);
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @brief 按指定语言和上下文获取翻译
|
|
47
|
+
* @param lang
|
|
48
|
+
* @param ctx
|
|
49
|
+
* @param id
|
|
50
|
+
* @return std::string
|
|
51
|
+
*/
|
|
52
|
+
std::string HKU_UTILS_API translate(const std::string &lang, const char *ctx, const char *id);
|
|
33
53
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return iter != ms_dict.end() ? ms_dict[lang].Lookup(id) : std::string(id);
|
|
37
|
-
}
|
|
54
|
+
/** 获取系统语言 */
|
|
55
|
+
std::string HKU_UTILS_API getSystemLanguage();
|
|
38
56
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return iter != ms_dict.end() ? ms_dict[lang].LookupWithContext(ctx, id) : std::string(id);
|
|
42
|
-
}
|
|
57
|
+
/** 按系统语言获取翻译 */
|
|
58
|
+
std::string HKU_UTILS_API _tr(const char *id);
|
|
43
59
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
60
|
+
/** 按系统语言和上下文获取翻译 */
|
|
61
|
+
std::string HKU_UTILS_API _ctr(const char *ctx, const char *id);
|
|
47
62
|
|
|
63
|
+
} // namespace mo
|
|
48
64
|
} // namespace hku
|
|
@@ -79,6 +79,12 @@ std::string HKU_UTILS_API getUserDir();
|
|
|
79
79
|
*/
|
|
80
80
|
std::string HKU_UTILS_API getCurrentDir();
|
|
81
81
|
|
|
82
|
+
/**
|
|
83
|
+
* 获取dll自身所在目录
|
|
84
|
+
* @note 仅支持linux/macos。windows下获取的是exe所在路径!
|
|
85
|
+
*/
|
|
86
|
+
std::string HKU_UTILS_API getDllSelfDir();
|
|
87
|
+
|
|
82
88
|
/**
|
|
83
89
|
* 输出终端是否支持彩色控制字符
|
|
84
90
|
*/
|
hikyuu/include/hikyuu/version.h
CHANGED
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
#define HKU_VERSION_H
|
|
13
13
|
|
|
14
14
|
// clang-format off
|
|
15
|
-
#define HKU_VERSION "2.6.
|
|
15
|
+
#define HKU_VERSION "2.6.6"
|
|
16
16
|
#define HKU_VERSION_MAJOR 2
|
|
17
17
|
#define HKU_VERSION_MINOR 6
|
|
18
|
-
#define HKU_VERSION_ALTER
|
|
19
|
-
#define HKU_VERSION_BUILD
|
|
18
|
+
#define HKU_VERSION_ALTER 6
|
|
19
|
+
#define HKU_VERSION_BUILD 202507291558
|
|
20
20
|
#define HKU_VERSION_MODE "RELEASE"
|
|
21
|
-
#define HKU_VERSION_GIT "2.6.
|
|
21
|
+
#define HKU_VERSION_GIT "2.6.6 master.c4a12bf4 (RELEASE)"
|
|
22
22
|
// clang-format on
|
|
23
23
|
|
|
24
24
|
#endif /* HKU_VERSION_H */
|
hikyuu/plugin/backtest.dll
CHANGED
|
Binary file
|
|
Binary file
|
hikyuu/plugin/dataserver.dll
CHANGED
|
Binary file
|
hikyuu/plugin/device.dll
CHANGED
|
Binary file
|
hikyuu/plugin/extind.dll
CHANGED
|
Binary file
|
hikyuu/plugin/import2hdf5.dll
CHANGED
|
Binary file
|
hikyuu/plugin/tmreport.dll
CHANGED
|
Binary file
|