1#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct EtfPricing {
7 #[prost(oneof="etf_pricing::Method", tags="1, 2, 3, 4, 5")]
8 pub method: ::core::option::Option<etf_pricing::Method>,
9}
10pub mod etf_pricing {
12 #[allow(clippy::derive_partial_eq_without_eq)]
13#[derive(Clone, PartialEq, ::prost::Oneof)]
14 pub enum Method {
15 #[prost(message, tag="1")]
17 PdfNavHedge(super::PdfNavHedgePricing),
18 #[prost(message, tag="2")]
20 IndexTrackingHedge(super::IndexTrackingHedgePricing),
21 #[prost(message, tag="3")]
22 FutureBasis(super::FutureBasis),
23 #[prost(message, tag="4")]
25 LeverageFuture(super::LeverageFuturePricing),
26 #[prost(message, tag="5")]
28 PdfDecomposeHedge(super::PdfDecomposeHedgePricing),
29 }
30}
31#[allow(clippy::derive_partial_eq_without_eq)]
33#[derive(Clone, Copy, PartialEq, ::prost::Message)]
34pub struct PdfNavHedgePricing {
35}
36#[allow(clippy::derive_partial_eq_without_eq)]
38#[derive(Clone, Copy, PartialEq, ::prost::Message)]
39pub struct IndexTrackingHedgePricing {
40}
41#[allow(clippy::derive_partial_eq_without_eq)]
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct FutureBasis {
44 #[prost(string, tag="1")]
45 pub prev_index: ::prost::alloc::string::String,
46}
47#[allow(clippy::derive_partial_eq_without_eq)]
49#[derive(Clone, Copy, PartialEq, ::prost::Message)]
50pub struct LeverageFuturePricing {
51 #[prost(double, tag="1")]
53 pub prev_index: f64,
54 #[prost(double, tag="2")]
56 pub prev_future: f64,
57}
58#[allow(clippy::derive_partial_eq_without_eq)]
61#[derive(Clone, Copy, PartialEq, ::prost::Message)]
62pub struct PdfDecomposeHedgePricing {
63}
64#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
66#[repr(i32)]
67pub enum OrderSide {
68 Unspecified = 0,
69 Bid = 1,
71 Ask = 2,
73}
74impl OrderSide {
75 pub fn as_str_name(&self) -> &'static str {
80 match self {
81 OrderSide::Unspecified => "ORDER_SIDE_UNSPECIFIED",
82 OrderSide::Bid => "ORDER_SIDE_BID",
83 OrderSide::Ask => "ORDER_SIDE_ASK",
84 }
85 }
86 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
88 match value {
89 "ORDER_SIDE_UNSPECIFIED" => Some(Self::Unspecified),
90 "ORDER_SIDE_BID" => Some(Self::Bid),
91 "ORDER_SIDE_ASK" => Some(Self::Ask),
92 _ => None,
93 }
94 }
95}
96#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
98#[repr(i32)]
99pub enum MarketType {
100 Unspecified = 0,
101 Kospi = 1,
103 Kosdaq = 2,
105 Derivative = 3,
107}
108impl MarketType {
109 pub fn as_str_name(&self) -> &'static str {
114 match self {
115 MarketType::Unspecified => "MARKET_TYPE_UNSPECIFIED",
116 MarketType::Kospi => "MARKET_TYPE_KOSPI",
117 MarketType::Kosdaq => "MARKET_TYPE_KOSDAQ",
118 MarketType::Derivative => "MARKET_TYPE_DERIVATIVE",
119 }
120 }
121 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
123 match value {
124 "MARKET_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
125 "MARKET_TYPE_KOSPI" => Some(Self::Kospi),
126 "MARKET_TYPE_KOSDAQ" => Some(Self::Kosdaq),
127 "MARKET_TYPE_DERIVATIVE" => Some(Self::Derivative),
128 _ => None,
129 }
130 }
131}
132#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
134#[repr(i32)]
135pub enum ProductType {
136 Unspecified = 0,
137 Stock = 1,
138 Futures = 2,
139 Etf = 3,
140 Cash = 4,
141}
142impl ProductType {
143 pub fn as_str_name(&self) -> &'static str {
148 match self {
149 ProductType::Unspecified => "PRODUCT_TYPE_UNSPECIFIED",
150 ProductType::Stock => "PRODUCT_TYPE_STOCK",
151 ProductType::Futures => "PRODUCT_TYPE_FUTURES",
152 ProductType::Etf => "PRODUCT_TYPE_ETF",
153 ProductType::Cash => "PRODUCT_TYPE_CASH",
154 }
155 }
156 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
158 match value {
159 "PRODUCT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
160 "PRODUCT_TYPE_STOCK" => Some(Self::Stock),
161 "PRODUCT_TYPE_FUTURES" => Some(Self::Futures),
162 "PRODUCT_TYPE_ETF" => Some(Self::Etf),
163 "PRODUCT_TYPE_CASH" => Some(Self::Cash),
164 _ => None,
165 }
166 }
167}
168#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
170#[repr(i32)]
171pub enum SessionId {
172 Unspecified = 0,
173 Previous = 1,
175 Connected = 2,
177 OpeningOnePrice = 3,
179 OnePrice = 4,
181 ClosingOnePrice = 5,
183 ViOnePrice = 6,
185 ViOpeningOnePrice = 7,
187 ViClosingOnePrice = 8,
189 UnitTrade = 9,
191 PostMarket = 10,
193 AuctionBid = 11,
195 AuctionAsk = 12,
197 Suspended = 13,
199 Shutdown = 14,
201 Closed = 15,
203 Etc = 16,
205}
206impl SessionId {
207 pub fn as_str_name(&self) -> &'static str {
212 match self {
213 SessionId::Unspecified => "SESSION_ID_UNSPECIFIED",
214 SessionId::Previous => "PREVIOUS",
215 SessionId::Connected => "CONNECTED",
216 SessionId::OpeningOnePrice => "OPENING_ONE_PRICE",
217 SessionId::OnePrice => "ONE_PRICE",
218 SessionId::ClosingOnePrice => "CLOSING_ONE_PRICE",
219 SessionId::ViOnePrice => "VI_ONE_PRICE",
220 SessionId::ViOpeningOnePrice => "VI_OPENING_ONE_PRICE",
221 SessionId::ViClosingOnePrice => "VI_CLOSING_ONE_PRICE",
222 SessionId::UnitTrade => "UNIT_TRADE",
223 SessionId::PostMarket => "POST_MARKET",
224 SessionId::AuctionBid => "AUCTION_BID",
225 SessionId::AuctionAsk => "AUCTION_ASK",
226 SessionId::Suspended => "SUSPENDED",
227 SessionId::Shutdown => "SHUTDOWN",
228 SessionId::Closed => "CLOSED",
229 SessionId::Etc => "ETC",
230 }
231 }
232 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
234 match value {
235 "SESSION_ID_UNSPECIFIED" => Some(Self::Unspecified),
236 "PREVIOUS" => Some(Self::Previous),
237 "CONNECTED" => Some(Self::Connected),
238 "OPENING_ONE_PRICE" => Some(Self::OpeningOnePrice),
239 "ONE_PRICE" => Some(Self::OnePrice),
240 "CLOSING_ONE_PRICE" => Some(Self::ClosingOnePrice),
241 "VI_ONE_PRICE" => Some(Self::ViOnePrice),
242 "VI_OPENING_ONE_PRICE" => Some(Self::ViOpeningOnePrice),
243 "VI_CLOSING_ONE_PRICE" => Some(Self::ViClosingOnePrice),
244 "UNIT_TRADE" => Some(Self::UnitTrade),
245 "POST_MARKET" => Some(Self::PostMarket),
246 "AUCTION_BID" => Some(Self::AuctionBid),
247 "AUCTION_ASK" => Some(Self::AuctionAsk),
248 "SUSPENDED" => Some(Self::Suspended),
249 "SHUTDOWN" => Some(Self::Shutdown),
250 "CLOSED" => Some(Self::Closed),
251 "ETC" => Some(Self::Etc),
252 _ => None,
253 }
254 }
255}
256#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
259#[repr(i32)]
260pub enum OrderConditionType {
261 Unspecified = 0,
263 Fas = 1,
265 Fak = 2,
267 Fok = 3,
269}
270impl OrderConditionType {
271 pub fn as_str_name(&self) -> &'static str {
276 match self {
277 OrderConditionType::Unspecified => "ORDER_CONDITION_TYPE_UNSPECIFIED",
278 OrderConditionType::Fas => "ORDER_CONDITION_TYPE_FAS",
279 OrderConditionType::Fak => "ORDER_CONDITION_TYPE_FAK",
280 OrderConditionType::Fok => "ORDER_CONDITION_TYPE_FOK",
281 }
282 }
283 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
285 match value {
286 "ORDER_CONDITION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
287 "ORDER_CONDITION_TYPE_FAS" => Some(Self::Fas),
288 "ORDER_CONDITION_TYPE_FAK" => Some(Self::Fak),
289 "ORDER_CONDITION_TYPE_FOK" => Some(Self::Fok),
290 _ => None,
291 }
292 }
293}
294#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
296#[repr(i32)]
297pub enum AmendMethodType {
298 Unspecified = 0,
300 SelfQuote = 1,
302 StopLoss = 4,
304}
305impl AmendMethodType {
306 pub fn as_str_name(&self) -> &'static str {
311 match self {
312 AmendMethodType::Unspecified => "AMEND_METHOD_TYPE_UNSPECIFIED",
313 AmendMethodType::SelfQuote => "AMEND_METHOD_TYPE_SELF_QUOTE",
314 AmendMethodType::StopLoss => "AMEND_METHOD_TYPE_STOP_LOSS",
315 }
316 }
317 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
319 match value {
320 "AMEND_METHOD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
321 "AMEND_METHOD_TYPE_SELF_QUOTE" => Some(Self::SelfQuote),
322 "AMEND_METHOD_TYPE_STOP_LOSS" => Some(Self::StopLoss),
323 _ => None,
324 }
325 }
326}
327include!("kdo.v1.common.serde.rs");
328