1use clap::Args;
4
5#[derive(Args)]
6pub struct ProtoJsonArgs {
7 #[arg(long = "c2s-json", value_name = "JSON")]
12 pub(crate) c2s_json: String,
13}
14
15#[derive(Args)]
16pub struct QuoteArgs {
17 #[arg(required = true)]
19 pub(crate) symbols: Vec<String>,
20}
21
22#[derive(Args)]
23pub struct SnapshotArgs {
24 #[arg(required = true)]
26 pub(crate) symbols: Vec<String>,
27}
28
29#[derive(Args)]
30pub struct SubArgs {
31 #[arg(required = true)]
33 pub(crate) symbols: Vec<String>,
34
35 #[arg(
42 short = 't',
43 long,
44 visible_aliases = ["sub-type", "sub-types", "stype"],
45 default_value = "basic"
46 )]
47 pub(crate) r#type: String,
48}
49
50#[derive(Args)]
51pub struct KlineArgs {
52 #[arg(index = 1, value_name = "SYMBOL")]
54 pub(crate) symbol_positional: Option<String>,
55
56 #[arg(
58 long = "symbol",
59 visible_aliases = ["code", "stock"],
60 conflicts_with = "symbol_positional",
61 value_name = "SYMBOL"
62 )]
63 pub(crate) symbol_arg: Option<String>,
64
65 #[arg(
69 short = 't',
70 long,
71 visible_aliases = ["ktype", "kltype", "kl-type"],
72 default_value = "day"
73 )]
74 pub(crate) r#type: String,
75
76 #[arg(
80 short = 'n',
81 long,
82 visible_aliases = ["num", "max-count", "req-count"]
83 )]
84 pub(crate) count: Option<i32>,
85
86 #[arg(long, visible_aliases = ["begin-time", "from"])]
90 pub(crate) begin: Option<String>,
91
92 #[arg(long, visible_aliases = ["end-time", "to"])]
96 pub(crate) end: Option<String>,
97}
98
99#[derive(Args)]
100pub struct OrderbookArgs {
101 #[arg(index = 1, value_name = "SYMBOL")]
103 pub(crate) symbol_positional: Option<String>,
104
105 #[arg(
107 long = "symbol",
108 visible_aliases = ["code", "stock"],
109 conflicts_with = "symbol_positional",
110 value_name = "SYMBOL"
111 )]
112 pub(crate) symbol_arg: Option<String>,
113
114 #[arg(
118 short = 'n',
119 long,
120 visible_aliases = ["num", "count"],
121 default_value_t = 10
122 )]
123 pub(crate) depth: i32,
124
125 #[arg(long = "odd-lot", visible_alias = "odd")]
127 pub(crate) odd_lot: bool,
128}
129
130#[derive(Args)]
131pub struct TickerArgs {
132 #[arg(index = 1, value_name = "SYMBOL")]
134 pub(crate) symbol_positional: Option<String>,
135
136 #[arg(
138 long = "symbol",
139 visible_aliases = ["code", "stock"],
140 conflicts_with = "symbol_positional",
141 value_name = "SYMBOL"
142 )]
143 pub(crate) symbol_arg: Option<String>,
144
145 #[arg(
149 short = 'n',
150 long,
151 visible_aliases = ["num", "max-count"],
152 default_value_t = 100
153 )]
154 pub(crate) count: i32,
155}
156
157#[derive(Args)]
158pub struct RtArgs {
159 #[arg(index = 1, value_name = "SYMBOL")]
161 pub(crate) symbol_positional: Option<String>,
162
163 #[arg(
165 long = "symbol",
166 visible_aliases = ["code", "stock"],
167 conflicts_with = "symbol_positional",
168 value_name = "SYMBOL"
169 )]
170 pub(crate) symbol_arg: Option<String>,
171}
172
173#[derive(Args)]
174pub struct StaticArgs {
175 #[arg(required = true)]
177 pub(crate) symbols: Vec<String>,
178}
179
180#[derive(Args)]
181pub struct BrokerArgs {
182 #[arg(index = 1, value_name = "SYMBOL")]
184 pub(crate) symbol_positional: Option<String>,
185
186 #[arg(
188 long = "symbol",
189 visible_aliases = ["code", "stock"],
190 conflicts_with = "symbol_positional",
191 value_name = "SYMBOL"
192 )]
193 pub(crate) symbol_arg: Option<String>,
194}
195
196#[derive(Args)]
197pub struct PlateListArgs {
198 #[arg(short, long)]
200 pub(crate) market: String,
201
202 #[arg(short = 's', long, visible_alias = "plate-type", default_value = "all")]
205 pub(crate) set: String,
206}
207
208#[derive(Args)]
209pub struct PlateStocksArgs {
210 #[arg(index = 1, value_name = "PLATE")]
212 pub(crate) plate: Option<String>,
213
214 #[arg(long = "plate", conflicts_with = "plate")]
216 pub(crate) plate_arg: Option<String>,
217}
218
219#[derive(Args)]
220pub struct CapitalFlowArgs {
221 pub(crate) symbol: String,
223 #[arg(long, default_value_t = 1)]
225 pub(crate) period_type: i32,
226 #[arg(long)]
228 pub(crate) begin: Option<String>,
229 #[arg(long)]
231 pub(crate) end: Option<String>,
232}
233
234#[derive(Args)]
235pub struct CompanyProfileArgs {
236 pub(crate) symbol: String,
238}
239
240#[derive(Args)]
241pub struct CompanyExecutivesArgs {
242 pub(crate) symbol: String,
244}
245
246#[derive(Args)]
247pub struct CompanyExecutiveBackgroundArgs {
248 pub(crate) symbol: String,
250 pub(crate) leader_name: String,
252}
253
254#[derive(Args)]
255pub struct CompanyOperationalEfficiencyArgs {
256 pub(crate) symbol: String,
258 #[arg(long, allow_hyphen_values = true)]
260 pub(crate) next_key: Option<String>,
261 #[arg(long)]
263 pub(crate) num: Option<i32>,
264 #[arg(long)]
266 pub(crate) currency_code: Option<String>,
267 #[arg(long)]
269 pub(crate) financial_type: Option<i32>,
270}
271
272#[derive(Args)]
273pub struct FinancialsEarningsPriceMoveArgs {
274 pub(crate) symbol: String,
276 #[arg(long)]
278 pub(crate) period_count: Option<i32>,
279}
280
281#[derive(Args)]
282pub struct FinancialsEarningsPriceHistoryArgs {
283 pub(crate) symbol: String,
285}
286
287#[derive(Args)]
288pub struct FinancialsStatementsArgs {
289 pub(crate) symbol: String,
291 #[arg(long)]
293 pub(crate) statement_type: Option<i32>,
294 #[arg(long)]
296 pub(crate) financial_type: Option<i32>,
297 #[arg(long)]
299 pub(crate) currency_code: Option<String>,
300 #[arg(long, allow_hyphen_values = true)]
302 pub(crate) next_key: Option<String>,
303 #[arg(long)]
305 pub(crate) num: Option<i32>,
306}
307
308#[derive(Args)]
309pub struct FinancialsRevenueBreakdownArgs {
310 pub(crate) symbol: String,
312 #[arg(long)]
314 pub(crate) date: Option<u32>,
315 #[arg(long)]
317 pub(crate) financial_type: Option<i32>,
318 #[arg(long)]
320 pub(crate) currency_code: Option<String>,
321}
322
323#[derive(Args)]
324pub struct ResearchAnalystConsensusArgs {
325 pub(crate) symbol: String,
327}
328
329#[derive(Args)]
330pub struct ResearchRatingSummaryArgs {
331 pub(crate) symbol: String,
333 #[arg(long)]
335 pub(crate) rating_dimension_type: Option<i32>,
336 #[arg(long)]
338 pub(crate) uid: Option<String>,
339 #[arg(long, allow_hyphen_values = true)]
341 pub(crate) next_key: Option<String>,
342 #[arg(long)]
344 pub(crate) num: Option<i32>,
345}
346
347#[derive(Args)]
348pub struct ResearchMorningstarReportArgs {
349 pub(crate) symbol: String,
351}
352
353#[derive(Args)]
354pub struct ValuationDetailArgs {
355 pub(crate) symbol: String,
357 #[arg(long)]
359 pub(crate) valuation_type: Option<i32>,
360 #[arg(long)]
362 pub(crate) interval_type: Option<i32>,
363}
364
365#[derive(Args)]
366pub struct ValuationPlateStockListArgs {
367 pub(crate) symbol: String,
369 #[arg(long)]
371 pub(crate) valuation_type: Option<i32>,
372 #[arg(long, allow_hyphen_values = true)]
374 pub(crate) next_key: Option<String>,
375 #[arg(long)]
377 pub(crate) num: Option<i32>,
378 #[arg(long)]
380 pub(crate) sort_type: Option<i32>,
381 #[arg(long)]
383 pub(crate) sort_id: Option<i32>,
384 #[arg(long)]
386 pub(crate) filter_security: Option<String>,
387}
388
389#[derive(Args)]
390pub struct StockScreenArgs {
391 #[arg(long = "c2s-json")]
393 pub(crate) c2s_json: String,
394}
395
396#[derive(Args)]
397pub struct OptionScreenArgs {
398 #[arg(long = "c2s-json")]
400 pub(crate) c2s_json: String,
401}
402
403#[derive(Args)]
404pub struct WarrantScreenArgs {
405 #[arg(long = "c2s-json")]
407 pub(crate) c2s_json: String,
408}
409
410#[derive(Args)]
411pub struct TechnicalUnusualArgs {
412 pub(crate) stock_symbol: String,
414 #[arg(long)]
416 pub(crate) time_range: Option<i32>,
417 #[arg(long = "indicator-filter")]
419 pub(crate) indicator_filters: Vec<String>,
420 #[arg(long)]
422 pub(crate) language_id: Option<i32>,
423}
424
425#[derive(Args)]
426pub struct FinancialUnusualArgs {
427 pub(crate) stock_symbol: String,
429 #[arg(long)]
431 pub(crate) time_range: Option<i32>,
432 #[arg(long = "analysis-dimension")]
434 pub(crate) analysis_dimensions: Vec<String>,
435 #[arg(long)]
437 pub(crate) language_id: Option<i32>,
438}
439
440#[derive(Args)]
441pub struct DerivativeUnusualArgs {
442 pub(crate) stock_symbol: String,
444 #[arg(long)]
446 pub(crate) time_range: Option<i32>,
447 #[arg(long = "analysis-dimension")]
449 pub(crate) analysis_dimensions: Vec<String>,
450 #[arg(long)]
452 pub(crate) language_id: Option<i32>,
453}
454
455#[derive(Args)]
456pub struct CorporateActionsDividendsArgs {
457 pub(crate) symbol: String,
459}
460
461#[derive(Args)]
462pub struct CorporateActionsBuybacksArgs {
463 pub(crate) symbol: String,
465 #[arg(long, allow_hyphen_values = true)]
467 pub(crate) next_key: Option<String>,
468 #[arg(long)]
470 pub(crate) num: Option<i32>,
471}
472
473#[derive(Args)]
474pub struct CorporateActionsStockSplitsArgs {
475 pub(crate) symbol: String,
477 #[arg(long, allow_hyphen_values = true)]
479 pub(crate) next_key: Option<String>,
480 #[arg(long)]
482 pub(crate) num: Option<i32>,
483}
484
485#[derive(Args)]
486pub struct DailyShortVolumeArgs {
487 pub(crate) symbol: 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 ShortInterestArgs {
499 pub(crate) symbol: String,
501 #[arg(long, allow_hyphen_values = true)]
503 pub(crate) next_key: Option<String>,
504 #[arg(long)]
506 pub(crate) num: Option<i32>,
507}
508
509#[derive(Args)]
510pub struct TopTenBuySellBrokersArgs {
511 pub(crate) symbol: String,
513 #[arg(long)]
515 pub(crate) days_before: Option<i32>,
516}
517
518#[derive(Args)]
519pub struct ShareholdersOverviewArgs {
520 pub(crate) symbol: String,
522 #[arg(long)]
524 pub(crate) period_id: Option<i32>,
525}
526
527#[derive(Args)]
528pub struct ShareholdersHoldingChangesArgs {
529 pub(crate) symbol: String,
531 #[arg(long, allow_hyphen_values = true)]
533 pub(crate) next_key: Option<String>,
534 #[arg(long)]
536 pub(crate) num: Option<i32>,
537 #[arg(long)]
539 pub(crate) sort_type: Option<i32>,
540 #[arg(long)]
542 pub(crate) sort_column: Option<i32>,
543 #[arg(long)]
545 pub(crate) filter_type: Option<i32>,
546}
547
548#[derive(Args)]
549pub struct ShareholdersHolderDetailArgs {
550 pub(crate) symbol: String,
552 #[arg(long)]
554 pub(crate) request_type: Option<i32>,
555 #[arg(long, allow_hyphen_values = true)]
557 pub(crate) next_key: Option<String>,
558 #[arg(long)]
560 pub(crate) num: Option<i32>,
561 #[arg(long)]
563 pub(crate) sort_column: Option<i32>,
564 #[arg(long)]
566 pub(crate) sort_type: Option<i32>,
567 #[arg(long)]
569 pub(crate) period_id: Option<i32>,
570 #[arg(long)]
572 pub(crate) holder_id: Option<i32>,
573}
574
575#[derive(Args)]
576pub struct ShareholdersInstitutionalArgs {
577 pub(crate) symbol: String,
579 #[arg(long, allow_hyphen_values = true)]
581 pub(crate) next_key: Option<String>,
582 #[arg(long)]
584 pub(crate) num: Option<i32>,
585}
586
587#[derive(Args)]
588pub struct InsiderHolderListArgs {
589 pub(crate) symbol: String,
591 #[arg(long, allow_hyphen_values = true)]
593 pub(crate) next_key: Option<String>,
594 #[arg(long)]
596 pub(crate) num: Option<i32>,
597}
598
599#[derive(Args)]
600pub struct InsiderTradeListArgs {
601 pub(crate) symbol: String,
603 #[arg(long)]
605 pub(crate) holder_id: Option<i64>,
606 #[arg(long, allow_hyphen_values = true)]
608 pub(crate) next_key: Option<String>,
609 #[arg(long)]
611 pub(crate) num: Option<i32>,
612}
613
614#[derive(Args)]
615pub struct OptionVolatilityArgs {
616 pub(crate) symbol: String,
618 #[arg(long)]
620 pub(crate) query_time_period: Option<i32>,
621 #[arg(long)]
623 pub(crate) hv_time_period: Option<i32>,
624}
625
626#[derive(Args)]
627pub struct OptionExerciseProbabilityArgs {
628 pub(crate) symbol: String,
630}