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