deriv_api_schema/available_item.rs
1
2// Generated automatically by schema_generator.rs - DO NOT EDIT.
3// Source: ./deriv-api-docs/config/v3/contracts_for/receive.json
4
5// Use direct crate names for imports within generated files
6use serde::{Deserialize, Serialize};
7use serde_json::Value;
8
9
10
11// Import shared types from the *same* crate
12use crate::forward_starting_option_item::ForwardStartingOptionItem;
13
14// It's a struct
15#[derive(Debug, Clone, Serialize, Deserialize)]
16#[serde(rename_all = "snake_case")]
17pub struct AvailableItem {
18 /// Array of available barriers for a predefined trading period\n
19 // Correct serde attribute construction - Use helper
20 #[serde(skip_serializing_if = "Option::is_none")]
21 pub available_barriers: Option<Vec<Value>>,
22 /// Barrier Details.\n
23 // Correct serde attribute construction - Use helper
24 #[serde(skip_serializing_if = "Option::is_none")]
25 pub barrier: Option<Value>,
26 /// Category of barrier.\n
27 // Correct serde attribute construction - Use helper
28
29 pub barrier_category: String,
30 /// [Only for Vanilla] Barrier Choices\n
31 // Correct serde attribute construction - Use helper
32 #[serde(skip_serializing_if = "Option::is_none")]
33 pub barrier_choices: Option<Vec<Value>>,
34 /// Number of barriers.\n
35 // Correct serde attribute construction - Use helper
36
37 pub barriers: f64,
38 /// Cancellation range\n
39 // Correct serde attribute construction - Use helper
40 #[serde(skip_serializing_if = "Option::is_none")]
41 pub cancellation_range: Option<Vec<Value>>,
42 /// Category of contract.\n
43 // Correct serde attribute construction - Use helper
44
45 pub contract_category: String,
46 /// Category of the contract.\n
47 // Correct serde attribute construction - Use helper
48
49 pub contract_category_display: String,
50 /// Display name for the type of contract.\n
51 // Correct serde attribute construction - Use helper
52 #[serde(skip_serializing_if = "Option::is_none")]
53 pub contract_display: Option<String>,
54 /// Type of contract.\n
55 // Correct serde attribute construction - Use helper
56
57 pub contract_type: String,
58 /// Default stake for the contract\n
59 // Correct serde attribute construction - Use helper
60 #[serde(skip_serializing_if = "Option::is_none")]
61 pub default_stake: Option<f64>,
62 /// [Only for Turbos] Its selected payout per point\n
63 // Correct serde attribute construction - Use helper
64 #[serde(skip_serializing_if = "Option::is_none")]
65 pub display_number_of_contracts: Option<f64>,
66 /// [Only for Snowball] Available contract durations in seconds.\n
67 // Correct serde attribute construction - Use helper
68 #[serde(skip_serializing_if = "Option::is_none")]
69 pub duration_choices: Option<Vec<i64>>,
70 /// Name of exchange\n
71 // Correct serde attribute construction - Use helper
72
73 pub exchange_name: String,
74 /// Array of barriers already expired\n
75 // Correct serde attribute construction - Use helper
76 #[serde(skip_serializing_if = "Option::is_none")]
77 pub expired_barriers: Option<Vec<Value>>,
78 /// Expiry Type.\n
79 // Correct serde attribute construction - Use helper
80
81 pub expiry_type: String,
82 /// Array of returned forward starting options\n
83 // Correct serde attribute construction - Use helper
84 #[serde(skip_serializing_if = "Option::is_none")]
85 pub forward_starting_options: Option<Vec<ForwardStartingOptionItem>>,
86 /// Growth rate range.\n
87 // Correct serde attribute construction - Use helper
88 #[serde(skip_serializing_if = "Option::is_none")]
89 pub growth_rate_range: Option<Vec<Value>>,
90 /// High barrier Details.\n
91 // Correct serde attribute construction - Use helper
92 #[serde(skip_serializing_if = "Option::is_none")]
93 pub high_barrier: Option<Value>,
94 /// Last digit range\n
95 // Correct serde attribute construction - Use helper
96 #[serde(skip_serializing_if = "Option::is_none")]
97 pub last_digit_range: Option<Vec<Value>>,
98 /// Low barrier Details.\n
99 // Correct serde attribute construction - Use helper
100 #[serde(skip_serializing_if = "Option::is_none")]
101 pub low_barrier: Option<Value>,
102 /// Type of market.\n
103 // Correct serde attribute construction - Use helper
104
105 pub market: String,
106 /// Maximum contract duration\n
107 // Correct serde attribute construction - Use helper
108
109 pub max_contract_duration: String,
110 /// [Only for turbos options] Maximum contract stake\n
111 // Correct serde attribute construction - Use helper
112 #[serde(skip_serializing_if = "Option::is_none")]
113 pub max_stake: Option<Value>,
114 /// Minimum contract duration.\n
115 // Correct serde attribute construction - Use helper
116
117 pub min_contract_duration: String,
118 /// [Only for turbos options] Minimum contract stake\n
119 // Correct serde attribute construction - Use helper
120 #[serde(skip_serializing_if = "Option::is_none")]
121 pub min_stake: Option<Value>,
122 /// Multiplier range.\n
123 // Correct serde attribute construction - Use helper
124 #[serde(skip_serializing_if = "Option::is_none")]
125 pub multiplier_range: Option<Vec<Value>>,
126 /// [Only for Turbos] Payout Choices\n
127 // Correct serde attribute construction - Use helper
128 #[serde(skip_serializing_if = "Option::is_none")]
129 pub payout_choices: Option<Vec<Value>>,
130 /// Maximum payout.\n
131 // Correct serde attribute construction - Use helper
132 #[serde(skip_serializing_if = "Option::is_none")]
133 pub payout_limit: Option<f64>,
134 /// Type of sentiment.\n
135 // Correct serde attribute construction - Use helper
136
137 pub sentiment: String,
138 /// Start Type.\n
139 // Correct serde attribute construction - Use helper
140
141 pub start_type: String,
142 /// Type of submarket.\n
143 // Correct serde attribute construction - Use helper
144
145 pub submarket: String,
146 /// [Only for Snowball] Available risk profile options.\n
147 // Correct serde attribute construction - Use helper
148 #[serde(skip_serializing_if = "Option::is_none")]
149 pub trade_risk_profile_choices: Option<Vec<String>>,
150 /// A hash of predefined trading period\n
151 // Correct serde attribute construction - Use helper
152 #[serde(skip_serializing_if = "Option::is_none")]
153 pub trading_period: Option<Value>,
154 /// Symbol code\n
155 // Correct serde attribute construction - Use helper
156
157 pub underlying_symbol: String,
158}
159