Skip to main content

futu_proto/
lib.rs

1//! FutuOpenD Protobuf 生成的 Rust 类型
2//!
3//! 所有子模块均由 [prost-build](https://docs.rs/prost-build) 从 `.proto` 文件
4//! 自动生成(见 crate 根目录 `build.rs`),对齐 C++ OpenD `NNProtoFile/FTAPI/`
5//! 一一映射。**不要手工编辑子模块内容**;修改 schema 请改 `proto/*.proto` 后
6//! 重新 `cargo build`。
7//!
8//! 模块命名约定:每个 proto 文件对应一个子模块(`Qot_Sub.proto` →
9//! [`qot_sub`] / `Trd_PlaceOrder.proto` → [`trd_place_order`] ...),
10//! 子模块里含 `Request` / `Response` / `C2S` / `S2C` 等 prost 生成的 struct。
11//!
12//! serde 行为说明:`build.rs` 为所有 message 加了 `#[serde(default)]` 与
13//! `#[serde(deny_unknown_fields)]`。REST adapter 层仍先用
14//! `normalize_json_keys_snake_case` 兼容官方 CamelCase 字段名(`accID` / `trdEnv` /
15//! `filterConditions` / `beginTime`),再进入 generated proto serde;未知字段必须
16//! fail-closed,不能静默 drop。
17
18#![allow(clippy::empty_docs, clippy::tabs_in_doc_comments)]
19
20pub mod common {
21    include!(concat!(env!("OUT_DIR"), "/common.rs"));
22}
23
24pub mod get_delay_statistics {
25    include!(concat!(env!("OUT_DIR"), "/get_delay_statistics.rs"));
26}
27
28pub mod get_global_state {
29    include!(concat!(env!("OUT_DIR"), "/get_global_state.rs"));
30}
31
32pub mod get_user_info {
33    include!(concat!(env!("OUT_DIR"), "/get_user_info.rs"));
34}
35
36pub mod init_connect {
37    include!(concat!(env!("OUT_DIR"), "/init_connect.rs"));
38}
39
40pub mod keep_alive {
41    include!(concat!(env!("OUT_DIR"), "/keep_alive.rs"));
42}
43
44pub mod notify {
45    include!(concat!(env!("OUT_DIR"), "/notify.rs"));
46}
47
48pub mod qot_common {
49    include!(concat!(env!("OUT_DIR"), "/qot_common.rs"));
50}
51
52pub mod qot_get_basic_qot {
53    include!(concat!(env!("OUT_DIR"), "/qot_get_basic_qot.rs"));
54}
55
56pub mod qot_get_broker {
57    include!(concat!(env!("OUT_DIR"), "/qot_get_broker.rs"));
58}
59
60pub mod qot_get_capital_distribution {
61    include!(concat!(env!("OUT_DIR"), "/qot_get_capital_distribution.rs"));
62}
63
64pub mod qot_get_capital_flow {
65    include!(concat!(env!("OUT_DIR"), "/qot_get_capital_flow.rs"));
66}
67
68pub mod qot_get_code_change {
69    include!(concat!(env!("OUT_DIR"), "/qot_get_code_change.rs"));
70}
71
72pub mod qot_get_company_executive_background {
73    include!(concat!(
74        env!("OUT_DIR"),
75        "/qot_get_company_executive_background.rs"
76    ));
77}
78
79pub mod qot_get_company_executives {
80    include!(concat!(env!("OUT_DIR"), "/qot_get_company_executives.rs"));
81}
82
83pub mod qot_get_company_operational_efficiency {
84    include!(concat!(
85        env!("OUT_DIR"),
86        "/qot_get_company_operational_efficiency.rs"
87    ));
88}
89
90pub mod qot_get_company_profile {
91    include!(concat!(env!("OUT_DIR"), "/qot_get_company_profile.rs"));
92}
93
94pub mod qot_get_corporate_actions_buybacks {
95    include!(concat!(
96        env!("OUT_DIR"),
97        "/qot_get_corporate_actions_buybacks.rs"
98    ));
99}
100
101pub mod qot_get_corporate_actions_dividends {
102    include!(concat!(
103        env!("OUT_DIR"),
104        "/qot_get_corporate_actions_dividends.rs"
105    ));
106}
107
108pub mod qot_get_corporate_actions_stock_splits {
109    include!(concat!(
110        env!("OUT_DIR"),
111        "/qot_get_corporate_actions_stock_splits.rs"
112    ));
113}
114
115pub mod qot_get_daily_short_volume {
116    include!(concat!(env!("OUT_DIR"), "/qot_get_daily_short_volume.rs"));
117}
118
119pub mod qot_get_financials_earnings_price_history {
120    include!(concat!(
121        env!("OUT_DIR"),
122        "/qot_get_financials_earnings_price_history.rs"
123    ));
124}
125
126pub mod qot_get_financials_earnings_price_move {
127    include!(concat!(
128        env!("OUT_DIR"),
129        "/qot_get_financials_earnings_price_move.rs"
130    ));
131}
132
133pub mod qot_get_financials_revenue_breakdown {
134    include!(concat!(
135        env!("OUT_DIR"),
136        "/qot_get_financials_revenue_breakdown.rs"
137    ));
138}
139
140pub mod qot_get_financials_statements {
141    include!(concat!(
142        env!("OUT_DIR"),
143        "/qot_get_financials_statements.rs"
144    ));
145}
146
147pub mod qot_get_future_info {
148    include!(concat!(env!("OUT_DIR"), "/qot_get_future_info.rs"));
149}
150
151pub mod qot_get_holding_change_list {
152    include!(concat!(env!("OUT_DIR"), "/qot_get_holding_change_list.rs"));
153}
154
155pub mod qot_get_insider_holder_list {
156    include!(concat!(env!("OUT_DIR"), "/qot_get_insider_holder_list.rs"));
157}
158
159pub mod qot_get_insider_trade_list {
160    include!(concat!(env!("OUT_DIR"), "/qot_get_insider_trade_list.rs"));
161}
162
163pub mod qot_get_ipo_list {
164    include!(concat!(env!("OUT_DIR"), "/qot_get_ipo_list.rs"));
165}
166
167pub mod qot_get_kl {
168    include!(concat!(env!("OUT_DIR"), "/qot_get_kl.rs"));
169}
170
171pub mod qot_get_market_state {
172    include!(concat!(env!("OUT_DIR"), "/qot_get_market_state.rs"));
173}
174
175pub mod qot_get_option_chain {
176    include!(concat!(env!("OUT_DIR"), "/qot_get_option_chain.rs"));
177}
178
179pub mod qot_get_option_quote {
180    include!(concat!(env!("OUT_DIR"), "/qot_get_option_quote.rs"));
181}
182
183pub mod qot_get_option_exercise_probability {
184    include!(concat!(
185        env!("OUT_DIR"),
186        "/qot_get_option_exercise_probability.rs"
187    ));
188}
189
190pub mod qot_get_option_expiration_date {
191    include!(concat!(
192        env!("OUT_DIR"),
193        "/qot_get_option_expiration_date.rs"
194    ));
195}
196
197pub mod qot_get_option_volatility {
198    include!(concat!(env!("OUT_DIR"), "/qot_get_option_volatility.rs"));
199}
200
201pub mod qot_get_option_strategy {
202    include!(concat!(env!("OUT_DIR"), "/qot_get_option_strategy.rs"));
203}
204
205pub mod qot_get_option_strategy_analysis {
206    include!(concat!(
207        env!("OUT_DIR"),
208        "/qot_get_option_strategy_analysis.rs"
209    ));
210}
211
212pub mod qot_get_option_strategy_spread {
213    include!(concat!(
214        env!("OUT_DIR"),
215        "/qot_get_option_strategy_spread.rs"
216    ));
217}
218
219pub mod qot_get_order_book {
220    include!(concat!(env!("OUT_DIR"), "/qot_get_order_book.rs"));
221}
222
223pub mod qot_get_owner_plate {
224    include!(concat!(env!("OUT_DIR"), "/qot_get_owner_plate.rs"));
225}
226
227pub mod qot_get_plate_security {
228    include!(concat!(env!("OUT_DIR"), "/qot_get_plate_security.rs"));
229}
230
231pub mod qot_get_plate_set {
232    include!(concat!(env!("OUT_DIR"), "/qot_get_plate_set.rs"));
233}
234
235pub mod qot_get_price_reminder {
236    include!(concat!(env!("OUT_DIR"), "/qot_get_price_reminder.rs"));
237}
238
239pub mod qot_get_reference {
240    include!(concat!(env!("OUT_DIR"), "/qot_get_reference.rs"));
241}
242
243pub mod qot_get_rt {
244    include!(concat!(env!("OUT_DIR"), "/qot_get_rt.rs"));
245}
246
247pub mod qot_get_research_analyst_consensus {
248    include!(concat!(
249        env!("OUT_DIR"),
250        "/qot_get_research_analyst_consensus.rs"
251    ));
252}
253
254pub mod qot_get_research_morningstar_report {
255    include!(concat!(
256        env!("OUT_DIR"),
257        "/qot_get_research_morningstar_report.rs"
258    ));
259}
260
261pub mod qot_get_research_rating_summary {
262    include!(concat!(
263        env!("OUT_DIR"),
264        "/qot_get_research_rating_summary.rs"
265    ));
266}
267
268pub mod qot_get_security_snapshot {
269    include!(concat!(env!("OUT_DIR"), "/qot_get_security_snapshot.rs"));
270}
271
272pub mod qot_get_shareholders_holder_detail {
273    include!(concat!(
274        env!("OUT_DIR"),
275        "/qot_get_shareholders_holder_detail.rs"
276    ));
277}
278
279pub mod qot_get_shareholders_holding_changes {
280    include!(concat!(
281        env!("OUT_DIR"),
282        "/qot_get_shareholders_holding_changes.rs"
283    ));
284}
285
286pub mod qot_get_shareholders_institutional {
287    include!(concat!(
288        env!("OUT_DIR"),
289        "/qot_get_shareholders_institutional.rs"
290    ));
291}
292
293pub mod qot_get_shareholders_overview {
294    include!(concat!(
295        env!("OUT_DIR"),
296        "/qot_get_shareholders_overview.rs"
297    ));
298}
299
300pub mod qot_get_short_interest {
301    include!(concat!(env!("OUT_DIR"), "/qot_get_short_interest.rs"));
302}
303
304pub mod qot_get_static_info {
305    include!(concat!(env!("OUT_DIR"), "/qot_get_static_info.rs"));
306}
307
308pub mod qot_get_sub_info {
309    include!(concat!(env!("OUT_DIR"), "/qot_get_sub_info.rs"));
310}
311
312pub mod qot_get_suspend {
313    include!(concat!(env!("OUT_DIR"), "/qot_get_suspend.rs"));
314}
315
316pub mod qot_get_ticker {
317    include!(concat!(env!("OUT_DIR"), "/qot_get_ticker.rs"));
318}
319
320pub mod qot_get_top_ten_buy_sell_brokers {
321    include!(concat!(
322        env!("OUT_DIR"),
323        "/qot_get_top_ten_buy_sell_brokers.rs"
324    ));
325}
326
327pub mod qot_get_user_security {
328    include!(concat!(env!("OUT_DIR"), "/qot_get_user_security.rs"));
329}
330
331pub mod qot_get_user_security_group {
332    include!(concat!(env!("OUT_DIR"), "/qot_get_user_security_group.rs"));
333}
334
335pub mod qot_get_valuation_detail {
336    include!(concat!(env!("OUT_DIR"), "/qot_get_valuation_detail.rs"));
337}
338
339pub mod qot_get_valuation_plate_stock_list {
340    include!(concat!(
341        env!("OUT_DIR"),
342        "/qot_get_valuation_plate_stock_list.rs"
343    ));
344}
345
346pub mod qot_get_warrant {
347    include!(concat!(env!("OUT_DIR"), "/qot_get_warrant.rs"));
348}
349
350pub mod qot_modify_user_security {
351    include!(concat!(env!("OUT_DIR"), "/qot_modify_user_security.rs"));
352}
353
354pub mod qot_reg_qot_push {
355    include!(concat!(env!("OUT_DIR"), "/qot_reg_qot_push.rs"));
356}
357
358pub mod qot_request_history_kl {
359    include!(concat!(env!("OUT_DIR"), "/qot_request_history_kl.rs"));
360}
361
362pub mod qot_request_history_kl_quota {
363    include!(concat!(env!("OUT_DIR"), "/qot_request_history_kl_quota.rs"));
364}
365
366pub mod qot_request_rehab {
367    include!(concat!(env!("OUT_DIR"), "/qot_request_rehab.rs"));
368}
369
370pub mod qot_request_trade_date {
371    include!(concat!(env!("OUT_DIR"), "/qot_request_trade_date.rs"));
372}
373
374pub mod qot_set_price_reminder {
375    include!(concat!(env!("OUT_DIR"), "/qot_set_price_reminder.rs"));
376}
377
378pub mod qot_option_screen {
379    include!(concat!(env!("OUT_DIR"), "/qot_option_screen.rs"));
380}
381
382pub mod qot_stock_screen {
383    include!(concat!(env!("OUT_DIR"), "/qot_stock_screen.rs"));
384}
385
386pub mod qot_stock_filter {
387    include!(concat!(env!("OUT_DIR"), "/qot_stock_filter.rs"));
388}
389
390pub mod qot_sub {
391    include!(concat!(env!("OUT_DIR"), "/qot_sub.rs"));
392}
393
394pub mod qot_update_basic_qot {
395    include!(concat!(env!("OUT_DIR"), "/qot_update_basic_qot.rs"));
396}
397
398pub mod qot_update_broker {
399    include!(concat!(env!("OUT_DIR"), "/qot_update_broker.rs"));
400}
401
402pub mod qot_update_kl {
403    include!(concat!(env!("OUT_DIR"), "/qot_update_kl.rs"));
404}
405
406pub mod qot_update_order_book {
407    include!(concat!(env!("OUT_DIR"), "/qot_update_order_book.rs"));
408}
409
410pub mod qot_update_price_reminder {
411    include!(concat!(env!("OUT_DIR"), "/qot_update_price_reminder.rs"));
412}
413
414pub mod qot_update_rt {
415    include!(concat!(env!("OUT_DIR"), "/qot_update_rt.rs"));
416}
417
418pub mod qot_update_ticker {
419    include!(concat!(env!("OUT_DIR"), "/qot_update_ticker.rs"));
420}
421
422pub mod qot_warrant_screen {
423    include!(concat!(env!("OUT_DIR"), "/qot_warrant_screen.rs"));
424}
425
426pub mod remote_cmd {
427    include!(concat!(env!("OUT_DIR"), "/remote_cmd.rs"));
428}
429
430pub mod skill_wrap_api {
431    include!(concat!(env!("OUT_DIR"), "/skill_wrap_api.rs"));
432}
433
434pub mod test_cmd {
435    include!(concat!(env!("OUT_DIR"), "/test_cmd.rs"));
436}
437
438pub mod trd_common {
439    include!(concat!(env!("OUT_DIR"), "/trd_common.rs"));
440}
441
442pub mod trd_flow_summary {
443    include!(concat!(env!("OUT_DIR"), "/trd_flow_summary.rs"));
444}
445
446pub mod trd_get_acc_list {
447    include!(concat!(env!("OUT_DIR"), "/trd_get_acc_list.rs"));
448}
449
450pub mod trd_get_funds {
451    include!(concat!(env!("OUT_DIR"), "/trd_get_funds.rs"));
452}
453
454pub mod trd_get_history_order_fill_list {
455    include!(concat!(
456        env!("OUT_DIR"),
457        "/trd_get_history_order_fill_list.rs"
458    ));
459}
460
461pub mod trd_get_history_order_list {
462    include!(concat!(env!("OUT_DIR"), "/trd_get_history_order_list.rs"));
463}
464
465pub mod trd_get_combo_max_trd_qtys {
466    include!(concat!(env!("OUT_DIR"), "/trd_get_combo_max_trd_qtys.rs"));
467}
468
469pub mod trd_get_margin_ratio {
470    include!(concat!(env!("OUT_DIR"), "/trd_get_margin_ratio.rs"));
471}
472
473pub mod trd_get_max_trd_qtys {
474    include!(concat!(env!("OUT_DIR"), "/trd_get_max_trd_qtys.rs"));
475}
476
477pub mod trd_get_order_fee {
478    include!(concat!(env!("OUT_DIR"), "/trd_get_order_fee.rs"));
479}
480
481pub mod trd_get_order_fill_list {
482    include!(concat!(env!("OUT_DIR"), "/trd_get_order_fill_list.rs"));
483}
484
485pub mod trd_get_order_list {
486    include!(concat!(env!("OUT_DIR"), "/trd_get_order_list.rs"));
487}
488
489pub mod trd_get_position_list {
490    include!(concat!(env!("OUT_DIR"), "/trd_get_position_list.rs"));
491}
492
493pub mod trd_modify_order {
494    include!(concat!(env!("OUT_DIR"), "/trd_modify_order.rs"));
495}
496
497pub mod trd_notify {
498    include!(concat!(env!("OUT_DIR"), "/trd_notify.rs"));
499}
500
501pub mod trd_place_combo_order {
502    include!(concat!(env!("OUT_DIR"), "/trd_place_combo_order.rs"));
503}
504
505pub mod trd_place_order {
506    include!(concat!(env!("OUT_DIR"), "/trd_place_order.rs"));
507}
508
509pub mod trd_reconfirm_order {
510    include!(concat!(env!("OUT_DIR"), "/trd_reconfirm_order.rs"));
511}
512
513pub mod trd_sub_acc_push {
514    include!(concat!(env!("OUT_DIR"), "/trd_sub_acc_push.rs"));
515}
516
517pub mod trd_unlock_trade {
518    include!(concat!(env!("OUT_DIR"), "/trd_unlock_trade.rs"));
519}
520
521pub mod trd_update_order {
522    include!(concat!(env!("OUT_DIR"), "/trd_update_order.rs"));
523}
524
525pub mod trd_update_order_fill {
526    include!(concat!(env!("OUT_DIR"), "/trd_update_order_fill.rs"));
527}
528
529pub mod used_quota {
530    include!(concat!(env!("OUT_DIR"), "/used_quota.rs"));
531}
532
533pub mod verification {
534    include!(concat!(env!("OUT_DIR"), "/verification.rs"));
535}