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//! 这导致 CamelCase 字段名(`accID` / `trdEnv` / `filterConditions` / `beginTime`)
14//! 被 serde 静默当未知字段 drop。REST adapter 层用
15//! `normalize_json_keys_snake_case` 预归一化解决(v1.4.45 修,CLAUDE.md 坑 30)。
16
17#![allow(clippy::empty_docs, clippy::tabs_in_doc_comments)]
18
19pub mod common {
20    include!(concat!(env!("OUT_DIR"), "/common.rs"));
21}
22
23pub mod get_delay_statistics {
24    include!(concat!(env!("OUT_DIR"), "/get_delay_statistics.rs"));
25}
26
27pub mod get_global_state {
28    include!(concat!(env!("OUT_DIR"), "/get_global_state.rs"));
29}
30
31pub mod get_user_info {
32    include!(concat!(env!("OUT_DIR"), "/get_user_info.rs"));
33}
34
35pub mod init_connect {
36    include!(concat!(env!("OUT_DIR"), "/init_connect.rs"));
37}
38
39pub mod keep_alive {
40    include!(concat!(env!("OUT_DIR"), "/keep_alive.rs"));
41}
42
43pub mod notify {
44    include!(concat!(env!("OUT_DIR"), "/notify.rs"));
45}
46
47pub mod qot_common {
48    include!(concat!(env!("OUT_DIR"), "/qot_common.rs"));
49}
50
51pub mod qot_get_basic_qot {
52    include!(concat!(env!("OUT_DIR"), "/qot_get_basic_qot.rs"));
53}
54
55pub mod qot_get_broker {
56    include!(concat!(env!("OUT_DIR"), "/qot_get_broker.rs"));
57}
58
59pub mod qot_get_capital_distribution {
60    include!(concat!(env!("OUT_DIR"), "/qot_get_capital_distribution.rs"));
61}
62
63pub mod qot_get_capital_flow {
64    include!(concat!(env!("OUT_DIR"), "/qot_get_capital_flow.rs"));
65}
66
67pub mod qot_get_code_change {
68    include!(concat!(env!("OUT_DIR"), "/qot_get_code_change.rs"));
69}
70
71pub mod qot_get_future_info {
72    include!(concat!(env!("OUT_DIR"), "/qot_get_future_info.rs"));
73}
74
75pub mod qot_get_holding_change_list {
76    include!(concat!(env!("OUT_DIR"), "/qot_get_holding_change_list.rs"));
77}
78
79pub mod qot_get_ipo_list {
80    include!(concat!(env!("OUT_DIR"), "/qot_get_ipo_list.rs"));
81}
82
83pub mod qot_get_kl {
84    include!(concat!(env!("OUT_DIR"), "/qot_get_kl.rs"));
85}
86
87pub mod qot_get_market_state {
88    include!(concat!(env!("OUT_DIR"), "/qot_get_market_state.rs"));
89}
90
91pub mod qot_get_option_chain {
92    include!(concat!(env!("OUT_DIR"), "/qot_get_option_chain.rs"));
93}
94
95pub mod qot_get_option_expiration_date {
96    include!(concat!(
97        env!("OUT_DIR"),
98        "/qot_get_option_expiration_date.rs"
99    ));
100}
101
102pub mod qot_get_order_book {
103    include!(concat!(env!("OUT_DIR"), "/qot_get_order_book.rs"));
104}
105
106pub mod qot_get_owner_plate {
107    include!(concat!(env!("OUT_DIR"), "/qot_get_owner_plate.rs"));
108}
109
110pub mod qot_get_plate_security {
111    include!(concat!(env!("OUT_DIR"), "/qot_get_plate_security.rs"));
112}
113
114pub mod qot_get_plate_set {
115    include!(concat!(env!("OUT_DIR"), "/qot_get_plate_set.rs"));
116}
117
118pub mod qot_get_price_reminder {
119    include!(concat!(env!("OUT_DIR"), "/qot_get_price_reminder.rs"));
120}
121
122pub mod qot_get_reference {
123    include!(concat!(env!("OUT_DIR"), "/qot_get_reference.rs"));
124}
125
126pub mod qot_get_rt {
127    include!(concat!(env!("OUT_DIR"), "/qot_get_rt.rs"));
128}
129
130pub mod qot_get_security_snapshot {
131    include!(concat!(env!("OUT_DIR"), "/qot_get_security_snapshot.rs"));
132}
133
134pub mod qot_get_static_info {
135    include!(concat!(env!("OUT_DIR"), "/qot_get_static_info.rs"));
136}
137
138pub mod qot_get_sub_info {
139    include!(concat!(env!("OUT_DIR"), "/qot_get_sub_info.rs"));
140}
141
142pub mod qot_get_suspend {
143    include!(concat!(env!("OUT_DIR"), "/qot_get_suspend.rs"));
144}
145
146pub mod qot_get_ticker {
147    include!(concat!(env!("OUT_DIR"), "/qot_get_ticker.rs"));
148}
149
150pub mod qot_get_user_security {
151    include!(concat!(env!("OUT_DIR"), "/qot_get_user_security.rs"));
152}
153
154pub mod qot_get_user_security_group {
155    include!(concat!(env!("OUT_DIR"), "/qot_get_user_security_group.rs"));
156}
157
158pub mod qot_get_warrant {
159    include!(concat!(env!("OUT_DIR"), "/qot_get_warrant.rs"));
160}
161
162pub mod qot_modify_user_security {
163    include!(concat!(env!("OUT_DIR"), "/qot_modify_user_security.rs"));
164}
165
166pub mod qot_reg_qot_push {
167    include!(concat!(env!("OUT_DIR"), "/qot_reg_qot_push.rs"));
168}
169
170pub mod qot_request_history_kl {
171    include!(concat!(env!("OUT_DIR"), "/qot_request_history_kl.rs"));
172}
173
174pub mod qot_request_history_kl_quota {
175    include!(concat!(env!("OUT_DIR"), "/qot_request_history_kl_quota.rs"));
176}
177
178pub mod qot_request_rehab {
179    include!(concat!(env!("OUT_DIR"), "/qot_request_rehab.rs"));
180}
181
182pub mod qot_request_trade_date {
183    include!(concat!(env!("OUT_DIR"), "/qot_request_trade_date.rs"));
184}
185
186pub mod qot_set_price_reminder {
187    include!(concat!(env!("OUT_DIR"), "/qot_set_price_reminder.rs"));
188}
189
190pub mod qot_stock_filter {
191    include!(concat!(env!("OUT_DIR"), "/qot_stock_filter.rs"));
192}
193
194pub mod qot_sub {
195    include!(concat!(env!("OUT_DIR"), "/qot_sub.rs"));
196}
197
198pub mod qot_update_basic_qot {
199    include!(concat!(env!("OUT_DIR"), "/qot_update_basic_qot.rs"));
200}
201
202pub mod qot_update_broker {
203    include!(concat!(env!("OUT_DIR"), "/qot_update_broker.rs"));
204}
205
206pub mod qot_update_kl {
207    include!(concat!(env!("OUT_DIR"), "/qot_update_kl.rs"));
208}
209
210pub mod qot_update_order_book {
211    include!(concat!(env!("OUT_DIR"), "/qot_update_order_book.rs"));
212}
213
214pub mod qot_update_price_reminder {
215    include!(concat!(env!("OUT_DIR"), "/qot_update_price_reminder.rs"));
216}
217
218pub mod qot_update_rt {
219    include!(concat!(env!("OUT_DIR"), "/qot_update_rt.rs"));
220}
221
222pub mod qot_update_ticker {
223    include!(concat!(env!("OUT_DIR"), "/qot_update_ticker.rs"));
224}
225
226pub mod remote_cmd {
227    include!(concat!(env!("OUT_DIR"), "/remote_cmd.rs"));
228}
229
230pub mod test_cmd {
231    include!(concat!(env!("OUT_DIR"), "/test_cmd.rs"));
232}
233
234pub mod trd_common {
235    include!(concat!(env!("OUT_DIR"), "/trd_common.rs"));
236}
237
238pub mod trd_flow_summary {
239    include!(concat!(env!("OUT_DIR"), "/trd_flow_summary.rs"));
240}
241
242pub mod trd_get_acc_list {
243    include!(concat!(env!("OUT_DIR"), "/trd_get_acc_list.rs"));
244}
245
246pub mod trd_get_funds {
247    include!(concat!(env!("OUT_DIR"), "/trd_get_funds.rs"));
248}
249
250pub mod trd_get_history_order_fill_list {
251    include!(concat!(
252        env!("OUT_DIR"),
253        "/trd_get_history_order_fill_list.rs"
254    ));
255}
256
257pub mod trd_get_history_order_list {
258    include!(concat!(env!("OUT_DIR"), "/trd_get_history_order_list.rs"));
259}
260
261pub mod trd_get_margin_ratio {
262    include!(concat!(env!("OUT_DIR"), "/trd_get_margin_ratio.rs"));
263}
264
265pub mod trd_get_max_trd_qtys {
266    include!(concat!(env!("OUT_DIR"), "/trd_get_max_trd_qtys.rs"));
267}
268
269pub mod trd_get_order_fee {
270    include!(concat!(env!("OUT_DIR"), "/trd_get_order_fee.rs"));
271}
272
273pub mod trd_get_order_fill_list {
274    include!(concat!(env!("OUT_DIR"), "/trd_get_order_fill_list.rs"));
275}
276
277pub mod trd_get_order_list {
278    include!(concat!(env!("OUT_DIR"), "/trd_get_order_list.rs"));
279}
280
281pub mod trd_get_position_list {
282    include!(concat!(env!("OUT_DIR"), "/trd_get_position_list.rs"));
283}
284
285pub mod trd_modify_order {
286    include!(concat!(env!("OUT_DIR"), "/trd_modify_order.rs"));
287}
288
289pub mod trd_notify {
290    include!(concat!(env!("OUT_DIR"), "/trd_notify.rs"));
291}
292
293pub mod trd_place_order {
294    include!(concat!(env!("OUT_DIR"), "/trd_place_order.rs"));
295}
296
297pub mod trd_reconfirm_order {
298    include!(concat!(env!("OUT_DIR"), "/trd_reconfirm_order.rs"));
299}
300
301pub mod trd_sub_acc_push {
302    include!(concat!(env!("OUT_DIR"), "/trd_sub_acc_push.rs"));
303}
304
305pub mod trd_unlock_trade {
306    include!(concat!(env!("OUT_DIR"), "/trd_unlock_trade.rs"));
307}
308
309pub mod trd_update_order {
310    include!(concat!(env!("OUT_DIR"), "/trd_update_order.rs"));
311}
312
313pub mod trd_update_order_fill {
314    include!(concat!(env!("OUT_DIR"), "/trd_update_order_fill.rs"));
315}
316
317pub mod used_quota {
318    include!(concat!(env!("OUT_DIR"), "/used_quota.rs"));
319}
320
321pub mod verification {
322    include!(concat!(env!("OUT_DIR"), "/verification.rs"));
323}