1#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Etf {
6 #[prost(uint64, tag="1")]
8 pub id: u64,
9 #[prost(string, tag="2")]
11 pub symbol: ::prost::alloc::string::String,
12 #[prost(string, tag="3")]
14 pub code: ::prost::alloc::string::String,
15 #[prost(string, tag="4")]
17 pub name: ::prost::alloc::string::String,
18 #[prost(string, tag="5")]
20 pub prev_close: ::prost::alloc::string::String,
21 #[prost(string, tag="6")]
22 pub prev_close_nav: ::prost::alloc::string::String,
23 #[prost(string, tag="7")]
24 pub last_price: ::prost::alloc::string::String,
25 #[prost(string, tag="8")]
26 pub last_ask_inav: ::prost::alloc::string::String,
27 #[prost(string, tag="9")]
28 pub last_bid_inav: ::prost::alloc::string::String,
29 #[prost(map="string, message", tag="10")]
31 pub constituents: ::std::collections::HashMap<::prost::alloc::string::String, EtfPdfConstituent>,
32 #[prost(int64, tag="11")]
34 pub creation_unit: i64,
35 #[prost(enumeration="ReplicationMethod", tag="12")]
37 pub replication_method: i32,
38 #[prost(int64, tag="13")]
40 pub tick_size: i64,
41 #[prost(int64, tag="14")]
43 pub listed_quantity: i64,
44 #[prost(float, tag="15")]
45 pub leverage: f32,
46 #[prost(bool, tag="16")]
47 pub tradable: bool,
48 #[prost(bool, tag="17")]
49 pub short_sellable: bool,
50 #[prost(bool, tag="23")]
51 pub cash_creditable: bool,
52 #[prost(int64, tag="24")]
53 pub cash_creation_amount: i64,
54}
55#[allow(clippy::derive_partial_eq_without_eq)]
56#[derive(Clone, PartialEq, ::prost::Message)]
57pub struct EtfConstituent {
58 #[prost(oneof="etf_constituent::ConstituentType", tags="1, 2, 3")]
59 pub constituent_type: ::core::option::Option<etf_constituent::ConstituentType>,
60}
61pub mod etf_constituent {
63 #[allow(clippy::derive_partial_eq_without_eq)]
64#[derive(Clone, PartialEq, ::prost::Oneof)]
65 pub enum ConstituentType {
66 #[prost(message, tag="1")]
67 Stock(super::StockConstituent),
68 #[prost(message, tag="2")]
69 Futures(super::FuturesConstituent),
70 #[prost(message, tag="3")]
71 Cash(super::CashConstituent),
72 }
73}
74#[allow(clippy::derive_partial_eq_without_eq)]
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct StockConstituent {
77 #[prost(string, tag="1")]
78 pub symbol: ::prost::alloc::string::String,
79 #[prost(string, tag="2")]
80 pub prev_close: ::prost::alloc::string::String,
81 #[prost(string, tag="3")]
82 pub last_price: ::prost::alloc::string::String,
83 #[prost(int64, tag="4")]
84 pub quantity: i64,
85 #[prost(int64, tag="5")]
86 pub last_valuation: i64,
87 #[prost(int64, tag="6")]
88 pub notional_amount: i64,
89 #[prost(uint32, tag="7")]
90 pub num_members: u32,
91}
92#[allow(clippy::derive_partial_eq_without_eq)]
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct FuturesConstituent {
95 #[prost(string, tag="1")]
96 pub symbol: ::prost::alloc::string::String,
97 #[prost(string, tag="2")]
98 pub prev_close: ::prost::alloc::string::String,
99 #[prost(string, tag="3")]
100 pub last_price: ::prost::alloc::string::String,
101 #[prost(float, tag="4")]
102 pub quantity: f32,
103 #[prost(double, tag="5")]
104 pub multiple: f64,
105 #[prost(int64, tag="6")]
106 pub last_valuation: i64,
107 #[prost(int64, tag="7")]
108 pub notional_amount: i64,
109 #[prost(uint32, tag="8")]
110 pub num_members: u32,
111}
112#[allow(clippy::derive_partial_eq_without_eq)]
113#[derive(Clone, PartialEq, ::prost::Message)]
114pub struct CashConstituent {
115 #[prost(string, tag="1")]
116 pub symbol: ::prost::alloc::string::String,
117 #[prost(int64, tag="2")]
118 pub prev_valuation: i64,
119 #[prost(uint32, tag="3")]
120 pub num_members: u32,
121}
122#[allow(clippy::derive_partial_eq_without_eq)]
124#[derive(Clone, PartialEq, ::prost::Message)]
125pub struct EtfPdfConstituent {
126 #[prost(string, tag="1")]
130 pub symbol: ::prost::alloc::string::String,
131 #[prost(string, tag="2")]
133 pub name: ::prost::alloc::string::String,
134 #[prost(enumeration="ProductType", tag="3")]
136 pub product_type: i32,
137 #[prost(int64, tag="4")]
139 pub quantity: i64,
140}
141#[allow(clippy::derive_partial_eq_without_eq)]
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct GetEtfRequest {
147 #[prost(string, tag="1")]
148 pub etf: ::prost::alloc::string::String,
149}
150#[allow(clippy::derive_partial_eq_without_eq)]
152#[derive(Clone, PartialEq, ::prost::Message)]
153pub struct ListEtfsRequest {
154 #[prost(uint32, optional, tag="1")]
156 pub page_size: ::core::option::Option<u32>,
157 #[prost(string, optional, tag="2")]
159 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
160 #[prost(string, tag="3")]
162 pub filter: ::prost::alloc::string::String,
163}
164#[allow(clippy::derive_partial_eq_without_eq)]
165#[derive(Clone, PartialEq, ::prost::Message)]
166pub struct ListEtfsResponse {
167 #[prost(message, repeated, tag="1")]
169 pub etfs: ::prost::alloc::vec::Vec<Etf>,
170 #[prost(string, tag="2")]
172 pub next_page_token: ::prost::alloc::string::String,
173}
174#[allow(clippy::derive_partial_eq_without_eq)]
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct CreateRedeemEtfRequest {
177 #[prost(string, tag="1")]
178 pub etf: ::prost::alloc::string::String,
179 #[prost(string, tag="2")]
180 pub fund: ::prost::alloc::string::String,
181 #[prost(int64, tag="3")]
182 pub quantity: i64,
183 #[prost(bool, tag="4")]
184 pub is_creation: bool,
185}
186#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
188#[repr(i32)]
189pub enum ProductType {
190 Unspecified = 0,
191 Stock = 1,
192 Futures = 2,
193 Etf = 3,
194 Cash = 4,
195}
196impl ProductType {
197 pub fn as_str_name(&self) -> &'static str {
202 match self {
203 ProductType::Unspecified => "PRODUCT_TYPE_UNSPECIFIED",
204 ProductType::Stock => "PRODUCT_TYPE_STOCK",
205 ProductType::Futures => "PRODUCT_TYPE_FUTURES",
206 ProductType::Etf => "PRODUCT_TYPE_ETF",
207 ProductType::Cash => "PRODUCT_TYPE_CASH",
208 }
209 }
210 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
212 match value {
213 "PRODUCT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
214 "PRODUCT_TYPE_STOCK" => Some(Self::Stock),
215 "PRODUCT_TYPE_FUTURES" => Some(Self::Futures),
216 "PRODUCT_TYPE_ETF" => Some(Self::Etf),
217 "PRODUCT_TYPE_CASH" => Some(Self::Cash),
218 _ => None,
219 }
220 }
221}
222#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
224#[repr(i32)]
225pub enum ReplicationMethod {
226 Unspecified = 0,
227 Active = 1,
228 Physical = 2,
229 Synthetic = 3,
230}
231impl ReplicationMethod {
232 pub fn as_str_name(&self) -> &'static str {
237 match self {
238 ReplicationMethod::Unspecified => "REPLICATION_METHOD_UNSPECIFIED",
239 ReplicationMethod::Active => "REPLICATION_METHOD_ACTIVE",
240 ReplicationMethod::Physical => "REPLICATION_METHOD_PHYSICAL",
241 ReplicationMethod::Synthetic => "REPLICATION_METHOD_SYNTHETIC",
242 }
243 }
244 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
246 match value {
247 "REPLICATION_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
248 "REPLICATION_METHOD_ACTIVE" => Some(Self::Active),
249 "REPLICATION_METHOD_PHYSICAL" => Some(Self::Physical),
250 "REPLICATION_METHOD_SYNTHETIC" => Some(Self::Synthetic),
251 _ => None,
252 }
253 }
254}
255include!("kdo.v1.etf.tonic.rs");
256include!("kdo.v1.etf.serde.rs");
257