Skip to main content

longbridge_proto/
longbridge.quote.v1.rs

1// This file is @generated by prost-build.
2#[derive(serde::Serialize, serde::Deserialize)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct SecurityRequest {
5    #[prost(string, tag = "1")]
6    pub symbol: ::prost::alloc::string::String,
7}
8#[derive(serde::Serialize, serde::Deserialize)]
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct MultiSecurityRequest {
11    #[prost(string, repeated, tag = "1")]
12    pub symbol: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
13}
14#[derive(serde::Serialize, serde::Deserialize)]
15#[derive(Clone, PartialEq, ::prost::Message)]
16pub struct SecurityStaticInfoResponse {
17    #[prost(message, repeated, tag = "1")]
18    pub secu_static_info: ::prost::alloc::vec::Vec<StaticInfo>,
19}
20#[derive(serde::Serialize, serde::Deserialize)]
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct StaticInfo {
23    #[prost(string, tag = "1")]
24    pub symbol: ::prost::alloc::string::String,
25    #[prost(string, tag = "2")]
26    pub name_cn: ::prost::alloc::string::String,
27    #[prost(string, tag = "3")]
28    pub name_en: ::prost::alloc::string::String,
29    #[prost(string, tag = "4")]
30    pub name_hk: ::prost::alloc::string::String,
31    #[prost(string, tag = "5")]
32    pub listing_date: ::prost::alloc::string::String,
33    #[prost(string, tag = "6")]
34    pub exchange: ::prost::alloc::string::String,
35    #[prost(string, tag = "7")]
36    pub currency: ::prost::alloc::string::String,
37    #[prost(int32, tag = "8")]
38    pub lot_size: i32,
39    #[prost(int64, tag = "9")]
40    pub total_shares: i64,
41    #[prost(int64, tag = "10")]
42    pub circulating_shares: i64,
43    #[prost(int64, tag = "11")]
44    pub hk_shares: i64,
45    #[prost(string, tag = "12")]
46    pub eps: ::prost::alloc::string::String,
47    #[prost(string, tag = "13")]
48    pub eps_ttm: ::prost::alloc::string::String,
49    #[prost(string, tag = "14")]
50    pub bps: ::prost::alloc::string::String,
51    #[prost(string, tag = "15")]
52    pub dividend_yield: ::prost::alloc::string::String,
53    #[prost(int32, repeated, tag = "16")]
54    pub stock_derivatives: ::prost::alloc::vec::Vec<i32>,
55    #[prost(string, tag = "17")]
56    pub board: ::prost::alloc::string::String,
57}
58#[derive(serde::Serialize, serde::Deserialize)]
59#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct SecurityQuoteResponse {
61    #[prost(message, repeated, tag = "1")]
62    pub secu_quote: ::prost::alloc::vec::Vec<SecurityQuote>,
63}
64#[derive(serde::Serialize, serde::Deserialize)]
65#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct SecurityQuote {
67    #[prost(string, tag = "1")]
68    pub symbol: ::prost::alloc::string::String,
69    #[prost(string, tag = "2")]
70    pub last_done: ::prost::alloc::string::String,
71    #[prost(string, tag = "3")]
72    pub prev_close: ::prost::alloc::string::String,
73    #[prost(string, tag = "4")]
74    pub open: ::prost::alloc::string::String,
75    #[prost(string, tag = "5")]
76    pub high: ::prost::alloc::string::String,
77    #[prost(string, tag = "6")]
78    pub low: ::prost::alloc::string::String,
79    #[prost(int64, tag = "7")]
80    pub timestamp: i64,
81    #[prost(int64, tag = "8")]
82    pub volume: i64,
83    #[prost(string, tag = "9")]
84    pub turnover: ::prost::alloc::string::String,
85    #[prost(enumeration = "TradeStatus", tag = "10")]
86    pub trade_status: i32,
87    #[prost(message, optional, tag = "11")]
88    pub pre_market_quote: ::core::option::Option<PrePostQuote>,
89    #[prost(message, optional, tag = "12")]
90    pub post_market_quote: ::core::option::Option<PrePostQuote>,
91    #[prost(message, optional, tag = "13")]
92    pub over_night_quote: ::core::option::Option<PrePostQuote>,
93}
94#[derive(serde::Serialize, serde::Deserialize)]
95#[derive(Clone, PartialEq, ::prost::Message)]
96pub struct PrePostQuote {
97    #[prost(string, tag = "1")]
98    pub last_done: ::prost::alloc::string::String,
99    #[prost(int64, tag = "2")]
100    pub timestamp: i64,
101    #[prost(int64, tag = "3")]
102    pub volume: i64,
103    #[prost(string, tag = "4")]
104    pub turnover: ::prost::alloc::string::String,
105    #[prost(string, tag = "5")]
106    pub high: ::prost::alloc::string::String,
107    #[prost(string, tag = "6")]
108    pub low: ::prost::alloc::string::String,
109    #[prost(string, tag = "7")]
110    pub prev_close: ::prost::alloc::string::String,
111}
112#[derive(serde::Serialize, serde::Deserialize)]
113#[derive(Clone, PartialEq, ::prost::Message)]
114pub struct OptionQuoteResponse {
115    #[prost(message, repeated, tag = "1")]
116    pub secu_quote: ::prost::alloc::vec::Vec<OptionQuote>,
117}
118#[derive(serde::Serialize, serde::Deserialize)]
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct OptionQuote {
121    #[prost(string, tag = "1")]
122    pub symbol: ::prost::alloc::string::String,
123    #[prost(string, tag = "2")]
124    pub last_done: ::prost::alloc::string::String,
125    #[prost(string, tag = "3")]
126    pub prev_close: ::prost::alloc::string::String,
127    #[prost(string, tag = "4")]
128    pub open: ::prost::alloc::string::String,
129    #[prost(string, tag = "5")]
130    pub high: ::prost::alloc::string::String,
131    #[prost(string, tag = "6")]
132    pub low: ::prost::alloc::string::String,
133    #[prost(int64, tag = "7")]
134    pub timestamp: i64,
135    #[prost(int64, tag = "8")]
136    pub volume: i64,
137    #[prost(string, tag = "9")]
138    pub turnover: ::prost::alloc::string::String,
139    #[prost(enumeration = "TradeStatus", tag = "10")]
140    pub trade_status: i32,
141    #[prost(message, optional, tag = "11")]
142    pub option_extend: ::core::option::Option<OptionExtend>,
143}
144#[derive(serde::Serialize, serde::Deserialize)]
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct OptionExtend {
147    #[prost(string, tag = "1")]
148    pub implied_volatility: ::prost::alloc::string::String,
149    #[prost(int64, tag = "2")]
150    pub open_interest: i64,
151    #[prost(string, tag = "3")]
152    pub expiry_date: ::prost::alloc::string::String,
153    #[prost(string, tag = "4")]
154    pub strike_price: ::prost::alloc::string::String,
155    #[prost(string, tag = "5")]
156    pub contract_multiplier: ::prost::alloc::string::String,
157    #[prost(string, tag = "6")]
158    pub contract_type: ::prost::alloc::string::String,
159    #[prost(string, tag = "7")]
160    pub contract_size: ::prost::alloc::string::String,
161    #[prost(string, tag = "8")]
162    pub direction: ::prost::alloc::string::String,
163    #[prost(string, tag = "9")]
164    pub historical_volatility: ::prost::alloc::string::String,
165    #[prost(string, tag = "10")]
166    pub underlying_symbol: ::prost::alloc::string::String,
167}
168#[derive(serde::Serialize, serde::Deserialize)]
169#[derive(Clone, PartialEq, ::prost::Message)]
170pub struct WarrantQuoteResponse {
171    #[prost(message, repeated, tag = "2")]
172    pub secu_quote: ::prost::alloc::vec::Vec<WarrantQuote>,
173}
174#[derive(serde::Serialize, serde::Deserialize)]
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct WarrantQuote {
177    #[prost(string, tag = "1")]
178    pub symbol: ::prost::alloc::string::String,
179    #[prost(string, tag = "2")]
180    pub last_done: ::prost::alloc::string::String,
181    #[prost(string, tag = "3")]
182    pub prev_close: ::prost::alloc::string::String,
183    #[prost(string, tag = "4")]
184    pub open: ::prost::alloc::string::String,
185    #[prost(string, tag = "5")]
186    pub high: ::prost::alloc::string::String,
187    #[prost(string, tag = "6")]
188    pub low: ::prost::alloc::string::String,
189    #[prost(int64, tag = "7")]
190    pub timestamp: i64,
191    #[prost(int64, tag = "8")]
192    pub volume: i64,
193    #[prost(string, tag = "9")]
194    pub turnover: ::prost::alloc::string::String,
195    #[prost(enumeration = "TradeStatus", tag = "10")]
196    pub trade_status: i32,
197    #[prost(message, optional, tag = "11")]
198    pub warrant_extend: ::core::option::Option<WarrantExtend>,
199}
200#[derive(serde::Serialize, serde::Deserialize)]
201#[derive(Clone, PartialEq, ::prost::Message)]
202pub struct WarrantExtend {
203    #[prost(string, tag = "1")]
204    pub implied_volatility: ::prost::alloc::string::String,
205    #[prost(string, tag = "2")]
206    pub expiry_date: ::prost::alloc::string::String,
207    #[prost(string, tag = "3")]
208    pub last_trade_date: ::prost::alloc::string::String,
209    #[prost(string, tag = "4")]
210    pub outstanding_ratio: ::prost::alloc::string::String,
211    #[prost(int64, tag = "5")]
212    pub outstanding_qty: i64,
213    #[prost(string, tag = "6")]
214    pub conversion_ratio: ::prost::alloc::string::String,
215    #[prost(string, tag = "7")]
216    pub category: ::prost::alloc::string::String,
217    #[prost(string, tag = "8")]
218    pub strike_price: ::prost::alloc::string::String,
219    #[prost(string, tag = "9")]
220    pub upper_strike_price: ::prost::alloc::string::String,
221    #[prost(string, tag = "10")]
222    pub lower_strike_price: ::prost::alloc::string::String,
223    #[prost(string, tag = "11")]
224    pub call_price: ::prost::alloc::string::String,
225    #[prost(string, tag = "12")]
226    pub underlying_symbol: ::prost::alloc::string::String,
227}
228#[derive(serde::Serialize, serde::Deserialize)]
229#[derive(Clone, PartialEq, ::prost::Message)]
230pub struct SecurityDepthResponse {
231    #[prost(string, tag = "1")]
232    pub symbol: ::prost::alloc::string::String,
233    #[prost(message, repeated, tag = "2")]
234    pub ask: ::prost::alloc::vec::Vec<Depth>,
235    #[prost(message, repeated, tag = "3")]
236    pub bid: ::prost::alloc::vec::Vec<Depth>,
237}
238#[derive(serde::Serialize, serde::Deserialize)]
239#[derive(Clone, PartialEq, ::prost::Message)]
240pub struct Depth {
241    #[prost(int32, tag = "1")]
242    pub position: i32,
243    #[prost(string, tag = "2")]
244    pub price: ::prost::alloc::string::String,
245    #[prost(int64, tag = "3")]
246    pub volume: i64,
247    #[prost(int64, tag = "4")]
248    pub order_num: i64,
249}
250#[derive(serde::Serialize, serde::Deserialize)]
251#[derive(Clone, PartialEq, ::prost::Message)]
252pub struct SecurityBrokersResponse {
253    #[prost(string, tag = "1")]
254    pub symbol: ::prost::alloc::string::String,
255    #[prost(message, repeated, tag = "2")]
256    pub ask_brokers: ::prost::alloc::vec::Vec<Brokers>,
257    #[prost(message, repeated, tag = "3")]
258    pub bid_brokers: ::prost::alloc::vec::Vec<Brokers>,
259}
260#[derive(serde::Serialize, serde::Deserialize)]
261#[derive(Clone, PartialEq, ::prost::Message)]
262pub struct Brokers {
263    #[prost(int32, tag = "1")]
264    pub position: i32,
265    #[prost(int32, repeated, tag = "2")]
266    pub broker_ids: ::prost::alloc::vec::Vec<i32>,
267}
268#[derive(serde::Serialize, serde::Deserialize)]
269#[derive(Clone, PartialEq, ::prost::Message)]
270pub struct ParticipantBrokerIdsResponse {
271    #[prost(message, repeated, tag = "1")]
272    pub participant_broker_numbers: ::prost::alloc::vec::Vec<ParticipantInfo>,
273}
274#[derive(serde::Serialize, serde::Deserialize)]
275#[derive(Clone, PartialEq, ::prost::Message)]
276pub struct ParticipantInfo {
277    #[prost(int32, repeated, tag = "1")]
278    pub broker_ids: ::prost::alloc::vec::Vec<i32>,
279    #[prost(string, tag = "2")]
280    pub participant_name_cn: ::prost::alloc::string::String,
281    #[prost(string, tag = "3")]
282    pub participant_name_en: ::prost::alloc::string::String,
283    #[prost(string, tag = "4")]
284    pub participant_name_hk: ::prost::alloc::string::String,
285}
286#[derive(serde::Serialize, serde::Deserialize)]
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct SecurityTradeRequest {
289    #[prost(string, tag = "1")]
290    pub symbol: ::prost::alloc::string::String,
291    #[prost(int32, tag = "2")]
292    pub count: i32,
293}
294#[derive(serde::Serialize, serde::Deserialize)]
295#[derive(Clone, PartialEq, ::prost::Message)]
296pub struct SecurityTradeResponse {
297    #[prost(string, tag = "1")]
298    pub symbol: ::prost::alloc::string::String,
299    #[prost(message, repeated, tag = "2")]
300    pub trades: ::prost::alloc::vec::Vec<Trade>,
301}
302#[derive(serde::Serialize, serde::Deserialize)]
303#[derive(Clone, PartialEq, ::prost::Message)]
304pub struct Trade {
305    #[prost(string, tag = "1")]
306    pub price: ::prost::alloc::string::String,
307    #[prost(int64, tag = "2")]
308    pub volume: i64,
309    #[prost(int64, tag = "3")]
310    pub timestamp: i64,
311    #[prost(string, tag = "4")]
312    pub trade_type: ::prost::alloc::string::String,
313    #[prost(int32, tag = "5")]
314    pub direction: i32,
315    #[prost(enumeration = "TradeSession", tag = "6")]
316    pub trade_session: i32,
317}
318#[derive(serde::Serialize, serde::Deserialize)]
319#[derive(Clone, PartialEq, ::prost::Message)]
320pub struct SecurityIntradayRequest {
321    #[prost(string, tag = "1")]
322    pub symbol: ::prost::alloc::string::String,
323    #[prost(int32, tag = "2")]
324    pub trade_session: i32,
325}
326#[derive(serde::Serialize, serde::Deserialize)]
327#[derive(Clone, PartialEq, ::prost::Message)]
328pub struct SecurityIntradayResponse {
329    #[prost(string, tag = "1")]
330    pub symbol: ::prost::alloc::string::String,
331    #[prost(message, repeated, tag = "2")]
332    pub lines: ::prost::alloc::vec::Vec<Line>,
333}
334#[derive(serde::Serialize, serde::Deserialize)]
335#[derive(Clone, PartialEq, ::prost::Message)]
336pub struct Line {
337    #[prost(string, tag = "1")]
338    pub price: ::prost::alloc::string::String,
339    #[prost(int64, tag = "2")]
340    pub timestamp: i64,
341    #[prost(int64, tag = "3")]
342    pub volume: i64,
343    #[prost(string, tag = "4")]
344    pub turnover: ::prost::alloc::string::String,
345    #[prost(string, tag = "5")]
346    pub avg_price: ::prost::alloc::string::String,
347}
348#[derive(serde::Serialize, serde::Deserialize)]
349#[derive(Clone, PartialEq, ::prost::Message)]
350pub struct SecurityCandlestickRequest {
351    #[prost(string, tag = "1")]
352    pub symbol: ::prost::alloc::string::String,
353    #[prost(enumeration = "Period", tag = "2")]
354    pub period: i32,
355    #[prost(int32, tag = "3")]
356    pub count: i32,
357    #[prost(enumeration = "AdjustType", tag = "4")]
358    pub adjust_type: i32,
359    #[prost(int32, tag = "5")]
360    pub trade_session: i32,
361}
362#[derive(serde::Serialize, serde::Deserialize)]
363#[derive(Clone, PartialEq, ::prost::Message)]
364pub struct SecurityCandlestickResponse {
365    #[prost(string, tag = "1")]
366    pub symbol: ::prost::alloc::string::String,
367    #[prost(message, repeated, tag = "2")]
368    pub candlesticks: ::prost::alloc::vec::Vec<Candlestick>,
369}
370#[derive(serde::Serialize, serde::Deserialize)]
371#[derive(Clone, PartialEq, ::prost::Message)]
372pub struct Candlestick {
373    #[prost(string, tag = "1")]
374    pub close: ::prost::alloc::string::String,
375    #[prost(string, tag = "2")]
376    pub open: ::prost::alloc::string::String,
377    #[prost(string, tag = "3")]
378    pub low: ::prost::alloc::string::String,
379    #[prost(string, tag = "4")]
380    pub high: ::prost::alloc::string::String,
381    #[prost(int64, tag = "5")]
382    pub volume: i64,
383    #[prost(string, tag = "6")]
384    pub turnover: ::prost::alloc::string::String,
385    #[prost(int64, tag = "7")]
386    pub timestamp: i64,
387    #[prost(enumeration = "TradeSession", tag = "8")]
388    pub trade_session: i32,
389}
390#[derive(serde::Serialize, serde::Deserialize)]
391#[derive(Clone, PartialEq, ::prost::Message)]
392pub struct OptionChainDateListResponse {
393    #[prost(string, repeated, tag = "1")]
394    pub expiry_date: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
395}
396#[derive(serde::Serialize, serde::Deserialize)]
397#[derive(Clone, PartialEq, ::prost::Message)]
398pub struct OptionChainDateStrikeInfoRequest {
399    #[prost(string, tag = "1")]
400    pub symbol: ::prost::alloc::string::String,
401    #[prost(string, tag = "2")]
402    pub expiry_date: ::prost::alloc::string::String,
403}
404#[derive(serde::Serialize, serde::Deserialize)]
405#[derive(Clone, PartialEq, ::prost::Message)]
406pub struct OptionChainDateStrikeInfoResponse {
407    #[prost(message, repeated, tag = "1")]
408    pub strike_price_info: ::prost::alloc::vec::Vec<StrikePriceInfo>,
409}
410#[derive(serde::Serialize, serde::Deserialize)]
411#[derive(Clone, PartialEq, ::prost::Message)]
412pub struct StrikePriceInfo {
413    #[prost(string, tag = "1")]
414    pub price: ::prost::alloc::string::String,
415    #[prost(string, tag = "2")]
416    pub call_symbol: ::prost::alloc::string::String,
417    #[prost(string, tag = "3")]
418    pub put_symbol: ::prost::alloc::string::String,
419    #[prost(bool, tag = "4")]
420    pub standard: bool,
421}
422#[derive(serde::Serialize, serde::Deserialize)]
423#[derive(Clone, PartialEq, ::prost::Message)]
424pub struct IssuerInfoResponse {
425    #[prost(message, repeated, tag = "1")]
426    pub issuer_info: ::prost::alloc::vec::Vec<IssuerInfo>,
427}
428#[derive(serde::Serialize, serde::Deserialize)]
429#[derive(Clone, PartialEq, ::prost::Message)]
430pub struct IssuerInfo {
431    #[prost(int32, tag = "1")]
432    pub id: i32,
433    #[prost(string, tag = "2")]
434    pub name_cn: ::prost::alloc::string::String,
435    #[prost(string, tag = "3")]
436    pub name_en: ::prost::alloc::string::String,
437    #[prost(string, tag = "4")]
438    pub name_hk: ::prost::alloc::string::String,
439}
440#[derive(serde::Serialize, serde::Deserialize)]
441#[derive(Clone, PartialEq, ::prost::Message)]
442pub struct WarrantFilterListRequest {
443    #[prost(string, tag = "1")]
444    pub symbol: ::prost::alloc::string::String,
445    #[prost(message, optional, tag = "2")]
446    pub filter_config: ::core::option::Option<FilterConfig>,
447    #[prost(int32, tag = "3")]
448    pub language: i32,
449}
450#[derive(serde::Serialize, serde::Deserialize)]
451#[derive(Clone, PartialEq, ::prost::Message)]
452pub struct FilterConfig {
453    #[prost(int32, tag = "1")]
454    pub sort_by: i32,
455    #[prost(int32, tag = "2")]
456    pub sort_order: i32,
457    #[prost(int32, tag = "3")]
458    pub sort_offset: i32,
459    #[prost(int32, tag = "4")]
460    pub sort_count: i32,
461    #[prost(int32, repeated, tag = "5")]
462    pub r#type: ::prost::alloc::vec::Vec<i32>,
463    #[prost(int32, repeated, tag = "6")]
464    pub issuer: ::prost::alloc::vec::Vec<i32>,
465    #[prost(int32, repeated, tag = "7")]
466    pub expiry_date: ::prost::alloc::vec::Vec<i32>,
467    #[prost(int32, repeated, tag = "8")]
468    pub price_type: ::prost::alloc::vec::Vec<i32>,
469    #[prost(int32, repeated, tag = "9")]
470    pub status: ::prost::alloc::vec::Vec<i32>,
471}
472#[derive(serde::Serialize, serde::Deserialize)]
473#[derive(Clone, PartialEq, ::prost::Message)]
474pub struct WarrantFilterListResponse {
475    #[prost(message, repeated, tag = "1")]
476    pub warrant_list: ::prost::alloc::vec::Vec<FilterWarrant>,
477    #[prost(int32, tag = "2")]
478    pub total_count: i32,
479}
480#[derive(serde::Serialize, serde::Deserialize)]
481#[derive(Clone, PartialEq, ::prost::Message)]
482pub struct FilterWarrant {
483    #[prost(string, tag = "1")]
484    pub symbol: ::prost::alloc::string::String,
485    #[prost(string, tag = "2")]
486    pub name: ::prost::alloc::string::String,
487    #[prost(string, tag = "3")]
488    pub last_done: ::prost::alloc::string::String,
489    #[prost(string, tag = "4")]
490    pub change_rate: ::prost::alloc::string::String,
491    #[prost(string, tag = "5")]
492    pub change_val: ::prost::alloc::string::String,
493    #[prost(int64, tag = "6")]
494    pub volume: i64,
495    #[prost(string, tag = "7")]
496    pub turnover: ::prost::alloc::string::String,
497    #[prost(string, tag = "8")]
498    pub expiry_date: ::prost::alloc::string::String,
499    #[prost(string, tag = "9")]
500    pub strike_price: ::prost::alloc::string::String,
501    #[prost(string, tag = "10")]
502    pub upper_strike_price: ::prost::alloc::string::String,
503    #[prost(string, tag = "11")]
504    pub lower_strike_price: ::prost::alloc::string::String,
505    #[prost(string, tag = "12")]
506    pub outstanding_qty: ::prost::alloc::string::String,
507    #[prost(string, tag = "13")]
508    pub outstanding_ratio: ::prost::alloc::string::String,
509    #[prost(string, tag = "14")]
510    pub premium: ::prost::alloc::string::String,
511    #[prost(string, tag = "15")]
512    pub itm_otm: ::prost::alloc::string::String,
513    #[prost(string, tag = "16")]
514    pub implied_volatility: ::prost::alloc::string::String,
515    #[prost(string, tag = "17")]
516    pub delta: ::prost::alloc::string::String,
517    #[prost(string, tag = "18")]
518    pub call_price: ::prost::alloc::string::String,
519    #[prost(string, tag = "19")]
520    pub to_call_price: ::prost::alloc::string::String,
521    #[prost(string, tag = "20")]
522    pub effective_leverage: ::prost::alloc::string::String,
523    #[prost(string, tag = "21")]
524    pub leverage_ratio: ::prost::alloc::string::String,
525    #[prost(string, tag = "22")]
526    pub conversion_ratio: ::prost::alloc::string::String,
527    #[prost(string, tag = "23")]
528    pub balance_point: ::prost::alloc::string::String,
529    #[prost(int32, tag = "24")]
530    pub status: i32,
531    #[prost(int32, tag = "25")]
532    pub r#type: i32,
533}
534#[derive(serde::Serialize, serde::Deserialize)]
535#[derive(Clone, PartialEq, ::prost::Message)]
536pub struct MarketTradePeriodResponse {
537    #[prost(message, repeated, tag = "1")]
538    pub market_trade_session: ::prost::alloc::vec::Vec<MarketTradePeriod>,
539}
540#[derive(serde::Serialize, serde::Deserialize)]
541#[derive(Clone, PartialEq, ::prost::Message)]
542pub struct MarketTradePeriod {
543    #[prost(string, tag = "1")]
544    pub market: ::prost::alloc::string::String,
545    #[prost(message, repeated, tag = "2")]
546    pub trade_session: ::prost::alloc::vec::Vec<TradePeriod>,
547}
548#[derive(serde::Serialize, serde::Deserialize)]
549#[derive(Clone, Copy, PartialEq, ::prost::Message)]
550pub struct TradePeriod {
551    #[prost(int32, tag = "1")]
552    pub beg_time: i32,
553    #[prost(int32, tag = "2")]
554    pub end_time: i32,
555    #[prost(enumeration = "TradeSession", tag = "3")]
556    pub trade_session: i32,
557}
558#[derive(serde::Serialize, serde::Deserialize)]
559#[derive(Clone, Copy, PartialEq, ::prost::Message)]
560pub struct SubscriptionRequest {}
561#[derive(serde::Serialize, serde::Deserialize)]
562#[derive(Clone, PartialEq, ::prost::Message)]
563pub struct SubscriptionResponse {
564    #[prost(message, repeated, tag = "1")]
565    pub sub_list: ::prost::alloc::vec::Vec<SubTypeList>,
566}
567#[derive(serde::Serialize, serde::Deserialize)]
568#[derive(Clone, PartialEq, ::prost::Message)]
569pub struct SubTypeList {
570    #[prost(string, tag = "1")]
571    pub symbol: ::prost::alloc::string::String,
572    #[prost(enumeration = "SubType", repeated, tag = "2")]
573    pub sub_type: ::prost::alloc::vec::Vec<i32>,
574}
575#[derive(serde::Serialize, serde::Deserialize)]
576#[derive(Clone, PartialEq, ::prost::Message)]
577pub struct SubscribeRequest {
578    #[prost(string, repeated, tag = "1")]
579    pub symbol: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
580    #[prost(enumeration = "SubType", repeated, tag = "2")]
581    pub sub_type: ::prost::alloc::vec::Vec<i32>,
582    #[prost(bool, tag = "3")]
583    pub is_first_push: bool,
584}
585#[derive(serde::Serialize, serde::Deserialize)]
586#[derive(Clone, PartialEq, ::prost::Message)]
587pub struct UnsubscribeRequest {
588    #[prost(string, repeated, tag = "1")]
589    pub symbol: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
590    #[prost(enumeration = "SubType", repeated, tag = "2")]
591    pub sub_type: ::prost::alloc::vec::Vec<i32>,
592    #[prost(bool, tag = "3")]
593    pub unsub_all: bool,
594}
595#[derive(serde::Serialize, serde::Deserialize)]
596#[derive(Clone, Copy, PartialEq, ::prost::Message)]
597pub struct UnsubscribeResponse {}
598#[derive(serde::Serialize, serde::Deserialize)]
599#[derive(Clone, PartialEq, ::prost::Message)]
600pub struct PushQuote {
601    #[prost(string, tag = "1")]
602    pub symbol: ::prost::alloc::string::String,
603    #[prost(int64, tag = "2")]
604    pub sequence: i64,
605    #[prost(string, tag = "3")]
606    pub last_done: ::prost::alloc::string::String,
607    #[prost(string, tag = "4")]
608    pub open: ::prost::alloc::string::String,
609    #[prost(string, tag = "5")]
610    pub high: ::prost::alloc::string::String,
611    #[prost(string, tag = "6")]
612    pub low: ::prost::alloc::string::String,
613    #[prost(int64, tag = "7")]
614    pub timestamp: i64,
615    #[prost(int64, tag = "8")]
616    pub volume: i64,
617    #[prost(string, tag = "9")]
618    pub turnover: ::prost::alloc::string::String,
619    #[prost(enumeration = "TradeStatus", tag = "10")]
620    pub trade_status: i32,
621    #[prost(enumeration = "TradeSession", tag = "11")]
622    pub trade_session: i32,
623    #[prost(int64, tag = "12")]
624    pub current_volume: i64,
625    #[prost(string, tag = "13")]
626    pub current_turnover: ::prost::alloc::string::String,
627    #[prost(enumeration = "PushQuoteTag", tag = "14")]
628    pub tag: i32,
629}
630#[derive(serde::Serialize, serde::Deserialize)]
631#[derive(Clone, PartialEq, ::prost::Message)]
632pub struct PushDepth {
633    #[prost(string, tag = "1")]
634    pub symbol: ::prost::alloc::string::String,
635    #[prost(int64, tag = "2")]
636    pub sequence: i64,
637    #[prost(message, repeated, tag = "3")]
638    pub ask: ::prost::alloc::vec::Vec<Depth>,
639    #[prost(message, repeated, tag = "4")]
640    pub bid: ::prost::alloc::vec::Vec<Depth>,
641}
642#[derive(serde::Serialize, serde::Deserialize)]
643#[derive(Clone, PartialEq, ::prost::Message)]
644pub struct PushBrokers {
645    #[prost(string, tag = "1")]
646    pub symbol: ::prost::alloc::string::String,
647    #[prost(int64, tag = "2")]
648    pub sequence: i64,
649    #[prost(message, repeated, tag = "3")]
650    pub ask_brokers: ::prost::alloc::vec::Vec<Brokers>,
651    #[prost(message, repeated, tag = "4")]
652    pub bid_brokers: ::prost::alloc::vec::Vec<Brokers>,
653}
654#[derive(serde::Serialize, serde::Deserialize)]
655#[derive(Clone, PartialEq, ::prost::Message)]
656pub struct PushTrade {
657    #[prost(string, tag = "1")]
658    pub symbol: ::prost::alloc::string::String,
659    #[prost(int64, tag = "2")]
660    pub sequence: i64,
661    #[prost(message, repeated, tag = "3")]
662    pub trade: ::prost::alloc::vec::Vec<Trade>,
663}
664#[derive(serde::Serialize, serde::Deserialize)]
665#[derive(Clone, PartialEq, ::prost::Message)]
666pub struct MarketTradeDayRequest {
667    #[prost(string, tag = "1")]
668    pub market: ::prost::alloc::string::String,
669    #[prost(string, tag = "2")]
670    pub beg_day: ::prost::alloc::string::String,
671    #[prost(string, tag = "3")]
672    pub end_day: ::prost::alloc::string::String,
673}
674#[derive(serde::Serialize, serde::Deserialize)]
675#[derive(Clone, PartialEq, ::prost::Message)]
676pub struct MarketTradeDayResponse {
677    #[prost(string, repeated, tag = "1")]
678    pub trade_day: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
679    #[prost(string, repeated, tag = "2")]
680    pub half_trade_day: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
681}
682#[derive(serde::Serialize, serde::Deserialize)]
683#[derive(Clone, PartialEq, ::prost::Message)]
684pub struct CapitalFlowIntradayRequest {
685    #[prost(string, tag = "1")]
686    pub symbol: ::prost::alloc::string::String,
687}
688#[derive(serde::Serialize, serde::Deserialize)]
689#[derive(Clone, PartialEq, ::prost::Message)]
690pub struct CapitalFlowIntradayResponse {
691    #[prost(string, tag = "1")]
692    pub symbol: ::prost::alloc::string::String,
693    #[prost(message, repeated, tag = "2")]
694    pub capital_flow_lines: ::prost::alloc::vec::Vec<
695        capital_flow_intraday_response::CapitalFlowLine,
696    >,
697}
698/// Nested message and enum types in `CapitalFlowIntradayResponse`.
699pub mod capital_flow_intraday_response {
700    #[derive(serde::Serialize, serde::Deserialize)]
701    #[derive(Clone, PartialEq, ::prost::Message)]
702    pub struct CapitalFlowLine {
703        #[prost(string, tag = "1")]
704        pub inflow: ::prost::alloc::string::String,
705        #[prost(int64, tag = "2")]
706        pub timestamp: i64,
707    }
708}
709#[derive(serde::Serialize, serde::Deserialize)]
710#[derive(Clone, PartialEq, ::prost::Message)]
711pub struct CapitalDistributionResponse {
712    #[prost(string, tag = "1")]
713    pub symbol: ::prost::alloc::string::String,
714    #[prost(int64, tag = "2")]
715    pub timestamp: i64,
716    #[prost(message, optional, tag = "3")]
717    pub capital_in: ::core::option::Option<
718        capital_distribution_response::CapitalDistribution,
719    >,
720    #[prost(message, optional, tag = "4")]
721    pub capital_out: ::core::option::Option<
722        capital_distribution_response::CapitalDistribution,
723    >,
724}
725/// Nested message and enum types in `CapitalDistributionResponse`.
726pub mod capital_distribution_response {
727    #[derive(serde::Serialize, serde::Deserialize)]
728    #[derive(Clone, PartialEq, ::prost::Message)]
729    pub struct CapitalDistribution {
730        #[prost(string, tag = "1")]
731        pub large: ::prost::alloc::string::String,
732        #[prost(string, tag = "2")]
733        pub medium: ::prost::alloc::string::String,
734        #[prost(string, tag = "3")]
735        pub small: ::prost::alloc::string::String,
736    }
737}
738#[derive(serde::Serialize, serde::Deserialize)]
739#[derive(Clone, PartialEq, ::prost::Message)]
740pub struct SecurityCalcQuoteRequest {
741    #[prost(string, repeated, tag = "1")]
742    pub symbols: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
743    #[prost(enumeration = "CalcIndex", repeated, tag = "2")]
744    pub calc_index: ::prost::alloc::vec::Vec<i32>,
745}
746#[derive(serde::Serialize, serde::Deserialize)]
747#[derive(Clone, PartialEq, ::prost::Message)]
748pub struct SecurityCalcIndex {
749    #[prost(string, tag = "1")]
750    pub symbol: ::prost::alloc::string::String,
751    #[prost(string, tag = "2")]
752    pub last_done: ::prost::alloc::string::String,
753    #[prost(string, tag = "3")]
754    pub change_val: ::prost::alloc::string::String,
755    #[prost(string, tag = "4")]
756    pub change_rate: ::prost::alloc::string::String,
757    #[prost(int64, tag = "5")]
758    pub volume: i64,
759    #[prost(string, tag = "6")]
760    pub turnover: ::prost::alloc::string::String,
761    #[prost(string, tag = "7")]
762    pub ytd_change_rate: ::prost::alloc::string::String,
763    #[prost(string, tag = "8")]
764    pub turnover_rate: ::prost::alloc::string::String,
765    #[prost(string, tag = "9")]
766    pub total_market_value: ::prost::alloc::string::String,
767    #[prost(string, tag = "10")]
768    pub capital_flow: ::prost::alloc::string::String,
769    #[prost(string, tag = "11")]
770    pub amplitude: ::prost::alloc::string::String,
771    #[prost(string, tag = "12")]
772    pub volume_ratio: ::prost::alloc::string::String,
773    #[prost(string, tag = "13")]
774    pub pe_ttm_ratio: ::prost::alloc::string::String,
775    #[prost(string, tag = "14")]
776    pub pb_ratio: ::prost::alloc::string::String,
777    #[prost(string, tag = "15")]
778    pub dividend_ratio_ttm: ::prost::alloc::string::String,
779    #[prost(string, tag = "16")]
780    pub five_day_change_rate: ::prost::alloc::string::String,
781    #[prost(string, tag = "17")]
782    pub ten_day_change_rate: ::prost::alloc::string::String,
783    #[prost(string, tag = "18")]
784    pub half_year_change_rate: ::prost::alloc::string::String,
785    #[prost(string, tag = "19")]
786    pub five_minutes_change_rate: ::prost::alloc::string::String,
787    #[prost(string, tag = "20")]
788    pub expiry_date: ::prost::alloc::string::String,
789    #[prost(string, tag = "21")]
790    pub strike_price: ::prost::alloc::string::String,
791    #[prost(string, tag = "22")]
792    pub upper_strike_price: ::prost::alloc::string::String,
793    #[prost(string, tag = "23")]
794    pub lower_strike_price: ::prost::alloc::string::String,
795    #[prost(int64, tag = "24")]
796    pub outstanding_qty: i64,
797    #[prost(string, tag = "25")]
798    pub outstanding_ratio: ::prost::alloc::string::String,
799    #[prost(string, tag = "26")]
800    pub premium: ::prost::alloc::string::String,
801    #[prost(string, tag = "27")]
802    pub itm_otm: ::prost::alloc::string::String,
803    #[prost(string, tag = "28")]
804    pub implied_volatility: ::prost::alloc::string::String,
805    #[prost(string, tag = "29")]
806    pub warrant_delta: ::prost::alloc::string::String,
807    #[prost(string, tag = "30")]
808    pub call_price: ::prost::alloc::string::String,
809    #[prost(string, tag = "31")]
810    pub to_call_price: ::prost::alloc::string::String,
811    #[prost(string, tag = "32")]
812    pub effective_leverage: ::prost::alloc::string::String,
813    #[prost(string, tag = "33")]
814    pub leverage_ratio: ::prost::alloc::string::String,
815    #[prost(string, tag = "34")]
816    pub conversion_ratio: ::prost::alloc::string::String,
817    #[prost(string, tag = "35")]
818    pub balance_point: ::prost::alloc::string::String,
819    #[prost(int64, tag = "36")]
820    pub open_interest: i64,
821    #[prost(string, tag = "37")]
822    pub delta: ::prost::alloc::string::String,
823    #[prost(string, tag = "38")]
824    pub gamma: ::prost::alloc::string::String,
825    #[prost(string, tag = "39")]
826    pub theta: ::prost::alloc::string::String,
827    #[prost(string, tag = "40")]
828    pub vega: ::prost::alloc::string::String,
829    #[prost(string, tag = "41")]
830    pub rho: ::prost::alloc::string::String,
831}
832#[derive(serde::Serialize, serde::Deserialize)]
833#[derive(Clone, PartialEq, ::prost::Message)]
834pub struct SecurityCalcQuoteResponse {
835    #[prost(message, repeated, tag = "1")]
836    pub security_calc_index: ::prost::alloc::vec::Vec<SecurityCalcIndex>,
837}
838#[derive(serde::Serialize, serde::Deserialize)]
839#[derive(Clone, PartialEq, ::prost::Message)]
840pub struct SecurityHistoryCandlestickRequest {
841    #[prost(string, tag = "1")]
842    pub symbol: ::prost::alloc::string::String,
843    #[prost(enumeration = "Period", tag = "2")]
844    pub period: i32,
845    #[prost(enumeration = "AdjustType", tag = "3")]
846    pub adjust_type: i32,
847    #[prost(enumeration = "HistoryCandlestickQueryType", tag = "4")]
848    pub query_type: i32,
849    #[prost(message, optional, tag = "5")]
850    pub offset_request: ::core::option::Option<
851        security_history_candlestick_request::OffsetQuery,
852    >,
853    #[prost(message, optional, tag = "6")]
854    pub date_request: ::core::option::Option<
855        security_history_candlestick_request::DateQuery,
856    >,
857    #[prost(int32, tag = "7")]
858    pub trade_session: i32,
859}
860/// Nested message and enum types in `SecurityHistoryCandlestickRequest`.
861pub mod security_history_candlestick_request {
862    #[derive(serde::Serialize, serde::Deserialize)]
863    #[derive(Clone, PartialEq, ::prost::Message)]
864    pub struct OffsetQuery {
865        #[prost(enumeration = "super::Direction", tag = "1")]
866        pub direction: i32,
867        #[prost(string, tag = "2")]
868        pub date: ::prost::alloc::string::String,
869        #[prost(string, tag = "3")]
870        pub minute: ::prost::alloc::string::String,
871        #[prost(int32, tag = "4")]
872        pub count: i32,
873    }
874    #[derive(serde::Serialize, serde::Deserialize)]
875    #[derive(Clone, PartialEq, ::prost::Message)]
876    pub struct DateQuery {
877        #[prost(string, tag = "1")]
878        pub start_date: ::prost::alloc::string::String,
879        #[prost(string, tag = "2")]
880        pub end_date: ::prost::alloc::string::String,
881    }
882}
883#[derive(serde::Serialize, serde::Deserialize)]
884#[derive(Clone, PartialEq, ::prost::Message)]
885pub struct UserQuoteProfileRequest {
886    #[prost(string, tag = "1")]
887    pub language: ::prost::alloc::string::String,
888}
889#[derive(serde::Serialize, serde::Deserialize)]
890#[derive(Clone, Copy, PartialEq, ::prost::Message)]
891pub struct RateLimit {
892    #[prost(enumeration = "Command", tag = "1")]
893    pub command: i32,
894    #[prost(int32, tag = "2")]
895    pub limit: i32,
896    #[prost(int32, tag = "3")]
897    pub burst: i32,
898}
899#[derive(serde::Serialize, serde::Deserialize)]
900#[derive(Clone, PartialEq, ::prost::Message)]
901pub struct UserQuoteLevelDetail {
902    /// 按行情包描述
903    #[prost(map = "string, message", tag = "1")]
904    pub by_package_key: ::std::collections::HashMap<
905        ::prost::alloc::string::String,
906        user_quote_level_detail::PackageDetail,
907    >,
908    /// 按市场描述, 目前写死的, 仅有 US HK CN USOption(期权) 4个
909    #[prost(map = "string, message", tag = "2")]
910    pub by_market_code: ::std::collections::HashMap<
911        ::prost::alloc::string::String,
912        user_quote_level_detail::MarketPackageDetail,
913    >,
914}
915/// Nested message and enum types in `UserQuoteLevelDetail`.
916pub mod user_quote_level_detail {
917    #[derive(serde::Serialize, serde::Deserialize)]
918    #[derive(Clone, PartialEq, ::prost::Message)]
919    pub struct PackageDetail {
920        /// 行情包 Key
921        #[prost(string, tag = "1")]
922        pub key: ::prost::alloc::string::String,
923        /// 行情包名称
924        #[prost(string, tag = "2")]
925        pub name: ::prost::alloc::string::String,
926        /// 行情包描述, 根据入参 lang 适配多语言
927        #[prost(string, tag = "4")]
928        pub description: ::prost::alloc::string::String,
929        /// 行情包生效开始时间 Unix 时间戳
930        #[prost(int64, tag = "5")]
931        pub start: i64,
932        /// 行情包生效结束时间 Unix 时间戳
933        #[prost(int64, tag = "6")]
934        pub end: i64,
935    }
936    #[derive(serde::Serialize, serde::Deserialize)]
937    #[derive(Clone, PartialEq, ::prost::Message)]
938    pub struct MarketPackageDetail {
939        #[prost(message, repeated, tag = "1")]
940        pub packages: ::prost::alloc::vec::Vec<PackageDetail>,
941        /// 当一个包也没有时, 会有如下, 多语言的文案
942        /// `您没有访问该市场 Open API 行情的权限,如需请前往行情商店购买`
943        #[prost(string, tag = "4")]
944        pub warning_msg: ::prost::alloc::string::String,
945    }
946}
947#[derive(serde::Serialize, serde::Deserialize)]
948#[derive(Clone, PartialEq, ::prost::Message)]
949pub struct UserQuoteProfileResponse {
950    #[prost(int64, tag = "1")]
951    pub member_id: i64,
952    /// 行情权限信息
953    #[prost(string, tag = "2")]
954    pub quote_level: ::prost::alloc::string::String,
955    /// 订阅数量限制
956    #[prost(int32, tag = "3")]
957    pub subscribe_limit: i32,
958    /// 历史 k 线限制
959    #[prost(int32, tag = "4")]
960    pub history_candlestick_limit: i32,
961    /// command rate limit
962    #[prost(message, repeated, tag = "5")]
963    pub rate_limit: ::prost::alloc::vec::Vec<RateLimit>,
964    /// 用户等级详情
965    #[prost(message, optional, tag = "6")]
966    pub quote_level_detail: ::core::option::Option<UserQuoteLevelDetail>,
967}
968/// 协议指令定义
969#[derive(serde::Serialize, serde::Deserialize)]
970#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
971#[repr(i32)]
972pub enum Command {
973    UnknownCommand = 0,
974    /// 心跳
975    HeartBeat = 1,
976    /// 鉴权
977    Auth = 2,
978    /// 重新连接
979    Reconnect = 3,
980    /// 查询用户行情信息
981    QueryUserQuoteProfile = 4,
982    /// 查询连接的已订阅数据
983    Subscription = 5,
984    /// 订阅行情数据
985    Subscribe = 6,
986    /// 取消订阅行情数据
987    Unsubscribe = 7,
988    /// 查询各市场的当日交易时段
989    QueryMarketTradePeriod = 8,
990    /// 查询交易日
991    QueryMarketTradeDay = 9,
992    /// 查询标的基础信息
993    QuerySecurityStaticInfo = 10,
994    /// 查询标的行情(所有标的通用行情)
995    QuerySecurityQuote = 11,
996    /// 查询期权行情(仅支持期权)
997    QueryOptionQuote = 12,
998    /// 查询轮证行情(仅支持轮证)
999    QueryWarrantQuote = 13,
1000    /// 查询盘口
1001    QueryDepth = 14,
1002    /// 查询经纪队列
1003    QueryBrokers = 15,
1004    /// 查询券商经纪席位
1005    QueryParticipantBrokerIds = 16,
1006    /// 查询成交明细
1007    QueryTrade = 17,
1008    /// 查询当日分时
1009    QueryIntraday = 18,
1010    /// 查询k线
1011    QueryCandlestick = 19,
1012    /// 查询标的期权链日期列表
1013    QueryOptionChainDate = 20,
1014    /// 查询标的期权链某日的行权价信息
1015    QueryOptionChainDateStrikeInfo = 21,
1016    /// 查询轮证发行商对应Id
1017    QueryWarrantIssuerInfo = 22,
1018    /// 查询轮证筛选列表
1019    QueryWarrantFilterList = 23,
1020    /// 查询标的的资金流分时
1021    QueryCapitalFlowIntraday = 24,
1022    /// 查询标的资金流大小单
1023    QueryCapitalFlowDistribution = 25,
1024    /// 查询标的指标数据
1025    QuerySecurityCalcIndex = 26,
1026    /// 查询标的历史 k 线
1027    QueryHistoryCandlestick = 27,
1028    /// 推送行情
1029    PushQuoteData = 101,
1030    /// 推送盘口
1031    PushDepthData = 102,
1032    /// 推送经纪队列
1033    PushBrokersData = 103,
1034    /// 推送成交明细
1035    PushTradeData = 104,
1036}
1037impl Command {
1038    /// String value of the enum field names used in the ProtoBuf definition.
1039    ///
1040    /// The values are not transformed in any way and thus are considered stable
1041    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1042    pub fn as_str_name(&self) -> &'static str {
1043        match self {
1044            Self::UnknownCommand => "UNKNOWN_COMMAND",
1045            Self::HeartBeat => "HEART_BEAT",
1046            Self::Auth => "AUTH",
1047            Self::Reconnect => "RECONNECT",
1048            Self::QueryUserQuoteProfile => "QueryUserQuoteProfile",
1049            Self::Subscription => "Subscription",
1050            Self::Subscribe => "Subscribe",
1051            Self::Unsubscribe => "Unsubscribe",
1052            Self::QueryMarketTradePeriod => "QueryMarketTradePeriod",
1053            Self::QueryMarketTradeDay => "QueryMarketTradeDay",
1054            Self::QuerySecurityStaticInfo => "QuerySecurityStaticInfo",
1055            Self::QuerySecurityQuote => "QuerySecurityQuote",
1056            Self::QueryOptionQuote => "QueryOptionQuote",
1057            Self::QueryWarrantQuote => "QueryWarrantQuote",
1058            Self::QueryDepth => "QueryDepth",
1059            Self::QueryBrokers => "QueryBrokers",
1060            Self::QueryParticipantBrokerIds => "QueryParticipantBrokerIds",
1061            Self::QueryTrade => "QueryTrade",
1062            Self::QueryIntraday => "QueryIntraday",
1063            Self::QueryCandlestick => "QueryCandlestick",
1064            Self::QueryOptionChainDate => "QueryOptionChainDate",
1065            Self::QueryOptionChainDateStrikeInfo => "QueryOptionChainDateStrikeInfo",
1066            Self::QueryWarrantIssuerInfo => "QueryWarrantIssuerInfo",
1067            Self::QueryWarrantFilterList => "QueryWarrantFilterList",
1068            Self::QueryCapitalFlowIntraday => "QueryCapitalFlowIntraday",
1069            Self::QueryCapitalFlowDistribution => "QueryCapitalFlowDistribution",
1070            Self::QuerySecurityCalcIndex => "QuerySecurityCalcIndex",
1071            Self::QueryHistoryCandlestick => "QueryHistoryCandlestick",
1072            Self::PushQuoteData => "PushQuoteData",
1073            Self::PushDepthData => "PushDepthData",
1074            Self::PushBrokersData => "PushBrokersData",
1075            Self::PushTradeData => "PushTradeData",
1076        }
1077    }
1078    /// Creates an enum from field names used in the ProtoBuf definition.
1079    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1080        match value {
1081            "UNKNOWN_COMMAND" => Some(Self::UnknownCommand),
1082            "HEART_BEAT" => Some(Self::HeartBeat),
1083            "AUTH" => Some(Self::Auth),
1084            "RECONNECT" => Some(Self::Reconnect),
1085            "QueryUserQuoteProfile" => Some(Self::QueryUserQuoteProfile),
1086            "Subscription" => Some(Self::Subscription),
1087            "Subscribe" => Some(Self::Subscribe),
1088            "Unsubscribe" => Some(Self::Unsubscribe),
1089            "QueryMarketTradePeriod" => Some(Self::QueryMarketTradePeriod),
1090            "QueryMarketTradeDay" => Some(Self::QueryMarketTradeDay),
1091            "QuerySecurityStaticInfo" => Some(Self::QuerySecurityStaticInfo),
1092            "QuerySecurityQuote" => Some(Self::QuerySecurityQuote),
1093            "QueryOptionQuote" => Some(Self::QueryOptionQuote),
1094            "QueryWarrantQuote" => Some(Self::QueryWarrantQuote),
1095            "QueryDepth" => Some(Self::QueryDepth),
1096            "QueryBrokers" => Some(Self::QueryBrokers),
1097            "QueryParticipantBrokerIds" => Some(Self::QueryParticipantBrokerIds),
1098            "QueryTrade" => Some(Self::QueryTrade),
1099            "QueryIntraday" => Some(Self::QueryIntraday),
1100            "QueryCandlestick" => Some(Self::QueryCandlestick),
1101            "QueryOptionChainDate" => Some(Self::QueryOptionChainDate),
1102            "QueryOptionChainDateStrikeInfo" => {
1103                Some(Self::QueryOptionChainDateStrikeInfo)
1104            }
1105            "QueryWarrantIssuerInfo" => Some(Self::QueryWarrantIssuerInfo),
1106            "QueryWarrantFilterList" => Some(Self::QueryWarrantFilterList),
1107            "QueryCapitalFlowIntraday" => Some(Self::QueryCapitalFlowIntraday),
1108            "QueryCapitalFlowDistribution" => Some(Self::QueryCapitalFlowDistribution),
1109            "QuerySecurityCalcIndex" => Some(Self::QuerySecurityCalcIndex),
1110            "QueryHistoryCandlestick" => Some(Self::QueryHistoryCandlestick),
1111            "PushQuoteData" => Some(Self::PushQuoteData),
1112            "PushDepthData" => Some(Self::PushDepthData),
1113            "PushBrokersData" => Some(Self::PushBrokersData),
1114            "PushTradeData" => Some(Self::PushTradeData),
1115            _ => None,
1116        }
1117    }
1118}
1119#[derive(serde::Serialize, serde::Deserialize)]
1120#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1121#[repr(i32)]
1122pub enum TradeStatus {
1123    Normal = 0,
1124    Halted = 1,
1125    Delisted = 2,
1126    Fuse = 3,
1127    PrepareList = 4,
1128    CodeMoved = 5,
1129    ToBeOpened = 6,
1130    SplitStockHalts = 7,
1131    Expired = 8,
1132    WarrantPrepareList = 9,
1133    SuspendTrade = 10,
1134}
1135impl TradeStatus {
1136    /// String value of the enum field names used in the ProtoBuf definition.
1137    ///
1138    /// The values are not transformed in any way and thus are considered stable
1139    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1140    pub fn as_str_name(&self) -> &'static str {
1141        match self {
1142            Self::Normal => "NORMAL",
1143            Self::Halted => "HALTED",
1144            Self::Delisted => "DELISTED",
1145            Self::Fuse => "FUSE",
1146            Self::PrepareList => "PREPARE_LIST",
1147            Self::CodeMoved => "CODE_MOVED",
1148            Self::ToBeOpened => "TO_BE_OPENED",
1149            Self::SplitStockHalts => "SPLIT_STOCK_HALTS",
1150            Self::Expired => "EXPIRED",
1151            Self::WarrantPrepareList => "WARRANT_PREPARE_LIST",
1152            Self::SuspendTrade => "SUSPEND_TRADE",
1153        }
1154    }
1155    /// Creates an enum from field names used in the ProtoBuf definition.
1156    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1157        match value {
1158            "NORMAL" => Some(Self::Normal),
1159            "HALTED" => Some(Self::Halted),
1160            "DELISTED" => Some(Self::Delisted),
1161            "FUSE" => Some(Self::Fuse),
1162            "PREPARE_LIST" => Some(Self::PrepareList),
1163            "CODE_MOVED" => Some(Self::CodeMoved),
1164            "TO_BE_OPENED" => Some(Self::ToBeOpened),
1165            "SPLIT_STOCK_HALTS" => Some(Self::SplitStockHalts),
1166            "EXPIRED" => Some(Self::Expired),
1167            "WARRANT_PREPARE_LIST" => Some(Self::WarrantPrepareList),
1168            "SUSPEND_TRADE" => Some(Self::SuspendTrade),
1169            _ => None,
1170        }
1171    }
1172}
1173#[derive(serde::Serialize, serde::Deserialize)]
1174#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1175#[repr(i32)]
1176pub enum TradeSession {
1177    NormalTrade = 0,
1178    PreTrade = 1,
1179    PostTrade = 2,
1180    OvernightTrade = 3,
1181}
1182impl TradeSession {
1183    /// String value of the enum field names used in the ProtoBuf definition.
1184    ///
1185    /// The values are not transformed in any way and thus are considered stable
1186    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1187    pub fn as_str_name(&self) -> &'static str {
1188        match self {
1189            Self::NormalTrade => "NORMAL_TRADE",
1190            Self::PreTrade => "PRE_TRADE",
1191            Self::PostTrade => "POST_TRADE",
1192            Self::OvernightTrade => "OVERNIGHT_TRADE",
1193        }
1194    }
1195    /// Creates an enum from field names used in the ProtoBuf definition.
1196    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1197        match value {
1198            "NORMAL_TRADE" => Some(Self::NormalTrade),
1199            "PRE_TRADE" => Some(Self::PreTrade),
1200            "POST_TRADE" => Some(Self::PostTrade),
1201            "OVERNIGHT_TRADE" => Some(Self::OvernightTrade),
1202            _ => None,
1203        }
1204    }
1205}
1206#[derive(serde::Serialize, serde::Deserialize)]
1207#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1208#[repr(i32)]
1209pub enum AdjustType {
1210    NoAdjust = 0,
1211    ForwardAdjust = 1,
1212}
1213impl AdjustType {
1214    /// String value of the enum field names used in the ProtoBuf definition.
1215    ///
1216    /// The values are not transformed in any way and thus are considered stable
1217    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1218    pub fn as_str_name(&self) -> &'static str {
1219        match self {
1220            Self::NoAdjust => "NO_ADJUST",
1221            Self::ForwardAdjust => "FORWARD_ADJUST",
1222        }
1223    }
1224    /// Creates an enum from field names used in the ProtoBuf definition.
1225    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1226        match value {
1227            "NO_ADJUST" => Some(Self::NoAdjust),
1228            "FORWARD_ADJUST" => Some(Self::ForwardAdjust),
1229            _ => None,
1230        }
1231    }
1232}
1233#[derive(serde::Serialize, serde::Deserialize)]
1234#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1235#[repr(i32)]
1236pub enum Period {
1237    UnknownPeriod = 0,
1238    OneMinute = 1,
1239    TwoMinute = 2,
1240    ThreeMinute = 3,
1241    FiveMinute = 5,
1242    TenMinute = 10,
1243    FifteenMinute = 15,
1244    TwentyMinute = 20,
1245    ThirtyMinute = 30,
1246    FortyFiveMinute = 45,
1247    SixtyMinute = 60,
1248    TwoHour = 120,
1249    ThreeHour = 180,
1250    FourHour = 240,
1251    Day = 1000,
1252    Week = 2000,
1253    Month = 3000,
1254    Quarter = 3500,
1255    Year = 4000,
1256}
1257impl Period {
1258    /// String value of the enum field names used in the ProtoBuf definition.
1259    ///
1260    /// The values are not transformed in any way and thus are considered stable
1261    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1262    pub fn as_str_name(&self) -> &'static str {
1263        match self {
1264            Self::UnknownPeriod => "UNKNOWN_PERIOD",
1265            Self::OneMinute => "ONE_MINUTE",
1266            Self::TwoMinute => "TWO_MINUTE",
1267            Self::ThreeMinute => "THREE_MINUTE",
1268            Self::FiveMinute => "FIVE_MINUTE",
1269            Self::TenMinute => "TEN_MINUTE",
1270            Self::FifteenMinute => "FIFTEEN_MINUTE",
1271            Self::TwentyMinute => "TWENTY_MINUTE",
1272            Self::ThirtyMinute => "THIRTY_MINUTE",
1273            Self::FortyFiveMinute => "FORTY_FIVE_MINUTE",
1274            Self::SixtyMinute => "SIXTY_MINUTE",
1275            Self::TwoHour => "TWO_HOUR",
1276            Self::ThreeHour => "THREE_HOUR",
1277            Self::FourHour => "FOUR_HOUR",
1278            Self::Day => "DAY",
1279            Self::Week => "WEEK",
1280            Self::Month => "MONTH",
1281            Self::Quarter => "QUARTER",
1282            Self::Year => "YEAR",
1283        }
1284    }
1285    /// Creates an enum from field names used in the ProtoBuf definition.
1286    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1287        match value {
1288            "UNKNOWN_PERIOD" => Some(Self::UnknownPeriod),
1289            "ONE_MINUTE" => Some(Self::OneMinute),
1290            "TWO_MINUTE" => Some(Self::TwoMinute),
1291            "THREE_MINUTE" => Some(Self::ThreeMinute),
1292            "FIVE_MINUTE" => Some(Self::FiveMinute),
1293            "TEN_MINUTE" => Some(Self::TenMinute),
1294            "FIFTEEN_MINUTE" => Some(Self::FifteenMinute),
1295            "TWENTY_MINUTE" => Some(Self::TwentyMinute),
1296            "THIRTY_MINUTE" => Some(Self::ThirtyMinute),
1297            "FORTY_FIVE_MINUTE" => Some(Self::FortyFiveMinute),
1298            "SIXTY_MINUTE" => Some(Self::SixtyMinute),
1299            "TWO_HOUR" => Some(Self::TwoHour),
1300            "THREE_HOUR" => Some(Self::ThreeHour),
1301            "FOUR_HOUR" => Some(Self::FourHour),
1302            "DAY" => Some(Self::Day),
1303            "WEEK" => Some(Self::Week),
1304            "MONTH" => Some(Self::Month),
1305            "QUARTER" => Some(Self::Quarter),
1306            "YEAR" => Some(Self::Year),
1307            _ => None,
1308        }
1309    }
1310}
1311#[derive(serde::Serialize, serde::Deserialize)]
1312#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1313#[repr(i32)]
1314pub enum SubType {
1315    UnknownType = 0,
1316    Quote = 1,
1317    Depth = 2,
1318    Brokers = 3,
1319    Trade = 4,
1320}
1321impl SubType {
1322    /// String value of the enum field names used in the ProtoBuf definition.
1323    ///
1324    /// The values are not transformed in any way and thus are considered stable
1325    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1326    pub fn as_str_name(&self) -> &'static str {
1327        match self {
1328            Self::UnknownType => "UNKNOWN_TYPE",
1329            Self::Quote => "QUOTE",
1330            Self::Depth => "DEPTH",
1331            Self::Brokers => "BROKERS",
1332            Self::Trade => "TRADE",
1333        }
1334    }
1335    /// Creates an enum from field names used in the ProtoBuf definition.
1336    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1337        match value {
1338            "UNKNOWN_TYPE" => Some(Self::UnknownType),
1339            "QUOTE" => Some(Self::Quote),
1340            "DEPTH" => Some(Self::Depth),
1341            "BROKERS" => Some(Self::Brokers),
1342            "TRADE" => Some(Self::Trade),
1343            _ => None,
1344        }
1345    }
1346}
1347#[derive(serde::Serialize, serde::Deserialize)]
1348#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1349#[repr(i32)]
1350pub enum PushQuoteTag {
1351    Normal = 0,
1352    Eod = 1,
1353}
1354impl PushQuoteTag {
1355    /// String value of the enum field names used in the ProtoBuf definition.
1356    ///
1357    /// The values are not transformed in any way and thus are considered stable
1358    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1359    pub fn as_str_name(&self) -> &'static str {
1360        match self {
1361            Self::Normal => "Normal",
1362            Self::Eod => "Eod",
1363        }
1364    }
1365    /// Creates an enum from field names used in the ProtoBuf definition.
1366    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1367        match value {
1368            "Normal" => Some(Self::Normal),
1369            "Eod" => Some(Self::Eod),
1370            _ => None,
1371        }
1372    }
1373}
1374#[derive(serde::Serialize, serde::Deserialize)]
1375#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1376#[repr(i32)]
1377pub enum CalcIndex {
1378    CalcindexUnknown = 0,
1379    CalcindexLastDone = 1,
1380    CalcindexChangeVal = 2,
1381    CalcindexChangeRate = 3,
1382    CalcindexVolume = 4,
1383    CalcindexTurnover = 5,
1384    CalcindexYtdChangeRate = 6,
1385    CalcindexTurnoverRate = 7,
1386    CalcindexTotalMarketValue = 8,
1387    CalcindexCapitalFlow = 9,
1388    CalcindexAmplitude = 10,
1389    CalcindexVolumeRatio = 11,
1390    CalcindexPeTtmRatio = 12,
1391    CalcindexPbRatio = 13,
1392    CalcindexDividendRatioTtm = 14,
1393    CalcindexFiveDayChangeRate = 15,
1394    CalcindexTenDayChangeRate = 16,
1395    CalcindexHalfYearChangeRate = 17,
1396    CalcindexFiveMinutesChangeRate = 18,
1397    CalcindexExpiryDate = 19,
1398    CalcindexStrikePrice = 20,
1399    CalcindexUpperStrikePrice = 21,
1400    CalcindexLowerStrikePrice = 22,
1401    CalcindexOutstandingQty = 23,
1402    CalcindexOutstandingRatio = 24,
1403    CalcindexPremium = 25,
1404    CalcindexItmOtm = 26,
1405    CalcindexImpliedVolatility = 27,
1406    CalcindexWarrantDelta = 28,
1407    CalcindexCallPrice = 29,
1408    CalcindexToCallPrice = 30,
1409    CalcindexEffectiveLeverage = 31,
1410    CalcindexLeverageRatio = 32,
1411    CalcindexConversionRatio = 33,
1412    CalcindexBalancePoint = 34,
1413    CalcindexOpenInterest = 35,
1414    CalcindexDelta = 36,
1415    CalcindexGamma = 37,
1416    CalcindexTheta = 38,
1417    CalcindexVega = 39,
1418    CalcindexRho = 40,
1419}
1420impl CalcIndex {
1421    /// String value of the enum field names used in the ProtoBuf definition.
1422    ///
1423    /// The values are not transformed in any way and thus are considered stable
1424    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1425    pub fn as_str_name(&self) -> &'static str {
1426        match self {
1427            Self::CalcindexUnknown => "CALCINDEX_UNKNOWN",
1428            Self::CalcindexLastDone => "CALCINDEX_LAST_DONE",
1429            Self::CalcindexChangeVal => "CALCINDEX_CHANGE_VAL",
1430            Self::CalcindexChangeRate => "CALCINDEX_CHANGE_RATE",
1431            Self::CalcindexVolume => "CALCINDEX_VOLUME",
1432            Self::CalcindexTurnover => "CALCINDEX_TURNOVER",
1433            Self::CalcindexYtdChangeRate => "CALCINDEX_YTD_CHANGE_RATE",
1434            Self::CalcindexTurnoverRate => "CALCINDEX_TURNOVER_RATE",
1435            Self::CalcindexTotalMarketValue => "CALCINDEX_TOTAL_MARKET_VALUE",
1436            Self::CalcindexCapitalFlow => "CALCINDEX_CAPITAL_FLOW",
1437            Self::CalcindexAmplitude => "CALCINDEX_AMPLITUDE",
1438            Self::CalcindexVolumeRatio => "CALCINDEX_VOLUME_RATIO",
1439            Self::CalcindexPeTtmRatio => "CALCINDEX_PE_TTM_RATIO",
1440            Self::CalcindexPbRatio => "CALCINDEX_PB_RATIO",
1441            Self::CalcindexDividendRatioTtm => "CALCINDEX_DIVIDEND_RATIO_TTM",
1442            Self::CalcindexFiveDayChangeRate => "CALCINDEX_FIVE_DAY_CHANGE_RATE",
1443            Self::CalcindexTenDayChangeRate => "CALCINDEX_TEN_DAY_CHANGE_RATE",
1444            Self::CalcindexHalfYearChangeRate => "CALCINDEX_HALF_YEAR_CHANGE_RATE",
1445            Self::CalcindexFiveMinutesChangeRate => "CALCINDEX_FIVE_MINUTES_CHANGE_RATE",
1446            Self::CalcindexExpiryDate => "CALCINDEX_EXPIRY_DATE",
1447            Self::CalcindexStrikePrice => "CALCINDEX_STRIKE_PRICE",
1448            Self::CalcindexUpperStrikePrice => "CALCINDEX_UPPER_STRIKE_PRICE",
1449            Self::CalcindexLowerStrikePrice => "CALCINDEX_LOWER_STRIKE_PRICE",
1450            Self::CalcindexOutstandingQty => "CALCINDEX_OUTSTANDING_QTY",
1451            Self::CalcindexOutstandingRatio => "CALCINDEX_OUTSTANDING_RATIO",
1452            Self::CalcindexPremium => "CALCINDEX_PREMIUM",
1453            Self::CalcindexItmOtm => "CALCINDEX_ITM_OTM",
1454            Self::CalcindexImpliedVolatility => "CALCINDEX_IMPLIED_VOLATILITY",
1455            Self::CalcindexWarrantDelta => "CALCINDEX_WARRANT_DELTA",
1456            Self::CalcindexCallPrice => "CALCINDEX_CALL_PRICE",
1457            Self::CalcindexToCallPrice => "CALCINDEX_TO_CALL_PRICE",
1458            Self::CalcindexEffectiveLeverage => "CALCINDEX_EFFECTIVE_LEVERAGE",
1459            Self::CalcindexLeverageRatio => "CALCINDEX_LEVERAGE_RATIO",
1460            Self::CalcindexConversionRatio => "CALCINDEX_CONVERSION_RATIO",
1461            Self::CalcindexBalancePoint => "CALCINDEX_BALANCE_POINT",
1462            Self::CalcindexOpenInterest => "CALCINDEX_OPEN_INTEREST",
1463            Self::CalcindexDelta => "CALCINDEX_DELTA",
1464            Self::CalcindexGamma => "CALCINDEX_GAMMA",
1465            Self::CalcindexTheta => "CALCINDEX_THETA",
1466            Self::CalcindexVega => "CALCINDEX_VEGA",
1467            Self::CalcindexRho => "CALCINDEX_RHO",
1468        }
1469    }
1470    /// Creates an enum from field names used in the ProtoBuf definition.
1471    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1472        match value {
1473            "CALCINDEX_UNKNOWN" => Some(Self::CalcindexUnknown),
1474            "CALCINDEX_LAST_DONE" => Some(Self::CalcindexLastDone),
1475            "CALCINDEX_CHANGE_VAL" => Some(Self::CalcindexChangeVal),
1476            "CALCINDEX_CHANGE_RATE" => Some(Self::CalcindexChangeRate),
1477            "CALCINDEX_VOLUME" => Some(Self::CalcindexVolume),
1478            "CALCINDEX_TURNOVER" => Some(Self::CalcindexTurnover),
1479            "CALCINDEX_YTD_CHANGE_RATE" => Some(Self::CalcindexYtdChangeRate),
1480            "CALCINDEX_TURNOVER_RATE" => Some(Self::CalcindexTurnoverRate),
1481            "CALCINDEX_TOTAL_MARKET_VALUE" => Some(Self::CalcindexTotalMarketValue),
1482            "CALCINDEX_CAPITAL_FLOW" => Some(Self::CalcindexCapitalFlow),
1483            "CALCINDEX_AMPLITUDE" => Some(Self::CalcindexAmplitude),
1484            "CALCINDEX_VOLUME_RATIO" => Some(Self::CalcindexVolumeRatio),
1485            "CALCINDEX_PE_TTM_RATIO" => Some(Self::CalcindexPeTtmRatio),
1486            "CALCINDEX_PB_RATIO" => Some(Self::CalcindexPbRatio),
1487            "CALCINDEX_DIVIDEND_RATIO_TTM" => Some(Self::CalcindexDividendRatioTtm),
1488            "CALCINDEX_FIVE_DAY_CHANGE_RATE" => Some(Self::CalcindexFiveDayChangeRate),
1489            "CALCINDEX_TEN_DAY_CHANGE_RATE" => Some(Self::CalcindexTenDayChangeRate),
1490            "CALCINDEX_HALF_YEAR_CHANGE_RATE" => Some(Self::CalcindexHalfYearChangeRate),
1491            "CALCINDEX_FIVE_MINUTES_CHANGE_RATE" => {
1492                Some(Self::CalcindexFiveMinutesChangeRate)
1493            }
1494            "CALCINDEX_EXPIRY_DATE" => Some(Self::CalcindexExpiryDate),
1495            "CALCINDEX_STRIKE_PRICE" => Some(Self::CalcindexStrikePrice),
1496            "CALCINDEX_UPPER_STRIKE_PRICE" => Some(Self::CalcindexUpperStrikePrice),
1497            "CALCINDEX_LOWER_STRIKE_PRICE" => Some(Self::CalcindexLowerStrikePrice),
1498            "CALCINDEX_OUTSTANDING_QTY" => Some(Self::CalcindexOutstandingQty),
1499            "CALCINDEX_OUTSTANDING_RATIO" => Some(Self::CalcindexOutstandingRatio),
1500            "CALCINDEX_PREMIUM" => Some(Self::CalcindexPremium),
1501            "CALCINDEX_ITM_OTM" => Some(Self::CalcindexItmOtm),
1502            "CALCINDEX_IMPLIED_VOLATILITY" => Some(Self::CalcindexImpliedVolatility),
1503            "CALCINDEX_WARRANT_DELTA" => Some(Self::CalcindexWarrantDelta),
1504            "CALCINDEX_CALL_PRICE" => Some(Self::CalcindexCallPrice),
1505            "CALCINDEX_TO_CALL_PRICE" => Some(Self::CalcindexToCallPrice),
1506            "CALCINDEX_EFFECTIVE_LEVERAGE" => Some(Self::CalcindexEffectiveLeverage),
1507            "CALCINDEX_LEVERAGE_RATIO" => Some(Self::CalcindexLeverageRatio),
1508            "CALCINDEX_CONVERSION_RATIO" => Some(Self::CalcindexConversionRatio),
1509            "CALCINDEX_BALANCE_POINT" => Some(Self::CalcindexBalancePoint),
1510            "CALCINDEX_OPEN_INTEREST" => Some(Self::CalcindexOpenInterest),
1511            "CALCINDEX_DELTA" => Some(Self::CalcindexDelta),
1512            "CALCINDEX_GAMMA" => Some(Self::CalcindexGamma),
1513            "CALCINDEX_THETA" => Some(Self::CalcindexTheta),
1514            "CALCINDEX_VEGA" => Some(Self::CalcindexVega),
1515            "CALCINDEX_RHO" => Some(Self::CalcindexRho),
1516            _ => None,
1517        }
1518    }
1519}
1520#[derive(serde::Serialize, serde::Deserialize)]
1521#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1522#[repr(i32)]
1523pub enum HistoryCandlestickQueryType {
1524    UnknownQueryType = 0,
1525    QueryByOffset = 1,
1526    QueryByDate = 2,
1527}
1528impl HistoryCandlestickQueryType {
1529    /// String value of the enum field names used in the ProtoBuf definition.
1530    ///
1531    /// The values are not transformed in any way and thus are considered stable
1532    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1533    pub fn as_str_name(&self) -> &'static str {
1534        match self {
1535            Self::UnknownQueryType => "UNKNOWN_QUERY_TYPE",
1536            Self::QueryByOffset => "QUERY_BY_OFFSET",
1537            Self::QueryByDate => "QUERY_BY_DATE",
1538        }
1539    }
1540    /// Creates an enum from field names used in the ProtoBuf definition.
1541    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1542        match value {
1543            "UNKNOWN_QUERY_TYPE" => Some(Self::UnknownQueryType),
1544            "QUERY_BY_OFFSET" => Some(Self::QueryByOffset),
1545            "QUERY_BY_DATE" => Some(Self::QueryByDate),
1546            _ => None,
1547        }
1548    }
1549}
1550#[derive(serde::Serialize, serde::Deserialize)]
1551#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1552#[repr(i32)]
1553pub enum Direction {
1554    /// 老数据, 从最新的数据往历史数据翻页
1555    Backward = 0,
1556    /// 新数据, 从当前数据往最新数据翻页
1557    Forward = 1,
1558}
1559impl Direction {
1560    /// String value of the enum field names used in the ProtoBuf definition.
1561    ///
1562    /// The values are not transformed in any way and thus are considered stable
1563    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1564    pub fn as_str_name(&self) -> &'static str {
1565        match self {
1566            Self::Backward => "BACKWARD",
1567            Self::Forward => "FORWARD",
1568        }
1569    }
1570    /// Creates an enum from field names used in the ProtoBuf definition.
1571    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1572        match value {
1573            "BACKWARD" => Some(Self::Backward),
1574            "FORWARD" => Some(Self::Forward),
1575            _ => None,
1576        }
1577    }
1578}