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 QuoteArgs {
18 #[arg(required = true)]
20 pub(crate) symbols: Vec<String>,
21}
22
23#[derive(Args)]
24pub struct SnapshotArgs {
25 #[arg(required = true)]
27 pub(crate) symbols: Vec<String>,
28}
29
30#[derive(Args)]
31pub struct SubArgs {
32 #[arg(required = true)]
34 pub(crate) symbols: Vec<String>,
35
36 #[arg(
44 short = 't',
45 long,
46 visible_aliases = ["sub-type", "sub-types", "stype"],
47 default_value = "basic"
48 )]
49 pub(crate) r#type: String,
50
51 #[arg(long = "extended-time")]
53 pub(crate) extended_time: bool,
54
55 #[arg(long)]
57 pub(crate) session: Option<String>,
58
59 #[arg(long = "orderbook-detail")]
61 pub(crate) orderbook_detail: bool,
62}
63
64#[derive(Args)]
65pub struct KlineArgs {
66 #[arg(index = 1, value_name = "SYMBOL")]
68 pub(crate) symbol_positional: Option<String>,
69
70 #[arg(
72 long = "symbol",
73 visible_aliases = ["code", "stock"],
74 conflicts_with = "symbol_positional",
75 value_name = "SYMBOL"
76 )]
77 pub(crate) symbol_arg: Option<String>,
78
79 #[arg(
84 short = 't',
85 long,
86 visible_aliases = ["ktype", "kltype", "kl-type"],
87 default_value = "day"
88 )]
89 pub(crate) r#type: String,
90
91 #[arg(
95 short = 'n',
96 long,
97 visible_aliases = ["num", "max-count", "req-count"]
98 )]
99 pub(crate) count: Option<i32>,
100
101 #[arg(long = "rehab-type", default_value = "none")]
103 pub(crate) rehab_type: String,
104
105 #[arg(long = "page-size", visible_alias = "max-ack-kl-num")]
107 pub(crate) page_size: Option<i32>,
108
109 #[arg(long = "next-req-key", visible_alias = "nextReqKey")]
111 pub(crate) next_req_key: Option<String>,
112
113 #[arg(long = "need-kl-fields-flag", visible_alias = "needKLFieldsFlag")]
115 pub(crate) need_kl_fields_flag: Option<i64>,
116
117 #[arg(long = "extended-time")]
119 pub(crate) extended_time: bool,
120
121 #[arg(long)]
123 pub(crate) session: Option<String>,
124
125 #[arg(long, visible_aliases = ["begin-time", "from"])]
129 pub(crate) begin: Option<String>,
130
131 #[arg(long, visible_aliases = ["end-time", "to"])]
135 pub(crate) end: Option<String>,
136}
137
138#[derive(Args)]
139pub struct OrderbookArgs {
140 #[arg(index = 1, value_name = "SYMBOL")]
142 pub(crate) symbol_positional: Option<String>,
143
144 #[arg(
146 long = "symbol",
147 visible_aliases = ["code", "stock"],
148 conflicts_with = "symbol_positional",
149 value_name = "SYMBOL"
150 )]
151 pub(crate) symbol_arg: Option<String>,
152
153 #[arg(
157 short = 'n',
158 long,
159 visible_aliases = ["num", "count"],
160 default_value_t = 10
161 )]
162 pub(crate) depth: i32,
163
164 #[arg(long = "odd-lot", visible_alias = "odd")]
166 pub(crate) odd_lot: bool,
167}
168
169#[derive(Args)]
170pub struct TickerArgs {
171 #[arg(index = 1, value_name = "SYMBOL")]
173 pub(crate) symbol_positional: Option<String>,
174
175 #[arg(
177 long = "symbol",
178 visible_aliases = ["code", "stock"],
179 conflicts_with = "symbol_positional",
180 value_name = "SYMBOL"
181 )]
182 pub(crate) symbol_arg: Option<String>,
183
184 #[arg(
188 short = 'n',
189 long,
190 visible_aliases = ["num", "max-count"],
191 default_value_t = 100
192 )]
193 pub(crate) count: i32,
194}
195
196#[derive(Args)]
197pub struct RtArgs {
198 #[arg(index = 1, value_name = "SYMBOL")]
200 pub(crate) symbol_positional: Option<String>,
201
202 #[arg(
204 long = "symbol",
205 visible_aliases = ["code", "stock"],
206 conflicts_with = "symbol_positional",
207 value_name = "SYMBOL"
208 )]
209 pub(crate) symbol_arg: Option<String>,
210}
211
212#[derive(Args)]
213pub struct StaticArgs {
214 #[arg(required = true)]
216 pub(crate) symbols: Vec<String>,
217}
218
219#[derive(Args)]
220pub struct BrokerArgs {
221 #[arg(index = 1, value_name = "SYMBOL")]
223 pub(crate) symbol_positional: Option<String>,
224
225 #[arg(
227 long = "symbol",
228 visible_aliases = ["code", "stock"],
229 conflicts_with = "symbol_positional",
230 value_name = "SYMBOL"
231 )]
232 pub(crate) symbol_arg: Option<String>,
233}
234
235#[derive(Args)]
236pub struct PlateListArgs {
237 #[arg(short, long)]
239 pub(crate) market: String,
240
241 #[arg(short = 's', long, visible_alias = "plate-type", default_value = "all")]
244 pub(crate) set: String,
245}
246
247#[derive(Args)]
248pub struct PlateStocksArgs {
249 #[arg(index = 1, value_name = "PLATE")]
251 pub(crate) plate: Option<String>,
252
253 #[arg(long = "plate", conflicts_with = "plate")]
255 pub(crate) plate_arg: Option<String>,
256}
257
258#[derive(Args)]
259pub struct ReferenceArgs {
260 #[arg(index = 1, value_name = "SYMBOL")]
262 pub(crate) symbol_positional: Option<String>,
263
264 #[arg(
266 long = "symbol",
267 visible_aliases = ["code", "stock"],
268 conflicts_with = "symbol_positional",
269 value_name = "SYMBOL"
270 )]
271 pub(crate) symbol_arg: Option<String>,
272
273 #[arg(
275 long = "reference-type",
276 visible_alias = "type",
277 default_value = "warrant"
278 )]
279 pub(crate) reference_type: String,
280}
281
282#[derive(Args)]
283pub struct CapitalFlowArgs {
284 pub(crate) symbol: String,
286 #[arg(long, default_value_t = 1)]
288 pub(crate) period_type: i32,
289 #[arg(long)]
291 pub(crate) begin: Option<String>,
292 #[arg(long)]
294 pub(crate) end: Option<String>,
295}
296
297#[derive(Args)]
298pub struct CompanyProfileArgs {
299 pub(crate) symbol: String,
301}
302
303#[derive(Args)]
304pub struct CompanyExecutivesArgs {
305 pub(crate) symbol: String,
307}
308
309#[derive(Args)]
310pub struct CompanyExecutiveBackgroundArgs {
311 pub(crate) symbol: String,
313 pub(crate) leader_name: String,
315}
316
317#[derive(Args)]
318pub struct CompanyOperationalEfficiencyArgs {
319 pub(crate) symbol: String,
321 #[arg(long, allow_hyphen_values = true)]
323 pub(crate) next_key: Option<String>,
324 #[arg(long)]
326 pub(crate) num: Option<i32>,
327 #[arg(long)]
329 pub(crate) currency_code: Option<String>,
330 #[arg(long)]
332 pub(crate) financial_type: Option<i32>,
333}
334
335#[derive(Args)]
336pub struct FinancialsEarningsPriceMoveArgs {
337 pub(crate) symbol: String,
339 #[arg(long)]
341 pub(crate) period_count: Option<i32>,
342}
343
344#[derive(Args)]
345pub struct FinancialsEarningsPriceHistoryArgs {
346 pub(crate) symbol: String,
348}
349
350#[derive(Args)]
351pub struct FinancialCalendarArgs {
352 #[arg(long)]
354 pub(crate) begin_date: String,
355 #[arg(long)]
357 pub(crate) end_date: String,
358 #[arg(long = "market", visible_alias = "market-list", value_delimiter = ',')]
360 pub(crate) markets: Vec<String>,
361 #[arg(
363 long = "pub-type",
364 visible_alias = "pub-type-list",
365 value_delimiter = ','
366 )]
367 pub(crate) pub_types: Vec<String>,
368 #[arg(
370 long = "stock-type",
371 visible_alias = "stock-type-list",
372 value_delimiter = ','
373 )]
374 pub(crate) stock_types: Vec<String>,
375 #[arg(long)]
377 pub(crate) watchlist_only: bool,
378 #[arg(long)]
380 pub(crate) positions_only: bool,
381 #[arg(long, default_value_t = 6)]
383 pub(crate) count: i32,
384 #[arg(long)]
386 pub(crate) ranking_type: Option<i32>,
387 #[arg(long = "custom-filter", value_name = "TYPE[:MIN[:MAX]]")]
389 pub(crate) custom_filters: Vec<String>,
390 #[arg(
392 long = "estimate-type",
393 visible_alias = "estimate-type-list",
394 value_delimiter = ','
395 )]
396 pub(crate) estimate_types: Vec<String>,
397 #[arg(long = "watchlist-stock-id")]
399 pub(crate) watchlist_stock_ids: Vec<u64>,
400 #[arg(long = "holding-stock-id")]
402 pub(crate) holding_stock_ids: Vec<u64>,
403}
404
405#[derive(Args)]
406pub struct FinancialCalendarTargetArgs {
407 #[arg(long = "stock-id", required = true)]
409 pub(crate) stock_ids: Vec<u64>,
410 #[arg(long = "market", visible_alias = "market-list", value_delimiter = ',')]
412 pub(crate) markets: Vec<String>,
413 #[arg(long, default_value_t = 20)]
415 pub(crate) size: i32,
416 #[arg(long)]
418 pub(crate) start: Option<i32>,
419}
420
421#[derive(Args)]
422pub struct IpoCalendarArgs {
423 #[arg(long)]
425 pub(crate) market: String,
426 #[arg(long = "event", visible_alias = "event-type", value_delimiter = ',')]
428 pub(crate) events: Vec<String>,
429 #[arg(long)]
431 pub(crate) begin_date: Option<String>,
432 #[arg(long)]
434 pub(crate) end_date: Option<String>,
435}
436
437#[derive(Args)]
438pub struct FinancialsStatementsArgs {
439 pub(crate) symbol: String,
441 #[arg(long)]
443 pub(crate) statement_type: Option<i32>,
444 #[arg(long)]
446 pub(crate) financial_type: Option<i32>,
447 #[arg(long)]
449 pub(crate) currency_code: Option<String>,
450 #[arg(long, allow_hyphen_values = true)]
452 pub(crate) next_key: Option<String>,
453 #[arg(long)]
455 pub(crate) num: Option<i32>,
456}
457
458#[derive(Args)]
459pub struct FinancialsRevenueBreakdownArgs {
460 pub(crate) symbol: String,
462 #[arg(long)]
464 pub(crate) date: Option<u32>,
465 #[arg(long)]
467 pub(crate) financial_type: Option<i32>,
468 #[arg(long)]
470 pub(crate) currency_code: Option<String>,
471}
472
473#[derive(Args)]
474pub struct ResearchAnalystConsensusArgs {
475 pub(crate) symbol: String,
477}
478
479#[derive(Args)]
480pub struct ResearchRatingSummaryArgs {
481 pub(crate) symbol: String,
483 #[arg(long)]
485 pub(crate) rating_dimension_type: Option<i32>,
486 #[arg(long)]
488 pub(crate) uid: Option<String>,
489 #[arg(long, allow_hyphen_values = true)]
491 pub(crate) next_key: Option<String>,
492 #[arg(long)]
494 pub(crate) num: Option<i32>,
495}
496
497#[derive(Args)]
498pub struct ResearchMorningstarReportArgs {
499 pub(crate) symbol: String,
501}
502
503#[derive(Args)]
504pub struct ValuationDetailArgs {
505 pub(crate) symbol: String,
507 #[arg(long)]
509 pub(crate) valuation_type: Option<i32>,
510 #[arg(long)]
512 pub(crate) interval_type: Option<i32>,
513}
514
515#[derive(Args)]
516pub struct ValuationPlateStockListArgs {
517 pub(crate) symbol: String,
519 #[arg(long)]
521 pub(crate) valuation_type: Option<i32>,
522 #[arg(long, allow_hyphen_values = true)]
524 pub(crate) next_key: Option<String>,
525 #[arg(long)]
527 pub(crate) num: Option<i32>,
528 #[arg(long)]
530 pub(crate) sort_type: Option<i32>,
531 #[arg(long)]
533 pub(crate) sort_id: Option<i32>,
534 #[arg(long)]
536 pub(crate) filter_security: Option<String>,
537}
538
539#[derive(Args)]
540pub struct StockScreenArgs {
541 #[arg(long = "c2s-json")]
543 pub(crate) c2s_json: String,
544}
545
546#[derive(Args)]
547pub struct OptionScreenArgs {
548 #[arg(long = "c2s-json")]
550 pub(crate) c2s_json: String,
551}
552
553#[derive(Args)]
554pub struct WarrantScreenArgs {
555 #[arg(long = "c2s-json")]
557 pub(crate) c2s_json: String,
558}
559
560#[derive(Args)]
561pub struct TechnicalUnusualArgs {
562 pub(crate) stock_symbol: String,
564 #[arg(long)]
566 pub(crate) time_range: Option<i32>,
567 #[arg(long = "indicator-filter")]
569 pub(crate) indicator_filters: Vec<String>,
570 #[arg(long)]
572 pub(crate) language_id: Option<i32>,
573}
574
575#[derive(Args)]
576pub struct FinancialUnusualArgs {
577 pub(crate) stock_symbol: String,
579 #[arg(long)]
581 pub(crate) time_range: Option<i32>,
582 #[arg(long = "analysis-dimension")]
584 pub(crate) analysis_dimensions: Vec<String>,
585 #[arg(long)]
587 pub(crate) language_id: Option<i32>,
588}
589
590#[derive(Args)]
591pub struct DerivativeUnusualArgs {
592 pub(crate) stock_symbol: String,
594 #[arg(long)]
596 pub(crate) time_range: Option<i32>,
597 #[arg(long = "analysis-dimension")]
599 pub(crate) analysis_dimensions: Vec<String>,
600 #[arg(long)]
602 pub(crate) language_id: Option<i32>,
603}
604
605#[derive(Args)]
606pub struct CorporateActionsDividendsArgs {
607 pub(crate) symbol: String,
609}
610
611#[derive(Args)]
612pub struct CorporateActionsBuybacksArgs {
613 pub(crate) symbol: String,
615 #[arg(long, allow_hyphen_values = true)]
617 pub(crate) next_key: Option<String>,
618 #[arg(long)]
620 pub(crate) num: Option<i32>,
621}
622
623#[derive(Args)]
624pub struct CorporateActionsStockSplitsArgs {
625 pub(crate) symbol: String,
627 #[arg(long, allow_hyphen_values = true)]
629 pub(crate) next_key: Option<String>,
630 #[arg(long)]
632 pub(crate) num: Option<i32>,
633}
634
635#[derive(Args)]
636pub struct DailyShortVolumeArgs {
637 pub(crate) symbol: String,
639 #[arg(long, allow_hyphen_values = true)]
641 pub(crate) next_key: Option<String>,
642 #[arg(long)]
644 pub(crate) num: Option<i32>,
645}
646
647#[derive(Args)]
648pub struct ShortInterestArgs {
649 pub(crate) symbol: String,
651 #[arg(long, allow_hyphen_values = true)]
653 pub(crate) next_key: Option<String>,
654 #[arg(long)]
656 pub(crate) num: Option<i32>,
657}
658
659#[derive(Args)]
660pub struct TopTenBuySellBrokersArgs {
661 pub(crate) symbol: String,
663 #[arg(long)]
665 pub(crate) days_before: Option<i32>,
666}
667
668#[derive(Args)]
669pub struct ShareholdersOverviewArgs {
670 pub(crate) symbol: String,
672 #[arg(long)]
674 pub(crate) period_id: Option<i32>,
675}
676
677#[derive(Args)]
678pub struct ShareholdersHoldingChangesArgs {
679 pub(crate) symbol: String,
681 #[arg(long, allow_hyphen_values = true)]
683 pub(crate) next_key: Option<String>,
684 #[arg(long)]
686 pub(crate) num: Option<i32>,
687 #[arg(long)]
689 pub(crate) sort_type: Option<i32>,
690 #[arg(long)]
692 pub(crate) sort_column: Option<i32>,
693 #[arg(long)]
695 pub(crate) filter_type: Option<i32>,
696}
697
698#[derive(Args)]
699pub struct ShareholdersHolderDetailArgs {
700 pub(crate) symbol: String,
702 #[arg(long)]
704 pub(crate) request_type: Option<i32>,
705 #[arg(long, allow_hyphen_values = true)]
707 pub(crate) next_key: Option<String>,
708 #[arg(long)]
710 pub(crate) num: Option<i32>,
711 #[arg(long)]
713 pub(crate) sort_column: Option<i32>,
714 #[arg(long)]
716 pub(crate) sort_type: Option<i32>,
717 #[arg(long)]
719 pub(crate) period_id: Option<i32>,
720 #[arg(long)]
722 pub(crate) holder_id: Option<i32>,
723}
724
725#[derive(Args)]
726pub struct ShareholdersInstitutionalArgs {
727 pub(crate) symbol: String,
729 #[arg(long, allow_hyphen_values = true)]
731 pub(crate) next_key: Option<String>,
732 #[arg(long)]
734 pub(crate) num: Option<i32>,
735}
736
737#[derive(Args)]
738pub struct InsiderHolderListArgs {
739 pub(crate) symbol: String,
741 #[arg(long, allow_hyphen_values = true)]
743 pub(crate) next_key: Option<String>,
744 #[arg(long)]
746 pub(crate) num: Option<i32>,
747}
748
749#[derive(Args)]
750pub struct InsiderTradeListArgs {
751 pub(crate) symbol: String,
753 #[arg(long)]
755 pub(crate) holder_id: Option<i64>,
756 #[arg(long, allow_hyphen_values = true)]
758 pub(crate) next_key: Option<String>,
759 #[arg(long)]
761 pub(crate) num: Option<i32>,
762}
763
764#[derive(Args)]
765pub struct OptionVolatilityArgs {
766 pub(crate) symbol: String,
768 #[arg(long)]
770 pub(crate) query_time_period: Option<i32>,
771 #[arg(long)]
773 pub(crate) hv_time_period: Option<i32>,
774}
775
776#[derive(Args)]
777pub struct OptionExerciseProbabilityArgs {
778 pub(crate) symbol: String,
780}