1use clap::Args;
4
5#[derive(Args)]
6pub struct ProtoJsonArgs {
7 #[arg(long = "c2s-json", value_name = "JSON")]
13 pub(crate) c2s_json: String,
14}
15
16#[derive(Args)]
17pub struct IndicatorListArgs {
18 #[arg(long = "c2s-json", value_name = "JSON")]
24 pub(crate) c2s_json: String,
25}
26
27#[derive(Args)]
28pub struct IndicatorCalcArgs {
29 #[arg(long = "c2s-json", value_name = "JSON")]
31 pub(crate) c2s_json: String,
32
33 #[arg(long = "timeout-secs", default_value_t = 10)]
35 pub(crate) timeout_secs: u64,
36}
37
38#[derive(Args)]
39pub struct QuoteArgs {
40 #[arg(required = true)]
42 pub(crate) symbols: Vec<String>,
43}
44
45#[derive(Args)]
46pub struct SnapshotArgs {
47 #[arg(required = true)]
49 pub(crate) symbols: Vec<String>,
50}
51
52#[derive(Args)]
53pub struct SubArgs {
54 #[arg(required = true)]
56 pub(crate) symbols: Vec<String>,
57
58 #[arg(
66 short = 't',
67 long,
68 visible_aliases = ["sub-type", "sub-types", "stype"],
69 default_value = "basic"
70 )]
71 pub(crate) r#type: String,
72
73 #[arg(long = "extended-time")]
75 pub(crate) extended_time: bool,
76
77 #[arg(long)]
79 pub(crate) session: Option<String>,
80
81 #[arg(long = "orderbook-detail")]
83 pub(crate) orderbook_detail: bool,
84}
85
86#[derive(Args)]
87pub struct KlineArgs {
88 #[arg(index = 1, value_name = "SYMBOL")]
90 pub(crate) symbol_positional: Option<String>,
91
92 #[arg(
94 long = "symbol",
95 visible_aliases = ["code", "stock"],
96 conflicts_with = "symbol_positional",
97 value_name = "SYMBOL"
98 )]
99 pub(crate) symbol_arg: Option<String>,
100
101 #[arg(
106 short = 't',
107 long,
108 visible_aliases = ["ktype", "kltype", "kl-type"],
109 default_value = "day"
110 )]
111 pub(crate) r#type: String,
112
113 #[arg(
117 short = 'n',
118 long,
119 visible_aliases = ["num", "max-count", "req-count"]
120 )]
121 pub(crate) count: Option<i32>,
122
123 #[arg(long = "rehab-type", default_value = "none")]
125 pub(crate) rehab_type: String,
126
127 #[arg(long = "page-size", visible_alias = "max-ack-kl-num")]
129 pub(crate) page_size: Option<i32>,
130
131 #[arg(long = "next-req-key", visible_alias = "nextReqKey")]
133 pub(crate) next_req_key: Option<String>,
134
135 #[arg(long = "need-kl-fields-flag", visible_alias = "needKLFieldsFlag")]
137 pub(crate) need_kl_fields_flag: Option<i64>,
138
139 #[arg(long = "extended-time")]
141 pub(crate) extended_time: bool,
142
143 #[arg(long)]
145 pub(crate) session: Option<String>,
146
147 #[arg(long, visible_aliases = ["begin-time", "from"])]
151 pub(crate) begin: Option<String>,
152
153 #[arg(long, visible_aliases = ["end-time", "to"])]
157 pub(crate) end: Option<String>,
158}
159
160#[derive(Args)]
161pub struct OrderbookArgs {
162 #[arg(index = 1, value_name = "SYMBOL")]
164 pub(crate) symbol_positional: Option<String>,
165
166 #[arg(
168 long = "symbol",
169 visible_aliases = ["code", "stock"],
170 conflicts_with = "symbol_positional",
171 value_name = "SYMBOL"
172 )]
173 pub(crate) symbol_arg: Option<String>,
174
175 #[arg(
179 short = 'n',
180 long,
181 visible_aliases = ["num", "count"],
182 default_value_t = 10
183 )]
184 pub(crate) depth: i32,
185
186 #[arg(long = "odd-lot", visible_alias = "odd")]
188 pub(crate) odd_lot: bool,
189}
190
191#[derive(Args)]
192pub struct TickerArgs {
193 #[arg(index = 1, value_name = "SYMBOL")]
195 pub(crate) symbol_positional: Option<String>,
196
197 #[arg(
199 long = "symbol",
200 visible_aliases = ["code", "stock"],
201 conflicts_with = "symbol_positional",
202 value_name = "SYMBOL"
203 )]
204 pub(crate) symbol_arg: Option<String>,
205
206 #[arg(
210 short = 'n',
211 long,
212 visible_aliases = ["num", "max-count"],
213 default_value_t = 100
214 )]
215 pub(crate) count: i32,
216}
217
218#[derive(Args)]
219pub struct RtArgs {
220 #[arg(index = 1, value_name = "SYMBOL")]
222 pub(crate) symbol_positional: Option<String>,
223
224 #[arg(
226 long = "symbol",
227 visible_aliases = ["code", "stock"],
228 conflicts_with = "symbol_positional",
229 value_name = "SYMBOL"
230 )]
231 pub(crate) symbol_arg: Option<String>,
232}
233
234#[derive(Args)]
235pub struct StaticArgs {
236 #[arg(required = true)]
238 pub(crate) symbols: Vec<String>,
239}
240
241#[derive(Args)]
242pub struct BrokerArgs {
243 #[arg(index = 1, value_name = "SYMBOL")]
245 pub(crate) symbol_positional: Option<String>,
246
247 #[arg(
249 long = "symbol",
250 visible_aliases = ["code", "stock"],
251 conflicts_with = "symbol_positional",
252 value_name = "SYMBOL"
253 )]
254 pub(crate) symbol_arg: Option<String>,
255}
256
257#[derive(Args)]
258pub struct PlateListArgs {
259 #[arg(short, long)]
261 pub(crate) market: String,
262
263 #[arg(short = 's', long, visible_alias = "plate-type", default_value = "all")]
266 pub(crate) set: String,
267}
268
269#[derive(Args)]
270pub struct PlateStocksArgs {
271 #[arg(index = 1, value_name = "PLATE")]
273 pub(crate) plate: Option<String>,
274
275 #[arg(long = "plate", conflicts_with = "plate")]
277 pub(crate) plate_arg: Option<String>,
278}
279
280#[derive(Args)]
281pub struct ReferenceArgs {
282 #[arg(index = 1, value_name = "SYMBOL")]
284 pub(crate) symbol_positional: Option<String>,
285
286 #[arg(
288 long = "symbol",
289 visible_aliases = ["code", "stock"],
290 conflicts_with = "symbol_positional",
291 value_name = "SYMBOL"
292 )]
293 pub(crate) symbol_arg: Option<String>,
294
295 #[arg(
297 long = "reference-type",
298 visible_alias = "type",
299 default_value = "warrant"
300 )]
301 pub(crate) reference_type: String,
302}
303
304#[derive(Args)]
305pub struct CapitalFlowArgs {
306 pub(crate) symbol: String,
308 #[arg(long, default_value_t = 1)]
310 pub(crate) period_type: i32,
311 #[arg(long)]
313 pub(crate) begin: Option<String>,
314 #[arg(long)]
316 pub(crate) end: Option<String>,
317}
318
319#[derive(Args)]
320pub struct CompanyProfileArgs {
321 pub(crate) symbol: String,
323}
324
325#[derive(Args)]
326pub struct CompanyExecutivesArgs {
327 pub(crate) symbol: String,
329}
330
331#[derive(Args)]
332pub struct CompanyExecutiveBackgroundArgs {
333 pub(crate) symbol: String,
335 pub(crate) leader_name: String,
337}
338
339#[derive(Args)]
340pub struct CompanyOperationalEfficiencyArgs {
341 pub(crate) symbol: String,
343 #[arg(long, allow_hyphen_values = true)]
345 pub(crate) next_key: Option<String>,
346 #[arg(long)]
348 pub(crate) num: Option<i32>,
349 #[arg(long)]
351 pub(crate) currency_code: Option<String>,
352 #[arg(long)]
354 pub(crate) financial_type: Option<i32>,
355}
356
357#[derive(Args)]
358pub struct FinancialsEarningsPriceMoveArgs {
359 pub(crate) symbol: String,
361 #[arg(long)]
363 pub(crate) period_count: Option<i32>,
364}
365
366#[derive(Args)]
367pub struct FinancialsEarningsPriceHistoryArgs {
368 pub(crate) symbol: String,
370}
371
372#[derive(Args)]
373pub struct FinancialCalendarArgs {
374 #[arg(long)]
376 pub(crate) begin_date: String,
377 #[arg(long)]
379 pub(crate) end_date: String,
380 #[arg(long = "market", visible_alias = "market-list", value_delimiter = ',')]
382 pub(crate) markets: Vec<String>,
383 #[arg(
385 long = "pub-type",
386 visible_alias = "pub-type-list",
387 value_delimiter = ','
388 )]
389 pub(crate) pub_types: Vec<String>,
390 #[arg(
392 long = "stock-type",
393 visible_alias = "stock-type-list",
394 value_delimiter = ','
395 )]
396 pub(crate) stock_types: Vec<String>,
397 #[arg(long)]
399 pub(crate) watchlist_only: bool,
400 #[arg(long)]
402 pub(crate) positions_only: bool,
403 #[arg(long, default_value_t = 6)]
405 pub(crate) count: i32,
406 #[arg(long)]
408 pub(crate) ranking_type: Option<i32>,
409 #[arg(long = "custom-filter", value_name = "TYPE[:MIN[:MAX]]")]
411 pub(crate) custom_filters: Vec<String>,
412 #[arg(
414 long = "estimate-type",
415 visible_alias = "estimate-type-list",
416 value_delimiter = ','
417 )]
418 pub(crate) estimate_types: Vec<String>,
419 #[arg(long = "watchlist-stock-id")]
421 pub(crate) watchlist_stock_ids: Vec<u64>,
422 #[arg(long = "holding-stock-id")]
424 pub(crate) holding_stock_ids: Vec<u64>,
425}
426
427#[derive(Args)]
428pub struct FinancialCalendarTargetArgs {
429 #[arg(long = "stock-id", required = true)]
431 pub(crate) stock_ids: Vec<u64>,
432 #[arg(long = "market", visible_alias = "market-list", value_delimiter = ',')]
434 pub(crate) markets: Vec<String>,
435 #[arg(long, default_value_t = 20)]
437 pub(crate) size: i32,
438 #[arg(long)]
440 pub(crate) start: Option<i32>,
441}
442
443#[derive(Args)]
444pub struct IpoCalendarArgs {
445 #[arg(long)]
447 pub(crate) market: String,
448 #[arg(long = "event", visible_alias = "event-type", value_delimiter = ',')]
450 pub(crate) events: Vec<String>,
451 #[arg(long)]
453 pub(crate) begin_date: Option<String>,
454 #[arg(long)]
456 pub(crate) end_date: Option<String>,
457}
458
459#[derive(Args)]
460pub struct FinancialsStatementsArgs {
461 pub(crate) symbol: String,
463 #[arg(long)]
465 pub(crate) statement_type: Option<i32>,
466 #[arg(long)]
468 pub(crate) financial_type: Option<i32>,
469 #[arg(long)]
471 pub(crate) currency_code: Option<String>,
472 #[arg(long, allow_hyphen_values = true)]
474 pub(crate) next_key: Option<String>,
475 #[arg(long)]
477 pub(crate) num: Option<i32>,
478}
479
480#[derive(Args)]
481pub struct FinancialsRevenueBreakdownArgs {
482 pub(crate) symbol: String,
484 #[arg(long)]
486 pub(crate) date: Option<u32>,
487 #[arg(long)]
489 pub(crate) financial_type: Option<i32>,
490 #[arg(long)]
492 pub(crate) currency_code: Option<String>,
493}
494
495#[derive(Args)]
496pub struct ResearchAnalystConsensusArgs {
497 pub(crate) symbol: String,
499}
500
501#[derive(Args)]
502pub struct ResearchRatingSummaryArgs {
503 pub(crate) symbol: String,
505 #[arg(long)]
507 pub(crate) rating_dimension_type: Option<i32>,
508 #[arg(long)]
510 pub(crate) uid: Option<String>,
511 #[arg(long, allow_hyphen_values = true)]
513 pub(crate) next_key: Option<String>,
514 #[arg(long)]
516 pub(crate) num: Option<i32>,
517}
518
519#[derive(Args)]
520pub struct ResearchMorningstarReportArgs {
521 pub(crate) symbol: String,
523}
524
525#[derive(Args)]
526pub struct ValuationDetailArgs {
527 pub(crate) symbol: String,
529 #[arg(long)]
531 pub(crate) valuation_type: Option<i32>,
532 #[arg(long)]
534 pub(crate) interval_type: Option<i32>,
535}
536
537#[derive(Args)]
538pub struct ValuationPlateStockListArgs {
539 pub(crate) symbol: String,
541 #[arg(long)]
543 pub(crate) valuation_type: Option<i32>,
544 #[arg(long, allow_hyphen_values = true)]
546 pub(crate) next_key: Option<String>,
547 #[arg(long)]
549 pub(crate) num: Option<i32>,
550 #[arg(long)]
552 pub(crate) sort_type: Option<i32>,
553 #[arg(long)]
555 pub(crate) sort_id: Option<i32>,
556 #[arg(long)]
558 pub(crate) filter_security: Option<String>,
559}
560
561#[derive(Args)]
562pub struct StockScreenArgs {
563 #[arg(long = "c2s-json")]
565 pub(crate) c2s_json: String,
566}
567
568#[derive(Args)]
569pub struct OptionScreenArgs {
570 #[arg(long = "c2s-json")]
572 pub(crate) c2s_json: String,
573}
574
575#[derive(Args)]
576pub struct WarrantScreenArgs {
577 #[arg(long = "c2s-json")]
579 pub(crate) c2s_json: String,
580}
581
582#[derive(Args)]
583pub struct TechnicalUnusualArgs {
584 pub(crate) stock_symbol: String,
586 #[arg(long)]
588 pub(crate) time_range: Option<i32>,
589 #[arg(long = "indicator-filter")]
591 pub(crate) indicator_filters: Vec<String>,
592 #[arg(long)]
594 pub(crate) language_id: Option<i32>,
595}
596
597#[derive(Args)]
598pub struct FinancialUnusualArgs {
599 pub(crate) stock_symbol: String,
601 #[arg(long)]
603 pub(crate) time_range: Option<i32>,
604 #[arg(long = "analysis-dimension")]
606 pub(crate) analysis_dimensions: Vec<String>,
607 #[arg(long)]
609 pub(crate) language_id: Option<i32>,
610}
611
612#[derive(Args)]
613pub struct DerivativeUnusualArgs {
614 pub(crate) stock_symbol: String,
616 #[arg(long)]
618 pub(crate) time_range: Option<i32>,
619 #[arg(long = "analysis-dimension")]
621 pub(crate) analysis_dimensions: Vec<String>,
622 #[arg(long)]
624 pub(crate) language_id: Option<i32>,
625}
626
627#[derive(Args)]
628pub struct CorporateActionsDividendsArgs {
629 pub(crate) symbol: String,
631}
632
633#[derive(Args)]
634pub struct CorporateActionsBuybacksArgs {
635 pub(crate) symbol: String,
637 #[arg(long, allow_hyphen_values = true)]
639 pub(crate) next_key: Option<String>,
640 #[arg(long)]
642 pub(crate) num: Option<i32>,
643}
644
645#[derive(Args)]
646pub struct CorporateActionsStockSplitsArgs {
647 pub(crate) symbol: String,
649 #[arg(long, allow_hyphen_values = true)]
651 pub(crate) next_key: Option<String>,
652 #[arg(long)]
654 pub(crate) num: Option<i32>,
655}
656
657#[derive(Args)]
658pub struct DailyShortVolumeArgs {
659 pub(crate) symbol: String,
661 #[arg(long, allow_hyphen_values = true)]
663 pub(crate) next_key: Option<String>,
664 #[arg(long)]
666 pub(crate) num: Option<i32>,
667}
668
669#[derive(Args)]
670pub struct ShortInterestArgs {
671 pub(crate) symbol: String,
673 #[arg(long, allow_hyphen_values = true)]
675 pub(crate) next_key: Option<String>,
676 #[arg(long)]
678 pub(crate) num: Option<i32>,
679}
680
681#[derive(Args)]
682pub struct TopTenBuySellBrokersArgs {
683 pub(crate) symbol: String,
685 #[arg(long)]
687 pub(crate) days_before: Option<i32>,
688}
689
690#[derive(Args)]
691pub struct ShareholdersOverviewArgs {
692 pub(crate) symbol: String,
694 #[arg(long)]
696 pub(crate) period_id: Option<i32>,
697}
698
699#[derive(Args)]
700pub struct ShareholdersHoldingChangesArgs {
701 pub(crate) symbol: String,
703 #[arg(long, allow_hyphen_values = true)]
705 pub(crate) next_key: Option<String>,
706 #[arg(long)]
708 pub(crate) num: Option<i32>,
709 #[arg(long)]
711 pub(crate) sort_type: Option<i32>,
712 #[arg(long)]
714 pub(crate) sort_column: Option<i32>,
715 #[arg(long)]
717 pub(crate) filter_type: Option<i32>,
718}
719
720#[derive(Args)]
721pub struct ShareholdersHolderDetailArgs {
722 pub(crate) symbol: String,
724 #[arg(long)]
726 pub(crate) request_type: Option<i32>,
727 #[arg(long, allow_hyphen_values = true)]
729 pub(crate) next_key: Option<String>,
730 #[arg(long)]
732 pub(crate) num: Option<i32>,
733 #[arg(long)]
735 pub(crate) sort_column: Option<i32>,
736 #[arg(long)]
738 pub(crate) sort_type: Option<i32>,
739 #[arg(long)]
741 pub(crate) period_id: Option<i32>,
742 #[arg(long)]
744 pub(crate) holder_id: Option<i32>,
745}
746
747#[derive(Args)]
748pub struct ShareholdersInstitutionalArgs {
749 pub(crate) symbol: String,
751 #[arg(long, allow_hyphen_values = true)]
753 pub(crate) next_key: Option<String>,
754 #[arg(long)]
756 pub(crate) num: Option<i32>,
757}
758
759#[derive(Args)]
760pub struct InsiderHolderListArgs {
761 pub(crate) symbol: String,
763 #[arg(long, allow_hyphen_values = true)]
765 pub(crate) next_key: Option<String>,
766 #[arg(long)]
768 pub(crate) num: Option<i32>,
769}
770
771#[derive(Args)]
772pub struct InsiderTradeListArgs {
773 pub(crate) symbol: String,
775 #[arg(long)]
777 pub(crate) holder_id: Option<i64>,
778 #[arg(long, allow_hyphen_values = true)]
780 pub(crate) next_key: Option<String>,
781 #[arg(long)]
783 pub(crate) num: Option<i32>,
784}
785
786#[derive(Args)]
787pub struct OptionVolatilityArgs {
788 pub(crate) symbol: String,
790 #[arg(long)]
792 pub(crate) query_time_period: Option<i32>,
793 #[arg(long)]
795 pub(crate) hv_time_period: Option<i32>,
796}
797
798#[derive(Args)]
799pub struct OptionExerciseProbabilityArgs {
800 pub(crate) symbol: String,
802}