1use serde::{Deserialize, Serialize};
10use serde_json::Value;
11
12use crate::serde_utils;
13
14#[derive(Debug, Clone, Default, Serialize, Deserialize)]
16#[serde(default)]
17pub struct FundNavValue {
18 pub change: String,
20 pub change_percent: String,
22 pub change_percent_format: String,
24 pub counter_id: String,
26 pub counter_name: String,
28 pub currency: String,
30 pub date_format: String,
32 pub isin: String,
34 #[serde(with = "serde_utils::int64_str")]
36 pub last_update_time: i64,
37 pub value: String,
39 pub value_format: String,
41}
42
43#[derive(Debug, Clone, Default, Serialize, Deserialize)]
45#[serde(default)]
46pub struct FundPerformancePoint {
47 pub date: String,
49 pub last_done: String,
51}
52
53#[derive(Debug, Clone, Default, Serialize, Deserialize)]
55#[serde(default)]
56pub struct HotFund {
57 pub asset_class: i32,
59 pub asset_class_name: String,
61 pub counter_id: String,
63 pub currency: String,
65 pub earning_rate: String,
67 pub fund_performances: Vec<FundPerformancePoint>,
69 pub name: String,
71 pub purchase_amount: String,
73 pub recommendation_text: String,
75 pub risk_level: i32,
77 pub risk_level_name: String,
79 pub time_interval: String,
81}
82
83#[derive(Debug, Clone, Default, Serialize, Deserialize)]
85#[serde(default)]
86pub struct FundBrief {
87 pub asset_class: i32,
89 pub asset_class_name: String,
91 pub code: String,
93 pub counter_id: String,
95 pub currency: String,
97 pub description: String,
99 pub earning_rate: String,
101 pub holding: bool,
103 pub isin: String,
105 pub name: String,
107 pub product: String,
109 pub purchase_amount: String,
111 pub recommendation_text: String,
113 pub risk_level: i32,
115 pub risk_level_name: String,
117 pub time_interval: String,
119 pub unit_value: String,
121}
122
123#[derive(Debug, Clone, Default, Serialize, Deserialize)]
125#[serde(default)]
126pub struct FundFilters {
127 pub asset_class: Vec<Value>,
129 pub company: Vec<Value>,
131 pub currency: Vec<Value>,
133 pub industry_category_name: Vec<Value>,
135 pub risk_level: Vec<Value>,
137}
138
139#[derive(Debug, Clone, Default, Serialize, Deserialize)]
141#[serde(default)]
142pub struct FundAssetAllocationItem {
143 pub code: String,
145 pub counter_id: String,
147 pub name: String,
149 pub position_ratio: String,
151}
152
153#[derive(Debug, Clone, Default, Serialize, Deserialize)]
155#[serde(default)]
156pub struct FundAssetAllocation {
157 pub asset_type: i32,
159 pub lists: Vec<FundAssetAllocationItem>,
161 pub report_date: String,
163}
164
165#[derive(Debug, Clone, Default, Serialize, Deserialize)]
167#[serde(default)]
168pub struct FundDetail {
169 pub additional_purchase_amount: String,
171 pub affirm_day: i32,
173 pub amount_affirm_day: String,
175 #[serde(default)]
177 pub asset_allocation: Option<FundAssetAllocation>,
178 pub asset_class: i32,
180 pub asset_class_name: String,
182 pub bill_purchase_rate: String,
184 pub channel: String,
186 pub close_period: String,
188 pub code: String,
190 pub currency: String,
192 pub cut_off_time: String,
194 pub derivatives: bool,
196 pub done_day: i32,
198 pub excess_return_fee: String,
200 pub gst_rate: String,
202 pub introduce: String,
204 pub is_cash_plus: bool,
206 pub is_complex: bool,
208 pub is_new_cash_plus: bool,
210 pub is_yinghebao: bool,
212 pub isin: String,
214 pub manage_rate: String,
216 pub manager: String,
218 pub min_hold_cash: String,
220 pub min_hold_share: String,
222 pub min_sell_share: String,
224 pub month_raise_day: String,
226 pub name: String,
228 pub nav_deadline: String,
230 pub no_load: bool,
232 pub open_date: String,
234 pub open_period: String,
236 pub product: String,
238 pub product_information_locals: String,
240 pub profile: String,
242 pub purchasable: i32,
244 pub purchase_affirm_day: String,
246 pub purchase_amount: String,
248 pub purchase_rate: String,
250 pub rating: i32,
252 pub redeemable: i32,
254 pub redemption_advance_day: String,
256 pub redemption_amount: String,
258 pub redemption_close_period_shows: String,
260 pub redemption_done_day: String,
262 pub redemption_open_day_shows: String,
264 pub risk_level: i32,
266 pub risk_level_name: String,
268 pub verify_status: i32,
270 pub virtual_currency: bool,
272 pub year_to_date_yield: String,
274 pub ytd_yield_type: i32,
276}
277
278#[derive(Debug, Clone, Default, Serialize, Deserialize)]
280#[serde(default)]
281pub struct FundAnalysis {
282 pub actual_period: i32,
284 pub cost_level: Value,
286 pub return_ability: Value,
288 pub risk_ability: Value,
290 pub updated_at: String,
292 pub value_for_money: Value,
294 pub visible: bool,
296}
297
298#[derive(Debug, Clone, Default, Serialize, Deserialize)]
300#[serde(default)]
301pub struct FundAnalysisDetail {
302 pub actual_period: i32,
304 pub available_periods: Vec<i32>,
306 pub cost_level: Value,
308 pub return_ability: Value,
310 pub risk_ability: Value,
312 pub updated_at: String,
314 pub value_for_money: Value,
316 pub visible: bool,
318}
319
320#[derive(Debug, Clone, Default, Serialize, Deserialize)]
322#[serde(default)]
323pub struct FundTrendContrast {
324 pub benchmark_name: String,
326 pub performances: Vec<Value>,
328}
329
330#[derive(Debug, Clone, Default, Serialize, Deserialize)]
332#[serde(default)]
333pub struct FundTrend {
334 pub actual_period: i32,
336 pub available_periods: Vec<i32>,
338 pub category_average_performances: Vec<Value>,
340 #[serde(default)]
342 pub contrast_performances: Option<FundTrendContrast>,
343 pub fund_performances: Vec<Value>,
345}
346
347#[derive(Debug, Clone, Default, Serialize, Deserialize)]
349#[serde(default)]
350pub struct FundNamedContrast {
351 pub name: String,
353 pub performances: Vec<Value>,
355}
356
357#[derive(Debug, Clone, Default, Serialize, Deserialize)]
359#[serde(default)]
360pub struct FundPerformanceComparison {
361 pub contrast_performances: Vec<FundNamedContrast>,
363 pub fund_performances: Vec<Value>,
365}
366
367#[derive(Debug, Clone, Default, Serialize, Deserialize)]
369#[serde(default)]
370pub struct FundAnnualReturn {
371 pub change_percent: String,
373 pub year: i32,
375}
376
377#[derive(Debug, Clone, Default, Serialize, Deserialize)]
379#[serde(default)]
380pub struct FundQuarterlyReturn {
381 pub change_percent: String,
383 pub quarter: i32,
385 pub year: i32,
387}
388
389#[derive(Debug, Clone, Default, Serialize, Deserialize)]
391#[serde(default)]
392pub struct FundPerformance {
393 pub annualized_return_five: String,
395 pub annualized_return_one: String,
397 pub annualized_return_ten: String,
399 pub annualized_return_three: String,
401 pub annualized_return_two: String,
403 pub counter_id: String,
405 pub fund_name: String,
407 pub performance_rank_five_years: i32,
409 pub performance_rank_one_day: i32,
411 pub performance_rank_one_month: i32,
413 pub performance_rank_one_week: i32,
415 pub performance_rank_one_year: i32,
417 pub performance_rank_six_months: i32,
419 pub performance_rank_ten_years: i32,
421 pub performance_rank_three_months: i32,
423 pub performance_rank_three_years: i32,
425 pub performance_rank_two_years: i32,
427 pub performance_rank_ytd: i32,
429 pub performance_return_five_years: String,
431 pub performance_return_one_day: String,
433 pub performance_return_one_month: String,
435 pub performance_return_one_week: String,
437 pub performance_return_one_year: String,
439 pub performance_return_six_months: String,
441 pub performance_return_ten_years: String,
443 pub performance_return_three_months: String,
445 pub performance_return_three_years: String,
447 pub performance_return_two_years: String,
449 pub performance_return_ytd: String,
451 pub performance_total_five_years: i32,
453 pub performance_total_one_day: i32,
455 pub performance_total_one_month: i32,
457 pub performance_total_one_week: i32,
459 pub performance_total_one_year: i32,
461 pub performance_total_six_months: i32,
463 pub performance_total_ten_years: i32,
465 pub performance_total_three_months: i32,
467 pub performance_total_three_years: i32,
469 pub performance_total_two_years: i32,
471 pub performance_total_ytd: i32,
473 pub seven_days_annualized: String,
475 pub ten_thousand_price: String,
477 #[serde(with = "serde_utils::int64_str")]
479 pub update_time: i64,
480}
481
482#[derive(Debug, Clone, Default, Serialize, Deserialize)]
484#[serde(default)]
485pub struct FundHolding {
486 pub bond_type: String,
488 pub bond_type_name: String,
490 pub country_name: String,
492 pub holding_type: String,
494 pub industry_name: String,
496 pub market_value: String,
498 pub maturity_date: String,
500 pub name: String,
502 pub share_change: String,
504 pub share_change_percent: String,
506 pub shares: String,
508 pub weighting: String,
510}
511
512#[derive(Debug, Clone, Default, Serialize, Deserialize)]
514#[serde(default)]
515pub struct FundHoldings {
516 pub holdings: Vec<FundHolding>,
518 pub report_date: String,
520 pub weighting: String,
522}
523
524#[derive(Debug, Clone, Default, Serialize, Deserialize)]
526#[serde(default)]
527pub struct FundStockHolding {
528 pub code: String,
530 pub counter_id: String,
532 pub currency: String,
534 pub name: String,
536 pub position_ratio: String,
538 pub report_date: String,
540}
541
542#[derive(Debug, Clone, Default, Serialize, Deserialize)]
544#[serde(default)]
545pub struct FundPosition {
546 pub amount: String,
548 pub counter_id: String,
550 pub currency: String,
552 pub freeze_units: String,
554 pub holding_profit: String,
556 pub holding_units: String,
558 pub name: String,
560 pub recent_profit: String,
562 #[serde(with = "serde_utils::int64_str")]
564 pub recent_trading_day: i64,
565 pub sum_recent_profit: String,
567}
568
569#[derive(Debug, Clone, Default, Serialize, Deserialize)]
571#[serde(default)]
572pub struct FundPositions {
573 pub account_channel: String,
575 pub list: Vec<FundPosition>,
577 pub pending_buy_orders: String,
579 #[serde(with = "serde_utils::int64_str")]
581 pub recent_trading_day: i64,
582 pub sold_pending_credit_orders: String,
584}
585
586#[derive(Debug, Clone, Default, Serialize, Deserialize)]
588#[serde(default)]
589pub struct FundDatedValue {
590 #[serde(with = "serde_utils::int64_str")]
592 pub date: i64,
593 pub value: String,
595}
596
597#[derive(Debug, Clone, Default, Serialize, Deserialize)]
599#[serde(default)]
600pub struct FundUnitValue {
601 #[serde(with = "serde_utils::int64_str")]
603 pub date: i64,
604 pub day_increase_rate: String,
606 pub total_value: String,
608 pub unit_value: String,
610}
611
612#[derive(Debug, Clone, Default, Serialize, Deserialize)]
614#[serde(default)]
615pub struct FundPositionDetailValues {
616 pub amount: String,
618 pub currency: String,
620 pub holding_cost: String,
622 pub holding_profit: String,
624 pub holding_profit_rate: String,
626 pub holding_units: String,
628 pub holding_value: String,
630 pub pending_buy_value: String,
632 pub pending_sell_value: String,
634 pub profit_amount_accum_td: String,
636 pub profit_amount_accum_td_rate: String,
638 pub recent_profit: String,
640 #[serde(with = "serde_utils::int64_str")]
642 pub recent_tradingday: i64,
643 pub recent_unit_value: String,
645 pub sold_pending_confirm_units: String,
647}
648
649#[derive(Debug, Clone, Default, Serialize, Deserialize)]
651#[serde(default)]
652pub struct FundPositionDetail {
653 #[serde(default)]
655 pub detail_values: Option<FundPositionDetailValues>,
656 pub sum_profit: Vec<FundDatedValue>,
658 pub ut_value: Vec<FundUnitValue>,
660}
661
662#[derive(Debug, Clone, Default, Serialize, Deserialize)]
664#[serde(default)]
665pub struct FundPositionPerformance {
666 pub annualized_return_five: String,
668 pub annualized_return_one: String,
670 pub annualized_return_ten: String,
672 pub annualized_return_three: String,
674 pub annualized_return_two: String,
676 pub counter_id: String,
678 pub fund_name: String,
680 pub performance_return_five_years: String,
682 pub performance_return_one_day: String,
684 pub performance_return_one_month: String,
686 pub performance_return_one_week: String,
688 pub performance_return_one_year: String,
690 pub performance_return_six_months: String,
692 pub performance_return_ten_years: String,
694 pub performance_return_three_months: String,
696 pub performance_return_three_years: String,
698 pub performance_return_two_years: String,
700 pub performance_return_ytd: String,
702 #[serde(with = "serde_utils::int64_str")]
704 pub update_time: i64,
705}
706
707#[derive(Debug, Clone, Default, Serialize, Deserialize)]
709#[serde(default)]
710pub struct FundPositionProfits {
711 pub currency: String,
713 pub history_value: Vec<FundDatedValue>,
715 #[serde(with = "serde_utils::int64_str")]
717 pub last_update_time: i64,
718 pub sum_profit: String,
720}
721
722#[derive(Debug, Clone, Default, Serialize, Deserialize)]
724#[serde(default)]
725pub struct FundPositionNav {
726 pub change: String,
728 pub change_percent: String,
730 pub counter_id: String,
732 pub counter_name: String,
734 #[serde(with = "serde_utils::int64_str")]
736 pub last_update_time: i64,
737 pub value: String,
739}
740
741#[derive(Debug, Clone, Default, Serialize, Deserialize)]
743#[serde(default)]
744pub struct FundDividend {
745 pub amount: String,
747 pub counter_id: String,
749 pub currency: String,
751 #[serde(with = "serde_utils::int64_str")]
753 pub date: i64,
754 pub div_method: String,
756 pub name: String,
758}
759
760#[derive(Debug, Clone, Default, Serialize, Deserialize)]
762#[serde(default)]
763pub struct FundDividends {
764 pub currency: String,
766 pub div_cash_infos: Vec<FundDividend>,
768 #[serde(with = "serde_utils::int64_str")]
770 pub lastest_date: i64,
771 pub total_div_cash: String,
773}
774
775#[derive(Debug, Clone, Default, Serialize, Deserialize)]
777#[serde(default)]
778pub struct FundOrder {
779 pub action: String,
781 pub amount: String,
783 pub counter_id: String,
785 #[serde(with = "serde_utils::int64_str")]
787 pub created_at: i64,
788 pub currency: String,
790 pub fund_name: String,
792 #[serde(with = "serde_utils::int64_str")]
794 pub id: i64,
795 pub is_auto: bool,
797 pub net_worth: String,
799 pub product_type: String,
801 pub state: String,
803 pub state_desc: String,
805 pub units: String,
807}
808
809#[derive(Debug, Clone, Default, Serialize, Deserialize)]
811#[serde(default)]
812pub struct FundOrderKeyword {
813 pub content: String,
815 pub group: String,
817 pub key: String,
819 pub line_strategy: String,
821 pub title: String,
823}
824
825#[derive(Debug, Clone, Default, Serialize, Deserialize)]
827#[serde(default)]
828pub struct FundOrderStage {
829 pub desc: String,
831 pub key: String,
833 pub link: String,
835 pub link_text: String,
837 pub progress: String,
839 pub stage: String,
841}
842
843#[derive(Debug, Clone, Default, Serialize, Deserialize)]
845#[serde(default)]
846pub struct FundOrderInfo {
847 #[serde(with = "serde_utils::int64_str")]
849 pub aaid: i64,
850 pub account_channel: String,
852 pub action: String,
854 pub amount: String,
856 pub channel: String,
858 pub counter_id: String,
860 #[serde(with = "serde_utils::int64_str")]
862 pub created_at: i64,
863 pub currency: String,
865 pub dividend_option: String,
867 #[serde(with = "serde_utils::int64_str")]
869 pub eq_at: i64,
870 pub fee: String,
872 pub fund_name: String,
874 pub fund_source: String,
876 pub histories: String,
878 #[serde(with = "serde_utils::int64_str")]
880 pub id: i64,
881 pub message: String,
883 pub net_worth: String,
885 #[serde(with = "serde_utils::int64_str")]
887 pub price_at: i64,
888 #[serde(with = "serde_utils::int64_str")]
890 pub processed_at: i64,
891 pub product_type: String,
893 pub repurchaseable: bool,
895 pub sale_proceeds: String,
897 pub sales_charge: String,
899 pub sales_price: String,
901 pub sales_unit: String,
903 pub state: String,
905 pub state_desc: String,
907 pub status: i32,
909 pub status_ex: i32,
911 pub t_description: String,
913 pub time_partition: String,
915 pub total_amount: String,
917 #[serde(with = "serde_utils::int64_str")]
919 pub transaction_at: i64,
920 pub units: String,
922 #[serde(with = "serde_utils::int64_str")]
924 pub withdraw_at: i64,
925 pub withdrawable: bool,
927}
928
929#[derive(Debug, Clone, Default, Serialize, Deserialize)]
931#[serde(default)]
932pub struct FundOrderDetail {
933 pub keywords: Vec<FundOrderKeyword>,
935 #[serde(default)]
937 pub order: Option<FundOrderInfo>,
938 pub stages: Vec<FundOrderStage>,
940}
941
942#[derive(Debug, Clone, Default, Serialize, Deserialize)]
944#[serde(default)]
945pub struct FundTransaction {
946 pub amount: String,
948 pub category: String,
950 #[serde(with = "serde_utils::int64_str")]
952 pub created_at: i64,
953 pub currency: String,
955 pub description: String,
957 #[serde(with = "serde_utils::int64_str")]
959 pub detail_created_at: i64,
960 pub detail_type: String,
962 #[serde(with = "serde_utils::int64_str")]
964 pub done_at: i64,
965 pub quantity_description: String,
967 pub redirect_page: String,
969 pub redirect_page_v2: String,
971 pub ref_no: String,
973 pub stock_quantity: String,
975 pub tx_type: String,
977 pub type_name: String,
979}
980
981#[derive(Debug, Clone, Default, Serialize, Deserialize)]
983#[serde(default)]
984pub struct FundOrderValidation {
985 pub auth_token: String,
987 pub eval_address: String,
989 pub fund_risk_level: i32,
991 pub msg: String,
993 pub user_pi: i32,
995 pub user_risk_level: i32,
997}
998
999#[derive(Debug, Clone, Default, Serialize, Deserialize)]
1001#[serde(default)]
1002pub struct FundOrderSubmitResponse {
1003 pub action: String,
1005 pub amount: String,
1007 pub counter_id: String,
1009 #[serde(with = "serde_utils::int64_str")]
1011 pub created_at: i64,
1012 pub fund_name: String,
1014 #[serde(with = "serde_utils::int64_str")]
1016 pub id: i64,
1017 pub msg: String,
1019 pub status: i32,
1021 pub units: String,
1023}