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_option_common {
53    include!(concat!(env!("OUT_DIR"), "/qot_option_common.rs"));
54}
55
56pub mod qot_get_basic_qot {
57    include!(concat!(env!("OUT_DIR"), "/qot_get_basic_qot.rs"));
58}
59
60pub mod qot_get_broker {
61    include!(concat!(env!("OUT_DIR"), "/qot_get_broker.rs"));
62}
63
64pub mod qot_get_capital_distribution {
65    include!(concat!(env!("OUT_DIR"), "/qot_get_capital_distribution.rs"));
66}
67
68pub mod qot_get_capital_flow {
69    include!(concat!(env!("OUT_DIR"), "/qot_get_capital_flow.rs"));
70}
71
72pub mod qot_get_code_change {
73    include!(concat!(env!("OUT_DIR"), "/qot_get_code_change.rs"));
74}
75
76pub mod qot_get_company_executive_background {
77    include!(concat!(
78        env!("OUT_DIR"),
79        "/qot_get_company_executive_background.rs"
80    ));
81}
82
83pub mod qot_get_company_executives {
84    include!(concat!(env!("OUT_DIR"), "/qot_get_company_executives.rs"));
85}
86
87pub mod qot_get_company_operational_efficiency {
88    include!(concat!(
89        env!("OUT_DIR"),
90        "/qot_get_company_operational_efficiency.rs"
91    ));
92}
93
94pub mod qot_get_company_profile {
95    include!(concat!(env!("OUT_DIR"), "/qot_get_company_profile.rs"));
96}
97
98pub mod qot_get_corporate_actions_buybacks {
99    include!(concat!(
100        env!("OUT_DIR"),
101        "/qot_get_corporate_actions_buybacks.rs"
102    ));
103}
104
105pub mod qot_get_corporate_actions_dividends {
106    include!(concat!(
107        env!("OUT_DIR"),
108        "/qot_get_corporate_actions_dividends.rs"
109    ));
110}
111
112pub mod qot_get_corporate_actions_stock_splits {
113    include!(concat!(
114        env!("OUT_DIR"),
115        "/qot_get_corporate_actions_stock_splits.rs"
116    ));
117}
118
119pub mod qot_get_daily_short_volume {
120    include!(concat!(env!("OUT_DIR"), "/qot_get_daily_short_volume.rs"));
121}
122
123pub mod qot_get_dividend_calendar {
124    include!(concat!(env!("OUT_DIR"), "/qot_get_dividend_calendar.rs"));
125}
126
127pub mod qot_get_dividend_rank {
128    include!(concat!(env!("OUT_DIR"), "/qot_get_dividend_rank.rs"));
129}
130
131pub mod qot_get_earnings_beat_rank {
132    include!(concat!(env!("OUT_DIR"), "/qot_get_earnings_beat_rank.rs"));
133}
134
135pub mod qot_get_earnings_calendar {
136    include!(concat!(env!("OUT_DIR"), "/qot_get_earnings_calendar.rs"));
137}
138
139pub mod qot_get_economic_calendar {
140    include!(concat!(env!("OUT_DIR"), "/qot_get_economic_calendar.rs"));
141}
142
143pub mod qot_get_fed_watch_dot_plot {
144    include!(concat!(env!("OUT_DIR"), "/qot_get_fed_watch_dot_plot.rs"));
145}
146
147pub mod qot_get_fed_watch_target_rate {
148    include!(concat!(
149        env!("OUT_DIR"),
150        "/qot_get_fed_watch_target_rate.rs"
151    ));
152}
153
154pub mod qot_get_financials_earnings_price_history {
155    include!(concat!(
156        env!("OUT_DIR"),
157        "/qot_get_financials_earnings_price_history.rs"
158    ));
159}
160
161pub mod qot_get_financials_earnings_price_move {
162    include!(concat!(
163        env!("OUT_DIR"),
164        "/qot_get_financials_earnings_price_move.rs"
165    ));
166}
167
168pub mod qot_get_financials_revenue_breakdown {
169    include!(concat!(
170        env!("OUT_DIR"),
171        "/qot_get_financials_revenue_breakdown.rs"
172    ));
173}
174
175pub mod qot_get_financials_statements {
176    include!(concat!(
177        env!("OUT_DIR"),
178        "/qot_get_financials_statements.rs"
179    ));
180}
181
182pub mod qot_get_future_info {
183    include!(concat!(env!("OUT_DIR"), "/qot_get_future_info.rs"));
184}
185
186pub mod qot_get_high_dividend_soe_rank {
187    include!(concat!(
188        env!("OUT_DIR"),
189        "/qot_get_high_dividend_soe_rank.rs"
190    ));
191}
192
193pub mod qot_get_ark_active_transaction {
194    include!(concat!(
195        env!("OUT_DIR"),
196        "/qot_get_ark_active_transaction.rs"
197    ));
198}
199
200pub mod qot_get_ark_fund_holding {
201    include!(concat!(env!("OUT_DIR"), "/qot_get_ark_fund_holding.rs"));
202}
203
204pub mod qot_get_ark_stock_dynamic {
205    include!(concat!(env!("OUT_DIR"), "/qot_get_ark_stock_dynamic.rs"));
206}
207
208pub mod qot_get_hot_list {
209    include!(concat!(env!("OUT_DIR"), "/qot_get_hot_list.rs"));
210}
211
212pub mod qot_get_holding_change_list {
213    include!(concat!(env!("OUT_DIR"), "/qot_get_holding_change_list.rs"));
214}
215
216pub mod qot_get_heat_map_data {
217    include!(concat!(env!("OUT_DIR"), "/qot_get_heat_map_data.rs"));
218}
219
220pub mod qot_get_institution_distribution {
221    include!(concat!(
222        env!("OUT_DIR"),
223        "/qot_get_institution_distribution.rs"
224    ));
225}
226
227pub mod qot_get_institution_holding_change {
228    include!(concat!(
229        env!("OUT_DIR"),
230        "/qot_get_institution_holding_change.rs"
231    ));
232}
233
234pub mod qot_get_institution_holding_list {
235    include!(concat!(
236        env!("OUT_DIR"),
237        "/qot_get_institution_holding_list.rs"
238    ));
239}
240
241pub mod qot_get_institution_list {
242    include!(concat!(env!("OUT_DIR"), "/qot_get_institution_list.rs"));
243}
244
245pub mod qot_get_institution_profile {
246    include!(concat!(env!("OUT_DIR"), "/qot_get_institution_profile.rs"));
247}
248
249pub mod qot_get_industrial_chain_by_plate {
250    include!(concat!(
251        env!("OUT_DIR"),
252        "/qot_get_industrial_chain_by_plate.rs"
253    ));
254}
255
256pub mod qot_get_industrial_chain_detail {
257    include!(concat!(
258        env!("OUT_DIR"),
259        "/qot_get_industrial_chain_detail.rs"
260    ));
261}
262
263pub mod qot_get_industrial_chain_list {
264    include!(concat!(
265        env!("OUT_DIR"),
266        "/qot_get_industrial_chain_list.rs"
267    ));
268}
269
270pub mod qot_get_industrial_plate_info {
271    include!(concat!(
272        env!("OUT_DIR"),
273        "/qot_get_industrial_plate_info.rs"
274    ));
275}
276
277pub mod qot_get_industrial_plate_stock {
278    include!(concat!(
279        env!("OUT_DIR"),
280        "/qot_get_industrial_plate_stock.rs"
281    ));
282}
283
284pub mod qot_get_insider_holder_list {
285    include!(concat!(env!("OUT_DIR"), "/qot_get_insider_holder_list.rs"));
286}
287
288pub mod qot_get_insider_trade_list {
289    include!(concat!(env!("OUT_DIR"), "/qot_get_insider_trade_list.rs"));
290}
291
292pub mod qot_get_ipo_list {
293    include!(concat!(env!("OUT_DIR"), "/qot_get_ipo_list.rs"));
294}
295
296pub mod qot_get_kl {
297    include!(concat!(env!("OUT_DIR"), "/qot_get_kl.rs"));
298}
299
300pub mod qot_get_macro_indicator_history {
301    include!(concat!(
302        env!("OUT_DIR"),
303        "/qot_get_macro_indicator_history.rs"
304    ));
305}
306
307pub mod qot_get_macro_indicator_list {
308    include!(concat!(env!("OUT_DIR"), "/qot_get_macro_indicator_list.rs"));
309}
310
311pub mod qot_get_market_state {
312    include!(concat!(env!("OUT_DIR"), "/qot_get_market_state.rs"));
313}
314
315pub mod qot_get_option_chain {
316    include!(concat!(env!("OUT_DIR"), "/qot_get_option_chain.rs"));
317}
318
319pub mod qot_get_option_quote {
320    include!(concat!(env!("OUT_DIR"), "/qot_get_option_quote.rs"));
321}
322
323pub mod qot_get_option_exercise_probability {
324    include!(concat!(
325        env!("OUT_DIR"),
326        "/qot_get_option_exercise_probability.rs"
327    ));
328}
329
330pub mod qot_get_option_expiration_date {
331    include!(concat!(
332        env!("OUT_DIR"),
333        "/qot_get_option_expiration_date.rs"
334    ));
335}
336
337pub mod qot_get_option_volatility {
338    include!(concat!(env!("OUT_DIR"), "/qot_get_option_volatility.rs"));
339}
340
341pub mod qot_get_option_strategy {
342    include!(concat!(env!("OUT_DIR"), "/qot_get_option_strategy.rs"));
343}
344
345pub mod qot_get_option_strategy_analysis {
346    include!(concat!(
347        env!("OUT_DIR"),
348        "/qot_get_option_strategy_analysis.rs"
349    ));
350}
351
352pub mod qot_get_option_strategy_spread {
353    include!(concat!(
354        env!("OUT_DIR"),
355        "/qot_get_option_strategy_spread.rs"
356    ));
357}
358
359pub mod qot_get_order_book {
360    include!(concat!(env!("OUT_DIR"), "/qot_get_order_book.rs"));
361}
362
363pub mod qot_get_owner_plate {
364    include!(concat!(env!("OUT_DIR"), "/qot_get_owner_plate.rs"));
365}
366
367pub mod qot_get_period_change_rank {
368    include!(concat!(env!("OUT_DIR"), "/qot_get_period_change_rank.rs"));
369}
370
371pub mod qot_get_plate_security {
372    include!(concat!(env!("OUT_DIR"), "/qot_get_plate_security.rs"));
373}
374
375pub mod qot_get_plate_set {
376    include!(concat!(env!("OUT_DIR"), "/qot_get_plate_set.rs"));
377}
378
379pub mod qot_get_price_reminder {
380    include!(concat!(env!("OUT_DIR"), "/qot_get_price_reminder.rs"));
381}
382
383pub mod qot_get_reference {
384    include!(concat!(env!("OUT_DIR"), "/qot_get_reference.rs"));
385}
386
387pub mod qot_get_rating_change {
388    include!(concat!(env!("OUT_DIR"), "/qot_get_rating_change.rs"));
389}
390
391pub mod qot_get_rise_fall_distribution {
392    include!(concat!(
393        env!("OUT_DIR"),
394        "/qot_get_rise_fall_distribution.rs"
395    ));
396}
397
398pub mod qot_get_rt {
399    include!(concat!(env!("OUT_DIR"), "/qot_get_rt.rs"));
400}
401
402pub mod qot_get_research_analyst_consensus {
403    include!(concat!(
404        env!("OUT_DIR"),
405        "/qot_get_research_analyst_consensus.rs"
406    ));
407}
408
409pub mod qot_get_research_morningstar_report {
410    include!(concat!(
411        env!("OUT_DIR"),
412        "/qot_get_research_morningstar_report.rs"
413    ));
414}
415
416pub mod qot_get_research_rating_summary {
417    include!(concat!(
418        env!("OUT_DIR"),
419        "/qot_get_research_rating_summary.rs"
420    ));
421}
422
423pub mod qot_get_security_snapshot {
424    include!(concat!(env!("OUT_DIR"), "/qot_get_security_snapshot.rs"));
425}
426
427pub mod qot_get_shareholders_holder_detail {
428    include!(concat!(
429        env!("OUT_DIR"),
430        "/qot_get_shareholders_holder_detail.rs"
431    ));
432}
433
434pub mod qot_get_shareholders_holding_changes {
435    include!(concat!(
436        env!("OUT_DIR"),
437        "/qot_get_shareholders_holding_changes.rs"
438    ));
439}
440
441pub mod qot_get_shareholders_institutional {
442    include!(concat!(
443        env!("OUT_DIR"),
444        "/qot_get_shareholders_institutional.rs"
445    ));
446}
447
448pub mod qot_get_shareholders_overview {
449    include!(concat!(
450        env!("OUT_DIR"),
451        "/qot_get_shareholders_overview.rs"
452    ));
453}
454
455pub mod qot_get_short_interest {
456    include!(concat!(env!("OUT_DIR"), "/qot_get_short_interest.rs"));
457}
458
459pub mod qot_get_short_selling_rank {
460    include!(concat!(env!("OUT_DIR"), "/qot_get_short_selling_rank.rs"));
461}
462
463pub mod qot_get_static_info {
464    include!(concat!(env!("OUT_DIR"), "/qot_get_static_info.rs"));
465}
466
467pub mod qot_get_sub_info {
468    include!(concat!(env!("OUT_DIR"), "/qot_get_sub_info.rs"));
469}
470
471pub mod qot_get_suspend {
472    include!(concat!(env!("OUT_DIR"), "/qot_get_suspend.rs"));
473}
474
475pub mod qot_get_ticker {
476    include!(concat!(env!("OUT_DIR"), "/qot_get_ticker.rs"));
477}
478
479pub mod qot_get_top_ten_buy_sell_brokers {
480    include!(concat!(
481        env!("OUT_DIR"),
482        "/qot_get_top_ten_buy_sell_brokers.rs"
483    ));
484}
485
486pub mod qot_get_top_movers_rank {
487    include!(concat!(env!("OUT_DIR"), "/qot_get_top_movers_rank.rs"));
488}
489
490pub mod qot_get_us_after_hours_rank {
491    include!(concat!(env!("OUT_DIR"), "/qot_get_us_after_hours_rank.rs"));
492}
493
494pub mod qot_get_us_overnight_rank {
495    include!(concat!(env!("OUT_DIR"), "/qot_get_us_overnight_rank.rs"));
496}
497
498pub mod qot_get_us_pre_market_rank {
499    include!(concat!(env!("OUT_DIR"), "/qot_get_us_pre_market_rank.rs"));
500}
501
502pub mod qot_get_user_security {
503    include!(concat!(env!("OUT_DIR"), "/qot_get_user_security.rs"));
504}
505
506pub mod qot_get_user_security_group {
507    include!(concat!(env!("OUT_DIR"), "/qot_get_user_security_group.rs"));
508}
509
510pub mod qot_get_valuation_detail {
511    include!(concat!(env!("OUT_DIR"), "/qot_get_valuation_detail.rs"));
512}
513
514pub mod qot_get_valuation_plate_stock_list {
515    include!(concat!(
516        env!("OUT_DIR"),
517        "/qot_get_valuation_plate_stock_list.rs"
518    ));
519}
520
521pub mod qot_get_warrant {
522    include!(concat!(env!("OUT_DIR"), "/qot_get_warrant.rs"));
523}
524
525pub mod qot_modify_user_security {
526    include!(concat!(env!("OUT_DIR"), "/qot_modify_user_security.rs"));
527}
528
529pub mod qot_reg_qot_push {
530    include!(concat!(env!("OUT_DIR"), "/qot_reg_qot_push.rs"));
531}
532
533pub mod qot_request_history_kl {
534    include!(concat!(env!("OUT_DIR"), "/qot_request_history_kl.rs"));
535}
536
537pub mod qot_request_history_kl_quota {
538    include!(concat!(env!("OUT_DIR"), "/qot_request_history_kl_quota.rs"));
539}
540
541pub mod qot_request_rehab {
542    include!(concat!(env!("OUT_DIR"), "/qot_request_rehab.rs"));
543}
544
545pub mod qot_request_trade_date {
546    include!(concat!(env!("OUT_DIR"), "/qot_request_trade_date.rs"));
547}
548
549pub mod qot_set_price_reminder {
550    include!(concat!(env!("OUT_DIR"), "/qot_set_price_reminder.rs"));
551}
552
553pub mod qot_option_screen {
554    include!(concat!(env!("OUT_DIR"), "/qot_option_screen.rs"));
555}
556
557pub mod qot_stock_screen {
558    include!(concat!(env!("OUT_DIR"), "/qot_stock_screen.rs"));
559}
560
561pub mod qot_stock_filter {
562    include!(concat!(env!("OUT_DIR"), "/qot_stock_filter.rs"));
563}
564
565pub mod qot_sub {
566    include!(concat!(env!("OUT_DIR"), "/qot_sub.rs"));
567}
568
569pub mod qot_update_basic_qot {
570    include!(concat!(env!("OUT_DIR"), "/qot_update_basic_qot.rs"));
571}
572
573pub mod qot_update_broker {
574    include!(concat!(env!("OUT_DIR"), "/qot_update_broker.rs"));
575}
576
577pub mod qot_update_kl {
578    include!(concat!(env!("OUT_DIR"), "/qot_update_kl.rs"));
579}
580
581pub mod qot_update_order_book {
582    include!(concat!(env!("OUT_DIR"), "/qot_update_order_book.rs"));
583}
584
585pub mod qot_update_price_reminder {
586    include!(concat!(env!("OUT_DIR"), "/qot_update_price_reminder.rs"));
587}
588
589pub mod qot_update_rt {
590    include!(concat!(env!("OUT_DIR"), "/qot_update_rt.rs"));
591}
592
593pub mod qot_update_ticker {
594    include!(concat!(env!("OUT_DIR"), "/qot_update_ticker.rs"));
595}
596
597pub mod qot_warrant_screen {
598    include!(concat!(env!("OUT_DIR"), "/qot_warrant_screen.rs"));
599}
600
601pub mod remote_cmd {
602    include!(concat!(env!("OUT_DIR"), "/remote_cmd.rs"));
603}
604
605pub mod skill_wrap_api {
606    include!(concat!(env!("OUT_DIR"), "/skill_wrap_api.rs"));
607}
608
609pub mod test_cmd {
610    include!(concat!(env!("OUT_DIR"), "/test_cmd.rs"));
611}
612
613pub mod trd_common {
614    include!(concat!(env!("OUT_DIR"), "/trd_common.rs"));
615}
616
617pub mod trd_flow_summary {
618    include!(concat!(env!("OUT_DIR"), "/trd_flow_summary.rs"));
619}
620
621pub mod trd_get_acc_list {
622    include!(concat!(env!("OUT_DIR"), "/trd_get_acc_list.rs"));
623}
624
625pub mod trd_get_funds {
626    include!(concat!(env!("OUT_DIR"), "/trd_get_funds.rs"));
627}
628
629pub mod trd_get_history_order_fill_list {
630    include!(concat!(
631        env!("OUT_DIR"),
632        "/trd_get_history_order_fill_list.rs"
633    ));
634}
635
636pub mod trd_get_history_order_list {
637    include!(concat!(env!("OUT_DIR"), "/trd_get_history_order_list.rs"));
638}
639
640pub mod trd_get_combo_max_trd_qtys {
641    include!(concat!(env!("OUT_DIR"), "/trd_get_combo_max_trd_qtys.rs"));
642}
643
644pub mod trd_get_margin_ratio {
645    include!(concat!(env!("OUT_DIR"), "/trd_get_margin_ratio.rs"));
646}
647
648pub mod trd_get_max_trd_qtys {
649    include!(concat!(env!("OUT_DIR"), "/trd_get_max_trd_qtys.rs"));
650}
651
652pub mod trd_get_order_fee {
653    include!(concat!(env!("OUT_DIR"), "/trd_get_order_fee.rs"));
654}
655
656pub mod trd_get_order_fill_list {
657    include!(concat!(env!("OUT_DIR"), "/trd_get_order_fill_list.rs"));
658}
659
660pub mod trd_get_order_list {
661    include!(concat!(env!("OUT_DIR"), "/trd_get_order_list.rs"));
662}
663
664pub mod trd_get_position_list {
665    include!(concat!(env!("OUT_DIR"), "/trd_get_position_list.rs"));
666}
667
668pub mod trd_modify_order {
669    include!(concat!(env!("OUT_DIR"), "/trd_modify_order.rs"));
670}
671
672pub mod trd_notify {
673    include!(concat!(env!("OUT_DIR"), "/trd_notify.rs"));
674}
675
676pub mod trd_place_combo_order {
677    include!(concat!(env!("OUT_DIR"), "/trd_place_combo_order.rs"));
678}
679
680pub mod trd_place_order {
681    include!(concat!(env!("OUT_DIR"), "/trd_place_order.rs"));
682}
683
684pub mod trd_reconfirm_order {
685    include!(concat!(env!("OUT_DIR"), "/trd_reconfirm_order.rs"));
686}
687
688pub mod trd_sub_acc_push {
689    include!(concat!(env!("OUT_DIR"), "/trd_sub_acc_push.rs"));
690}
691
692pub mod trd_unlock_trade {
693    include!(concat!(env!("OUT_DIR"), "/trd_unlock_trade.rs"));
694}
695
696pub mod trd_update_order {
697    include!(concat!(env!("OUT_DIR"), "/trd_update_order.rs"));
698}
699
700pub mod trd_update_order_fill {
701    include!(concat!(env!("OUT_DIR"), "/trd_update_order_fill.rs"));
702}
703
704pub mod used_quota {
705    include!(concat!(env!("OUT_DIR"), "/used_quota.rs"));
706}
707
708pub mod verification {
709    include!(concat!(env!("OUT_DIR"), "/verification.rs"));
710}