Skip to main content

futu_rest/routes/qot/
reference.rs

1//! Split from routes/qot.rs: reference.
2
3use axum::extract::{Json, State};
4use serde_json::Value;
5
6use futu_core::proto_id;
7
8use super::*;
9
10mod unusual;
11pub use unusual::{get_derivative_unusual, get_financial_unusual, get_technical_unusual};
12
13pub async fn get_plate_set(
14    State(state): State<RestState>,
15    Json(body): Json<Value>,
16) -> RawApiResult {
17    adapter::proto_request_raw::<qot_get_plate_set::Request, qot_get_plate_set::Response>(
18        &state,
19        proto_id::QOT_GET_PLATE_SET,
20        Some(body),
21    )
22    .await
23}
24
25/// POST /api/plate-security — 获取板块内股票
26pub async fn get_plate_security(
27    State(state): State<RestState>,
28    Json(body): Json<Value>,
29) -> RawApiResult {
30    adapter::proto_request_raw::<qot_get_plate_security::Request, qot_get_plate_security::Response>(
31        &state,
32        proto_id::QOT_GET_PLATE_SECURITY,
33        Some(body),
34    )
35    .await
36}
37
38/// POST /api/reference — 获取关联数据
39pub async fn get_reference(
40    State(state): State<RestState>,
41    Json(body): Json<Value>,
42) -> RawApiResult {
43    adapter::proto_request_raw::<qot_get_reference::Request, qot_get_reference::Response>(
44        &state,
45        proto_id::QOT_GET_REFERENCE,
46        Some(body),
47    )
48    .await
49}
50
51/// POST /api/owner-plate — 获取所属板块
52pub async fn get_owner_plate(
53    State(state): State<RestState>,
54    Json(body): Json<Value>,
55) -> RawApiResult {
56    adapter::proto_request_raw::<qot_get_owner_plate::Request, qot_get_owner_plate::Response>(
57        &state,
58        proto_id::QOT_GET_OWNER_PLATE,
59        Some(body),
60    )
61    .await
62}
63
64/// POST /api/option-chain — 获取期权链
65pub async fn get_option_chain(
66    State(state): State<RestState>,
67    Json(body): Json<Value>,
68) -> RawApiResult {
69    adapter::proto_request_raw::<qot_get_option_chain::Request, qot_get_option_chain::Response>(
70        &state,
71        proto_id::QOT_GET_OPTION_CHAIN,
72        Some(body),
73    )
74    .await
75}
76
77/// POST /api/option-quote — 获取单腿/组合期权实时行情
78pub async fn get_option_quote(
79    State(state): State<RestState>,
80    Json(body): Json<Value>,
81) -> RawApiResult {
82    adapter::proto_request_raw::<qot_get_option_quote::Request, qot_get_option_quote::Response>(
83        &state,
84        proto_id::QOT_GET_OPTION_QUOTE,
85        Some(body),
86    )
87    .await
88}
89
90/// POST /api/option-strategy — 获取组合期权策略列表
91pub async fn get_option_strategy(
92    State(state): State<RestState>,
93    Json(body): Json<Value>,
94) -> RawApiResult {
95    adapter::proto_request_raw::<
96        qot_get_option_strategy::Request,
97        qot_get_option_strategy::Response,
98    >(&state, proto_id::QOT_GET_OPTION_STRATEGY, Some(body))
99    .await
100}
101
102/// POST /api/option-strategy-analysis — 获取组合期权策略分析
103pub async fn get_option_strategy_analysis(
104    State(state): State<RestState>,
105    Json(body): Json<Value>,
106) -> RawApiResult {
107    adapter::proto_request_raw::<
108        qot_get_option_strategy_analysis::Request,
109        qot_get_option_strategy_analysis::Response,
110    >(
111        &state,
112        proto_id::QOT_GET_OPTION_STRATEGY_ANALYSIS,
113        Some(body),
114    )
115    .await
116}
117
118/// POST /api/option-strategy-spread — 获取组合期权有效价差
119pub async fn get_option_strategy_spread(
120    State(state): State<RestState>,
121    Json(body): Json<Value>,
122) -> RawApiResult {
123    adapter::proto_request_raw::<
124        qot_get_option_strategy_spread::Request,
125        qot_get_option_strategy_spread::Response,
126    >(&state, proto_id::QOT_GET_OPTION_STRATEGY_SPREAD, Some(body))
127    .await
128}
129
130/// POST /api/warrant — 获取窝轮
131pub async fn get_warrant(State(state): State<RestState>, Json(body): Json<Value>) -> RawApiResult {
132    adapter::proto_request_raw::<qot_get_warrant::Request, qot_get_warrant::Response>(
133        &state,
134        proto_id::QOT_GET_WARRANT,
135        Some(body),
136    )
137    .await
138}
139
140/// POST /api/capital-flow — 获取资金流向
141pub async fn get_capital_flow(
142    State(state): State<RestState>,
143    Json(body): Json<Value>,
144) -> RawApiResult {
145    adapter::proto_request_raw::<qot_get_capital_flow::Request, qot_get_capital_flow::Response>(
146        &state,
147        proto_id::QOT_GET_CAPITAL_FLOW,
148        Some(body),
149    )
150    .await
151}
152
153/// POST /api/capital-distribution — 获取资金分布
154pub async fn get_capital_distribution(
155    State(state): State<RestState>,
156    Json(body): Json<Value>,
157) -> RawApiResult {
158    adapter::proto_request_raw::<
159        qot_get_capital_distribution::Request,
160        qot_get_capital_distribution::Response,
161    >(&state, proto_id::QOT_GET_CAPITAL_DISTRIBUTION, Some(body))
162    .await
163}
164
165/// POST /api/company-profile — 获取公司详情标签
166pub async fn get_company_profile(
167    State(state): State<RestState>,
168    Json(body): Json<Value>,
169) -> RawApiResult {
170    adapter::proto_request_raw::<qot_get_company_profile::Request, qot_get_company_profile::Response>(
171        &state,
172        proto_id::QOT_GET_COMPANY_PROFILE,
173        Some(body),
174    )
175    .await
176}
177
178/// POST /api/company-executives — 获取公司高管信息
179pub async fn get_company_executives(
180    State(state): State<RestState>,
181    Json(body): Json<Value>,
182) -> RawApiResult {
183    adapter::proto_request_raw::<
184        qot_get_company_executives::Request,
185        qot_get_company_executives::Response,
186    >(&state, proto_id::QOT_GET_COMPANY_EXECUTIVES, Some(body))
187    .await
188}
189
190/// POST /api/company-executive-background — 获取公司高管背景
191pub async fn get_company_executive_background(
192    State(state): State<RestState>,
193    Json(body): Json<Value>,
194) -> RawApiResult {
195    adapter::proto_request_raw::<
196        qot_get_company_executive_background::Request,
197        qot_get_company_executive_background::Response,
198    >(
199        &state,
200        proto_id::QOT_GET_COMPANY_EXECUTIVE_BACKGROUND,
201        Some(body),
202    )
203    .await
204}
205
206/// POST /api/company-operational-efficiency — 获取公司经营效率
207pub async fn get_company_operational_efficiency(
208    State(state): State<RestState>,
209    Json(body): Json<Value>,
210) -> RawApiResult {
211    adapter::proto_request_raw::<
212        qot_get_company_operational_efficiency::Request,
213        qot_get_company_operational_efficiency::Response,
214    >(
215        &state,
216        proto_id::QOT_GET_COMPANY_OPERATIONAL_EFFICIENCY,
217        Some(body),
218    )
219    .await
220}
221
222/// POST /api/financials-earnings-price-move — 获取财报日前后价格表现
223pub async fn get_financials_earnings_price_move(
224    State(state): State<RestState>,
225    Json(body): Json<Value>,
226) -> RawApiResult {
227    adapter::proto_request_raw::<
228        qot_get_financials_earnings_price_move::Request,
229        qot_get_financials_earnings_price_move::Response,
230    >(
231        &state,
232        proto_id::QOT_GET_FINANCIALS_EARNINGS_PRICE_MOVE,
233        Some(body),
234    )
235    .await
236}
237
238/// POST /api/financials-earnings-price-history — 获取财报日前后股价历史
239pub async fn get_financials_earnings_price_history(
240    State(state): State<RestState>,
241    Json(body): Json<Value>,
242) -> RawApiResult {
243    adapter::proto_request_raw::<
244        qot_get_financials_earnings_price_history::Request,
245        qot_get_financials_earnings_price_history::Response,
246    >(
247        &state,
248        proto_id::QOT_GET_FINANCIALS_EARNINGS_PRICE_HISTORY,
249        Some(body),
250    )
251    .await
252}
253
254/// POST /api/financials-statements — 获取财务报表
255pub async fn get_financials_statements(
256    State(state): State<RestState>,
257    Json(body): Json<Value>,
258) -> RawApiResult {
259    adapter::proto_request_raw::<
260        qot_get_financials_statements::Request,
261        qot_get_financials_statements::Response,
262    >(&state, proto_id::QOT_GET_FINANCIALS_STATEMENTS, Some(body))
263    .await
264}
265
266/// POST /api/financials-revenue-breakdown — 获取主营构成
267pub async fn get_financials_revenue_breakdown(
268    State(state): State<RestState>,
269    Json(body): Json<Value>,
270) -> RawApiResult {
271    adapter::proto_request_raw::<
272        qot_get_financials_revenue_breakdown::Request,
273        qot_get_financials_revenue_breakdown::Response,
274    >(
275        &state,
276        proto_id::QOT_GET_FINANCIALS_REVENUE_BREAKDOWN,
277        Some(body),
278    )
279    .await
280}
281
282/// POST /api/research-analyst-consensus — 获取分析师评级概述
283pub async fn get_research_analyst_consensus(
284    State(state): State<RestState>,
285    Json(body): Json<Value>,
286) -> RawApiResult {
287    adapter::proto_request_raw::<
288        qot_get_research_analyst_consensus::Request,
289        qot_get_research_analyst_consensus::Response,
290    >(
291        &state,
292        proto_id::QOT_GET_RESEARCH_ANALYST_CONSENSUS,
293        Some(body),
294    )
295    .await
296}
297
298/// POST /api/research-rating-summary — 获取评级汇总
299pub async fn get_research_rating_summary(
300    State(state): State<RestState>,
301    Json(body): Json<Value>,
302) -> RawApiResult {
303    adapter::proto_request_raw::<
304        qot_get_research_rating_summary::Request,
305        qot_get_research_rating_summary::Response,
306    >(
307        &state,
308        proto_id::QOT_GET_RESEARCH_RATING_SUMMARY,
309        Some(body),
310    )
311    .await
312}
313
314/// POST /api/research-morningstar-report — 获取晨星研究报告
315pub async fn get_research_morningstar_report(
316    State(state): State<RestState>,
317    Json(body): Json<Value>,
318) -> RawApiResult {
319    adapter::proto_request_raw::<
320        qot_get_research_morningstar_report::Request,
321        qot_get_research_morningstar_report::Response,
322    >(
323        &state,
324        proto_id::QOT_GET_RESEARCH_MORNINGSTAR_REPORT,
325        Some(body),
326    )
327    .await
328}
329
330/// POST /api/valuation-detail — 获取个股/指数估值详情
331pub async fn get_valuation_detail(
332    State(state): State<RestState>,
333    Json(body): Json<Value>,
334) -> RawApiResult {
335    adapter::proto_request_raw::<
336        qot_get_valuation_detail::Request,
337        qot_get_valuation_detail::Response,
338    >(&state, proto_id::QOT_GET_VALUATION_DETAIL, Some(body))
339    .await
340}
341
342/// POST /api/valuation-plate-stock-list — 获取板块/指数成分股估值
343pub async fn get_valuation_plate_stock_list(
344    State(state): State<RestState>,
345    Json(body): Json<Value>,
346) -> RawApiResult {
347    adapter::proto_request_raw::<
348        qot_get_valuation_plate_stock_list::Request,
349        qot_get_valuation_plate_stock_list::Response,
350    >(
351        &state,
352        proto_id::QOT_GET_VALUATION_PLATE_STOCK_LIST,
353        Some(body),
354    )
355    .await
356}
357
358/// POST /api/corporate-actions-buybacks — 获取回购记录
359pub async fn get_corporate_actions_buybacks(
360    State(state): State<RestState>,
361    Json(body): Json<Value>,
362) -> RawApiResult {
363    adapter::proto_request_raw::<
364        qot_get_corporate_actions_buybacks::Request,
365        qot_get_corporate_actions_buybacks::Response,
366    >(
367        &state,
368        proto_id::QOT_GET_CORPORATE_ACTIONS_BUYBACKS,
369        Some(body),
370    )
371    .await
372}
373
374/// POST /api/corporate-actions-dividends — 获取分红派息
375pub async fn get_corporate_actions_dividends(
376    State(state): State<RestState>,
377    Json(body): Json<Value>,
378) -> RawApiResult {
379    adapter::proto_request_raw::<
380        qot_get_corporate_actions_dividends::Request,
381        qot_get_corporate_actions_dividends::Response,
382    >(
383        &state,
384        proto_id::QOT_GET_CORPORATE_ACTIONS_DIVIDENDS,
385        Some(body),
386    )
387    .await
388}
389
390/// POST /api/corporate-actions-stock-splits — 获取拆合股
391pub async fn get_corporate_actions_stock_splits(
392    State(state): State<RestState>,
393    Json(body): Json<Value>,
394) -> RawApiResult {
395    adapter::proto_request_raw::<
396        qot_get_corporate_actions_stock_splits::Request,
397        qot_get_corporate_actions_stock_splits::Response,
398    >(
399        &state,
400        proto_id::QOT_GET_CORPORATE_ACTIONS_STOCK_SPLITS,
401        Some(body),
402    )
403    .await
404}
405
406/// POST /api/daily-short-volume — 获取每日卖空成交
407pub async fn get_daily_short_volume(
408    State(state): State<RestState>,
409    Json(body): Json<Value>,
410) -> RawApiResult {
411    adapter::proto_request_raw::<
412        qot_get_daily_short_volume::Request,
413        qot_get_daily_short_volume::Response,
414    >(&state, proto_id::QOT_GET_DAILY_SHORT_VOLUME, Some(body))
415    .await
416}
417
418/// POST /api/short-interest — 获取空头持仓
419pub async fn get_short_interest(
420    State(state): State<RestState>,
421    Json(body): Json<Value>,
422) -> RawApiResult {
423    adapter::proto_request_raw::<qot_get_short_interest::Request, qot_get_short_interest::Response>(
424        &state,
425        proto_id::QOT_GET_SHORT_INTEREST,
426        Some(body),
427    )
428    .await
429}
430
431/// POST /api/top-ten-buy-sell-brokers — 获取十大买卖经纪商
432pub async fn get_top_ten_buy_sell_brokers(
433    State(state): State<RestState>,
434    Json(body): Json<Value>,
435) -> RawApiResult {
436    adapter::proto_request_raw::<
437        qot_get_top_ten_buy_sell_brokers::Request,
438        qot_get_top_ten_buy_sell_brokers::Response,
439    >(
440        &state,
441        proto_id::QOT_GET_TOP_TEN_BUY_SELL_BROKERS,
442        Some(body),
443    )
444    .await
445}
446
447/// POST /api/shareholders-overview — 获取持股统计
448pub async fn get_shareholders_overview(
449    State(state): State<RestState>,
450    Json(body): Json<Value>,
451) -> RawApiResult {
452    adapter::proto_request_raw::<
453        qot_get_shareholders_overview::Request,
454        qot_get_shareholders_overview::Response,
455    >(&state, proto_id::QOT_GET_SHAREHOLDERS_OVERVIEW, Some(body))
456    .await
457}
458
459/// POST /api/shareholders-holding-changes — 获取股东持股变动
460pub async fn get_shareholders_holding_changes(
461    State(state): State<RestState>,
462    Json(body): Json<Value>,
463) -> RawApiResult {
464    adapter::proto_request_raw::<
465        qot_get_shareholders_holding_changes::Request,
466        qot_get_shareholders_holding_changes::Response,
467    >(
468        &state,
469        proto_id::QOT_GET_SHAREHOLDERS_HOLDING_CHANGES,
470        Some(body),
471    )
472    .await
473}
474
475/// POST /api/shareholders-holder-detail — 获取股东持股明细
476pub async fn get_shareholders_holder_detail(
477    State(state): State<RestState>,
478    Json(body): Json<Value>,
479) -> RawApiResult {
480    adapter::proto_request_raw::<
481        qot_get_shareholders_holder_detail::Request,
482        qot_get_shareholders_holder_detail::Response,
483    >(
484        &state,
485        proto_id::QOT_GET_SHAREHOLDERS_HOLDER_DETAIL,
486        Some(body),
487    )
488    .await
489}
490
491/// POST /api/shareholders-institutional — 获取机构持股统计
492pub async fn get_shareholders_institutional(
493    State(state): State<RestState>,
494    Json(body): Json<Value>,
495) -> RawApiResult {
496    adapter::proto_request_raw::<
497        qot_get_shareholders_institutional::Request,
498        qot_get_shareholders_institutional::Response,
499    >(
500        &state,
501        proto_id::QOT_GET_SHAREHOLDERS_INSTITUTIONAL,
502        Some(body),
503    )
504    .await
505}
506
507/// POST /api/insider-holder-list — 获取内部人持股列表
508pub async fn get_insider_holder_list(
509    State(state): State<RestState>,
510    Json(body): Json<Value>,
511) -> RawApiResult {
512    adapter::proto_request_raw::<
513        qot_get_insider_holder_list::Request,
514        qot_get_insider_holder_list::Response,
515    >(&state, proto_id::QOT_GET_INSIDER_HOLDER_LIST, Some(body))
516    .await
517}
518
519/// POST /api/insider-trade-list — 获取内部人交易列表
520pub async fn get_insider_trade_list(
521    State(state): State<RestState>,
522    Json(body): Json<Value>,
523) -> RawApiResult {
524    adapter::proto_request_raw::<
525        qot_get_insider_trade_list::Request,
526        qot_get_insider_trade_list::Response,
527    >(&state, proto_id::QOT_GET_INSIDER_TRADE_LIST, Some(body))
528    .await
529}
530
531/// POST /api/option-volatility — 获取期权波动率分析
532pub async fn get_option_volatility(
533    State(state): State<RestState>,
534    Json(body): Json<Value>,
535) -> RawApiResult {
536    adapter::proto_request_raw::<
537        qot_get_option_volatility::Request,
538        qot_get_option_volatility::Response,
539    >(&state, proto_id::QOT_GET_OPTION_VOLATILITY, Some(body))
540    .await
541}
542
543/// POST /api/option-exercise-probability — 获取期权行权概率
544pub async fn get_option_exercise_probability(
545    State(state): State<RestState>,
546    Json(body): Json<Value>,
547) -> RawApiResult {
548    adapter::proto_request_raw::<
549        qot_get_option_exercise_probability::Request,
550        qot_get_option_exercise_probability::Response,
551    >(
552        &state,
553        proto_id::QOT_GET_OPTION_EXERCISE_PROBABILITY,
554        Some(body),
555    )
556    .await
557}
558
559/// POST /api/stock-screen — 获取股票筛选结果
560pub async fn stock_screen(State(state): State<RestState>, Json(body): Json<Value>) -> RawApiResult {
561    adapter::proto_request_raw::<qot_stock_screen::Request, qot_stock_screen::Response>(
562        &state,
563        proto_id::QOT_STOCK_SCREEN,
564        Some(body),
565    )
566    .await
567}
568
569/// POST /api/option-screen — 获取期权筛选结果
570pub async fn option_screen(
571    State(state): State<RestState>,
572    Json(body): Json<Value>,
573) -> RawApiResult {
574    adapter::proto_request_raw::<qot_option_screen::Request, qot_option_screen::Response>(
575        &state,
576        proto_id::QOT_OPTION_SCREEN,
577        Some(body),
578    )
579    .await
580}
581
582/// POST /api/warrant-screen — 获取窝轮筛选结果
583pub async fn warrant_screen(
584    State(state): State<RestState>,
585    Json(body): Json<Value>,
586) -> RawApiResult {
587    adapter::proto_request_raw::<qot_warrant_screen::Request, qot_warrant_screen::Response>(
588        &state,
589        proto_id::QOT_WARRANT_SCREEN,
590        Some(body),
591    )
592    .await
593}
594
595/// POST /api/user-security — 获取自选股
596pub async fn get_user_security(
597    State(state): State<RestState>,
598    Json(body): Json<Value>,
599) -> RawApiResult {
600    adapter::proto_request_raw::<qot_get_user_security::Request, qot_get_user_security::Response>(
601        &state,
602        proto_id::QOT_GET_USER_SECURITY,
603        Some(body),
604    )
605    .await
606}
607
608/// POST /api/stock-filter — 条件选股
609pub async fn stock_filter(State(state): State<RestState>, Json(body): Json<Value>) -> RawApiResult {
610    adapter::proto_request_raw::<qot_stock_filter::Request, qot_stock_filter::Response>(
611        &state,
612        proto_id::QOT_STOCK_FILTER,
613        Some(body),
614    )
615    .await
616}
617
618/// POST /api/ipo-list — 获取IPO列表
619pub async fn get_ipo_list(State(state): State<RestState>, Json(body): Json<Value>) -> RawApiResult {
620    adapter::proto_request_raw::<qot_get_ipo_list::Request, qot_get_ipo_list::Response>(
621        &state,
622        proto_id::QOT_GET_IPO_LIST,
623        Some(body),
624    )
625    .await
626}
627
628/// POST /api/future-info — 获取期货信息
629pub async fn get_future_info(
630    State(state): State<RestState>,
631    Json(body): Json<Value>,
632) -> RawApiResult {
633    adapter::proto_request_raw::<qot_get_future_info::Request, qot_get_future_info::Response>(
634        &state,
635        proto_id::QOT_GET_FUTURE_INFO,
636        Some(body),
637    )
638    .await
639}
640
641/// POST /api/market-state — 获取市场状态
642pub async fn get_market_state(
643    State(state): State<RestState>,
644    Json(body): Json<Value>,
645) -> RawApiResult {
646    adapter::proto_request_raw::<qot_get_market_state::Request, qot_get_market_state::Response>(
647        &state,
648        proto_id::QOT_GET_MARKET_STATE,
649        Some(body),
650    )
651    .await
652}
653
654/// POST /api/history-kline — 请求历史K线
655pub async fn request_history_kl(
656    State(state): State<RestState>,
657    Json(body): Json<Value>,
658) -> RawApiResult {
659    adapter::proto_request_raw::<qot_request_history_kl::Request, qot_request_history_kl::Response>(
660        &state,
661        proto_id::QOT_REQUEST_HISTORY_KL,
662        Some(body),
663    )
664    .await
665}
666
667// v1.4.30 新增
668
669/// POST /api/trading-days — 查询交易日(对齐 py-futu-api `request_trading_days`)
670pub async fn request_trading_days(
671    State(state): State<RestState>,
672    Json(body): Json<Value>,
673) -> RawApiResult {
674    adapter::proto_request_raw::<qot_request_trade_date::Request, qot_request_trade_date::Response>(
675        &state,
676        proto_id::QOT_REQUEST_TRADE_DATE,
677        Some(body),
678    )
679    .await
680}
681
682/// POST /api/rehab — 请求复权因子(对齐 py-futu-api `get_rehab`)
683pub async fn request_rehab(
684    State(state): State<RestState>,
685    Json(body): Json<Value>,
686) -> RawApiResult {
687    adapter::proto_request_raw::<qot_request_rehab::Request, qot_request_rehab::Response>(
688        &state,
689        proto_id::QOT_REQUEST_REHAB,
690        Some(body),
691    )
692    .await
693}
694
695/// POST /api/suspend — 获取停牌日(对齐 py-futu-api `get_suspend`)
696pub async fn get_suspend(State(state): State<RestState>, Json(body): Json<Value>) -> RawApiResult {
697    adapter::proto_request_raw::<qot_get_suspend::Request, qot_get_suspend::Response>(
698        &state,
699        proto_id::QOT_GET_SUSPEND,
700        Some(body),
701    )
702    .await
703}
704
705// v1.4.30 P2(100% 覆盖)
706
707/// POST /api/history-kl-quota — 历史 K 线配额
708pub async fn request_history_kl_quota(
709    State(state): State<RestState>,
710    Json(body): Json<Value>,
711) -> RawApiResult {
712    adapter::proto_request_raw::<
713        qot_request_history_kl_quota::Request,
714        qot_request_history_kl_quota::Response,
715    >(&state, proto_id::QOT_REQUEST_HISTORY_KL_QUOTA, Some(body))
716    .await
717}
718
719/// POST /api/used-quota — 当前 daemon 已用订阅额度与历史 K 线额度
720pub async fn get_used_quota(
721    State(state): State<RestState>,
722    Json(body): Json<Value>,
723) -> RawApiResult {
724    adapter::proto_request_raw::<used_quota::Request, used_quota::Response>(
725        &state,
726        proto_id::GET_USED_QUOTA,
727        Some(body),
728    )
729    .await
730}
731
732/// POST /api/holding-change — 持股变动
733pub async fn get_holding_change(
734    State(state): State<RestState>,
735    Json(body): Json<Value>,
736) -> RawApiResult {
737    adapter::proto_request_raw::<
738        qot_get_holding_change_list::Request,
739        qot_get_holding_change_list::Response,
740    >(&state, proto_id::QOT_GET_HOLDING_CHANGE_LIST, Some(body))
741    .await
742}
743
744/// POST /api/modify-user-security — 修改自选
745pub async fn modify_user_security(
746    State(state): State<RestState>,
747    Json(body): Json<Value>,
748) -> RawApiResult {
749    adapter::proto_request_raw::<
750        qot_modify_user_security::Request,
751        qot_modify_user_security::Response,
752    >(&state, proto_id::QOT_MODIFY_USER_SECURITY, Some(body))
753    .await
754}
755
756/// POST /api/code-change — 代码变更
757pub async fn get_code_change(
758    State(state): State<RestState>,
759    Json(body): Json<Value>,
760) -> RawApiResult {
761    adapter::proto_request_raw::<qot_get_code_change::Request, qot_get_code_change::Response>(
762        &state,
763        proto_id::QOT_GET_CODE_CHANGE,
764        Some(body),
765    )
766    .await
767}
768
769/// POST /api/set-price-reminder — 设置到价提醒
770pub async fn set_price_reminder(
771    State(state): State<RestState>,
772    Json(body): Json<Value>,
773) -> RawApiResult {
774    adapter::proto_request_raw::<qot_set_price_reminder::Request, qot_set_price_reminder::Response>(
775        &state,
776        proto_id::QOT_SET_PRICE_REMINDER,
777        Some(body),
778    )
779    .await
780}
781
782/// POST /api/price-reminder — 查询到价提醒
783pub async fn get_price_reminder(
784    State(state): State<RestState>,
785    Json(body): Json<Value>,
786) -> RawApiResult {
787    adapter::proto_request_raw::<qot_get_price_reminder::Request, qot_get_price_reminder::Response>(
788        &state,
789        proto_id::QOT_GET_PRICE_REMINDER,
790        Some(body),
791    )
792    .await
793}
794
795/// POST /api/option-expiration-date — 期权到期日
796pub async fn get_option_expiration_date(
797    State(state): State<RestState>,
798    Json(body): Json<Value>,
799) -> RawApiResult {
800    adapter::proto_request_raw::<
801        qot_get_option_expiration_date::Request,
802        qot_get_option_expiration_date::Response,
803    >(&state, proto_id::QOT_GET_OPTION_EXPIRATION_DATE, Some(body))
804    .await
805}