1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
4pub struct MoneyValue {
5 #[prost(string, tag = "1")]
7 pub currency: ::prost::alloc::string::String,
8 #[prost(int64, tag = "2")]
10 pub units: i64,
11 #[prost(int32, tag = "3")]
13 pub nano: i32,
14}
15#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
17pub struct Quotation {
18 #[prost(int64, tag = "1")]
20 pub units: i64,
21 #[prost(int32, tag = "2")]
23 pub nano: i32,
24}
25#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
26pub struct PingRequest {
27 #[prost(message, optional, tag = "1")]
29 pub time: ::core::option::Option<::prost_types::Timestamp>,
30}
31#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
32pub struct PingDelaySettings {
33 #[prost(int32, optional, tag = "15")]
35 pub ping_delay_ms: ::core::option::Option<i32>,
36}
37#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
39pub struct Ping {
40 #[prost(message, optional, tag = "1")]
42 pub time: ::core::option::Option<::prost_types::Timestamp>,
43 #[prost(string, tag = "2")]
45 pub stream_id: ::prost::alloc::string::String,
46 #[prost(message, optional, tag = "4")]
48 pub ping_request_time: ::core::option::Option<::prost_types::Timestamp>,
49}
50#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
51pub struct Page {
52 #[prost(int32, tag = "1")]
54 pub limit: i32,
55 #[prost(int32, tag = "2")]
57 pub page_number: i32,
58}
59#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
60pub struct PageResponse {
61 #[prost(int32, tag = "1")]
63 pub limit: i32,
64 #[prost(int32, tag = "2")]
66 pub page_number: i32,
67 #[prost(int32, tag = "3")]
69 pub total_count: i32,
70}
71#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
72pub struct ResponseMetadata {
73 #[prost(string, tag = "42")]
75 pub tracking_id: ::prost::alloc::string::String,
76 #[prost(message, optional, tag = "43")]
78 pub server_time: ::core::option::Option<::prost_types::Timestamp>,
79}
80#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
81pub struct BrandData {
82 #[prost(string, tag = "1")]
84 pub logo_name: ::prost::alloc::string::String,
85 #[prost(string, tag = "2")]
90 pub logo_base_color: ::prost::alloc::string::String,
91 #[prost(string, tag = "3")]
93 pub text_color: ::prost::alloc::string::String,
94}
95#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
96pub struct ErrorDetail {
97 #[prost(string, tag = "1")]
99 pub code: ::prost::alloc::string::String,
100 #[prost(string, tag = "3")]
102 pub message: ::prost::alloc::string::String,
103}
104#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
106#[repr(i32)]
107pub enum InstrumentType {
108 Unspecified = 0,
109 Bond = 1,
111 Share = 2,
113 Currency = 3,
115 Etf = 4,
117 Futures = 5,
119 Sp = 6,
121 Option = 7,
123 ClearingCertificate = 8,
125 Index = 9,
127 Commodity = 10,
129 Dfa = 11,
131}
132impl InstrumentType {
133 pub fn as_str_name(&self) -> &'static str {
138 match self {
139 Self::Unspecified => "INSTRUMENT_TYPE_UNSPECIFIED",
140 Self::Bond => "INSTRUMENT_TYPE_BOND",
141 Self::Share => "INSTRUMENT_TYPE_SHARE",
142 Self::Currency => "INSTRUMENT_TYPE_CURRENCY",
143 Self::Etf => "INSTRUMENT_TYPE_ETF",
144 Self::Futures => "INSTRUMENT_TYPE_FUTURES",
145 Self::Sp => "INSTRUMENT_TYPE_SP",
146 Self::Option => "INSTRUMENT_TYPE_OPTION",
147 Self::ClearingCertificate => "INSTRUMENT_TYPE_CLEARING_CERTIFICATE",
148 Self::Index => "INSTRUMENT_TYPE_INDEX",
149 Self::Commodity => "INSTRUMENT_TYPE_COMMODITY",
150 Self::Dfa => "INSTRUMENT_TYPE_DFA",
151 }
152 }
153 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
155 match value {
156 "INSTRUMENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
157 "INSTRUMENT_TYPE_BOND" => Some(Self::Bond),
158 "INSTRUMENT_TYPE_SHARE" => Some(Self::Share),
159 "INSTRUMENT_TYPE_CURRENCY" => Some(Self::Currency),
160 "INSTRUMENT_TYPE_ETF" => Some(Self::Etf),
161 "INSTRUMENT_TYPE_FUTURES" => Some(Self::Futures),
162 "INSTRUMENT_TYPE_SP" => Some(Self::Sp),
163 "INSTRUMENT_TYPE_OPTION" => Some(Self::Option),
164 "INSTRUMENT_TYPE_CLEARING_CERTIFICATE" => Some(Self::ClearingCertificate),
165 "INSTRUMENT_TYPE_INDEX" => Some(Self::Index),
166 "INSTRUMENT_TYPE_COMMODITY" => Some(Self::Commodity),
167 "INSTRUMENT_TYPE_DFA" => Some(Self::Dfa),
168 _ => None,
169 }
170 }
171}
172#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
174#[repr(i32)]
175pub enum InstrumentStatus {
176 Unspecified = 0,
178 Base = 1,
180 All = 2,
182}
183impl InstrumentStatus {
184 pub fn as_str_name(&self) -> &'static str {
189 match self {
190 Self::Unspecified => "INSTRUMENT_STATUS_UNSPECIFIED",
191 Self::Base => "INSTRUMENT_STATUS_BASE",
192 Self::All => "INSTRUMENT_STATUS_ALL",
193 }
194 }
195 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
197 match value {
198 "INSTRUMENT_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
199 "INSTRUMENT_STATUS_BASE" => Some(Self::Base),
200 "INSTRUMENT_STATUS_ALL" => Some(Self::All),
201 _ => None,
202 }
203 }
204}
205#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
207#[repr(i32)]
208pub enum SecurityTradingStatus {
209 Unspecified = 0,
211 NotAvailableForTrading = 1,
213 OpeningPeriod = 2,
215 ClosingPeriod = 3,
217 BreakInTrading = 4,
219 NormalTrading = 5,
221 ClosingAuction = 6,
223 DarkPoolAuction = 7,
225 DiscreteAuction = 8,
227 OpeningAuctionPeriod = 9,
229 TradingAtClosingAuctionPrice = 10,
231 SessionAssigned = 11,
233 SessionClose = 12,
235 SessionOpen = 13,
237 DealerNormalTrading = 14,
239 DealerBreakInTrading = 15,
241 DealerNotAvailableForTrading = 16,
243 StabilizationAuction = 17,
245}
246impl SecurityTradingStatus {
247 pub fn as_str_name(&self) -> &'static str {
252 match self {
253 Self::Unspecified => "SECURITY_TRADING_STATUS_UNSPECIFIED",
254 Self::NotAvailableForTrading => {
255 "SECURITY_TRADING_STATUS_NOT_AVAILABLE_FOR_TRADING"
256 }
257 Self::OpeningPeriod => "SECURITY_TRADING_STATUS_OPENING_PERIOD",
258 Self::ClosingPeriod => "SECURITY_TRADING_STATUS_CLOSING_PERIOD",
259 Self::BreakInTrading => "SECURITY_TRADING_STATUS_BREAK_IN_TRADING",
260 Self::NormalTrading => "SECURITY_TRADING_STATUS_NORMAL_TRADING",
261 Self::ClosingAuction => "SECURITY_TRADING_STATUS_CLOSING_AUCTION",
262 Self::DarkPoolAuction => "SECURITY_TRADING_STATUS_DARK_POOL_AUCTION",
263 Self::DiscreteAuction => "SECURITY_TRADING_STATUS_DISCRETE_AUCTION",
264 Self::OpeningAuctionPeriod => {
265 "SECURITY_TRADING_STATUS_OPENING_AUCTION_PERIOD"
266 }
267 Self::TradingAtClosingAuctionPrice => {
268 "SECURITY_TRADING_STATUS_TRADING_AT_CLOSING_AUCTION_PRICE"
269 }
270 Self::SessionAssigned => "SECURITY_TRADING_STATUS_SESSION_ASSIGNED",
271 Self::SessionClose => "SECURITY_TRADING_STATUS_SESSION_CLOSE",
272 Self::SessionOpen => "SECURITY_TRADING_STATUS_SESSION_OPEN",
273 Self::DealerNormalTrading => "SECURITY_TRADING_STATUS_DEALER_NORMAL_TRADING",
274 Self::DealerBreakInTrading => {
275 "SECURITY_TRADING_STATUS_DEALER_BREAK_IN_TRADING"
276 }
277 Self::DealerNotAvailableForTrading => {
278 "SECURITY_TRADING_STATUS_DEALER_NOT_AVAILABLE_FOR_TRADING"
279 }
280 Self::StabilizationAuction => "SECURITY_TRADING_STATUS_STABILIZATION_AUCTION",
281 }
282 }
283 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
285 match value {
286 "SECURITY_TRADING_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
287 "SECURITY_TRADING_STATUS_NOT_AVAILABLE_FOR_TRADING" => {
288 Some(Self::NotAvailableForTrading)
289 }
290 "SECURITY_TRADING_STATUS_OPENING_PERIOD" => Some(Self::OpeningPeriod),
291 "SECURITY_TRADING_STATUS_CLOSING_PERIOD" => Some(Self::ClosingPeriod),
292 "SECURITY_TRADING_STATUS_BREAK_IN_TRADING" => Some(Self::BreakInTrading),
293 "SECURITY_TRADING_STATUS_NORMAL_TRADING" => Some(Self::NormalTrading),
294 "SECURITY_TRADING_STATUS_CLOSING_AUCTION" => Some(Self::ClosingAuction),
295 "SECURITY_TRADING_STATUS_DARK_POOL_AUCTION" => Some(Self::DarkPoolAuction),
296 "SECURITY_TRADING_STATUS_DISCRETE_AUCTION" => Some(Self::DiscreteAuction),
297 "SECURITY_TRADING_STATUS_OPENING_AUCTION_PERIOD" => {
298 Some(Self::OpeningAuctionPeriod)
299 }
300 "SECURITY_TRADING_STATUS_TRADING_AT_CLOSING_AUCTION_PRICE" => {
301 Some(Self::TradingAtClosingAuctionPrice)
302 }
303 "SECURITY_TRADING_STATUS_SESSION_ASSIGNED" => Some(Self::SessionAssigned),
304 "SECURITY_TRADING_STATUS_SESSION_CLOSE" => Some(Self::SessionClose),
305 "SECURITY_TRADING_STATUS_SESSION_OPEN" => Some(Self::SessionOpen),
306 "SECURITY_TRADING_STATUS_DEALER_NORMAL_TRADING" => {
307 Some(Self::DealerNormalTrading)
308 }
309 "SECURITY_TRADING_STATUS_DEALER_BREAK_IN_TRADING" => {
310 Some(Self::DealerBreakInTrading)
311 }
312 "SECURITY_TRADING_STATUS_DEALER_NOT_AVAILABLE_FOR_TRADING" => {
313 Some(Self::DealerNotAvailableForTrading)
314 }
315 "SECURITY_TRADING_STATUS_STABILIZATION_AUCTION" => {
316 Some(Self::StabilizationAuction)
317 }
318 _ => None,
319 }
320 }
321}
322#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
324#[repr(i32)]
325pub enum PriceType {
326 Unspecified = 0,
328 Point = 1,
330 Currency = 2,
332}
333impl PriceType {
334 pub fn as_str_name(&self) -> &'static str {
339 match self {
340 Self::Unspecified => "PRICE_TYPE_UNSPECIFIED",
341 Self::Point => "PRICE_TYPE_POINT",
342 Self::Currency => "PRICE_TYPE_CURRENCY",
343 }
344 }
345 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
347 match value {
348 "PRICE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
349 "PRICE_TYPE_POINT" => Some(Self::Point),
350 "PRICE_TYPE_CURRENCY" => Some(Self::Currency),
351 _ => None,
352 }
353 }
354}
355#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
356#[repr(i32)]
357pub enum ResultSubscriptionStatus {
358 Unspecified = 0,
360 Ok = 1,
362 Error = 13,
364}
365impl ResultSubscriptionStatus {
366 pub fn as_str_name(&self) -> &'static str {
371 match self {
372 Self::Unspecified => "RESULT_SUBSCRIPTION_STATUS_UNSPECIFIED",
373 Self::Ok => "RESULT_SUBSCRIPTION_STATUS_OK",
374 Self::Error => "RESULT_SUBSCRIPTION_STATUS_ERROR",
375 }
376 }
377 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
379 match value {
380 "RESULT_SUBSCRIPTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
381 "RESULT_SUBSCRIPTION_STATUS_OK" => Some(Self::Ok),
382 "RESULT_SUBSCRIPTION_STATUS_ERROR" => Some(Self::Error),
383 _ => None,
384 }
385 }
386}
387#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
389#[repr(i32)]
390pub enum RealExchange {
391 Unspecified = 0,
393 Moex = 1,
395 Rts = 2,
397 Otc = 3,
399 Dealer = 4,
401}
402impl RealExchange {
403 pub fn as_str_name(&self) -> &'static str {
408 match self {
409 Self::Unspecified => "REAL_EXCHANGE_UNSPECIFIED",
410 Self::Moex => "REAL_EXCHANGE_MOEX",
411 Self::Rts => "REAL_EXCHANGE_RTS",
412 Self::Otc => "REAL_EXCHANGE_OTC",
413 Self::Dealer => "REAL_EXCHANGE_DEALER",
414 }
415 }
416 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
418 match value {
419 "REAL_EXCHANGE_UNSPECIFIED" => Some(Self::Unspecified),
420 "REAL_EXCHANGE_MOEX" => Some(Self::Moex),
421 "REAL_EXCHANGE_RTS" => Some(Self::Rts),
422 "REAL_EXCHANGE_OTC" => Some(Self::Otc),
423 "REAL_EXCHANGE_DEALER" => Some(Self::Dealer),
424 _ => None,
425 }
426 }
427}
428#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
430pub struct TradingSchedulesRequest {
431 #[prost(string, optional, tag = "1")]
433 pub exchange: ::core::option::Option<::prost::alloc::string::String>,
434 #[prost(message, optional, tag = "2")]
436 pub from: ::core::option::Option<::prost_types::Timestamp>,
437 #[prost(message, optional, tag = "3")]
439 pub to: ::core::option::Option<::prost_types::Timestamp>,
440}
441#[derive(Clone, PartialEq, ::prost::Message)]
443pub struct TradingSchedulesResponse {
444 #[prost(message, repeated, tag = "1")]
446 pub exchanges: ::prost::alloc::vec::Vec<TradingSchedule>,
447}
448#[derive(Clone, PartialEq, ::prost::Message)]
450pub struct TradingSchedule {
451 #[prost(string, tag = "1")]
453 pub exchange: ::prost::alloc::string::String,
454 #[prost(message, repeated, tag = "2")]
456 pub days: ::prost::alloc::vec::Vec<TradingDay>,
457}
458#[derive(Clone, PartialEq, ::prost::Message)]
460pub struct TradingDay {
461 #[prost(message, optional, tag = "1")]
463 pub date: ::core::option::Option<::prost_types::Timestamp>,
464 #[prost(bool, tag = "2")]
466 pub is_trading_day: bool,
467 #[prost(message, optional, tag = "3")]
469 pub start_time: ::core::option::Option<::prost_types::Timestamp>,
470 #[prost(message, optional, tag = "4")]
472 pub end_time: ::core::option::Option<::prost_types::Timestamp>,
473 #[prost(message, optional, tag = "7")]
475 pub opening_auction_start_time: ::core::option::Option<::prost_types::Timestamp>,
476 #[prost(message, optional, tag = "8")]
478 pub closing_auction_end_time: ::core::option::Option<::prost_types::Timestamp>,
479 #[prost(message, optional, tag = "9")]
481 pub evening_opening_auction_start_time: ::core::option::Option<
482 ::prost_types::Timestamp,
483 >,
484 #[prost(message, optional, tag = "10")]
486 pub evening_start_time: ::core::option::Option<::prost_types::Timestamp>,
487 #[prost(message, optional, tag = "11")]
489 pub evening_end_time: ::core::option::Option<::prost_types::Timestamp>,
490 #[prost(message, optional, tag = "12")]
492 pub clearing_start_time: ::core::option::Option<::prost_types::Timestamp>,
493 #[prost(message, optional, tag = "13")]
495 pub clearing_end_time: ::core::option::Option<::prost_types::Timestamp>,
496 #[prost(message, optional, tag = "14")]
498 pub premarket_start_time: ::core::option::Option<::prost_types::Timestamp>,
499 #[prost(message, optional, tag = "15")]
501 pub premarket_end_time: ::core::option::Option<::prost_types::Timestamp>,
502 #[prost(message, optional, tag = "16")]
504 pub closing_auction_start_time: ::core::option::Option<::prost_types::Timestamp>,
505 #[prost(message, optional, tag = "17")]
507 pub opening_auction_end_time: ::core::option::Option<::prost_types::Timestamp>,
508 #[prost(message, repeated, tag = "18")]
510 pub intervals: ::prost::alloc::vec::Vec<TradingInterval>,
511}
512#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
514pub struct InstrumentRequest {
515 #[prost(enumeration = "InstrumentIdType", tag = "1")]
517 pub id_type: i32,
518 #[prost(string, optional, tag = "2")]
520 pub class_code: ::core::option::Option<::prost::alloc::string::String>,
521 #[prost(string, tag = "3")]
523 pub id: ::prost::alloc::string::String,
524}
525#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
527pub struct InstrumentsRequest {
528 #[prost(enumeration = "InstrumentStatus", optional, tag = "1")]
530 pub instrument_status: ::core::option::Option<i32>,
531 #[prost(enumeration = "InstrumentExchangeType", optional, tag = "2")]
533 pub instrument_exchange: ::core::option::Option<i32>,
534}
535#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
537pub struct FilterOptionsRequest {
538 #[prost(string, optional, tag = "1")]
540 pub basic_asset_uid: ::core::option::Option<::prost::alloc::string::String>,
541 #[prost(string, optional, tag = "2")]
543 pub basic_asset_position_uid: ::core::option::Option<::prost::alloc::string::String>,
544 #[prost(string, optional, tag = "3")]
546 pub basic_instrument_id: ::core::option::Option<::prost::alloc::string::String>,
547}
548#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
550pub struct BondResponse {
551 #[prost(message, optional, tag = "1")]
553 pub instrument: ::core::option::Option<Bond>,
554}
555#[derive(Clone, PartialEq, ::prost::Message)]
557pub struct BondsResponse {
558 #[prost(message, repeated, tag = "1")]
560 pub instruments: ::prost::alloc::vec::Vec<Bond>,
561}
562#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
564pub struct GetBondCouponsRequest {
565 #[deprecated]
567 #[prost(string, tag = "1")]
568 pub figi: ::prost::alloc::string::String,
569 #[prost(message, optional, tag = "2")]
571 pub from: ::core::option::Option<::prost_types::Timestamp>,
572 #[prost(message, optional, tag = "3")]
574 pub to: ::core::option::Option<::prost_types::Timestamp>,
575 #[prost(string, tag = "4")]
577 pub instrument_id: ::prost::alloc::string::String,
578}
579#[derive(Clone, PartialEq, ::prost::Message)]
581pub struct GetBondCouponsResponse {
582 #[prost(message, repeated, tag = "1")]
583 pub events: ::prost::alloc::vec::Vec<Coupon>,
584}
585#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
587pub struct GetBondEventsRequest {
588 #[prost(message, optional, tag = "2")]
590 pub from: ::core::option::Option<::prost_types::Timestamp>,
591 #[prost(message, optional, tag = "3")]
593 pub to: ::core::option::Option<::prost_types::Timestamp>,
594 #[prost(string, tag = "4")]
596 pub instrument_id: ::prost::alloc::string::String,
597 #[prost(enumeration = "get_bond_events_request::EventType", tag = "5")]
599 pub r#type: i32,
600}
601pub mod get_bond_events_request {
603 #[derive(
604 Clone,
605 Copy,
606 Debug,
607 PartialEq,
608 Eq,
609 Hash,
610 PartialOrd,
611 Ord,
612 ::prost::Enumeration
613 )]
614 #[repr(i32)]
615 pub enum EventType {
616 Unspecified = 0,
618 Cpn = 1,
620 Call = 2,
622 Mty = 3,
624 Conv = 4,
626 }
627 impl EventType {
628 pub fn as_str_name(&self) -> &'static str {
633 match self {
634 Self::Unspecified => "EVENT_TYPE_UNSPECIFIED",
635 Self::Cpn => "EVENT_TYPE_CPN",
636 Self::Call => "EVENT_TYPE_CALL",
637 Self::Mty => "EVENT_TYPE_MTY",
638 Self::Conv => "EVENT_TYPE_CONV",
639 }
640 }
641 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
643 match value {
644 "EVENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
645 "EVENT_TYPE_CPN" => Some(Self::Cpn),
646 "EVENT_TYPE_CALL" => Some(Self::Call),
647 "EVENT_TYPE_MTY" => Some(Self::Mty),
648 "EVENT_TYPE_CONV" => Some(Self::Conv),
649 _ => None,
650 }
651 }
652 }
653}
654#[derive(Clone, PartialEq, ::prost::Message)]
656pub struct GetBondEventsResponse {
657 #[prost(message, repeated, tag = "1")]
658 pub events: ::prost::alloc::vec::Vec<get_bond_events_response::BondEvent>,
659}
660pub mod get_bond_events_response {
662 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
663 pub struct BondEvent {
664 #[prost(string, tag = "2")]
666 pub instrument_id: ::prost::alloc::string::String,
667 #[prost(int32, tag = "3")]
669 pub event_number: i32,
670 #[prost(message, optional, tag = "4")]
672 pub event_date: ::core::option::Option<::prost_types::Timestamp>,
673 #[prost(enumeration = "super::get_bond_events_request::EventType", tag = "5")]
675 pub event_type: i32,
676 #[prost(message, optional, tag = "6")]
678 pub event_total_vol: ::core::option::Option<super::Quotation>,
679 #[prost(message, optional, tag = "7")]
681 pub fix_date: ::core::option::Option<::prost_types::Timestamp>,
682 #[prost(message, optional, tag = "8")]
684 pub rate_date: ::core::option::Option<::prost_types::Timestamp>,
685 #[prost(message, optional, tag = "9")]
687 pub default_date: ::core::option::Option<::prost_types::Timestamp>,
688 #[prost(message, optional, tag = "10")]
690 pub real_pay_date: ::core::option::Option<::prost_types::Timestamp>,
691 #[prost(message, optional, tag = "11")]
693 pub pay_date: ::core::option::Option<::prost_types::Timestamp>,
694 #[prost(message, optional, tag = "12")]
696 pub pay_one_bond: ::core::option::Option<super::MoneyValue>,
697 #[prost(message, optional, tag = "13")]
699 pub money_flow_val: ::core::option::Option<super::MoneyValue>,
700 #[prost(string, tag = "14")]
702 pub execution: ::prost::alloc::string::String,
703 #[prost(string, tag = "15")]
705 pub operation_type: ::prost::alloc::string::String,
706 #[prost(message, optional, tag = "16")]
708 pub value: ::core::option::Option<super::Quotation>,
709 #[prost(string, tag = "17")]
711 pub note: ::prost::alloc::string::String,
712 #[prost(string, tag = "18")]
714 pub convert_to_fin_tool_id: ::prost::alloc::string::String,
715 #[prost(message, optional, tag = "19")]
717 pub coupon_start_date: ::core::option::Option<::prost_types::Timestamp>,
718 #[prost(message, optional, tag = "20")]
720 pub coupon_end_date: ::core::option::Option<::prost_types::Timestamp>,
721 #[prost(int32, tag = "21")]
723 pub coupon_period: i32,
724 #[prost(message, optional, tag = "22")]
726 pub coupon_interest_rate: ::core::option::Option<super::Quotation>,
727 }
728}
729#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
731pub struct Coupon {
732 #[prost(string, tag = "1")]
734 pub figi: ::prost::alloc::string::String,
735 #[prost(message, optional, tag = "2")]
737 pub coupon_date: ::core::option::Option<::prost_types::Timestamp>,
738 #[prost(int64, tag = "3")]
740 pub coupon_number: i64,
741 #[prost(message, optional, tag = "4")]
743 pub fix_date: ::core::option::Option<::prost_types::Timestamp>,
744 #[prost(message, optional, tag = "5")]
746 pub pay_one_bond: ::core::option::Option<MoneyValue>,
747 #[prost(enumeration = "CouponType", tag = "6")]
749 pub coupon_type: i32,
750 #[prost(message, optional, tag = "7")]
752 pub coupon_start_date: ::core::option::Option<::prost_types::Timestamp>,
753 #[prost(message, optional, tag = "8")]
755 pub coupon_end_date: ::core::option::Option<::prost_types::Timestamp>,
756 #[prost(int32, tag = "9")]
758 pub coupon_period: i32,
759}
760#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
762pub struct CurrencyResponse {
763 #[prost(message, optional, tag = "1")]
765 pub instrument: ::core::option::Option<Currency>,
766}
767#[derive(Clone, PartialEq, ::prost::Message)]
769pub struct CurrenciesResponse {
770 #[prost(message, repeated, tag = "1")]
772 pub instruments: ::prost::alloc::vec::Vec<Currency>,
773}
774#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
776pub struct EtfResponse {
777 #[prost(message, optional, tag = "1")]
779 pub instrument: ::core::option::Option<Etf>,
780}
781#[derive(Clone, PartialEq, ::prost::Message)]
783pub struct EtfsResponse {
784 #[prost(message, repeated, tag = "1")]
786 pub instruments: ::prost::alloc::vec::Vec<Etf>,
787}
788#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
790pub struct FutureResponse {
791 #[prost(message, optional, tag = "1")]
793 pub instrument: ::core::option::Option<Future>,
794}
795#[derive(Clone, PartialEq, ::prost::Message)]
797pub struct FuturesResponse {
798 #[prost(message, repeated, tag = "1")]
800 pub instruments: ::prost::alloc::vec::Vec<Future>,
801}
802#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
804pub struct OptionResponse {
805 #[prost(message, optional, tag = "1")]
807 pub instrument: ::core::option::Option<Option>,
808}
809#[derive(Clone, PartialEq, ::prost::Message)]
811pub struct OptionsResponse {
812 #[prost(message, repeated, tag = "1")]
814 pub instruments: ::prost::alloc::vec::Vec<Option>,
815}
816#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
818pub struct Option {
819 #[prost(string, tag = "1")]
821 pub uid: ::prost::alloc::string::String,
822 #[prost(string, tag = "2")]
824 pub position_uid: ::prost::alloc::string::String,
825 #[prost(string, tag = "3")]
827 pub ticker: ::prost::alloc::string::String,
828 #[prost(string, tag = "4")]
830 pub class_code: ::prost::alloc::string::String,
831 #[prost(string, tag = "5")]
833 pub basic_asset_position_uid: ::prost::alloc::string::String,
834 #[prost(enumeration = "SecurityTradingStatus", tag = "21")]
836 pub trading_status: i32,
837 #[prost(enumeration = "RealExchange", tag = "31")]
839 pub real_exchange: i32,
840 #[prost(enumeration = "OptionDirection", tag = "41")]
842 pub direction: i32,
843 #[prost(enumeration = "OptionPaymentType", tag = "42")]
845 pub payment_type: i32,
846 #[prost(enumeration = "OptionStyle", tag = "43")]
848 pub style: i32,
849 #[prost(enumeration = "OptionSettlementType", tag = "44")]
851 pub settlement_type: i32,
852 #[prost(string, tag = "101")]
854 pub name: ::prost::alloc::string::String,
855 #[prost(string, tag = "111")]
857 pub currency: ::prost::alloc::string::String,
858 #[prost(string, tag = "112")]
860 pub settlement_currency: ::prost::alloc::string::String,
861 #[prost(string, tag = "131")]
863 pub asset_type: ::prost::alloc::string::String,
864 #[prost(string, tag = "132")]
866 pub basic_asset: ::prost::alloc::string::String,
867 #[prost(string, tag = "141")]
869 pub exchange: ::prost::alloc::string::String,
870 #[prost(string, tag = "151")]
872 pub country_of_risk: ::prost::alloc::string::String,
873 #[prost(string, tag = "152")]
875 pub country_of_risk_name: ::prost::alloc::string::String,
876 #[prost(string, tag = "161")]
878 pub sector: ::prost::alloc::string::String,
879 #[prost(message, optional, tag = "162")]
881 pub brand: ::core::option::Option<BrandData>,
882 #[prost(int32, tag = "201")]
884 pub lot: i32,
885 #[prost(message, optional, tag = "211")]
887 pub basic_asset_size: ::core::option::Option<Quotation>,
888 #[deprecated]
890 #[prost(message, optional, tag = "221")]
891 pub klong: ::core::option::Option<Quotation>,
892 #[deprecated]
894 #[prost(message, optional, tag = "222")]
895 pub kshort: ::core::option::Option<Quotation>,
896 #[prost(message, optional, tag = "223")]
898 pub dlong: ::core::option::Option<Quotation>,
899 #[prost(message, optional, tag = "224")]
901 pub dshort: ::core::option::Option<Quotation>,
902 #[prost(message, optional, tag = "225")]
904 pub dlong_min: ::core::option::Option<Quotation>,
905 #[prost(message, optional, tag = "226")]
907 pub dshort_min: ::core::option::Option<Quotation>,
908 #[prost(message, optional, tag = "231")]
910 pub min_price_increment: ::core::option::Option<Quotation>,
911 #[prost(message, optional, tag = "241")]
913 pub strike_price: ::core::option::Option<MoneyValue>,
914 #[prost(message, optional, tag = "290")]
916 pub dlong_client: ::core::option::Option<Quotation>,
917 #[prost(message, optional, tag = "291")]
919 pub dshort_client: ::core::option::Option<Quotation>,
920 #[prost(message, optional, tag = "301")]
922 pub expiration_date: ::core::option::Option<::prost_types::Timestamp>,
923 #[prost(message, optional, tag = "311")]
925 pub first_trade_date: ::core::option::Option<::prost_types::Timestamp>,
926 #[prost(message, optional, tag = "312")]
928 pub last_trade_date: ::core::option::Option<::prost_types::Timestamp>,
929 #[prost(message, optional, tag = "321")]
931 pub first_1min_candle_date: ::core::option::Option<::prost_types::Timestamp>,
932 #[prost(message, optional, tag = "322")]
934 pub first_1day_candle_date: ::core::option::Option<::prost_types::Timestamp>,
935 #[prost(bool, tag = "401")]
937 pub short_enabled_flag: bool,
938 #[prost(bool, tag = "402")]
940 pub for_iis_flag: bool,
941 #[prost(bool, tag = "403")]
943 pub otc_flag: bool,
944 #[prost(bool, tag = "404")]
946 pub buy_available_flag: bool,
947 #[prost(bool, tag = "405")]
949 pub sell_available_flag: bool,
950 #[prost(bool, tag = "406")]
952 pub for_qual_investor_flag: bool,
953 #[prost(bool, tag = "407")]
955 pub weekend_flag: bool,
956 #[prost(bool, tag = "408")]
958 pub blocked_tca_flag: bool,
959 #[prost(bool, tag = "409")]
961 pub api_trade_available_flag: bool,
962 #[prost(string, repeated, tag = "410")]
964 pub required_tests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
965}
966#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
968pub struct ShareResponse {
969 #[prost(message, optional, tag = "1")]
971 pub instrument: ::core::option::Option<Share>,
972}
973#[derive(Clone, PartialEq, ::prost::Message)]
975pub struct SharesResponse {
976 #[prost(message, repeated, tag = "1")]
978 pub instruments: ::prost::alloc::vec::Vec<Share>,
979}
980#[derive(Clone, PartialEq, ::prost::Message)]
982pub struct StructuredNoteResponse {
983 #[prost(message, optional, tag = "1")]
985 pub instrument: ::core::option::Option<StructuredNote>,
986}
987#[derive(Clone, PartialEq, ::prost::Message)]
989pub struct StructuredNotesResponse {
990 #[prost(message, repeated, tag = "1")]
992 pub instruments: ::prost::alloc::vec::Vec<StructuredNote>,
993}
994#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
996pub struct Bond {
997 #[prost(string, tag = "1")]
999 pub figi: ::prost::alloc::string::String,
1000 #[prost(string, tag = "2")]
1002 pub ticker: ::prost::alloc::string::String,
1003 #[prost(string, tag = "3")]
1005 pub class_code: ::prost::alloc::string::String,
1006 #[prost(string, tag = "4")]
1008 pub isin: ::prost::alloc::string::String,
1009 #[prost(int32, tag = "5")]
1011 pub lot: i32,
1012 #[prost(string, tag = "6")]
1014 pub currency: ::prost::alloc::string::String,
1015 #[deprecated]
1017 #[prost(message, optional, tag = "7")]
1018 pub klong: ::core::option::Option<Quotation>,
1019 #[deprecated]
1021 #[prost(message, optional, tag = "8")]
1022 pub kshort: ::core::option::Option<Quotation>,
1023 #[prost(message, optional, tag = "9")]
1025 pub dlong: ::core::option::Option<Quotation>,
1026 #[prost(message, optional, tag = "10")]
1028 pub dshort: ::core::option::Option<Quotation>,
1029 #[prost(message, optional, tag = "11")]
1031 pub dlong_min: ::core::option::Option<Quotation>,
1032 #[prost(message, optional, tag = "12")]
1034 pub dshort_min: ::core::option::Option<Quotation>,
1035 #[prost(bool, tag = "13")]
1037 pub short_enabled_flag: bool,
1038 #[prost(string, tag = "15")]
1040 pub name: ::prost::alloc::string::String,
1041 #[prost(string, tag = "16")]
1043 pub exchange: ::prost::alloc::string::String,
1044 #[prost(int32, tag = "17")]
1046 pub coupon_quantity_per_year: i32,
1047 #[prost(message, optional, tag = "18")]
1049 pub maturity_date: ::core::option::Option<::prost_types::Timestamp>,
1050 #[prost(message, optional, tag = "19")]
1052 pub nominal: ::core::option::Option<MoneyValue>,
1053 #[prost(message, optional, tag = "20")]
1055 pub initial_nominal: ::core::option::Option<MoneyValue>,
1056 #[prost(message, optional, tag = "21")]
1058 pub state_reg_date: ::core::option::Option<::prost_types::Timestamp>,
1059 #[prost(message, optional, tag = "22")]
1061 pub placement_date: ::core::option::Option<::prost_types::Timestamp>,
1062 #[prost(message, optional, tag = "23")]
1064 pub placement_price: ::core::option::Option<MoneyValue>,
1065 #[prost(message, optional, tag = "24")]
1067 pub aci_value: ::core::option::Option<MoneyValue>,
1068 #[prost(string, tag = "25")]
1070 pub country_of_risk: ::prost::alloc::string::String,
1071 #[prost(string, tag = "26")]
1073 pub country_of_risk_name: ::prost::alloc::string::String,
1074 #[prost(string, tag = "27")]
1076 pub sector: ::prost::alloc::string::String,
1077 #[prost(string, tag = "28")]
1079 pub issue_kind: ::prost::alloc::string::String,
1080 #[prost(int64, tag = "29")]
1082 pub issue_size: i64,
1083 #[prost(int64, tag = "30")]
1085 pub issue_size_plan: i64,
1086 #[prost(enumeration = "SecurityTradingStatus", tag = "31")]
1088 pub trading_status: i32,
1089 #[prost(bool, tag = "32")]
1091 pub otc_flag: bool,
1092 #[prost(bool, tag = "33")]
1094 pub buy_available_flag: bool,
1095 #[prost(bool, tag = "34")]
1097 pub sell_available_flag: bool,
1098 #[prost(bool, tag = "35")]
1100 pub floating_coupon_flag: bool,
1101 #[prost(bool, tag = "36")]
1103 pub perpetual_flag: bool,
1104 #[prost(bool, tag = "37")]
1106 pub amortization_flag: bool,
1107 #[prost(message, optional, tag = "38")]
1109 pub min_price_increment: ::core::option::Option<Quotation>,
1110 #[prost(bool, tag = "39")]
1112 pub api_trade_available_flag: bool,
1113 #[prost(string, tag = "40")]
1115 pub uid: ::prost::alloc::string::String,
1116 #[prost(enumeration = "RealExchange", tag = "41")]
1118 pub real_exchange: i32,
1119 #[prost(string, tag = "42")]
1121 pub position_uid: ::prost::alloc::string::String,
1122 #[prost(string, tag = "43")]
1124 pub asset_uid: ::prost::alloc::string::String,
1125 #[prost(string, repeated, tag = "44")]
1127 pub required_tests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1128 #[prost(bool, tag = "51")]
1130 pub for_iis_flag: bool,
1131 #[prost(bool, tag = "52")]
1133 pub for_qual_investor_flag: bool,
1134 #[prost(bool, tag = "53")]
1136 pub weekend_flag: bool,
1137 #[prost(bool, tag = "54")]
1139 pub blocked_tca_flag: bool,
1140 #[prost(bool, tag = "55")]
1142 pub subordinated_flag: bool,
1143 #[prost(bool, tag = "56")]
1145 pub liquidity_flag: bool,
1146 #[prost(message, optional, tag = "61")]
1148 pub first_1min_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1149 #[prost(message, optional, tag = "62")]
1151 pub first_1day_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1152 #[prost(enumeration = "RiskLevel", tag = "63")]
1154 pub risk_level: i32,
1155 #[prost(message, optional, tag = "64")]
1157 pub brand: ::core::option::Option<BrandData>,
1158 #[prost(enumeration = "BondType", tag = "65")]
1160 pub bond_type: i32,
1161 #[prost(message, optional, tag = "69")]
1163 pub call_date: ::core::option::Option<::prost_types::Timestamp>,
1164 #[prost(message, optional, tag = "90")]
1166 pub dlong_client: ::core::option::Option<Quotation>,
1167 #[prost(message, optional, tag = "91")]
1169 pub dshort_client: ::core::option::Option<Quotation>,
1170}
1171#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1173pub struct Currency {
1174 #[prost(string, tag = "1")]
1176 pub figi: ::prost::alloc::string::String,
1177 #[prost(string, tag = "2")]
1179 pub ticker: ::prost::alloc::string::String,
1180 #[prost(string, tag = "3")]
1182 pub class_code: ::prost::alloc::string::String,
1183 #[prost(string, tag = "4")]
1185 pub isin: ::prost::alloc::string::String,
1186 #[prost(int32, tag = "5")]
1188 pub lot: i32,
1189 #[prost(string, tag = "6")]
1191 pub currency: ::prost::alloc::string::String,
1192 #[deprecated]
1194 #[prost(message, optional, tag = "7")]
1195 pub klong: ::core::option::Option<Quotation>,
1196 #[deprecated]
1198 #[prost(message, optional, tag = "8")]
1199 pub kshort: ::core::option::Option<Quotation>,
1200 #[prost(message, optional, tag = "9")]
1202 pub dlong: ::core::option::Option<Quotation>,
1203 #[prost(message, optional, tag = "10")]
1205 pub dshort: ::core::option::Option<Quotation>,
1206 #[prost(message, optional, tag = "11")]
1208 pub dlong_min: ::core::option::Option<Quotation>,
1209 #[prost(message, optional, tag = "12")]
1211 pub dshort_min: ::core::option::Option<Quotation>,
1212 #[prost(bool, tag = "13")]
1214 pub short_enabled_flag: bool,
1215 #[prost(string, tag = "15")]
1217 pub name: ::prost::alloc::string::String,
1218 #[prost(string, tag = "16")]
1220 pub exchange: ::prost::alloc::string::String,
1221 #[prost(message, optional, tag = "17")]
1223 pub nominal: ::core::option::Option<MoneyValue>,
1224 #[prost(string, tag = "18")]
1226 pub country_of_risk: ::prost::alloc::string::String,
1227 #[prost(string, tag = "19")]
1229 pub country_of_risk_name: ::prost::alloc::string::String,
1230 #[prost(enumeration = "SecurityTradingStatus", tag = "20")]
1232 pub trading_status: i32,
1233 #[prost(bool, tag = "21")]
1235 pub otc_flag: bool,
1236 #[prost(bool, tag = "22")]
1238 pub buy_available_flag: bool,
1239 #[prost(bool, tag = "23")]
1241 pub sell_available_flag: bool,
1242 #[prost(string, tag = "24")]
1244 pub iso_currency_name: ::prost::alloc::string::String,
1245 #[prost(message, optional, tag = "25")]
1247 pub min_price_increment: ::core::option::Option<Quotation>,
1248 #[prost(bool, tag = "26")]
1250 pub api_trade_available_flag: bool,
1251 #[prost(string, tag = "27")]
1253 pub uid: ::prost::alloc::string::String,
1254 #[prost(enumeration = "RealExchange", tag = "28")]
1256 pub real_exchange: i32,
1257 #[prost(string, tag = "29")]
1259 pub position_uid: ::prost::alloc::string::String,
1260 #[prost(string, repeated, tag = "30")]
1262 pub required_tests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1263 #[prost(string, tag = "31")]
1265 pub asset_uid: ::prost::alloc::string::String,
1266 #[prost(bool, tag = "41")]
1268 pub for_iis_flag: bool,
1269 #[prost(bool, tag = "52")]
1271 pub for_qual_investor_flag: bool,
1272 #[prost(bool, tag = "53")]
1274 pub weekend_flag: bool,
1275 #[prost(bool, tag = "54")]
1277 pub blocked_tca_flag: bool,
1278 #[prost(message, optional, tag = "56")]
1280 pub first_1min_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1281 #[prost(message, optional, tag = "57")]
1283 pub first_1day_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1284 #[prost(message, optional, tag = "60")]
1286 pub brand: ::core::option::Option<BrandData>,
1287 #[prost(message, optional, tag = "90")]
1289 pub dlong_client: ::core::option::Option<Quotation>,
1290 #[prost(message, optional, tag = "91")]
1292 pub dshort_client: ::core::option::Option<Quotation>,
1293}
1294#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1296pub struct Etf {
1297 #[prost(string, tag = "1")]
1299 pub figi: ::prost::alloc::string::String,
1300 #[prost(string, tag = "2")]
1302 pub ticker: ::prost::alloc::string::String,
1303 #[prost(string, tag = "3")]
1305 pub class_code: ::prost::alloc::string::String,
1306 #[prost(string, tag = "4")]
1308 pub isin: ::prost::alloc::string::String,
1309 #[prost(int32, tag = "5")]
1311 pub lot: i32,
1312 #[prost(string, tag = "6")]
1314 pub currency: ::prost::alloc::string::String,
1315 #[deprecated]
1317 #[prost(message, optional, tag = "7")]
1318 pub klong: ::core::option::Option<Quotation>,
1319 #[deprecated]
1321 #[prost(message, optional, tag = "8")]
1322 pub kshort: ::core::option::Option<Quotation>,
1323 #[prost(message, optional, tag = "9")]
1325 pub dlong: ::core::option::Option<Quotation>,
1326 #[prost(message, optional, tag = "10")]
1328 pub dshort: ::core::option::Option<Quotation>,
1329 #[prost(message, optional, tag = "11")]
1331 pub dlong_min: ::core::option::Option<Quotation>,
1332 #[prost(message, optional, tag = "12")]
1334 pub dshort_min: ::core::option::Option<Quotation>,
1335 #[prost(bool, tag = "13")]
1337 pub short_enabled_flag: bool,
1338 #[prost(string, tag = "15")]
1340 pub name: ::prost::alloc::string::String,
1341 #[prost(string, tag = "16")]
1343 pub exchange: ::prost::alloc::string::String,
1344 #[prost(message, optional, tag = "17")]
1346 pub fixed_commission: ::core::option::Option<Quotation>,
1347 #[prost(string, tag = "18")]
1349 pub focus_type: ::prost::alloc::string::String,
1350 #[prost(message, optional, tag = "19")]
1352 pub released_date: ::core::option::Option<::prost_types::Timestamp>,
1353 #[prost(message, optional, tag = "20")]
1355 pub num_shares: ::core::option::Option<Quotation>,
1356 #[prost(string, tag = "21")]
1358 pub country_of_risk: ::prost::alloc::string::String,
1359 #[prost(string, tag = "22")]
1361 pub country_of_risk_name: ::prost::alloc::string::String,
1362 #[prost(string, tag = "23")]
1364 pub sector: ::prost::alloc::string::String,
1365 #[prost(string, tag = "24")]
1367 pub rebalancing_freq: ::prost::alloc::string::String,
1368 #[prost(enumeration = "SecurityTradingStatus", tag = "25")]
1370 pub trading_status: i32,
1371 #[prost(bool, tag = "26")]
1373 pub otc_flag: bool,
1374 #[prost(bool, tag = "27")]
1376 pub buy_available_flag: bool,
1377 #[prost(bool, tag = "28")]
1379 pub sell_available_flag: bool,
1380 #[prost(message, optional, tag = "29")]
1382 pub min_price_increment: ::core::option::Option<Quotation>,
1383 #[prost(bool, tag = "30")]
1385 pub api_trade_available_flag: bool,
1386 #[prost(string, tag = "31")]
1388 pub uid: ::prost::alloc::string::String,
1389 #[prost(enumeration = "RealExchange", tag = "32")]
1391 pub real_exchange: i32,
1392 #[prost(string, tag = "33")]
1394 pub position_uid: ::prost::alloc::string::String,
1395 #[prost(string, tag = "34")]
1397 pub asset_uid: ::prost::alloc::string::String,
1398 #[prost(enumeration = "InstrumentExchangeType", tag = "35")]
1400 pub instrument_exchange: i32,
1401 #[prost(string, repeated, tag = "36")]
1403 pub required_tests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1404 #[prost(bool, tag = "41")]
1406 pub for_iis_flag: bool,
1407 #[prost(bool, tag = "42")]
1409 pub for_qual_investor_flag: bool,
1410 #[prost(bool, tag = "43")]
1412 pub weekend_flag: bool,
1413 #[prost(bool, tag = "44")]
1415 pub blocked_tca_flag: bool,
1416 #[prost(bool, tag = "45")]
1418 pub liquidity_flag: bool,
1419 #[prost(message, optional, tag = "56")]
1421 pub first_1min_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1422 #[prost(message, optional, tag = "57")]
1424 pub first_1day_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1425 #[prost(message, optional, tag = "60")]
1427 pub brand: ::core::option::Option<BrandData>,
1428 #[prost(message, optional, tag = "90")]
1430 pub dlong_client: ::core::option::Option<Quotation>,
1431 #[prost(message, optional, tag = "91")]
1433 pub dshort_client: ::core::option::Option<Quotation>,
1434}
1435#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1437pub struct Future {
1438 #[prost(string, tag = "1")]
1440 pub figi: ::prost::alloc::string::String,
1441 #[prost(string, tag = "2")]
1443 pub ticker: ::prost::alloc::string::String,
1444 #[prost(string, tag = "3")]
1446 pub class_code: ::prost::alloc::string::String,
1447 #[prost(int32, tag = "4")]
1449 pub lot: i32,
1450 #[prost(string, tag = "5")]
1452 pub currency: ::prost::alloc::string::String,
1453 #[deprecated]
1455 #[prost(message, optional, tag = "6")]
1456 pub klong: ::core::option::Option<Quotation>,
1457 #[deprecated]
1459 #[prost(message, optional, tag = "7")]
1460 pub kshort: ::core::option::Option<Quotation>,
1461 #[prost(message, optional, tag = "8")]
1463 pub dlong: ::core::option::Option<Quotation>,
1464 #[prost(message, optional, tag = "9")]
1466 pub dshort: ::core::option::Option<Quotation>,
1467 #[prost(message, optional, tag = "10")]
1469 pub dlong_min: ::core::option::Option<Quotation>,
1470 #[prost(message, optional, tag = "11")]
1472 pub dshort_min: ::core::option::Option<Quotation>,
1473 #[prost(bool, tag = "12")]
1475 pub short_enabled_flag: bool,
1476 #[prost(string, tag = "13")]
1478 pub name: ::prost::alloc::string::String,
1479 #[prost(string, tag = "14")]
1481 pub exchange: ::prost::alloc::string::String,
1482 #[prost(message, optional, tag = "15")]
1484 pub first_trade_date: ::core::option::Option<::prost_types::Timestamp>,
1485 #[prost(message, optional, tag = "16")]
1487 pub last_trade_date: ::core::option::Option<::prost_types::Timestamp>,
1488 #[prost(string, tag = "17")]
1490 pub futures_type: ::prost::alloc::string::String,
1491 #[prost(string, tag = "18")]
1493 pub asset_type: ::prost::alloc::string::String,
1494 #[prost(string, tag = "19")]
1496 pub basic_asset: ::prost::alloc::string::String,
1497 #[prost(message, optional, tag = "20")]
1499 pub basic_asset_size: ::core::option::Option<Quotation>,
1500 #[prost(string, tag = "21")]
1502 pub country_of_risk: ::prost::alloc::string::String,
1503 #[prost(string, tag = "22")]
1505 pub country_of_risk_name: ::prost::alloc::string::String,
1506 #[prost(string, tag = "23")]
1508 pub sector: ::prost::alloc::string::String,
1509 #[prost(message, optional, tag = "24")]
1511 pub expiration_date: ::core::option::Option<::prost_types::Timestamp>,
1512 #[prost(enumeration = "SecurityTradingStatus", tag = "25")]
1514 pub trading_status: i32,
1515 #[prost(bool, tag = "26")]
1517 pub otc_flag: bool,
1518 #[prost(bool, tag = "27")]
1520 pub buy_available_flag: bool,
1521 #[prost(bool, tag = "28")]
1523 pub sell_available_flag: bool,
1524 #[prost(message, optional, tag = "29")]
1526 pub min_price_increment: ::core::option::Option<Quotation>,
1527 #[prost(bool, tag = "30")]
1529 pub api_trade_available_flag: bool,
1530 #[prost(string, tag = "31")]
1532 pub uid: ::prost::alloc::string::String,
1533 #[prost(enumeration = "RealExchange", tag = "32")]
1535 pub real_exchange: i32,
1536 #[prost(string, tag = "33")]
1538 pub position_uid: ::prost::alloc::string::String,
1539 #[prost(string, tag = "34")]
1541 pub basic_asset_position_uid: ::prost::alloc::string::String,
1542 #[prost(string, repeated, tag = "35")]
1544 pub required_tests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1545 #[prost(bool, tag = "41")]
1547 pub for_iis_flag: bool,
1548 #[prost(bool, tag = "42")]
1550 pub for_qual_investor_flag: bool,
1551 #[prost(bool, tag = "43")]
1553 pub weekend_flag: bool,
1554 #[prost(bool, tag = "44")]
1556 pub blocked_tca_flag: bool,
1557 #[prost(message, optional, tag = "56")]
1559 pub first_1min_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1560 #[prost(message, optional, tag = "57")]
1562 pub first_1day_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1563 #[prost(message, optional, tag = "61")]
1565 pub initial_margin_on_buy: ::core::option::Option<MoneyValue>,
1566 #[prost(message, optional, tag = "62")]
1568 pub initial_margin_on_sell: ::core::option::Option<MoneyValue>,
1569 #[prost(message, optional, tag = "63")]
1571 pub min_price_increment_amount: ::core::option::Option<Quotation>,
1572 #[prost(message, optional, tag = "64")]
1574 pub brand: ::core::option::Option<BrandData>,
1575 #[prost(message, optional, tag = "90")]
1577 pub dlong_client: ::core::option::Option<Quotation>,
1578 #[prost(message, optional, tag = "91")]
1580 pub dshort_client: ::core::option::Option<Quotation>,
1581}
1582#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1584pub struct Share {
1585 #[prost(string, tag = "1")]
1587 pub figi: ::prost::alloc::string::String,
1588 #[prost(string, tag = "2")]
1590 pub ticker: ::prost::alloc::string::String,
1591 #[prost(string, tag = "3")]
1593 pub class_code: ::prost::alloc::string::String,
1594 #[prost(string, tag = "4")]
1596 pub isin: ::prost::alloc::string::String,
1597 #[prost(int32, tag = "5")]
1599 pub lot: i32,
1600 #[prost(string, tag = "6")]
1602 pub currency: ::prost::alloc::string::String,
1603 #[deprecated]
1605 #[prost(message, optional, tag = "7")]
1606 pub klong: ::core::option::Option<Quotation>,
1607 #[deprecated]
1609 #[prost(message, optional, tag = "8")]
1610 pub kshort: ::core::option::Option<Quotation>,
1611 #[prost(message, optional, tag = "9")]
1613 pub dlong: ::core::option::Option<Quotation>,
1614 #[prost(message, optional, tag = "10")]
1616 pub dshort: ::core::option::Option<Quotation>,
1617 #[prost(message, optional, tag = "11")]
1619 pub dlong_min: ::core::option::Option<Quotation>,
1620 #[prost(message, optional, tag = "12")]
1622 pub dshort_min: ::core::option::Option<Quotation>,
1623 #[prost(bool, tag = "13")]
1625 pub short_enabled_flag: bool,
1626 #[prost(string, tag = "15")]
1628 pub name: ::prost::alloc::string::String,
1629 #[prost(string, tag = "16")]
1631 pub exchange: ::prost::alloc::string::String,
1632 #[prost(message, optional, tag = "17")]
1634 pub ipo_date: ::core::option::Option<::prost_types::Timestamp>,
1635 #[prost(int64, tag = "18")]
1637 pub issue_size: i64,
1638 #[prost(string, tag = "19")]
1640 pub country_of_risk: ::prost::alloc::string::String,
1641 #[prost(string, tag = "20")]
1643 pub country_of_risk_name: ::prost::alloc::string::String,
1644 #[prost(string, tag = "21")]
1646 pub sector: ::prost::alloc::string::String,
1647 #[prost(int64, tag = "22")]
1649 pub issue_size_plan: i64,
1650 #[prost(message, optional, tag = "23")]
1652 pub nominal: ::core::option::Option<MoneyValue>,
1653 #[prost(enumeration = "SecurityTradingStatus", tag = "25")]
1655 pub trading_status: i32,
1656 #[prost(bool, tag = "26")]
1658 pub otc_flag: bool,
1659 #[prost(bool, tag = "27")]
1661 pub buy_available_flag: bool,
1662 #[prost(bool, tag = "28")]
1664 pub sell_available_flag: bool,
1665 #[prost(bool, tag = "29")]
1667 pub div_yield_flag: bool,
1668 #[prost(enumeration = "ShareType", tag = "30")]
1670 pub share_type: i32,
1671 #[prost(message, optional, tag = "31")]
1673 pub min_price_increment: ::core::option::Option<Quotation>,
1674 #[prost(bool, tag = "32")]
1676 pub api_trade_available_flag: bool,
1677 #[prost(string, tag = "33")]
1679 pub uid: ::prost::alloc::string::String,
1680 #[prost(enumeration = "RealExchange", tag = "34")]
1682 pub real_exchange: i32,
1683 #[prost(string, tag = "35")]
1685 pub position_uid: ::prost::alloc::string::String,
1686 #[prost(string, tag = "36")]
1688 pub asset_uid: ::prost::alloc::string::String,
1689 #[prost(enumeration = "InstrumentExchangeType", tag = "37")]
1691 pub instrument_exchange: i32,
1692 #[prost(string, repeated, tag = "38")]
1694 pub required_tests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1695 #[prost(bool, tag = "46")]
1697 pub for_iis_flag: bool,
1698 #[prost(bool, tag = "47")]
1700 pub for_qual_investor_flag: bool,
1701 #[prost(bool, tag = "48")]
1703 pub weekend_flag: bool,
1704 #[prost(bool, tag = "49")]
1706 pub blocked_tca_flag: bool,
1707 #[prost(bool, tag = "50")]
1709 pub liquidity_flag: bool,
1710 #[prost(message, optional, tag = "56")]
1712 pub first_1min_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1713 #[prost(message, optional, tag = "57")]
1715 pub first_1day_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1716 #[prost(message, optional, tag = "60")]
1718 pub brand: ::core::option::Option<BrandData>,
1719 #[prost(message, optional, tag = "90")]
1721 pub dlong_client: ::core::option::Option<Quotation>,
1722 #[prost(message, optional, tag = "91")]
1724 pub dshort_client: ::core::option::Option<Quotation>,
1725}
1726#[derive(Clone, PartialEq, ::prost::Message)]
1728pub struct StructuredNote {
1729 #[prost(string, tag = "1")]
1731 pub uid: ::prost::alloc::string::String,
1732 #[prost(string, tag = "2")]
1734 pub figi: ::prost::alloc::string::String,
1735 #[prost(string, tag = "3")]
1737 pub ticker: ::prost::alloc::string::String,
1738 #[prost(string, tag = "4")]
1740 pub class_code: ::prost::alloc::string::String,
1741 #[prost(string, tag = "5")]
1743 pub isin: ::prost::alloc::string::String,
1744 #[prost(string, tag = "6")]
1746 pub name: ::prost::alloc::string::String,
1747 #[prost(string, tag = "7")]
1749 pub asset_uid: ::prost::alloc::string::String,
1750 #[prost(string, tag = "8")]
1752 pub position_uid: ::prost::alloc::string::String,
1753 #[prost(message, optional, tag = "9")]
1755 pub min_price_increment: ::core::option::Option<Quotation>,
1756 #[prost(int32, tag = "10")]
1758 pub lot: i32,
1759 #[prost(message, optional, tag = "11")]
1761 pub nominal: ::core::option::Option<MoneyValue>,
1762 #[prost(string, tag = "12")]
1764 pub currency: ::prost::alloc::string::String,
1765 #[prost(message, optional, tag = "13")]
1767 pub maturity_date: ::core::option::Option<::prost_types::Timestamp>,
1768 #[prost(message, optional, tag = "14")]
1770 pub placement_date: ::core::option::Option<::prost_types::Timestamp>,
1771 #[prost(string, tag = "15")]
1773 pub issue_kind: ::prost::alloc::string::String,
1774 #[prost(int32, tag = "16")]
1776 pub issue_size: i32,
1777 #[prost(int32, tag = "17")]
1779 pub issue_size_plan: i32,
1780 #[prost(message, optional, tag = "18")]
1782 pub dlong_client: ::core::option::Option<Quotation>,
1783 #[prost(message, optional, tag = "19")]
1785 pub dshort_client: ::core::option::Option<Quotation>,
1786 #[prost(bool, tag = "20")]
1788 pub short_enabled_flag: bool,
1789 #[prost(string, tag = "21")]
1791 pub exchange: ::prost::alloc::string::String,
1792 #[prost(enumeration = "SecurityTradingStatus", tag = "22")]
1794 pub trading_status: i32,
1795 #[prost(bool, tag = "23")]
1797 pub api_trade_available_flag: bool,
1798 #[prost(bool, tag = "24")]
1800 pub buy_available_flag: bool,
1801 #[prost(bool, tag = "25")]
1803 pub sell_available_flag: bool,
1804 #[prost(bool, tag = "26")]
1806 pub limit_order_available_flag: bool,
1807 #[prost(bool, tag = "27")]
1809 pub market_order_available_flag: bool,
1810 #[prost(bool, tag = "28")]
1812 pub bestprice_order_available_flag: bool,
1813 #[prost(bool, tag = "29")]
1815 pub weekend_flag: bool,
1816 #[prost(bool, tag = "30")]
1818 pub liquidity_flag: bool,
1819 #[prost(bool, tag = "31")]
1821 pub for_iis_flag: bool,
1822 #[prost(bool, tag = "32")]
1824 pub for_qual_investor_flag: bool,
1825 #[prost(bool, tag = "33")]
1827 pub pawnshop_list_flag: bool,
1828 #[prost(enumeration = "RealExchange", tag = "34")]
1830 pub real_exchange: i32,
1831 #[prost(message, optional, tag = "35")]
1833 pub first_1min_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1834 #[prost(message, optional, tag = "36")]
1836 pub first_1day_candle_date: ::core::option::Option<::prost_types::Timestamp>,
1837 #[prost(string, tag = "37")]
1839 pub borrow_name: ::prost::alloc::string::String,
1840 #[prost(string, tag = "38")]
1842 pub r#type: ::prost::alloc::string::String,
1843 #[prost(enumeration = "structured_note::LogicPortfolio", tag = "39")]
1845 pub logic_portfolio: i32,
1846 #[prost(enumeration = "AssetType", tag = "40")]
1848 pub asset_type: i32,
1849 #[prost(message, repeated, tag = "41")]
1851 pub basic_assets: ::prost::alloc::vec::Vec<structured_note::BasicAsset>,
1852 #[prost(message, optional, tag = "42")]
1854 pub safety_barrier: ::core::option::Option<Quotation>,
1855 #[prost(string, tag = "43")]
1857 pub coupon_period_base: ::prost::alloc::string::String,
1858 #[prost(enumeration = "structured_note::ObservationPrinciple", tag = "44")]
1860 pub observation_principle: i32,
1861 #[prost(string, tag = "45")]
1863 pub observation_frequency: ::prost::alloc::string::String,
1864 #[prost(message, optional, tag = "46")]
1866 pub initial_price_fixing_date: ::core::option::Option<::prost_types::Timestamp>,
1867 #[prost(message, repeated, tag = "47")]
1869 pub r#yield: ::prost::alloc::vec::Vec<structured_note::Yield>,
1870 #[prost(bool, tag = "48")]
1872 pub coupon_saving_flag: bool,
1873 #[prost(string, tag = "49")]
1875 pub sector: ::prost::alloc::string::String,
1876 #[prost(string, tag = "50")]
1878 pub country_of_risk: ::prost::alloc::string::String,
1879 #[prost(string, tag = "51")]
1881 pub country_of_risk_name: ::prost::alloc::string::String,
1882 #[prost(string, tag = "52")]
1884 pub logo_name: ::prost::alloc::string::String,
1885 #[prost(string, repeated, tag = "53")]
1887 pub required_tests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1888}
1889pub mod structured_note {
1891 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1893 pub struct BasicAsset {
1894 #[prost(string, tag = "1")]
1896 pub uid: ::prost::alloc::string::String,
1897 #[prost(enumeration = "super::AssetType", tag = "2")]
1899 pub r#type: i32,
1900 #[prost(message, optional, tag = "3")]
1902 pub initial_price: ::core::option::Option<super::Quotation>,
1903 }
1904 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1906 pub struct Yield {
1907 #[prost(enumeration = "YieldType", tag = "1")]
1909 pub r#type: i32,
1910 #[prost(message, optional, tag = "2")]
1912 pub value: ::core::option::Option<super::Quotation>,
1913 }
1914 #[derive(
1916 Clone,
1917 Copy,
1918 Debug,
1919 PartialEq,
1920 Eq,
1921 Hash,
1922 PartialOrd,
1923 Ord,
1924 ::prost::Enumeration
1925 )]
1926 #[repr(i32)]
1927 pub enum LogicPortfolio {
1928 Unspecified = 0,
1930 Volatility = 1,
1932 Correlation = 2,
1934 }
1935 impl LogicPortfolio {
1936 pub fn as_str_name(&self) -> &'static str {
1941 match self {
1942 Self::Unspecified => "LOGIC_PORTFOLIO_UNSPECIFIED",
1943 Self::Volatility => "LOGIC_PORTFOLIO_VOLATILITY",
1944 Self::Correlation => "LOGIC_PORTFOLIO_CORRELATION",
1945 }
1946 }
1947 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1949 match value {
1950 "LOGIC_PORTFOLIO_UNSPECIFIED" => Some(Self::Unspecified),
1951 "LOGIC_PORTFOLIO_VOLATILITY" => Some(Self::Volatility),
1952 "LOGIC_PORTFOLIO_CORRELATION" => Some(Self::Correlation),
1953 _ => None,
1954 }
1955 }
1956 }
1957 #[derive(
1959 Clone,
1960 Copy,
1961 Debug,
1962 PartialEq,
1963 Eq,
1964 Hash,
1965 PartialOrd,
1966 Ord,
1967 ::prost::Enumeration
1968 )]
1969 #[repr(i32)]
1970 pub enum ObservationPrinciple {
1971 Unspecified = 0,
1973 WorstBasicAsset = 1,
1975 BestBasicAsset = 2,
1977 AverageOfBasicAssets = 3,
1979 SingleBasicAssetPerformance = 4,
1981 }
1982 impl ObservationPrinciple {
1983 pub fn as_str_name(&self) -> &'static str {
1988 match self {
1989 Self::Unspecified => "OBSERVATION_PRINCIPLE_UNSPECIFIED",
1990 Self::WorstBasicAsset => "OBSERVATION_PRINCIPLE_WORST_BASIC_ASSET",
1991 Self::BestBasicAsset => "OBSERVATION_PRINCIPLE_BEST_BASIC_ASSET",
1992 Self::AverageOfBasicAssets => {
1993 "OBSERVATION_PRINCIPLE_AVERAGE_OF_BASIC_ASSETS"
1994 }
1995 Self::SingleBasicAssetPerformance => {
1996 "OBSERVATION_PRINCIPLE_SINGLE_BASIC_ASSET_PERFORMANCE"
1997 }
1998 }
1999 }
2000 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2002 match value {
2003 "OBSERVATION_PRINCIPLE_UNSPECIFIED" => Some(Self::Unspecified),
2004 "OBSERVATION_PRINCIPLE_WORST_BASIC_ASSET" => Some(Self::WorstBasicAsset),
2005 "OBSERVATION_PRINCIPLE_BEST_BASIC_ASSET" => Some(Self::BestBasicAsset),
2006 "OBSERVATION_PRINCIPLE_AVERAGE_OF_BASIC_ASSETS" => {
2007 Some(Self::AverageOfBasicAssets)
2008 }
2009 "OBSERVATION_PRINCIPLE_SINGLE_BASIC_ASSET_PERFORMANCE" => {
2010 Some(Self::SingleBasicAssetPerformance)
2011 }
2012 _ => None,
2013 }
2014 }
2015 }
2016 #[derive(
2018 Clone,
2019 Copy,
2020 Debug,
2021 PartialEq,
2022 Eq,
2023 Hash,
2024 PartialOrd,
2025 Ord,
2026 ::prost::Enumeration
2027 )]
2028 #[repr(i32)]
2029 pub enum YieldType {
2030 Unspecified = 0,
2032 GuarantedCoupon = 1,
2034 ConditionalCoupon = 2,
2036 Participation = 3,
2038 }
2039 impl YieldType {
2040 pub fn as_str_name(&self) -> &'static str {
2045 match self {
2046 Self::Unspecified => "YIELD_TYPE_UNSPECIFIED",
2047 Self::GuarantedCoupon => "YIELD_TYPE_GUARANTED_COUPON",
2048 Self::ConditionalCoupon => "YIELD_TYPE_CONDITIONAL_COUPON",
2049 Self::Participation => "YIELD_TYPE_PARTICIPATION",
2050 }
2051 }
2052 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2054 match value {
2055 "YIELD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2056 "YIELD_TYPE_GUARANTED_COUPON" => Some(Self::GuarantedCoupon),
2057 "YIELD_TYPE_CONDITIONAL_COUPON" => Some(Self::ConditionalCoupon),
2058 "YIELD_TYPE_PARTICIPATION" => Some(Self::Participation),
2059 _ => None,
2060 }
2061 }
2062 }
2063}
2064#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2066pub struct GetAccruedInterestsRequest {
2067 #[deprecated]
2069 #[prost(string, tag = "1")]
2070 pub figi: ::prost::alloc::string::String,
2071 #[prost(message, optional, tag = "2")]
2073 pub from: ::core::option::Option<::prost_types::Timestamp>,
2074 #[prost(message, optional, tag = "3")]
2076 pub to: ::core::option::Option<::prost_types::Timestamp>,
2077 #[prost(string, tag = "4")]
2079 pub instrument_id: ::prost::alloc::string::String,
2080}
2081#[derive(Clone, PartialEq, ::prost::Message)]
2083pub struct GetAccruedInterestsResponse {
2084 #[prost(message, repeated, tag = "1")]
2086 pub accrued_interests: ::prost::alloc::vec::Vec<AccruedInterest>,
2087}
2088#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2090pub struct AccruedInterest {
2091 #[prost(message, optional, tag = "1")]
2093 pub date: ::core::option::Option<::prost_types::Timestamp>,
2094 #[prost(message, optional, tag = "2")]
2096 pub value: ::core::option::Option<Quotation>,
2097 #[prost(message, optional, tag = "3")]
2099 pub value_percent: ::core::option::Option<Quotation>,
2100 #[prost(message, optional, tag = "4")]
2102 pub nominal: ::core::option::Option<Quotation>,
2103}
2104#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2106pub struct GetFuturesMarginRequest {
2107 #[deprecated]
2109 #[prost(string, tag = "1")]
2110 pub figi: ::prost::alloc::string::String,
2111 #[prost(string, tag = "4")]
2113 pub instrument_id: ::prost::alloc::string::String,
2114}
2115#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2117pub struct GetFuturesMarginResponse {
2118 #[prost(message, optional, tag = "1")]
2120 pub initial_margin_on_buy: ::core::option::Option<MoneyValue>,
2121 #[prost(message, optional, tag = "2")]
2123 pub initial_margin_on_sell: ::core::option::Option<MoneyValue>,
2124 #[prost(message, optional, tag = "3")]
2126 pub min_price_increment: ::core::option::Option<Quotation>,
2127 #[prost(message, optional, tag = "4")]
2129 pub min_price_increment_amount: ::core::option::Option<Quotation>,
2130}
2131#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2133pub struct InstrumentResponse {
2134 #[prost(message, optional, tag = "1")]
2136 pub instrument: ::core::option::Option<Instrument>,
2137}
2138#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2140pub struct Instrument {
2141 #[prost(string, tag = "1")]
2143 pub figi: ::prost::alloc::string::String,
2144 #[prost(string, tag = "2")]
2146 pub ticker: ::prost::alloc::string::String,
2147 #[prost(string, tag = "3")]
2149 pub class_code: ::prost::alloc::string::String,
2150 #[prost(string, tag = "4")]
2152 pub isin: ::prost::alloc::string::String,
2153 #[prost(int32, tag = "5")]
2155 pub lot: i32,
2156 #[prost(string, tag = "6")]
2158 pub currency: ::prost::alloc::string::String,
2159 #[deprecated]
2161 #[prost(message, optional, tag = "7")]
2162 pub klong: ::core::option::Option<Quotation>,
2163 #[deprecated]
2165 #[prost(message, optional, tag = "8")]
2166 pub kshort: ::core::option::Option<Quotation>,
2167 #[prost(message, optional, tag = "9")]
2169 pub dlong: ::core::option::Option<Quotation>,
2170 #[prost(message, optional, tag = "10")]
2172 pub dshort: ::core::option::Option<Quotation>,
2173 #[prost(message, optional, tag = "11")]
2175 pub dlong_min: ::core::option::Option<Quotation>,
2176 #[prost(message, optional, tag = "12")]
2178 pub dshort_min: ::core::option::Option<Quotation>,
2179 #[prost(bool, tag = "13")]
2181 pub short_enabled_flag: bool,
2182 #[prost(string, tag = "14")]
2184 pub name: ::prost::alloc::string::String,
2185 #[prost(string, tag = "15")]
2187 pub exchange: ::prost::alloc::string::String,
2188 #[prost(string, tag = "16")]
2190 pub country_of_risk: ::prost::alloc::string::String,
2191 #[prost(string, tag = "17")]
2193 pub country_of_risk_name: ::prost::alloc::string::String,
2194 #[prost(string, tag = "18")]
2196 pub instrument_type: ::prost::alloc::string::String,
2197 #[prost(enumeration = "SecurityTradingStatus", tag = "19")]
2199 pub trading_status: i32,
2200 #[prost(bool, tag = "20")]
2202 pub otc_flag: bool,
2203 #[prost(bool, tag = "21")]
2205 pub buy_available_flag: bool,
2206 #[prost(bool, tag = "22")]
2208 pub sell_available_flag: bool,
2209 #[prost(message, optional, tag = "23")]
2211 pub min_price_increment: ::core::option::Option<Quotation>,
2212 #[prost(bool, tag = "24")]
2214 pub api_trade_available_flag: bool,
2215 #[prost(string, tag = "25")]
2217 pub uid: ::prost::alloc::string::String,
2218 #[prost(enumeration = "RealExchange", tag = "26")]
2220 pub real_exchange: i32,
2221 #[prost(string, tag = "27")]
2223 pub position_uid: ::prost::alloc::string::String,
2224 #[prost(string, tag = "28")]
2226 pub asset_uid: ::prost::alloc::string::String,
2227 #[prost(string, repeated, tag = "29")]
2229 pub required_tests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2230 #[prost(bool, tag = "36")]
2232 pub for_iis_flag: bool,
2233 #[prost(bool, tag = "37")]
2235 pub for_qual_investor_flag: bool,
2236 #[prost(bool, tag = "38")]
2238 pub weekend_flag: bool,
2239 #[prost(bool, tag = "39")]
2241 pub blocked_tca_flag: bool,
2242 #[prost(enumeration = "InstrumentType", tag = "40")]
2244 pub instrument_kind: i32,
2245 #[prost(message, optional, tag = "56")]
2247 pub first_1min_candle_date: ::core::option::Option<::prost_types::Timestamp>,
2248 #[prost(message, optional, tag = "57")]
2250 pub first_1day_candle_date: ::core::option::Option<::prost_types::Timestamp>,
2251 #[prost(message, optional, tag = "60")]
2253 pub brand: ::core::option::Option<BrandData>,
2254 #[prost(message, optional, tag = "490")]
2256 pub dlong_client: ::core::option::Option<Quotation>,
2257 #[prost(message, optional, tag = "491")]
2259 pub dshort_client: ::core::option::Option<Quotation>,
2260}
2261#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2263pub struct GetDividendsRequest {
2264 #[deprecated]
2266 #[prost(string, tag = "1")]
2267 pub figi: ::prost::alloc::string::String,
2268 #[prost(message, optional, tag = "2")]
2270 pub from: ::core::option::Option<::prost_types::Timestamp>,
2271 #[prost(message, optional, tag = "3")]
2273 pub to: ::core::option::Option<::prost_types::Timestamp>,
2274 #[prost(string, tag = "4")]
2276 pub instrument_id: ::prost::alloc::string::String,
2277}
2278#[derive(Clone, PartialEq, ::prost::Message)]
2280pub struct GetDividendsResponse {
2281 #[prost(message, repeated, tag = "1")]
2282 pub dividends: ::prost::alloc::vec::Vec<Dividend>,
2283}
2284#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2286pub struct Dividend {
2287 #[prost(message, optional, tag = "1")]
2289 pub dividend_net: ::core::option::Option<MoneyValue>,
2290 #[prost(message, optional, tag = "2")]
2292 pub payment_date: ::core::option::Option<::prost_types::Timestamp>,
2293 #[prost(message, optional, tag = "3")]
2295 pub declared_date: ::core::option::Option<::prost_types::Timestamp>,
2296 #[prost(message, optional, tag = "4")]
2298 pub last_buy_date: ::core::option::Option<::prost_types::Timestamp>,
2299 #[prost(string, tag = "5")]
2301 pub dividend_type: ::prost::alloc::string::String,
2302 #[prost(message, optional, tag = "6")]
2304 pub record_date: ::core::option::Option<::prost_types::Timestamp>,
2305 #[prost(string, tag = "7")]
2307 pub regularity: ::prost::alloc::string::String,
2308 #[prost(message, optional, tag = "8")]
2310 pub close_price: ::core::option::Option<MoneyValue>,
2311 #[prost(message, optional, tag = "9")]
2313 pub yield_value: ::core::option::Option<Quotation>,
2314 #[prost(message, optional, tag = "10")]
2316 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
2317}
2318#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2320pub struct AssetRequest {
2321 #[prost(string, tag = "1")]
2323 pub id: ::prost::alloc::string::String,
2324}
2325#[derive(Clone, PartialEq, ::prost::Message)]
2327pub struct AssetResponse {
2328 #[prost(message, optional, tag = "1")]
2330 pub asset: ::core::option::Option<AssetFull>,
2331}
2332#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2334pub struct AssetsRequest {
2335 #[prost(enumeration = "InstrumentType", optional, tag = "1")]
2336 pub instrument_type: ::core::option::Option<i32>,
2337 #[prost(enumeration = "InstrumentStatus", optional, tag = "2")]
2339 pub instrument_status: ::core::option::Option<i32>,
2340}
2341#[derive(Clone, PartialEq, ::prost::Message)]
2343pub struct AssetsResponse {
2344 #[prost(message, repeated, tag = "1")]
2346 pub assets: ::prost::alloc::vec::Vec<Asset>,
2347}
2348#[derive(Clone, PartialEq, ::prost::Message)]
2349pub struct AssetFull {
2350 #[prost(string, tag = "1")]
2352 pub uid: ::prost::alloc::string::String,
2353 #[prost(enumeration = "AssetType", tag = "2")]
2355 pub r#type: i32,
2356 #[prost(string, tag = "3")]
2358 pub name: ::prost::alloc::string::String,
2359 #[prost(string, tag = "4")]
2361 pub name_brief: ::prost::alloc::string::String,
2362 #[prost(string, tag = "5")]
2364 pub description: ::prost::alloc::string::String,
2365 #[prost(message, optional, tag = "6")]
2367 pub deleted_at: ::core::option::Option<::prost_types::Timestamp>,
2368 #[prost(string, repeated, tag = "7")]
2370 pub required_tests: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2371 #[prost(string, tag = "10")]
2373 pub gos_reg_code: ::prost::alloc::string::String,
2374 #[prost(string, tag = "11")]
2376 pub cfi: ::prost::alloc::string::String,
2377 #[prost(string, tag = "12")]
2379 pub code_nsd: ::prost::alloc::string::String,
2380 #[prost(string, tag = "13")]
2382 pub status: ::prost::alloc::string::String,
2383 #[prost(message, optional, tag = "14")]
2385 pub brand: ::core::option::Option<Brand>,
2386 #[prost(message, optional, tag = "15")]
2388 pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
2389 #[prost(string, tag = "16")]
2391 pub br_code: ::prost::alloc::string::String,
2392 #[prost(string, tag = "17")]
2394 pub br_code_name: ::prost::alloc::string::String,
2395 #[prost(message, repeated, tag = "18")]
2397 pub instruments: ::prost::alloc::vec::Vec<AssetInstrument>,
2398 #[prost(oneof = "asset_full::Ext", tags = "8, 9")]
2399 pub ext: ::core::option::Option<asset_full::Ext>,
2400}
2401pub mod asset_full {
2403 #[derive(Clone, PartialEq, ::prost::Oneof)]
2404 pub enum Ext {
2405 #[prost(message, tag = "8")]
2407 Currency(super::AssetCurrency),
2408 #[prost(message, tag = "9")]
2410 Security(super::AssetSecurity),
2411 }
2412}
2413#[derive(Clone, PartialEq, ::prost::Message)]
2415pub struct Asset {
2416 #[prost(string, tag = "1")]
2418 pub uid: ::prost::alloc::string::String,
2419 #[prost(enumeration = "AssetType", tag = "2")]
2421 pub r#type: i32,
2422 #[prost(string, tag = "3")]
2424 pub name: ::prost::alloc::string::String,
2425 #[prost(message, repeated, tag = "4")]
2427 pub instruments: ::prost::alloc::vec::Vec<AssetInstrument>,
2428}
2429#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2431pub struct AssetCurrency {
2432 #[prost(string, tag = "1")]
2434 pub base_currency: ::prost::alloc::string::String,
2435}
2436#[derive(Clone, PartialEq, ::prost::Message)]
2438pub struct AssetSecurity {
2439 #[prost(string, tag = "1")]
2441 pub isin: ::prost::alloc::string::String,
2442 #[prost(string, tag = "2")]
2444 pub r#type: ::prost::alloc::string::String,
2445 #[prost(enumeration = "InstrumentType", tag = "10")]
2447 pub instrument_kind: i32,
2448 #[prost(oneof = "asset_security::Ext", tags = "3, 4, 5, 6, 7")]
2449 pub ext: ::core::option::Option<asset_security::Ext>,
2450}
2451pub mod asset_security {
2453 #[derive(Clone, PartialEq, ::prost::Oneof)]
2454 pub enum Ext {
2455 #[prost(message, tag = "3")]
2457 Share(super::AssetShare),
2458 #[prost(message, tag = "4")]
2460 Bond(super::AssetBond),
2461 #[prost(message, tag = "5")]
2463 Sp(super::AssetStructuredProduct),
2464 #[prost(message, tag = "6")]
2466 Etf(super::AssetEtf),
2467 #[prost(message, tag = "7")]
2469 ClearingCertificate(super::AssetClearingCertificate),
2470 }
2471}
2472#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2474pub struct AssetShare {
2475 #[prost(enumeration = "ShareType", tag = "1")]
2477 pub r#type: i32,
2478 #[prost(message, optional, tag = "2")]
2480 pub issue_size: ::core::option::Option<Quotation>,
2481 #[prost(message, optional, tag = "3")]
2483 pub nominal: ::core::option::Option<Quotation>,
2484 #[prost(string, tag = "4")]
2486 pub nominal_currency: ::prost::alloc::string::String,
2487 #[prost(string, tag = "5")]
2489 pub primary_index: ::prost::alloc::string::String,
2490 #[prost(message, optional, tag = "6")]
2492 pub dividend_rate: ::core::option::Option<Quotation>,
2493 #[prost(string, tag = "7")]
2495 pub preferred_share_type: ::prost::alloc::string::String,
2496 #[prost(message, optional, tag = "8")]
2498 pub ipo_date: ::core::option::Option<::prost_types::Timestamp>,
2499 #[prost(message, optional, tag = "9")]
2501 pub registry_date: ::core::option::Option<::prost_types::Timestamp>,
2502 #[prost(bool, tag = "10")]
2504 pub div_yield_flag: bool,
2505 #[prost(string, tag = "11")]
2507 pub issue_kind: ::prost::alloc::string::String,
2508 #[prost(message, optional, tag = "12")]
2510 pub placement_date: ::core::option::Option<::prost_types::Timestamp>,
2511 #[prost(string, tag = "13")]
2513 pub repres_isin: ::prost::alloc::string::String,
2514 #[prost(message, optional, tag = "14")]
2516 pub issue_size_plan: ::core::option::Option<Quotation>,
2517 #[prost(message, optional, tag = "15")]
2519 pub total_float: ::core::option::Option<Quotation>,
2520}
2521#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2523pub struct AssetBond {
2524 #[prost(message, optional, tag = "1")]
2526 pub current_nominal: ::core::option::Option<Quotation>,
2527 #[prost(string, tag = "2")]
2529 pub borrow_name: ::prost::alloc::string::String,
2530 #[prost(message, optional, tag = "3")]
2532 pub issue_size: ::core::option::Option<Quotation>,
2533 #[prost(message, optional, tag = "4")]
2535 pub nominal: ::core::option::Option<Quotation>,
2536 #[prost(string, tag = "5")]
2538 pub nominal_currency: ::prost::alloc::string::String,
2539 #[prost(string, tag = "6")]
2541 pub issue_kind: ::prost::alloc::string::String,
2542 #[prost(string, tag = "7")]
2544 pub interest_kind: ::prost::alloc::string::String,
2545 #[prost(int32, tag = "8")]
2547 pub coupon_quantity_per_year: i32,
2548 #[prost(bool, tag = "9")]
2550 pub indexed_nominal_flag: bool,
2551 #[prost(bool, tag = "10")]
2553 pub subordinated_flag: bool,
2554 #[prost(bool, tag = "11")]
2556 pub collateral_flag: bool,
2557 #[prost(bool, tag = "12")]
2559 pub tax_free_flag: bool,
2560 #[prost(bool, tag = "13")]
2562 pub amortization_flag: bool,
2563 #[prost(bool, tag = "14")]
2565 pub floating_coupon_flag: bool,
2566 #[prost(bool, tag = "15")]
2568 pub perpetual_flag: bool,
2569 #[prost(message, optional, tag = "16")]
2571 pub maturity_date: ::core::option::Option<::prost_types::Timestamp>,
2572 #[prost(string, tag = "17")]
2574 pub return_condition: ::prost::alloc::string::String,
2575 #[prost(message, optional, tag = "18")]
2577 pub state_reg_date: ::core::option::Option<::prost_types::Timestamp>,
2578 #[prost(message, optional, tag = "19")]
2580 pub placement_date: ::core::option::Option<::prost_types::Timestamp>,
2581 #[prost(message, optional, tag = "20")]
2583 pub placement_price: ::core::option::Option<Quotation>,
2584 #[prost(message, optional, tag = "21")]
2586 pub issue_size_plan: ::core::option::Option<Quotation>,
2587}
2588#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2590pub struct AssetStructuredProduct {
2591 #[prost(string, tag = "1")]
2593 pub borrow_name: ::prost::alloc::string::String,
2594 #[prost(message, optional, tag = "2")]
2596 pub nominal: ::core::option::Option<Quotation>,
2597 #[prost(string, tag = "3")]
2599 pub nominal_currency: ::prost::alloc::string::String,
2600 #[prost(enumeration = "StructuredProductType", tag = "4")]
2602 pub r#type: i32,
2603 #[prost(string, tag = "5")]
2605 pub logic_portfolio: ::prost::alloc::string::String,
2606 #[prost(enumeration = "AssetType", tag = "6")]
2608 pub asset_type: i32,
2609 #[prost(string, tag = "7")]
2611 pub basic_asset: ::prost::alloc::string::String,
2612 #[prost(message, optional, tag = "8")]
2614 pub safety_barrier: ::core::option::Option<Quotation>,
2615 #[prost(message, optional, tag = "9")]
2617 pub maturity_date: ::core::option::Option<::prost_types::Timestamp>,
2618 #[prost(message, optional, tag = "10")]
2620 pub issue_size_plan: ::core::option::Option<Quotation>,
2621 #[prost(message, optional, tag = "11")]
2623 pub issue_size: ::core::option::Option<Quotation>,
2624 #[prost(message, optional, tag = "12")]
2626 pub placement_date: ::core::option::Option<::prost_types::Timestamp>,
2627 #[prost(string, tag = "13")]
2629 pub issue_kind: ::prost::alloc::string::String,
2630}
2631#[derive(Clone, PartialEq, ::prost::Message)]
2633pub struct AssetEtf {
2634 #[prost(message, optional, tag = "1")]
2636 pub total_expense: ::core::option::Option<Quotation>,
2637 #[prost(message, optional, tag = "2")]
2639 pub hurdle_rate: ::core::option::Option<Quotation>,
2640 #[prost(message, optional, tag = "3")]
2642 pub performance_fee: ::core::option::Option<Quotation>,
2643 #[prost(message, optional, tag = "4")]
2645 pub fixed_commission: ::core::option::Option<Quotation>,
2646 #[prost(string, tag = "5")]
2648 pub payment_type: ::prost::alloc::string::String,
2649 #[prost(bool, tag = "6")]
2651 pub watermark_flag: bool,
2652 #[prost(message, optional, tag = "7")]
2654 pub buy_premium: ::core::option::Option<Quotation>,
2655 #[prost(message, optional, tag = "8")]
2657 pub sell_discount: ::core::option::Option<Quotation>,
2658 #[prost(bool, tag = "9")]
2660 pub rebalancing_flag: bool,
2661 #[prost(string, tag = "10")]
2663 pub rebalancing_freq: ::prost::alloc::string::String,
2664 #[prost(string, tag = "11")]
2666 pub management_type: ::prost::alloc::string::String,
2667 #[prost(string, tag = "12")]
2669 pub primary_index: ::prost::alloc::string::String,
2670 #[prost(string, tag = "13")]
2672 pub focus_type: ::prost::alloc::string::String,
2673 #[prost(bool, tag = "14")]
2675 pub leveraged_flag: bool,
2676 #[prost(message, optional, tag = "15")]
2678 pub num_share: ::core::option::Option<Quotation>,
2679 #[prost(bool, tag = "16")]
2681 pub ucits_flag: bool,
2682 #[prost(message, optional, tag = "17")]
2684 pub released_date: ::core::option::Option<::prost_types::Timestamp>,
2685 #[prost(string, tag = "18")]
2687 pub description: ::prost::alloc::string::String,
2688 #[prost(string, tag = "19")]
2690 pub primary_index_description: ::prost::alloc::string::String,
2691 #[prost(string, tag = "20")]
2693 pub primary_index_company: ::prost::alloc::string::String,
2694 #[prost(message, optional, tag = "21")]
2696 pub index_recovery_period: ::core::option::Option<Quotation>,
2697 #[prost(string, tag = "22")]
2699 pub inav_code: ::prost::alloc::string::String,
2700 #[prost(bool, tag = "23")]
2702 pub div_yield_flag: bool,
2703 #[prost(message, optional, tag = "24")]
2705 pub expense_commission: ::core::option::Option<Quotation>,
2706 #[prost(message, optional, tag = "25")]
2708 pub primary_index_tracking_error: ::core::option::Option<Quotation>,
2709 #[prost(string, tag = "26")]
2711 pub rebalancing_plan: ::prost::alloc::string::String,
2712 #[prost(string, tag = "27")]
2714 pub tax_rate: ::prost::alloc::string::String,
2715 #[prost(message, repeated, tag = "28")]
2717 pub rebalancing_dates: ::prost::alloc::vec::Vec<::prost_types::Timestamp>,
2718 #[prost(string, tag = "29")]
2720 pub issue_kind: ::prost::alloc::string::String,
2721 #[prost(message, optional, tag = "30")]
2723 pub nominal: ::core::option::Option<Quotation>,
2724 #[prost(string, tag = "31")]
2726 pub nominal_currency: ::prost::alloc::string::String,
2727}
2728#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2730pub struct AssetClearingCertificate {
2731 #[prost(message, optional, tag = "1")]
2733 pub nominal: ::core::option::Option<Quotation>,
2734 #[prost(string, tag = "2")]
2736 pub nominal_currency: ::prost::alloc::string::String,
2737}
2738#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2740pub struct Brand {
2741 #[prost(string, tag = "1")]
2743 pub uid: ::prost::alloc::string::String,
2744 #[prost(string, tag = "2")]
2746 pub name: ::prost::alloc::string::String,
2747 #[prost(string, tag = "3")]
2749 pub description: ::prost::alloc::string::String,
2750 #[prost(string, tag = "4")]
2752 pub info: ::prost::alloc::string::String,
2753 #[prost(string, tag = "5")]
2755 pub company: ::prost::alloc::string::String,
2756 #[prost(string, tag = "6")]
2758 pub sector: ::prost::alloc::string::String,
2759 #[prost(string, tag = "7")]
2761 pub country_of_risk: ::prost::alloc::string::String,
2762 #[prost(string, tag = "8")]
2764 pub country_of_risk_name: ::prost::alloc::string::String,
2765}
2766#[derive(Clone, PartialEq, ::prost::Message)]
2768pub struct AssetInstrument {
2769 #[prost(string, tag = "1")]
2771 pub uid: ::prost::alloc::string::String,
2772 #[prost(string, tag = "2")]
2774 pub figi: ::prost::alloc::string::String,
2775 #[prost(string, tag = "3")]
2777 pub instrument_type: ::prost::alloc::string::String,
2778 #[prost(string, tag = "4")]
2780 pub ticker: ::prost::alloc::string::String,
2781 #[prost(string, tag = "5")]
2783 pub class_code: ::prost::alloc::string::String,
2784 #[prost(message, repeated, tag = "6")]
2786 pub links: ::prost::alloc::vec::Vec<InstrumentLink>,
2787 #[prost(enumeration = "InstrumentType", tag = "10")]
2789 pub instrument_kind: i32,
2790 #[prost(string, tag = "11")]
2792 pub position_uid: ::prost::alloc::string::String,
2793}
2794#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2796pub struct InstrumentLink {
2797 #[prost(string, tag = "1")]
2799 pub r#type: ::prost::alloc::string::String,
2800 #[prost(string, tag = "2")]
2802 pub instrument_uid: ::prost::alloc::string::String,
2803}
2804#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2806pub struct GetFavoritesRequest {
2807 #[prost(string, optional, tag = "1")]
2809 pub group_id: ::core::option::Option<::prost::alloc::string::String>,
2810}
2811#[derive(Clone, PartialEq, ::prost::Message)]
2813pub struct GetFavoritesResponse {
2814 #[prost(message, repeated, tag = "1")]
2816 pub favorite_instruments: ::prost::alloc::vec::Vec<FavoriteInstrument>,
2817 #[prost(string, optional, tag = "2")]
2819 pub group_id: ::core::option::Option<::prost::alloc::string::String>,
2820}
2821#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2823pub struct FavoriteInstrument {
2824 #[prost(string, tag = "1")]
2826 pub figi: ::prost::alloc::string::String,
2827 #[prost(string, tag = "2")]
2829 pub ticker: ::prost::alloc::string::String,
2830 #[prost(string, tag = "3")]
2832 pub class_code: ::prost::alloc::string::String,
2833 #[prost(string, tag = "4")]
2835 pub isin: ::prost::alloc::string::String,
2836 #[prost(string, tag = "11")]
2838 pub instrument_type: ::prost::alloc::string::String,
2839 #[prost(string, tag = "12")]
2841 pub name: ::prost::alloc::string::String,
2842 #[prost(string, tag = "13")]
2844 pub uid: ::prost::alloc::string::String,
2845 #[prost(bool, tag = "16")]
2847 pub otc_flag: bool,
2848 #[prost(bool, tag = "17")]
2850 pub api_trade_available_flag: bool,
2851 #[prost(enumeration = "InstrumentType", tag = "18")]
2853 pub instrument_kind: i32,
2854}
2855#[derive(Clone, PartialEq, ::prost::Message)]
2857pub struct EditFavoritesRequest {
2858 #[prost(message, repeated, tag = "1")]
2860 pub instruments: ::prost::alloc::vec::Vec<EditFavoritesRequestInstrument>,
2861 #[prost(enumeration = "EditFavoritesActionType", tag = "6")]
2863 pub action_type: i32,
2864 #[prost(string, optional, tag = "7")]
2866 pub group_id: ::core::option::Option<::prost::alloc::string::String>,
2867}
2868#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2870pub struct EditFavoritesRequestInstrument {
2871 #[deprecated]
2873 #[prost(string, optional, tag = "1")]
2874 pub figi: ::core::option::Option<::prost::alloc::string::String>,
2875 #[prost(string, tag = "2")]
2877 pub instrument_id: ::prost::alloc::string::String,
2878}
2879#[derive(Clone, PartialEq, ::prost::Message)]
2881pub struct EditFavoritesResponse {
2882 #[prost(message, repeated, tag = "1")]
2884 pub favorite_instruments: ::prost::alloc::vec::Vec<FavoriteInstrument>,
2885 #[prost(string, optional, tag = "2")]
2887 pub group_id: ::core::option::Option<::prost::alloc::string::String>,
2888}
2889#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2891pub struct CreateFavoriteGroupRequest {
2892 #[prost(string, tag = "1")]
2894 pub group_name: ::prost::alloc::string::String,
2895 #[prost(string, tag = "2")]
2897 pub group_color: ::prost::alloc::string::String,
2898 #[prost(string, optional, tag = "3")]
2900 pub note: ::core::option::Option<::prost::alloc::string::String>,
2901}
2902#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2903pub struct CreateFavoriteGroupResponse {
2904 #[prost(string, tag = "1")]
2906 pub group_id: ::prost::alloc::string::String,
2907 #[prost(string, tag = "2")]
2909 pub group_name: ::prost::alloc::string::String,
2910}
2911#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2913pub struct DeleteFavoriteGroupRequest {
2914 #[prost(string, tag = "1")]
2916 pub group_id: ::prost::alloc::string::String,
2917}
2918#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2919pub struct DeleteFavoriteGroupResponse {}
2920#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2922pub struct GetFavoriteGroupsRequest {
2923 #[prost(string, repeated, tag = "1")]
2925 pub instrument_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2926 #[prost(string, repeated, tag = "2")]
2928 pub excluded_group_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2929}
2930#[derive(Clone, PartialEq, ::prost::Message)]
2932pub struct GetFavoriteGroupsResponse {
2933 #[prost(message, repeated, tag = "1")]
2935 pub groups: ::prost::alloc::vec::Vec<get_favorite_groups_response::FavoriteGroup>,
2936}
2937pub mod get_favorite_groups_response {
2939 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2941 pub struct FavoriteGroup {
2942 #[prost(string, tag = "1")]
2944 pub group_id: ::prost::alloc::string::String,
2945 #[prost(string, tag = "2")]
2947 pub group_name: ::prost::alloc::string::String,
2948 #[prost(string, tag = "3")]
2950 pub color: ::prost::alloc::string::String,
2951 #[prost(int32, tag = "4")]
2953 pub size: i32,
2954 #[prost(bool, optional, tag = "5")]
2956 pub contains_instrument: ::core::option::Option<bool>,
2957 }
2958}
2959#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2961pub struct GetCountriesRequest {}
2962#[derive(Clone, PartialEq, ::prost::Message)]
2964pub struct GetCountriesResponse {
2965 #[prost(message, repeated, tag = "1")]
2967 pub countries: ::prost::alloc::vec::Vec<CountryResponse>,
2968}
2969#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
2971pub struct IndicativesRequest {}
2972#[derive(Clone, PartialEq, ::prost::Message)]
2974pub struct IndicativesResponse {
2975 #[prost(message, repeated, tag = "1")]
2977 pub instruments: ::prost::alloc::vec::Vec<IndicativeResponse>,
2978}
2979#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2981pub struct IndicativeResponse {
2982 #[prost(string, tag = "1")]
2984 pub figi: ::prost::alloc::string::String,
2985 #[prost(string, tag = "2")]
2987 pub ticker: ::prost::alloc::string::String,
2988 #[prost(string, tag = "3")]
2990 pub class_code: ::prost::alloc::string::String,
2991 #[prost(string, tag = "4")]
2993 pub currency: ::prost::alloc::string::String,
2994 #[prost(enumeration = "InstrumentType", tag = "10")]
2996 pub instrument_kind: i32,
2997 #[prost(string, tag = "12")]
2999 pub name: ::prost::alloc::string::String,
3000 #[prost(string, tag = "13")]
3002 pub exchange: ::prost::alloc::string::String,
3003 #[prost(string, tag = "14")]
3005 pub uid: ::prost::alloc::string::String,
3006 #[prost(bool, tag = "404")]
3008 pub buy_available_flag: bool,
3009 #[prost(bool, tag = "405")]
3011 pub sell_available_flag: bool,
3012}
3013#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3015pub struct CountryResponse {
3016 #[prost(string, tag = "1")]
3018 pub alfa_two: ::prost::alloc::string::String,
3019 #[prost(string, tag = "2")]
3021 pub alfa_three: ::prost::alloc::string::String,
3022 #[prost(string, tag = "3")]
3024 pub name: ::prost::alloc::string::String,
3025 #[prost(string, tag = "4")]
3027 pub name_brief: ::prost::alloc::string::String,
3028}
3029#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3031pub struct FindInstrumentRequest {
3032 #[prost(string, tag = "1")]
3034 pub query: ::prost::alloc::string::String,
3035 #[prost(enumeration = "InstrumentType", optional, tag = "2")]
3037 pub instrument_kind: ::core::option::Option<i32>,
3038 #[prost(bool, optional, tag = "3")]
3040 pub api_trade_available_flag: ::core::option::Option<bool>,
3041}
3042#[derive(Clone, PartialEq, ::prost::Message)]
3044pub struct FindInstrumentResponse {
3045 #[prost(message, repeated, tag = "1")]
3047 pub instruments: ::prost::alloc::vec::Vec<InstrumentShort>,
3048}
3049#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3051pub struct InstrumentShort {
3052 #[prost(string, tag = "1")]
3054 pub isin: ::prost::alloc::string::String,
3055 #[prost(string, tag = "2")]
3057 pub figi: ::prost::alloc::string::String,
3058 #[prost(string, tag = "3")]
3060 pub ticker: ::prost::alloc::string::String,
3061 #[prost(string, tag = "4")]
3063 pub class_code: ::prost::alloc::string::String,
3064 #[prost(string, tag = "5")]
3066 pub instrument_type: ::prost::alloc::string::String,
3067 #[prost(string, tag = "6")]
3069 pub name: ::prost::alloc::string::String,
3070 #[prost(string, tag = "7")]
3072 pub uid: ::prost::alloc::string::String,
3073 #[prost(string, tag = "8")]
3075 pub position_uid: ::prost::alloc::string::String,
3076 #[prost(enumeration = "InstrumentType", tag = "10")]
3078 pub instrument_kind: i32,
3079 #[prost(bool, tag = "11")]
3081 pub api_trade_available_flag: bool,
3082 #[prost(bool, tag = "12")]
3084 pub for_iis_flag: bool,
3085 #[prost(message, optional, tag = "26")]
3087 pub first_1min_candle_date: ::core::option::Option<::prost_types::Timestamp>,
3088 #[prost(message, optional, tag = "27")]
3090 pub first_1day_candle_date: ::core::option::Option<::prost_types::Timestamp>,
3091 #[prost(bool, tag = "28")]
3093 pub for_qual_investor_flag: bool,
3094 #[prost(bool, tag = "29")]
3096 pub weekend_flag: bool,
3097 #[prost(bool, tag = "30")]
3099 pub blocked_tca_flag: bool,
3100 #[prost(int32, tag = "31")]
3102 pub lot: i32,
3103}
3104#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3106pub struct GetBrandsRequest {
3107 #[prost(message, optional, tag = "1")]
3109 pub paging: ::core::option::Option<Page>,
3110}
3111#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3113pub struct GetBrandRequest {
3114 #[prost(string, tag = "1")]
3116 pub id: ::prost::alloc::string::String,
3117}
3118#[derive(Clone, PartialEq, ::prost::Message)]
3120pub struct GetBrandsResponse {
3121 #[prost(message, repeated, tag = "1")]
3123 pub brands: ::prost::alloc::vec::Vec<Brand>,
3124 #[prost(message, optional, tag = "2")]
3126 pub paging: ::core::option::Option<PageResponse>,
3127}
3128#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3130pub struct GetAssetFundamentalsRequest {
3131 #[prost(string, repeated, tag = "1")]
3133 pub assets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3134}
3135#[derive(Clone, PartialEq, ::prost::Message)]
3137pub struct GetAssetFundamentalsResponse {
3138 #[prost(message, repeated, tag = "1")]
3139 pub fundamentals: ::prost::alloc::vec::Vec<
3140 get_asset_fundamentals_response::StatisticResponse,
3141 >,
3142}
3143pub mod get_asset_fundamentals_response {
3145 #[derive(Clone, PartialEq, ::prost::Message)]
3147 pub struct StatisticResponse {
3148 #[prost(string, tag = "1")]
3150 pub asset_uid: ::prost::alloc::string::String,
3151 #[prost(string, tag = "2")]
3153 pub currency: ::prost::alloc::string::String,
3154 #[prost(double, tag = "3")]
3156 pub market_capitalization: f64,
3157 #[prost(double, tag = "4")]
3159 pub high_price_last_52_weeks: f64,
3160 #[prost(double, tag = "5")]
3162 pub low_price_last_52_weeks: f64,
3163 #[prost(double, tag = "6")]
3165 pub average_daily_volume_last_10_days: f64,
3166 #[prost(double, tag = "7")]
3168 pub average_daily_volume_last_4_weeks: f64,
3169 #[prost(double, tag = "8")]
3170 pub beta: f64,
3171 #[prost(double, tag = "9")]
3173 pub free_float: f64,
3174 #[prost(double, tag = "10")]
3176 pub forward_annual_dividend_yield: f64,
3177 #[prost(double, tag = "11")]
3179 pub shares_outstanding: f64,
3180 #[prost(double, tag = "12")]
3182 pub revenue_ttm: f64,
3183 #[prost(double, tag = "13")]
3185 pub ebitda_ttm: f64,
3186 #[prost(double, tag = "14")]
3188 pub net_income_ttm: f64,
3189 #[prost(double, tag = "15")]
3191 pub eps_ttm: f64,
3192 #[prost(double, tag = "16")]
3194 pub diluted_eps_ttm: f64,
3195 #[prost(double, tag = "17")]
3197 pub free_cash_flow_ttm: f64,
3198 #[prost(double, tag = "18")]
3200 pub five_year_annual_revenue_growth_rate: f64,
3201 #[prost(double, tag = "19")]
3203 pub three_year_annual_revenue_growth_rate: f64,
3204 #[prost(double, tag = "20")]
3206 pub pe_ratio_ttm: f64,
3207 #[prost(double, tag = "21")]
3209 pub price_to_sales_ttm: f64,
3210 #[prost(double, tag = "22")]
3212 pub price_to_book_ttm: f64,
3213 #[prost(double, tag = "23")]
3215 pub price_to_free_cash_flow_ttm: f64,
3216 #[prost(double, tag = "24")]
3218 pub total_enterprise_value_mrq: f64,
3219 #[prost(double, tag = "25")]
3221 pub ev_to_ebitda_mrq: f64,
3222 #[prost(double, tag = "26")]
3224 pub net_margin_mrq: f64,
3225 #[prost(double, tag = "27")]
3227 pub net_interest_margin_mrq: f64,
3228 #[prost(double, tag = "28")]
3230 pub roe: f64,
3231 #[prost(double, tag = "29")]
3233 pub roa: f64,
3234 #[prost(double, tag = "30")]
3236 pub roic: f64,
3237 #[prost(double, tag = "31")]
3239 pub total_debt_mrq: f64,
3240 #[prost(double, tag = "32")]
3242 pub total_debt_to_equity_mrq: f64,
3243 #[prost(double, tag = "33")]
3245 pub total_debt_to_ebitda_mrq: f64,
3246 #[prost(double, tag = "34")]
3248 pub free_cash_flow_to_price: f64,
3249 #[prost(double, tag = "35")]
3251 pub net_debt_to_ebitda: f64,
3252 #[prost(double, tag = "36")]
3254 pub current_ratio_mrq: f64,
3255 #[prost(double, tag = "37")]
3257 pub fixed_charge_coverage_ratio_fy: f64,
3258 #[prost(double, tag = "38")]
3260 pub dividend_yield_daily_ttm: f64,
3261 #[prost(double, tag = "39")]
3263 pub dividend_rate_ttm: f64,
3264 #[prost(double, tag = "40")]
3266 pub dividends_per_share: f64,
3267 #[prost(double, tag = "41")]
3269 pub five_years_average_dividend_yield: f64,
3270 #[prost(double, tag = "42")]
3272 pub five_year_annual_dividend_growth_rate: f64,
3273 #[prost(double, tag = "43")]
3275 pub dividend_payout_ratio_fy: f64,
3276 #[prost(double, tag = "44")]
3278 pub buy_back_ttm: f64,
3279 #[prost(double, tag = "45")]
3281 pub one_year_annual_revenue_growth_rate: f64,
3282 #[prost(string, tag = "46")]
3284 pub domicile_indicator_code: ::prost::alloc::string::String,
3285 #[prost(double, tag = "47")]
3287 pub adr_to_common_share_ratio: f64,
3288 #[prost(double, tag = "48")]
3290 pub number_of_employees: f64,
3291 #[prost(message, optional, tag = "49")]
3292 pub ex_dividend_date: ::core::option::Option<::prost_types::Timestamp>,
3293 #[prost(message, optional, tag = "50")]
3295 pub fiscal_period_start_date: ::core::option::Option<::prost_types::Timestamp>,
3296 #[prost(message, optional, tag = "51")]
3298 pub fiscal_period_end_date: ::core::option::Option<::prost_types::Timestamp>,
3299 #[prost(double, tag = "53")]
3301 pub revenue_change_five_years: f64,
3302 #[prost(double, tag = "54")]
3304 pub eps_change_five_years: f64,
3305 #[prost(double, tag = "55")]
3307 pub ebitda_change_five_years: f64,
3308 #[prost(double, tag = "56")]
3310 pub total_debt_change_five_years: f64,
3311 #[prost(double, tag = "57")]
3313 pub ev_to_sales: f64,
3314 }
3315}
3316#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3318pub struct GetAssetReportsRequest {
3319 #[prost(string, tag = "1")]
3321 pub instrument_id: ::prost::alloc::string::String,
3322 #[prost(message, optional, tag = "2")]
3324 pub from: ::core::option::Option<::prost_types::Timestamp>,
3325 #[prost(message, optional, tag = "3")]
3327 pub to: ::core::option::Option<::prost_types::Timestamp>,
3328}
3329#[derive(Clone, PartialEq, ::prost::Message)]
3331pub struct GetAssetReportsResponse {
3332 #[prost(message, repeated, tag = "1")]
3334 pub events: ::prost::alloc::vec::Vec<
3335 get_asset_reports_response::GetAssetReportsEvent,
3336 >,
3337}
3338pub mod get_asset_reports_response {
3340 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3342 pub struct GetAssetReportsEvent {
3343 #[prost(string, tag = "1")]
3345 pub instrument_id: ::prost::alloc::string::String,
3346 #[prost(message, optional, tag = "2")]
3348 pub report_date: ::core::option::Option<::prost_types::Timestamp>,
3349 #[prost(int32, tag = "3")]
3351 pub period_year: i32,
3352 #[prost(int32, tag = "4")]
3354 pub period_num: i32,
3355 #[prost(enumeration = "AssetReportPeriodType", tag = "5")]
3357 pub period_type: i32,
3358 #[prost(message, optional, tag = "6")]
3360 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
3361 }
3362 #[derive(
3363 Clone,
3364 Copy,
3365 Debug,
3366 PartialEq,
3367 Eq,
3368 Hash,
3369 PartialOrd,
3370 Ord,
3371 ::prost::Enumeration
3372 )]
3373 #[repr(i32)]
3374 pub enum AssetReportPeriodType {
3375 PeriodTypeUnspecified = 0,
3377 PeriodTypeQuarter = 1,
3379 PeriodTypeSemiannual = 2,
3381 PeriodTypeAnnual = 3,
3383 }
3384 impl AssetReportPeriodType {
3385 pub fn as_str_name(&self) -> &'static str {
3390 match self {
3391 Self::PeriodTypeUnspecified => "PERIOD_TYPE_UNSPECIFIED",
3392 Self::PeriodTypeQuarter => "PERIOD_TYPE_QUARTER",
3393 Self::PeriodTypeSemiannual => "PERIOD_TYPE_SEMIANNUAL",
3394 Self::PeriodTypeAnnual => "PERIOD_TYPE_ANNUAL",
3395 }
3396 }
3397 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3399 match value {
3400 "PERIOD_TYPE_UNSPECIFIED" => Some(Self::PeriodTypeUnspecified),
3401 "PERIOD_TYPE_QUARTER" => Some(Self::PeriodTypeQuarter),
3402 "PERIOD_TYPE_SEMIANNUAL" => Some(Self::PeriodTypeSemiannual),
3403 "PERIOD_TYPE_ANNUAL" => Some(Self::PeriodTypeAnnual),
3404 _ => None,
3405 }
3406 }
3407 }
3408}
3409#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3411pub struct GetConsensusForecastsRequest {
3412 #[prost(message, optional, tag = "1")]
3414 pub paging: ::core::option::Option<Page>,
3415}
3416#[derive(Clone, PartialEq, ::prost::Message)]
3418pub struct GetConsensusForecastsResponse {
3419 #[prost(message, repeated, tag = "1")]
3421 pub items: ::prost::alloc::vec::Vec<
3422 get_consensus_forecasts_response::ConsensusForecastsItem,
3423 >,
3424 #[prost(message, optional, tag = "2")]
3426 pub page: ::core::option::Option<PageResponse>,
3427}
3428pub mod get_consensus_forecasts_response {
3430 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3432 pub struct ConsensusForecastsItem {
3433 #[prost(string, tag = "1")]
3435 pub uid: ::prost::alloc::string::String,
3436 #[prost(string, tag = "2")]
3438 pub asset_uid: ::prost::alloc::string::String,
3439 #[prost(message, optional, tag = "3")]
3441 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
3442 #[prost(message, optional, tag = "4")]
3444 pub best_target_price: ::core::option::Option<super::Quotation>,
3445 #[prost(message, optional, tag = "5")]
3447 pub best_target_low: ::core::option::Option<super::Quotation>,
3448 #[prost(message, optional, tag = "6")]
3450 pub best_target_high: ::core::option::Option<super::Quotation>,
3451 #[prost(int32, tag = "7")]
3453 pub total_buy_recommend: i32,
3454 #[prost(int32, tag = "8")]
3456 pub total_hold_recommend: i32,
3457 #[prost(int32, tag = "9")]
3459 pub total_sell_recommend: i32,
3460 #[prost(string, tag = "10")]
3462 pub currency: ::prost::alloc::string::String,
3463 #[prost(enumeration = "super::Recommendation", tag = "11")]
3465 pub consensus: i32,
3466 #[prost(message, optional, tag = "12")]
3468 pub prognosis_date: ::core::option::Option<::prost_types::Timestamp>,
3469 }
3470}
3471#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3473pub struct GetForecastRequest {
3474 #[prost(string, tag = "1")]
3476 pub instrument_id: ::prost::alloc::string::String,
3477}
3478#[derive(Clone, PartialEq, ::prost::Message)]
3480pub struct GetForecastResponse {
3481 #[prost(message, repeated, tag = "1")]
3483 pub targets: ::prost::alloc::vec::Vec<get_forecast_response::TargetItem>,
3484 #[prost(message, optional, tag = "2")]
3486 pub consensus: ::core::option::Option<get_forecast_response::ConsensusItem>,
3487}
3488pub mod get_forecast_response {
3490 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3492 pub struct TargetItem {
3493 #[prost(string, tag = "1")]
3495 pub uid: ::prost::alloc::string::String,
3496 #[prost(string, tag = "2")]
3498 pub ticker: ::prost::alloc::string::String,
3499 #[prost(string, tag = "3")]
3501 pub company: ::prost::alloc::string::String,
3502 #[prost(enumeration = "super::Recommendation", tag = "4")]
3504 pub recommendation: i32,
3505 #[prost(message, optional, tag = "5")]
3507 pub recommendation_date: ::core::option::Option<::prost_types::Timestamp>,
3508 #[prost(string, tag = "6")]
3510 pub currency: ::prost::alloc::string::String,
3511 #[prost(message, optional, tag = "7")]
3513 pub current_price: ::core::option::Option<super::Quotation>,
3514 #[prost(message, optional, tag = "8")]
3516 pub target_price: ::core::option::Option<super::Quotation>,
3517 #[prost(message, optional, tag = "9")]
3519 pub price_change: ::core::option::Option<super::Quotation>,
3520 #[prost(message, optional, tag = "10")]
3522 pub price_change_rel: ::core::option::Option<super::Quotation>,
3523 #[prost(string, tag = "11")]
3525 pub show_name: ::prost::alloc::string::String,
3526 }
3527 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3529 pub struct ConsensusItem {
3530 #[prost(string, tag = "1")]
3532 pub uid: ::prost::alloc::string::String,
3533 #[prost(string, tag = "2")]
3535 pub ticker: ::prost::alloc::string::String,
3536 #[prost(enumeration = "super::Recommendation", tag = "3")]
3538 pub recommendation: i32,
3539 #[prost(string, tag = "4")]
3541 pub currency: ::prost::alloc::string::String,
3542 #[prost(message, optional, tag = "5")]
3544 pub current_price: ::core::option::Option<super::Quotation>,
3545 #[prost(message, optional, tag = "6")]
3547 pub consensus: ::core::option::Option<super::Quotation>,
3548 #[prost(message, optional, tag = "7")]
3550 pub min_target: ::core::option::Option<super::Quotation>,
3551 #[prost(message, optional, tag = "8")]
3553 pub max_target: ::core::option::Option<super::Quotation>,
3554 #[prost(message, optional, tag = "9")]
3556 pub price_change: ::core::option::Option<super::Quotation>,
3557 #[prost(message, optional, tag = "10")]
3559 pub price_change_rel: ::core::option::Option<super::Quotation>,
3560 }
3561}
3562#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3564pub struct RiskRatesRequest {
3565 #[prost(string, repeated, tag = "1")]
3567 pub instrument_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3568}
3569#[derive(Clone, PartialEq, ::prost::Message)]
3571pub struct RiskRatesResponse {
3572 #[prost(message, repeated, tag = "1")]
3573 pub instrument_risk_rates: ::prost::alloc::vec::Vec<
3574 risk_rates_response::RiskRateResult,
3575 >,
3576}
3577pub mod risk_rates_response {
3579 #[derive(Clone, PartialEq, ::prost::Message)]
3580 pub struct RiskRateResult {
3581 #[prost(string, tag = "1")]
3582 pub instrument_uid: ::prost::alloc::string::String,
3583 #[prost(message, optional, tag = "2")]
3585 pub short_risk_rate: ::core::option::Option<RiskRate>,
3586 #[prost(message, optional, tag = "3")]
3588 pub long_risk_rate: ::core::option::Option<RiskRate>,
3589 #[prost(message, repeated, tag = "5")]
3591 pub short_risk_rates: ::prost::alloc::vec::Vec<RiskRate>,
3592 #[prost(message, repeated, tag = "6")]
3594 pub long_risk_rates: ::prost::alloc::vec::Vec<RiskRate>,
3595 #[prost(string, optional, tag = "9")]
3597 pub error: ::core::option::Option<::prost::alloc::string::String>,
3598 }
3599 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3600 pub struct RiskRate {
3601 #[prost(string, tag = "2")]
3603 pub risk_level_code: ::prost::alloc::string::String,
3604 #[prost(message, optional, tag = "5")]
3606 pub value: ::core::option::Option<super::Quotation>,
3607 }
3608}
3609#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3610pub struct TradingInterval {
3611 #[prost(string, tag = "1")]
3613 pub r#type: ::prost::alloc::string::String,
3614 #[prost(message, optional, tag = "2")]
3616 pub interval: ::core::option::Option<trading_interval::TimeInterval>,
3617}
3618pub mod trading_interval {
3620 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3621 pub struct TimeInterval {
3622 #[prost(message, optional, tag = "1")]
3624 pub start_ts: ::core::option::Option<::prost_types::Timestamp>,
3625 #[prost(message, optional, tag = "2")]
3627 pub end_ts: ::core::option::Option<::prost_types::Timestamp>,
3628 }
3629}
3630#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3632pub struct GetInsiderDealsRequest {
3633 #[prost(string, tag = "1")]
3635 pub instrument_id: ::prost::alloc::string::String,
3636 #[prost(int32, tag = "2")]
3638 pub limit: i32,
3639 #[prost(string, optional, tag = "3")]
3641 pub next_cursor: ::core::option::Option<::prost::alloc::string::String>,
3642}
3643#[derive(Clone, PartialEq, ::prost::Message)]
3645pub struct GetInsiderDealsResponse {
3646 #[prost(message, repeated, tag = "1")]
3648 pub insider_deals: ::prost::alloc::vec::Vec<get_insider_deals_response::InsiderDeal>,
3649 #[prost(string, optional, tag = "2")]
3651 pub next_cursor: ::core::option::Option<::prost::alloc::string::String>,
3652}
3653pub mod get_insider_deals_response {
3655 #[derive(Clone, PartialEq, ::prost::Message)]
3656 pub struct InsiderDeal {
3657 #[prost(int64, tag = "1")]
3659 pub trade_id: i64,
3660 #[prost(enumeration = "TradeDirection", tag = "2")]
3662 pub direction: i32,
3663 #[prost(string, tag = "3")]
3665 pub currency: ::prost::alloc::string::String,
3666 #[prost(message, optional, tag = "4")]
3668 pub date: ::core::option::Option<::prost_types::Timestamp>,
3669 #[prost(int64, tag = "5")]
3671 pub quantity: i64,
3672 #[prost(message, optional, tag = "6")]
3674 pub price: ::core::option::Option<super::Quotation>,
3675 #[prost(string, tag = "7")]
3677 pub instrument_uid: ::prost::alloc::string::String,
3678 #[prost(string, tag = "8")]
3680 pub ticker: ::prost::alloc::string::String,
3681 #[prost(string, tag = "9")]
3683 pub investor_name: ::prost::alloc::string::String,
3684 #[prost(string, tag = "10")]
3686 pub investor_position: ::prost::alloc::string::String,
3687 #[prost(float, tag = "11")]
3689 pub percentage: f32,
3690 #[prost(bool, tag = "12")]
3692 pub is_option_execution: bool,
3693 #[prost(message, optional, tag = "13")]
3695 pub disclosure_date: ::core::option::Option<::prost_types::Timestamp>,
3696 }
3697 #[derive(
3698 Clone,
3699 Copy,
3700 Debug,
3701 PartialEq,
3702 Eq,
3703 Hash,
3704 PartialOrd,
3705 Ord,
3706 ::prost::Enumeration
3707 )]
3708 #[repr(i32)]
3709 pub enum TradeDirection {
3710 Unspecified = 0,
3712 Buy = 1,
3714 Sell = 2,
3716 Increase = 3,
3718 Decrease = 4,
3720 }
3721 impl TradeDirection {
3722 pub fn as_str_name(&self) -> &'static str {
3727 match self {
3728 Self::Unspecified => "TRADE_DIRECTION_UNSPECIFIED",
3729 Self::Buy => "TRADE_DIRECTION_BUY",
3730 Self::Sell => "TRADE_DIRECTION_SELL",
3731 Self::Increase => "TRADE_DIRECTION_INCREASE",
3732 Self::Decrease => "TRADE_DIRECTION_DECREASE",
3733 }
3734 }
3735 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3737 match value {
3738 "TRADE_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
3739 "TRADE_DIRECTION_BUY" => Some(Self::Buy),
3740 "TRADE_DIRECTION_SELL" => Some(Self::Sell),
3741 "TRADE_DIRECTION_INCREASE" => Some(Self::Increase),
3742 "TRADE_DIRECTION_DECREASE" => Some(Self::Decrease),
3743 _ => None,
3744 }
3745 }
3746 }
3747}
3748#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3750pub struct DfasRequest {}
3751#[derive(Clone, PartialEq, ::prost::Message)]
3753pub struct DfaResponse {
3754 #[prost(string, tag = "1")]
3756 pub uid: ::prost::alloc::string::String,
3757 #[prost(string, tag = "2")]
3759 pub ticker: ::prost::alloc::string::String,
3760 #[prost(string, tag = "3")]
3762 pub name: ::prost::alloc::string::String,
3763 #[prost(string, tag = "4")]
3765 pub position_uid: ::prost::alloc::string::String,
3766 #[prost(message, optional, tag = "5")]
3768 pub min_price_increment: ::core::option::Option<Quotation>,
3769 #[prost(int32, tag = "6")]
3771 pub lot: i32,
3772 #[prost(message, optional, tag = "7")]
3774 pub nominal: ::core::option::Option<MoneyValue>,
3775 #[prost(string, tag = "8")]
3777 pub currency: ::prost::alloc::string::String,
3778 #[prost(message, optional, tag = "9")]
3780 pub maturity_date: ::core::option::Option<::prost_types::Timestamp>,
3781 #[prost(bool, tag = "10")]
3783 pub short_enabled_flag: bool,
3784 #[prost(bool, tag = "11")]
3786 pub api_trade_available_flag: bool,
3787 #[prost(bool, tag = "12")]
3789 pub buy_available_flag: bool,
3790 #[prost(bool, tag = "13")]
3792 pub sell_available_flag: bool,
3793 #[prost(bool, tag = "14")]
3795 pub limit_order_available_flag: bool,
3796 #[prost(bool, tag = "15")]
3798 pub market_order_available_flag: bool,
3799 #[prost(bool, tag = "16")]
3801 pub bestprice_order_available_flag: bool,
3802 #[prost(bool, tag = "17")]
3804 pub for_iis_flag: bool,
3805 #[prost(bool, tag = "18")]
3807 pub for_qual_investor_flag: bool,
3808 #[prost(string, tag = "19")]
3810 pub r#type: ::prost::alloc::string::String,
3811 #[prost(message, repeated, tag = "20")]
3813 pub basic_assets: ::prost::alloc::vec::Vec<dfa_response::BasicAsset>,
3814 #[prost(message, optional, tag = "21")]
3816 pub forecast_yield: ::core::option::Option<dfa_response::ForecastYield>,
3817 #[prost(message, optional, tag = "22")]
3819 pub yield_to_maturity: ::core::option::Option<Quotation>,
3820 #[prost(message, optional, tag = "23")]
3822 pub coupon_value: ::core::option::Option<Quotation>,
3823 #[prost(int32, tag = "24")]
3825 pub coupon_payment_frequency: i32,
3826 #[prost(message, optional, tag = "25")]
3828 pub coupon_payment_date: ::core::option::Option<::prost_types::Timestamp>,
3829 #[prost(message, optional, tag = "26")]
3831 pub aci_value: ::core::option::Option<Quotation>,
3832}
3833pub mod dfa_response {
3835 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3837 pub struct BasicAsset {
3838 #[prost(string, tag = "1")]
3840 pub uid: ::prost::alloc::string::String,
3841 }
3842 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
3844 pub struct ForecastYield {
3845 #[prost(message, optional, tag = "1")]
3847 pub min_value: ::core::option::Option<super::Quotation>,
3848 #[prost(message, optional, tag = "2")]
3850 pub max_value: ::core::option::Option<super::Quotation>,
3851 }
3852}
3853#[derive(Clone, PartialEq, ::prost::Message)]
3855pub struct DfasResponse {
3856 #[prost(message, repeated, tag = "1")]
3858 pub instruments: ::prost::alloc::vec::Vec<DfaResponse>,
3859}
3860#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3862#[repr(i32)]
3863pub enum CouponType {
3864 Unspecified = 0,
3866 Constant = 1,
3868 Floating = 2,
3870 Discount = 3,
3872 Mortgage = 4,
3874 Fix = 5,
3876 Variable = 6,
3878 Other = 7,
3880}
3881impl CouponType {
3882 pub fn as_str_name(&self) -> &'static str {
3887 match self {
3888 Self::Unspecified => "COUPON_TYPE_UNSPECIFIED",
3889 Self::Constant => "COUPON_TYPE_CONSTANT",
3890 Self::Floating => "COUPON_TYPE_FLOATING",
3891 Self::Discount => "COUPON_TYPE_DISCOUNT",
3892 Self::Mortgage => "COUPON_TYPE_MORTGAGE",
3893 Self::Fix => "COUPON_TYPE_FIX",
3894 Self::Variable => "COUPON_TYPE_VARIABLE",
3895 Self::Other => "COUPON_TYPE_OTHER",
3896 }
3897 }
3898 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3900 match value {
3901 "COUPON_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
3902 "COUPON_TYPE_CONSTANT" => Some(Self::Constant),
3903 "COUPON_TYPE_FLOATING" => Some(Self::Floating),
3904 "COUPON_TYPE_DISCOUNT" => Some(Self::Discount),
3905 "COUPON_TYPE_MORTGAGE" => Some(Self::Mortgage),
3906 "COUPON_TYPE_FIX" => Some(Self::Fix),
3907 "COUPON_TYPE_VARIABLE" => Some(Self::Variable),
3908 "COUPON_TYPE_OTHER" => Some(Self::Other),
3909 _ => None,
3910 }
3911 }
3912}
3913#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3915#[repr(i32)]
3916pub enum OptionDirection {
3917 Unspecified = 0,
3919 Put = 1,
3921 Call = 2,
3923}
3924impl OptionDirection {
3925 pub fn as_str_name(&self) -> &'static str {
3930 match self {
3931 Self::Unspecified => "OPTION_DIRECTION_UNSPECIFIED",
3932 Self::Put => "OPTION_DIRECTION_PUT",
3933 Self::Call => "OPTION_DIRECTION_CALL",
3934 }
3935 }
3936 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3938 match value {
3939 "OPTION_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
3940 "OPTION_DIRECTION_PUT" => Some(Self::Put),
3941 "OPTION_DIRECTION_CALL" => Some(Self::Call),
3942 _ => None,
3943 }
3944 }
3945}
3946#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3948#[repr(i32)]
3949pub enum OptionPaymentType {
3950 Unspecified = 0,
3952 Premium = 1,
3954 Marginal = 2,
3956}
3957impl OptionPaymentType {
3958 pub fn as_str_name(&self) -> &'static str {
3963 match self {
3964 Self::Unspecified => "OPTION_PAYMENT_TYPE_UNSPECIFIED",
3965 Self::Premium => "OPTION_PAYMENT_TYPE_PREMIUM",
3966 Self::Marginal => "OPTION_PAYMENT_TYPE_MARGINAL",
3967 }
3968 }
3969 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3971 match value {
3972 "OPTION_PAYMENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
3973 "OPTION_PAYMENT_TYPE_PREMIUM" => Some(Self::Premium),
3974 "OPTION_PAYMENT_TYPE_MARGINAL" => Some(Self::Marginal),
3975 _ => None,
3976 }
3977 }
3978}
3979#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3981#[repr(i32)]
3982pub enum OptionStyle {
3983 Unspecified = 0,
3985 American = 1,
3987 European = 2,
3989}
3990impl OptionStyle {
3991 pub fn as_str_name(&self) -> &'static str {
3996 match self {
3997 Self::Unspecified => "OPTION_STYLE_UNSPECIFIED",
3998 Self::American => "OPTION_STYLE_AMERICAN",
3999 Self::European => "OPTION_STYLE_EUROPEAN",
4000 }
4001 }
4002 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4004 match value {
4005 "OPTION_STYLE_UNSPECIFIED" => Some(Self::Unspecified),
4006 "OPTION_STYLE_AMERICAN" => Some(Self::American),
4007 "OPTION_STYLE_EUROPEAN" => Some(Self::European),
4008 _ => None,
4009 }
4010 }
4011}
4012#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4014#[repr(i32)]
4015pub enum OptionSettlementType {
4016 OptionExecutionTypeUnspecified = 0,
4018 OptionExecutionTypePhysicalDelivery = 1,
4020 OptionExecutionTypeCashSettlement = 2,
4022}
4023impl OptionSettlementType {
4024 pub fn as_str_name(&self) -> &'static str {
4029 match self {
4030 Self::OptionExecutionTypeUnspecified => "OPTION_EXECUTION_TYPE_UNSPECIFIED",
4031 Self::OptionExecutionTypePhysicalDelivery => {
4032 "OPTION_EXECUTION_TYPE_PHYSICAL_DELIVERY"
4033 }
4034 Self::OptionExecutionTypeCashSettlement => {
4035 "OPTION_EXECUTION_TYPE_CASH_SETTLEMENT"
4036 }
4037 }
4038 }
4039 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4041 match value {
4042 "OPTION_EXECUTION_TYPE_UNSPECIFIED" => {
4043 Some(Self::OptionExecutionTypeUnspecified)
4044 }
4045 "OPTION_EXECUTION_TYPE_PHYSICAL_DELIVERY" => {
4046 Some(Self::OptionExecutionTypePhysicalDelivery)
4047 }
4048 "OPTION_EXECUTION_TYPE_CASH_SETTLEMENT" => {
4049 Some(Self::OptionExecutionTypeCashSettlement)
4050 }
4051 _ => None,
4052 }
4053 }
4054}
4055#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4057#[repr(i32)]
4058pub enum InstrumentIdType {
4059 InstrumentIdUnspecified = 0,
4061 Figi = 1,
4063 Ticker = 2,
4065 Uid = 3,
4067 PositionUid = 4,
4069 Id = 5,
4071}
4072impl InstrumentIdType {
4073 pub fn as_str_name(&self) -> &'static str {
4078 match self {
4079 Self::InstrumentIdUnspecified => "INSTRUMENT_ID_UNSPECIFIED",
4080 Self::Figi => "INSTRUMENT_ID_TYPE_FIGI",
4081 Self::Ticker => "INSTRUMENT_ID_TYPE_TICKER",
4082 Self::Uid => "INSTRUMENT_ID_TYPE_UID",
4083 Self::PositionUid => "INSTRUMENT_ID_TYPE_POSITION_UID",
4084 Self::Id => "INSTRUMENT_ID_TYPE_ID",
4085 }
4086 }
4087 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4089 match value {
4090 "INSTRUMENT_ID_UNSPECIFIED" => Some(Self::InstrumentIdUnspecified),
4091 "INSTRUMENT_ID_TYPE_FIGI" => Some(Self::Figi),
4092 "INSTRUMENT_ID_TYPE_TICKER" => Some(Self::Ticker),
4093 "INSTRUMENT_ID_TYPE_UID" => Some(Self::Uid),
4094 "INSTRUMENT_ID_TYPE_POSITION_UID" => Some(Self::PositionUid),
4095 "INSTRUMENT_ID_TYPE_ID" => Some(Self::Id),
4096 _ => None,
4097 }
4098 }
4099}
4100#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4102#[repr(i32)]
4103pub enum ShareType {
4104 Unspecified = 0,
4106 Common = 1,
4108 Preferred = 2,
4110 Adr = 3,
4112 Gdr = 4,
4114 Mlp = 5,
4116 NyRegShrs = 6,
4118 ClosedEndFund = 7,
4120 Reit = 8,
4122}
4123impl ShareType {
4124 pub fn as_str_name(&self) -> &'static str {
4129 match self {
4130 Self::Unspecified => "SHARE_TYPE_UNSPECIFIED",
4131 Self::Common => "SHARE_TYPE_COMMON",
4132 Self::Preferred => "SHARE_TYPE_PREFERRED",
4133 Self::Adr => "SHARE_TYPE_ADR",
4134 Self::Gdr => "SHARE_TYPE_GDR",
4135 Self::Mlp => "SHARE_TYPE_MLP",
4136 Self::NyRegShrs => "SHARE_TYPE_NY_REG_SHRS",
4137 Self::ClosedEndFund => "SHARE_TYPE_CLOSED_END_FUND",
4138 Self::Reit => "SHARE_TYPE_REIT",
4139 }
4140 }
4141 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4143 match value {
4144 "SHARE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
4145 "SHARE_TYPE_COMMON" => Some(Self::Common),
4146 "SHARE_TYPE_PREFERRED" => Some(Self::Preferred),
4147 "SHARE_TYPE_ADR" => Some(Self::Adr),
4148 "SHARE_TYPE_GDR" => Some(Self::Gdr),
4149 "SHARE_TYPE_MLP" => Some(Self::Mlp),
4150 "SHARE_TYPE_NY_REG_SHRS" => Some(Self::NyRegShrs),
4151 "SHARE_TYPE_CLOSED_END_FUND" => Some(Self::ClosedEndFund),
4152 "SHARE_TYPE_REIT" => Some(Self::Reit),
4153 _ => None,
4154 }
4155 }
4156}
4157#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4159#[repr(i32)]
4160pub enum AssetType {
4161 Unspecified = 0,
4163 Currency = 1,
4165 Commodity = 2,
4167 Index = 3,
4169 Security = 4,
4171}
4172impl AssetType {
4173 pub fn as_str_name(&self) -> &'static str {
4178 match self {
4179 Self::Unspecified => "ASSET_TYPE_UNSPECIFIED",
4180 Self::Currency => "ASSET_TYPE_CURRENCY",
4181 Self::Commodity => "ASSET_TYPE_COMMODITY",
4182 Self::Index => "ASSET_TYPE_INDEX",
4183 Self::Security => "ASSET_TYPE_SECURITY",
4184 }
4185 }
4186 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4188 match value {
4189 "ASSET_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
4190 "ASSET_TYPE_CURRENCY" => Some(Self::Currency),
4191 "ASSET_TYPE_COMMODITY" => Some(Self::Commodity),
4192 "ASSET_TYPE_INDEX" => Some(Self::Index),
4193 "ASSET_TYPE_SECURITY" => Some(Self::Security),
4194 _ => None,
4195 }
4196 }
4197}
4198#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4200#[repr(i32)]
4201pub enum StructuredProductType {
4202 SpTypeUnspecified = 0,
4204 SpTypeDeliverable = 1,
4206 SpTypeNonDeliverable = 2,
4208}
4209impl StructuredProductType {
4210 pub fn as_str_name(&self) -> &'static str {
4215 match self {
4216 Self::SpTypeUnspecified => "SP_TYPE_UNSPECIFIED",
4217 Self::SpTypeDeliverable => "SP_TYPE_DELIVERABLE",
4218 Self::SpTypeNonDeliverable => "SP_TYPE_NON_DELIVERABLE",
4219 }
4220 }
4221 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4223 match value {
4224 "SP_TYPE_UNSPECIFIED" => Some(Self::SpTypeUnspecified),
4225 "SP_TYPE_DELIVERABLE" => Some(Self::SpTypeDeliverable),
4226 "SP_TYPE_NON_DELIVERABLE" => Some(Self::SpTypeNonDeliverable),
4227 _ => None,
4228 }
4229 }
4230}
4231#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4233#[repr(i32)]
4234pub enum EditFavoritesActionType {
4235 Unspecified = 0,
4237 Add = 1,
4239 Del = 2,
4241}
4242impl EditFavoritesActionType {
4243 pub fn as_str_name(&self) -> &'static str {
4248 match self {
4249 Self::Unspecified => "EDIT_FAVORITES_ACTION_TYPE_UNSPECIFIED",
4250 Self::Add => "EDIT_FAVORITES_ACTION_TYPE_ADD",
4251 Self::Del => "EDIT_FAVORITES_ACTION_TYPE_DEL",
4252 }
4253 }
4254 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4256 match value {
4257 "EDIT_FAVORITES_ACTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
4258 "EDIT_FAVORITES_ACTION_TYPE_ADD" => Some(Self::Add),
4259 "EDIT_FAVORITES_ACTION_TYPE_DEL" => Some(Self::Del),
4260 _ => None,
4261 }
4262 }
4263}
4264#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4265#[repr(i32)]
4266pub enum Recommendation {
4267 Unspecified = 0,
4269 Buy = 1,
4271 Hold = 2,
4273 Sell = 3,
4275}
4276impl Recommendation {
4277 pub fn as_str_name(&self) -> &'static str {
4282 match self {
4283 Self::Unspecified => "RECOMMENDATION_UNSPECIFIED",
4284 Self::Buy => "RECOMMENDATION_BUY",
4285 Self::Hold => "RECOMMENDATION_HOLD",
4286 Self::Sell => "RECOMMENDATION_SELL",
4287 }
4288 }
4289 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4291 match value {
4292 "RECOMMENDATION_UNSPECIFIED" => Some(Self::Unspecified),
4293 "RECOMMENDATION_BUY" => Some(Self::Buy),
4294 "RECOMMENDATION_HOLD" => Some(Self::Hold),
4295 "RECOMMENDATION_SELL" => Some(Self::Sell),
4296 _ => None,
4297 }
4298 }
4299}
4300#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4302#[repr(i32)]
4303pub enum RiskLevel {
4304 Unspecified = 0,
4306 Low = 1,
4308 Moderate = 2,
4310 High = 3,
4312}
4313impl RiskLevel {
4314 pub fn as_str_name(&self) -> &'static str {
4319 match self {
4320 Self::Unspecified => "RISK_LEVEL_UNSPECIFIED",
4321 Self::Low => "RISK_LEVEL_LOW",
4322 Self::Moderate => "RISK_LEVEL_MODERATE",
4323 Self::High => "RISK_LEVEL_HIGH",
4324 }
4325 }
4326 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4328 match value {
4329 "RISK_LEVEL_UNSPECIFIED" => Some(Self::Unspecified),
4330 "RISK_LEVEL_LOW" => Some(Self::Low),
4331 "RISK_LEVEL_MODERATE" => Some(Self::Moderate),
4332 "RISK_LEVEL_HIGH" => Some(Self::High),
4333 _ => None,
4334 }
4335 }
4336}
4337#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4338#[repr(i32)]
4339pub enum BondType {
4340 Unspecified = 0,
4342 Replaced = 1,
4344}
4345impl BondType {
4346 pub fn as_str_name(&self) -> &'static str {
4351 match self {
4352 Self::Unspecified => "BOND_TYPE_UNSPECIFIED",
4353 Self::Replaced => "BOND_TYPE_REPLACED",
4354 }
4355 }
4356 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4358 match value {
4359 "BOND_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
4360 "BOND_TYPE_REPLACED" => Some(Self::Replaced),
4361 _ => None,
4362 }
4363 }
4364}
4365#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
4367#[repr(i32)]
4368pub enum InstrumentExchangeType {
4369 InstrumentExchangeUnspecified = 0,
4371 InstrumentExchangeDealer = 1,
4373}
4374impl InstrumentExchangeType {
4375 pub fn as_str_name(&self) -> &'static str {
4380 match self {
4381 Self::InstrumentExchangeUnspecified => "INSTRUMENT_EXCHANGE_UNSPECIFIED",
4382 Self::InstrumentExchangeDealer => "INSTRUMENT_EXCHANGE_DEALER",
4383 }
4384 }
4385 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
4387 match value {
4388 "INSTRUMENT_EXCHANGE_UNSPECIFIED" => {
4389 Some(Self::InstrumentExchangeUnspecified)
4390 }
4391 "INSTRUMENT_EXCHANGE_DEALER" => Some(Self::InstrumentExchangeDealer),
4392 _ => None,
4393 }
4394 }
4395}
4396pub mod instruments_service_client {
4398 #![allow(
4399 unused_variables,
4400 dead_code,
4401 missing_docs,
4402 clippy::wildcard_imports,
4403 clippy::let_unit_value,
4404 )]
4405 use tonic::codegen::*;
4406 use tonic::codegen::http::Uri;
4407 #[derive(Debug, Clone)]
4408 pub struct InstrumentsServiceClient<T> {
4409 inner: tonic::client::Grpc<T>,
4410 }
4411 impl InstrumentsServiceClient<tonic::transport::Channel> {
4412 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
4414 where
4415 D: TryInto<tonic::transport::Endpoint>,
4416 D::Error: Into<StdError>,
4417 {
4418 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
4419 Ok(Self::new(conn))
4420 }
4421 }
4422 impl<T> InstrumentsServiceClient<T>
4423 where
4424 T: tonic::client::GrpcService<tonic::body::Body>,
4425 T::Error: Into<StdError>,
4426 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
4427 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
4428 {
4429 pub fn new(inner: T) -> Self {
4430 let inner = tonic::client::Grpc::new(inner);
4431 Self { inner }
4432 }
4433 pub fn with_origin(inner: T, origin: Uri) -> Self {
4434 let inner = tonic::client::Grpc::with_origin(inner, origin);
4435 Self { inner }
4436 }
4437 pub fn with_interceptor<F>(
4438 inner: T,
4439 interceptor: F,
4440 ) -> InstrumentsServiceClient<InterceptedService<T, F>>
4441 where
4442 F: tonic::service::Interceptor,
4443 T::ResponseBody: Default,
4444 T: tonic::codegen::Service<
4445 http::Request<tonic::body::Body>,
4446 Response = http::Response<
4447 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
4448 >,
4449 >,
4450 <T as tonic::codegen::Service<
4451 http::Request<tonic::body::Body>,
4452 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
4453 {
4454 InstrumentsServiceClient::new(InterceptedService::new(inner, interceptor))
4455 }
4456 #[must_use]
4461 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4462 self.inner = self.inner.send_compressed(encoding);
4463 self
4464 }
4465 #[must_use]
4467 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4468 self.inner = self.inner.accept_compressed(encoding);
4469 self
4470 }
4471 #[must_use]
4475 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4476 self.inner = self.inner.max_decoding_message_size(limit);
4477 self
4478 }
4479 #[must_use]
4483 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4484 self.inner = self.inner.max_encoding_message_size(limit);
4485 self
4486 }
4487 pub async fn trading_schedules(
4489 &mut self,
4490 request: impl tonic::IntoRequest<super::TradingSchedulesRequest>,
4491 ) -> std::result::Result<
4492 tonic::Response<super::TradingSchedulesResponse>,
4493 tonic::Status,
4494 > {
4495 self.inner
4496 .ready()
4497 .await
4498 .map_err(|e| {
4499 tonic::Status::unknown(
4500 format!("Service was not ready: {}", e.into()),
4501 )
4502 })?;
4503 let codec = tonic_prost::ProstCodec::default();
4504 let path = http::uri::PathAndQuery::from_static(
4505 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/TradingSchedules",
4506 );
4507 let mut req = request.into_request();
4508 req.extensions_mut()
4509 .insert(
4510 GrpcMethod::new(
4511 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4512 "TradingSchedules",
4513 ),
4514 );
4515 self.inner.unary(req, path, codec).await
4516 }
4517 pub async fn bond_by(
4519 &mut self,
4520 request: impl tonic::IntoRequest<super::InstrumentRequest>,
4521 ) -> std::result::Result<tonic::Response<super::BondResponse>, tonic::Status> {
4522 self.inner
4523 .ready()
4524 .await
4525 .map_err(|e| {
4526 tonic::Status::unknown(
4527 format!("Service was not ready: {}", e.into()),
4528 )
4529 })?;
4530 let codec = tonic_prost::ProstCodec::default();
4531 let path = http::uri::PathAndQuery::from_static(
4532 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/BondBy",
4533 );
4534 let mut req = request.into_request();
4535 req.extensions_mut()
4536 .insert(
4537 GrpcMethod::new(
4538 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4539 "BondBy",
4540 ),
4541 );
4542 self.inner.unary(req, path, codec).await
4543 }
4544 pub async fn bonds(
4546 &mut self,
4547 request: impl tonic::IntoRequest<super::InstrumentsRequest>,
4548 ) -> std::result::Result<tonic::Response<super::BondsResponse>, tonic::Status> {
4549 self.inner
4550 .ready()
4551 .await
4552 .map_err(|e| {
4553 tonic::Status::unknown(
4554 format!("Service was not ready: {}", e.into()),
4555 )
4556 })?;
4557 let codec = tonic_prost::ProstCodec::default();
4558 let path = http::uri::PathAndQuery::from_static(
4559 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/Bonds",
4560 );
4561 let mut req = request.into_request();
4562 req.extensions_mut()
4563 .insert(
4564 GrpcMethod::new(
4565 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4566 "Bonds",
4567 ),
4568 );
4569 self.inner.unary(req, path, codec).await
4570 }
4571 pub async fn get_bond_coupons(
4573 &mut self,
4574 request: impl tonic::IntoRequest<super::GetBondCouponsRequest>,
4575 ) -> std::result::Result<
4576 tonic::Response<super::GetBondCouponsResponse>,
4577 tonic::Status,
4578 > {
4579 self.inner
4580 .ready()
4581 .await
4582 .map_err(|e| {
4583 tonic::Status::unknown(
4584 format!("Service was not ready: {}", e.into()),
4585 )
4586 })?;
4587 let codec = tonic_prost::ProstCodec::default();
4588 let path = http::uri::PathAndQuery::from_static(
4589 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetBondCoupons",
4590 );
4591 let mut req = request.into_request();
4592 req.extensions_mut()
4593 .insert(
4594 GrpcMethod::new(
4595 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4596 "GetBondCoupons",
4597 ),
4598 );
4599 self.inner.unary(req, path, codec).await
4600 }
4601 pub async fn get_bond_events(
4603 &mut self,
4604 request: impl tonic::IntoRequest<super::GetBondEventsRequest>,
4605 ) -> std::result::Result<
4606 tonic::Response<super::GetBondEventsResponse>,
4607 tonic::Status,
4608 > {
4609 self.inner
4610 .ready()
4611 .await
4612 .map_err(|e| {
4613 tonic::Status::unknown(
4614 format!("Service was not ready: {}", e.into()),
4615 )
4616 })?;
4617 let codec = tonic_prost::ProstCodec::default();
4618 let path = http::uri::PathAndQuery::from_static(
4619 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetBondEvents",
4620 );
4621 let mut req = request.into_request();
4622 req.extensions_mut()
4623 .insert(
4624 GrpcMethod::new(
4625 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4626 "GetBondEvents",
4627 ),
4628 );
4629 self.inner.unary(req, path, codec).await
4630 }
4631 pub async fn currency_by(
4633 &mut self,
4634 request: impl tonic::IntoRequest<super::InstrumentRequest>,
4635 ) -> std::result::Result<
4636 tonic::Response<super::CurrencyResponse>,
4637 tonic::Status,
4638 > {
4639 self.inner
4640 .ready()
4641 .await
4642 .map_err(|e| {
4643 tonic::Status::unknown(
4644 format!("Service was not ready: {}", e.into()),
4645 )
4646 })?;
4647 let codec = tonic_prost::ProstCodec::default();
4648 let path = http::uri::PathAndQuery::from_static(
4649 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/CurrencyBy",
4650 );
4651 let mut req = request.into_request();
4652 req.extensions_mut()
4653 .insert(
4654 GrpcMethod::new(
4655 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4656 "CurrencyBy",
4657 ),
4658 );
4659 self.inner.unary(req, path, codec).await
4660 }
4661 pub async fn currencies(
4663 &mut self,
4664 request: impl tonic::IntoRequest<super::InstrumentsRequest>,
4665 ) -> std::result::Result<
4666 tonic::Response<super::CurrenciesResponse>,
4667 tonic::Status,
4668 > {
4669 self.inner
4670 .ready()
4671 .await
4672 .map_err(|e| {
4673 tonic::Status::unknown(
4674 format!("Service was not ready: {}", e.into()),
4675 )
4676 })?;
4677 let codec = tonic_prost::ProstCodec::default();
4678 let path = http::uri::PathAndQuery::from_static(
4679 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/Currencies",
4680 );
4681 let mut req = request.into_request();
4682 req.extensions_mut()
4683 .insert(
4684 GrpcMethod::new(
4685 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4686 "Currencies",
4687 ),
4688 );
4689 self.inner.unary(req, path, codec).await
4690 }
4691 pub async fn etf_by(
4693 &mut self,
4694 request: impl tonic::IntoRequest<super::InstrumentRequest>,
4695 ) -> std::result::Result<tonic::Response<super::EtfResponse>, tonic::Status> {
4696 self.inner
4697 .ready()
4698 .await
4699 .map_err(|e| {
4700 tonic::Status::unknown(
4701 format!("Service was not ready: {}", e.into()),
4702 )
4703 })?;
4704 let codec = tonic_prost::ProstCodec::default();
4705 let path = http::uri::PathAndQuery::from_static(
4706 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/EtfBy",
4707 );
4708 let mut req = request.into_request();
4709 req.extensions_mut()
4710 .insert(
4711 GrpcMethod::new(
4712 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4713 "EtfBy",
4714 ),
4715 );
4716 self.inner.unary(req, path, codec).await
4717 }
4718 pub async fn etfs(
4720 &mut self,
4721 request: impl tonic::IntoRequest<super::InstrumentsRequest>,
4722 ) -> std::result::Result<tonic::Response<super::EtfsResponse>, tonic::Status> {
4723 self.inner
4724 .ready()
4725 .await
4726 .map_err(|e| {
4727 tonic::Status::unknown(
4728 format!("Service was not ready: {}", e.into()),
4729 )
4730 })?;
4731 let codec = tonic_prost::ProstCodec::default();
4732 let path = http::uri::PathAndQuery::from_static(
4733 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/Etfs",
4734 );
4735 let mut req = request.into_request();
4736 req.extensions_mut()
4737 .insert(
4738 GrpcMethod::new(
4739 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4740 "Etfs",
4741 ),
4742 );
4743 self.inner.unary(req, path, codec).await
4744 }
4745 pub async fn future_by(
4747 &mut self,
4748 request: impl tonic::IntoRequest<super::InstrumentRequest>,
4749 ) -> std::result::Result<tonic::Response<super::FutureResponse>, tonic::Status> {
4750 self.inner
4751 .ready()
4752 .await
4753 .map_err(|e| {
4754 tonic::Status::unknown(
4755 format!("Service was not ready: {}", e.into()),
4756 )
4757 })?;
4758 let codec = tonic_prost::ProstCodec::default();
4759 let path = http::uri::PathAndQuery::from_static(
4760 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/FutureBy",
4761 );
4762 let mut req = request.into_request();
4763 req.extensions_mut()
4764 .insert(
4765 GrpcMethod::new(
4766 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4767 "FutureBy",
4768 ),
4769 );
4770 self.inner.unary(req, path, codec).await
4771 }
4772 pub async fn futures(
4774 &mut self,
4775 request: impl tonic::IntoRequest<super::InstrumentsRequest>,
4776 ) -> std::result::Result<
4777 tonic::Response<super::FuturesResponse>,
4778 tonic::Status,
4779 > {
4780 self.inner
4781 .ready()
4782 .await
4783 .map_err(|e| {
4784 tonic::Status::unknown(
4785 format!("Service was not ready: {}", e.into()),
4786 )
4787 })?;
4788 let codec = tonic_prost::ProstCodec::default();
4789 let path = http::uri::PathAndQuery::from_static(
4790 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/Futures",
4791 );
4792 let mut req = request.into_request();
4793 req.extensions_mut()
4794 .insert(
4795 GrpcMethod::new(
4796 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4797 "Futures",
4798 ),
4799 );
4800 self.inner.unary(req, path, codec).await
4801 }
4802 pub async fn option_by(
4804 &mut self,
4805 request: impl tonic::IntoRequest<super::InstrumentRequest>,
4806 ) -> std::result::Result<tonic::Response<super::OptionResponse>, tonic::Status> {
4807 self.inner
4808 .ready()
4809 .await
4810 .map_err(|e| {
4811 tonic::Status::unknown(
4812 format!("Service was not ready: {}", e.into()),
4813 )
4814 })?;
4815 let codec = tonic_prost::ProstCodec::default();
4816 let path = http::uri::PathAndQuery::from_static(
4817 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/OptionBy",
4818 );
4819 let mut req = request.into_request();
4820 req.extensions_mut()
4821 .insert(
4822 GrpcMethod::new(
4823 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4824 "OptionBy",
4825 ),
4826 );
4827 self.inner.unary(req, path, codec).await
4828 }
4829 #[deprecated]
4831 pub async fn options(
4832 &mut self,
4833 request: impl tonic::IntoRequest<super::InstrumentsRequest>,
4834 ) -> std::result::Result<
4835 tonic::Response<super::OptionsResponse>,
4836 tonic::Status,
4837 > {
4838 self.inner
4839 .ready()
4840 .await
4841 .map_err(|e| {
4842 tonic::Status::unknown(
4843 format!("Service was not ready: {}", e.into()),
4844 )
4845 })?;
4846 let codec = tonic_prost::ProstCodec::default();
4847 let path = http::uri::PathAndQuery::from_static(
4848 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/Options",
4849 );
4850 let mut req = request.into_request();
4851 req.extensions_mut()
4852 .insert(
4853 GrpcMethod::new(
4854 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4855 "Options",
4856 ),
4857 );
4858 self.inner.unary(req, path, codec).await
4859 }
4860 pub async fn options_by(
4862 &mut self,
4863 request: impl tonic::IntoRequest<super::FilterOptionsRequest>,
4864 ) -> std::result::Result<
4865 tonic::Response<super::OptionsResponse>,
4866 tonic::Status,
4867 > {
4868 self.inner
4869 .ready()
4870 .await
4871 .map_err(|e| {
4872 tonic::Status::unknown(
4873 format!("Service was not ready: {}", e.into()),
4874 )
4875 })?;
4876 let codec = tonic_prost::ProstCodec::default();
4877 let path = http::uri::PathAndQuery::from_static(
4878 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/OptionsBy",
4879 );
4880 let mut req = request.into_request();
4881 req.extensions_mut()
4882 .insert(
4883 GrpcMethod::new(
4884 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4885 "OptionsBy",
4886 ),
4887 );
4888 self.inner.unary(req, path, codec).await
4889 }
4890 pub async fn share_by(
4892 &mut self,
4893 request: impl tonic::IntoRequest<super::InstrumentRequest>,
4894 ) -> std::result::Result<tonic::Response<super::ShareResponse>, tonic::Status> {
4895 self.inner
4896 .ready()
4897 .await
4898 .map_err(|e| {
4899 tonic::Status::unknown(
4900 format!("Service was not ready: {}", e.into()),
4901 )
4902 })?;
4903 let codec = tonic_prost::ProstCodec::default();
4904 let path = http::uri::PathAndQuery::from_static(
4905 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/ShareBy",
4906 );
4907 let mut req = request.into_request();
4908 req.extensions_mut()
4909 .insert(
4910 GrpcMethod::new(
4911 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4912 "ShareBy",
4913 ),
4914 );
4915 self.inner.unary(req, path, codec).await
4916 }
4917 pub async fn shares(
4919 &mut self,
4920 request: impl tonic::IntoRequest<super::InstrumentsRequest>,
4921 ) -> std::result::Result<tonic::Response<super::SharesResponse>, tonic::Status> {
4922 self.inner
4923 .ready()
4924 .await
4925 .map_err(|e| {
4926 tonic::Status::unknown(
4927 format!("Service was not ready: {}", e.into()),
4928 )
4929 })?;
4930 let codec = tonic_prost::ProstCodec::default();
4931 let path = http::uri::PathAndQuery::from_static(
4932 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/Shares",
4933 );
4934 let mut req = request.into_request();
4935 req.extensions_mut()
4936 .insert(
4937 GrpcMethod::new(
4938 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4939 "Shares",
4940 ),
4941 );
4942 self.inner.unary(req, path, codec).await
4943 }
4944 pub async fn dfa_by(
4946 &mut self,
4947 request: impl tonic::IntoRequest<super::InstrumentRequest>,
4948 ) -> std::result::Result<tonic::Response<super::DfaResponse>, tonic::Status> {
4949 self.inner
4950 .ready()
4951 .await
4952 .map_err(|e| {
4953 tonic::Status::unknown(
4954 format!("Service was not ready: {}", e.into()),
4955 )
4956 })?;
4957 let codec = tonic_prost::ProstCodec::default();
4958 let path = http::uri::PathAndQuery::from_static(
4959 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/DfaBy",
4960 );
4961 let mut req = request.into_request();
4962 req.extensions_mut()
4963 .insert(
4964 GrpcMethod::new(
4965 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4966 "DfaBy",
4967 ),
4968 );
4969 self.inner.unary(req, path, codec).await
4970 }
4971 pub async fn dfas(
4973 &mut self,
4974 request: impl tonic::IntoRequest<super::DfasRequest>,
4975 ) -> std::result::Result<tonic::Response<super::DfasResponse>, tonic::Status> {
4976 self.inner
4977 .ready()
4978 .await
4979 .map_err(|e| {
4980 tonic::Status::unknown(
4981 format!("Service was not ready: {}", e.into()),
4982 )
4983 })?;
4984 let codec = tonic_prost::ProstCodec::default();
4985 let path = http::uri::PathAndQuery::from_static(
4986 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/Dfas",
4987 );
4988 let mut req = request.into_request();
4989 req.extensions_mut()
4990 .insert(
4991 GrpcMethod::new(
4992 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
4993 "Dfas",
4994 ),
4995 );
4996 self.inner.unary(req, path, codec).await
4997 }
4998 pub async fn indicatives(
5000 &mut self,
5001 request: impl tonic::IntoRequest<super::IndicativesRequest>,
5002 ) -> std::result::Result<
5003 tonic::Response<super::IndicativesResponse>,
5004 tonic::Status,
5005 > {
5006 self.inner
5007 .ready()
5008 .await
5009 .map_err(|e| {
5010 tonic::Status::unknown(
5011 format!("Service was not ready: {}", e.into()),
5012 )
5013 })?;
5014 let codec = tonic_prost::ProstCodec::default();
5015 let path = http::uri::PathAndQuery::from_static(
5016 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/Indicatives",
5017 );
5018 let mut req = request.into_request();
5019 req.extensions_mut()
5020 .insert(
5021 GrpcMethod::new(
5022 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5023 "Indicatives",
5024 ),
5025 );
5026 self.inner.unary(req, path, codec).await
5027 }
5028 pub async fn get_accrued_interests(
5030 &mut self,
5031 request: impl tonic::IntoRequest<super::GetAccruedInterestsRequest>,
5032 ) -> std::result::Result<
5033 tonic::Response<super::GetAccruedInterestsResponse>,
5034 tonic::Status,
5035 > {
5036 self.inner
5037 .ready()
5038 .await
5039 .map_err(|e| {
5040 tonic::Status::unknown(
5041 format!("Service was not ready: {}", e.into()),
5042 )
5043 })?;
5044 let codec = tonic_prost::ProstCodec::default();
5045 let path = http::uri::PathAndQuery::from_static(
5046 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetAccruedInterests",
5047 );
5048 let mut req = request.into_request();
5049 req.extensions_mut()
5050 .insert(
5051 GrpcMethod::new(
5052 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5053 "GetAccruedInterests",
5054 ),
5055 );
5056 self.inner.unary(req, path, codec).await
5057 }
5058 pub async fn get_futures_margin(
5060 &mut self,
5061 request: impl tonic::IntoRequest<super::GetFuturesMarginRequest>,
5062 ) -> std::result::Result<
5063 tonic::Response<super::GetFuturesMarginResponse>,
5064 tonic::Status,
5065 > {
5066 self.inner
5067 .ready()
5068 .await
5069 .map_err(|e| {
5070 tonic::Status::unknown(
5071 format!("Service was not ready: {}", e.into()),
5072 )
5073 })?;
5074 let codec = tonic_prost::ProstCodec::default();
5075 let path = http::uri::PathAndQuery::from_static(
5076 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetFuturesMargin",
5077 );
5078 let mut req = request.into_request();
5079 req.extensions_mut()
5080 .insert(
5081 GrpcMethod::new(
5082 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5083 "GetFuturesMargin",
5084 ),
5085 );
5086 self.inner.unary(req, path, codec).await
5087 }
5088 pub async fn get_instrument_by(
5090 &mut self,
5091 request: impl tonic::IntoRequest<super::InstrumentRequest>,
5092 ) -> std::result::Result<
5093 tonic::Response<super::InstrumentResponse>,
5094 tonic::Status,
5095 > {
5096 self.inner
5097 .ready()
5098 .await
5099 .map_err(|e| {
5100 tonic::Status::unknown(
5101 format!("Service was not ready: {}", e.into()),
5102 )
5103 })?;
5104 let codec = tonic_prost::ProstCodec::default();
5105 let path = http::uri::PathAndQuery::from_static(
5106 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetInstrumentBy",
5107 );
5108 let mut req = request.into_request();
5109 req.extensions_mut()
5110 .insert(
5111 GrpcMethod::new(
5112 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5113 "GetInstrumentBy",
5114 ),
5115 );
5116 self.inner.unary(req, path, codec).await
5117 }
5118 pub async fn get_dividends(
5120 &mut self,
5121 request: impl tonic::IntoRequest<super::GetDividendsRequest>,
5122 ) -> std::result::Result<
5123 tonic::Response<super::GetDividendsResponse>,
5124 tonic::Status,
5125 > {
5126 self.inner
5127 .ready()
5128 .await
5129 .map_err(|e| {
5130 tonic::Status::unknown(
5131 format!("Service was not ready: {}", e.into()),
5132 )
5133 })?;
5134 let codec = tonic_prost::ProstCodec::default();
5135 let path = http::uri::PathAndQuery::from_static(
5136 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetDividends",
5137 );
5138 let mut req = request.into_request();
5139 req.extensions_mut()
5140 .insert(
5141 GrpcMethod::new(
5142 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5143 "GetDividends",
5144 ),
5145 );
5146 self.inner.unary(req, path, codec).await
5147 }
5148 pub async fn get_asset_by(
5150 &mut self,
5151 request: impl tonic::IntoRequest<super::AssetRequest>,
5152 ) -> std::result::Result<tonic::Response<super::AssetResponse>, tonic::Status> {
5153 self.inner
5154 .ready()
5155 .await
5156 .map_err(|e| {
5157 tonic::Status::unknown(
5158 format!("Service was not ready: {}", e.into()),
5159 )
5160 })?;
5161 let codec = tonic_prost::ProstCodec::default();
5162 let path = http::uri::PathAndQuery::from_static(
5163 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetAssetBy",
5164 );
5165 let mut req = request.into_request();
5166 req.extensions_mut()
5167 .insert(
5168 GrpcMethod::new(
5169 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5170 "GetAssetBy",
5171 ),
5172 );
5173 self.inner.unary(req, path, codec).await
5174 }
5175 pub async fn get_assets(
5178 &mut self,
5179 request: impl tonic::IntoRequest<super::AssetsRequest>,
5180 ) -> std::result::Result<tonic::Response<super::AssetsResponse>, tonic::Status> {
5181 self.inner
5182 .ready()
5183 .await
5184 .map_err(|e| {
5185 tonic::Status::unknown(
5186 format!("Service was not ready: {}", e.into()),
5187 )
5188 })?;
5189 let codec = tonic_prost::ProstCodec::default();
5190 let path = http::uri::PathAndQuery::from_static(
5191 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetAssets",
5192 );
5193 let mut req = request.into_request();
5194 req.extensions_mut()
5195 .insert(
5196 GrpcMethod::new(
5197 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5198 "GetAssets",
5199 ),
5200 );
5201 self.inner.unary(req, path, codec).await
5202 }
5203 pub async fn get_favorites(
5205 &mut self,
5206 request: impl tonic::IntoRequest<super::GetFavoritesRequest>,
5207 ) -> std::result::Result<
5208 tonic::Response<super::GetFavoritesResponse>,
5209 tonic::Status,
5210 > {
5211 self.inner
5212 .ready()
5213 .await
5214 .map_err(|e| {
5215 tonic::Status::unknown(
5216 format!("Service was not ready: {}", e.into()),
5217 )
5218 })?;
5219 let codec = tonic_prost::ProstCodec::default();
5220 let path = http::uri::PathAndQuery::from_static(
5221 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetFavorites",
5222 );
5223 let mut req = request.into_request();
5224 req.extensions_mut()
5225 .insert(
5226 GrpcMethod::new(
5227 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5228 "GetFavorites",
5229 ),
5230 );
5231 self.inner.unary(req, path, codec).await
5232 }
5233 pub async fn edit_favorites(
5235 &mut self,
5236 request: impl tonic::IntoRequest<super::EditFavoritesRequest>,
5237 ) -> std::result::Result<
5238 tonic::Response<super::EditFavoritesResponse>,
5239 tonic::Status,
5240 > {
5241 self.inner
5242 .ready()
5243 .await
5244 .map_err(|e| {
5245 tonic::Status::unknown(
5246 format!("Service was not ready: {}", e.into()),
5247 )
5248 })?;
5249 let codec = tonic_prost::ProstCodec::default();
5250 let path = http::uri::PathAndQuery::from_static(
5251 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/EditFavorites",
5252 );
5253 let mut req = request.into_request();
5254 req.extensions_mut()
5255 .insert(
5256 GrpcMethod::new(
5257 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5258 "EditFavorites",
5259 ),
5260 );
5261 self.inner.unary(req, path, codec).await
5262 }
5263 pub async fn create_favorite_group(
5265 &mut self,
5266 request: impl tonic::IntoRequest<super::CreateFavoriteGroupRequest>,
5267 ) -> std::result::Result<
5268 tonic::Response<super::CreateFavoriteGroupResponse>,
5269 tonic::Status,
5270 > {
5271 self.inner
5272 .ready()
5273 .await
5274 .map_err(|e| {
5275 tonic::Status::unknown(
5276 format!("Service was not ready: {}", e.into()),
5277 )
5278 })?;
5279 let codec = tonic_prost::ProstCodec::default();
5280 let path = http::uri::PathAndQuery::from_static(
5281 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/CreateFavoriteGroup",
5282 );
5283 let mut req = request.into_request();
5284 req.extensions_mut()
5285 .insert(
5286 GrpcMethod::new(
5287 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5288 "CreateFavoriteGroup",
5289 ),
5290 );
5291 self.inner.unary(req, path, codec).await
5292 }
5293 pub async fn delete_favorite_group(
5295 &mut self,
5296 request: impl tonic::IntoRequest<super::DeleteFavoriteGroupRequest>,
5297 ) -> std::result::Result<
5298 tonic::Response<super::DeleteFavoriteGroupResponse>,
5299 tonic::Status,
5300 > {
5301 self.inner
5302 .ready()
5303 .await
5304 .map_err(|e| {
5305 tonic::Status::unknown(
5306 format!("Service was not ready: {}", e.into()),
5307 )
5308 })?;
5309 let codec = tonic_prost::ProstCodec::default();
5310 let path = http::uri::PathAndQuery::from_static(
5311 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/DeleteFavoriteGroup",
5312 );
5313 let mut req = request.into_request();
5314 req.extensions_mut()
5315 .insert(
5316 GrpcMethod::new(
5317 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5318 "DeleteFavoriteGroup",
5319 ),
5320 );
5321 self.inner.unary(req, path, codec).await
5322 }
5323 pub async fn get_favorite_groups(
5325 &mut self,
5326 request: impl tonic::IntoRequest<super::GetFavoriteGroupsRequest>,
5327 ) -> std::result::Result<
5328 tonic::Response<super::GetFavoriteGroupsResponse>,
5329 tonic::Status,
5330 > {
5331 self.inner
5332 .ready()
5333 .await
5334 .map_err(|e| {
5335 tonic::Status::unknown(
5336 format!("Service was not ready: {}", e.into()),
5337 )
5338 })?;
5339 let codec = tonic_prost::ProstCodec::default();
5340 let path = http::uri::PathAndQuery::from_static(
5341 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetFavoriteGroups",
5342 );
5343 let mut req = request.into_request();
5344 req.extensions_mut()
5345 .insert(
5346 GrpcMethod::new(
5347 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5348 "GetFavoriteGroups",
5349 ),
5350 );
5351 self.inner.unary(req, path, codec).await
5352 }
5353 pub async fn get_countries(
5355 &mut self,
5356 request: impl tonic::IntoRequest<super::GetCountriesRequest>,
5357 ) -> std::result::Result<
5358 tonic::Response<super::GetCountriesResponse>,
5359 tonic::Status,
5360 > {
5361 self.inner
5362 .ready()
5363 .await
5364 .map_err(|e| {
5365 tonic::Status::unknown(
5366 format!("Service was not ready: {}", e.into()),
5367 )
5368 })?;
5369 let codec = tonic_prost::ProstCodec::default();
5370 let path = http::uri::PathAndQuery::from_static(
5371 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetCountries",
5372 );
5373 let mut req = request.into_request();
5374 req.extensions_mut()
5375 .insert(
5376 GrpcMethod::new(
5377 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5378 "GetCountries",
5379 ),
5380 );
5381 self.inner.unary(req, path, codec).await
5382 }
5383 pub async fn find_instrument(
5385 &mut self,
5386 request: impl tonic::IntoRequest<super::FindInstrumentRequest>,
5387 ) -> std::result::Result<
5388 tonic::Response<super::FindInstrumentResponse>,
5389 tonic::Status,
5390 > {
5391 self.inner
5392 .ready()
5393 .await
5394 .map_err(|e| {
5395 tonic::Status::unknown(
5396 format!("Service was not ready: {}", e.into()),
5397 )
5398 })?;
5399 let codec = tonic_prost::ProstCodec::default();
5400 let path = http::uri::PathAndQuery::from_static(
5401 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/FindInstrument",
5402 );
5403 let mut req = request.into_request();
5404 req.extensions_mut()
5405 .insert(
5406 GrpcMethod::new(
5407 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5408 "FindInstrument",
5409 ),
5410 );
5411 self.inner.unary(req, path, codec).await
5412 }
5413 pub async fn get_brands(
5415 &mut self,
5416 request: impl tonic::IntoRequest<super::GetBrandsRequest>,
5417 ) -> std::result::Result<
5418 tonic::Response<super::GetBrandsResponse>,
5419 tonic::Status,
5420 > {
5421 self.inner
5422 .ready()
5423 .await
5424 .map_err(|e| {
5425 tonic::Status::unknown(
5426 format!("Service was not ready: {}", e.into()),
5427 )
5428 })?;
5429 let codec = tonic_prost::ProstCodec::default();
5430 let path = http::uri::PathAndQuery::from_static(
5431 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetBrands",
5432 );
5433 let mut req = request.into_request();
5434 req.extensions_mut()
5435 .insert(
5436 GrpcMethod::new(
5437 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5438 "GetBrands",
5439 ),
5440 );
5441 self.inner.unary(req, path, codec).await
5442 }
5443 pub async fn get_brand_by(
5445 &mut self,
5446 request: impl tonic::IntoRequest<super::GetBrandRequest>,
5447 ) -> std::result::Result<tonic::Response<super::Brand>, tonic::Status> {
5448 self.inner
5449 .ready()
5450 .await
5451 .map_err(|e| {
5452 tonic::Status::unknown(
5453 format!("Service was not ready: {}", e.into()),
5454 )
5455 })?;
5456 let codec = tonic_prost::ProstCodec::default();
5457 let path = http::uri::PathAndQuery::from_static(
5458 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetBrandBy",
5459 );
5460 let mut req = request.into_request();
5461 req.extensions_mut()
5462 .insert(
5463 GrpcMethod::new(
5464 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5465 "GetBrandBy",
5466 ),
5467 );
5468 self.inner.unary(req, path, codec).await
5469 }
5470 pub async fn get_asset_fundamentals(
5472 &mut self,
5473 request: impl tonic::IntoRequest<super::GetAssetFundamentalsRequest>,
5474 ) -> std::result::Result<
5475 tonic::Response<super::GetAssetFundamentalsResponse>,
5476 tonic::Status,
5477 > {
5478 self.inner
5479 .ready()
5480 .await
5481 .map_err(|e| {
5482 tonic::Status::unknown(
5483 format!("Service was not ready: {}", e.into()),
5484 )
5485 })?;
5486 let codec = tonic_prost::ProstCodec::default();
5487 let path = http::uri::PathAndQuery::from_static(
5488 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetAssetFundamentals",
5489 );
5490 let mut req = request.into_request();
5491 req.extensions_mut()
5492 .insert(
5493 GrpcMethod::new(
5494 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5495 "GetAssetFundamentals",
5496 ),
5497 );
5498 self.inner.unary(req, path, codec).await
5499 }
5500 pub async fn get_asset_reports(
5502 &mut self,
5503 request: impl tonic::IntoRequest<super::GetAssetReportsRequest>,
5504 ) -> std::result::Result<
5505 tonic::Response<super::GetAssetReportsResponse>,
5506 tonic::Status,
5507 > {
5508 self.inner
5509 .ready()
5510 .await
5511 .map_err(|e| {
5512 tonic::Status::unknown(
5513 format!("Service was not ready: {}", e.into()),
5514 )
5515 })?;
5516 let codec = tonic_prost::ProstCodec::default();
5517 let path = http::uri::PathAndQuery::from_static(
5518 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetAssetReports",
5519 );
5520 let mut req = request.into_request();
5521 req.extensions_mut()
5522 .insert(
5523 GrpcMethod::new(
5524 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5525 "GetAssetReports",
5526 ),
5527 );
5528 self.inner.unary(req, path, codec).await
5529 }
5530 pub async fn get_consensus_forecasts(
5532 &mut self,
5533 request: impl tonic::IntoRequest<super::GetConsensusForecastsRequest>,
5534 ) -> std::result::Result<
5535 tonic::Response<super::GetConsensusForecastsResponse>,
5536 tonic::Status,
5537 > {
5538 self.inner
5539 .ready()
5540 .await
5541 .map_err(|e| {
5542 tonic::Status::unknown(
5543 format!("Service was not ready: {}", e.into()),
5544 )
5545 })?;
5546 let codec = tonic_prost::ProstCodec::default();
5547 let path = http::uri::PathAndQuery::from_static(
5548 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetConsensusForecasts",
5549 );
5550 let mut req = request.into_request();
5551 req.extensions_mut()
5552 .insert(
5553 GrpcMethod::new(
5554 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5555 "GetConsensusForecasts",
5556 ),
5557 );
5558 self.inner.unary(req, path, codec).await
5559 }
5560 pub async fn get_forecast_by(
5562 &mut self,
5563 request: impl tonic::IntoRequest<super::GetForecastRequest>,
5564 ) -> std::result::Result<
5565 tonic::Response<super::GetForecastResponse>,
5566 tonic::Status,
5567 > {
5568 self.inner
5569 .ready()
5570 .await
5571 .map_err(|e| {
5572 tonic::Status::unknown(
5573 format!("Service was not ready: {}", e.into()),
5574 )
5575 })?;
5576 let codec = tonic_prost::ProstCodec::default();
5577 let path = http::uri::PathAndQuery::from_static(
5578 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetForecastBy",
5579 );
5580 let mut req = request.into_request();
5581 req.extensions_mut()
5582 .insert(
5583 GrpcMethod::new(
5584 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5585 "GetForecastBy",
5586 ),
5587 );
5588 self.inner.unary(req, path, codec).await
5589 }
5590 pub async fn get_risk_rates(
5592 &mut self,
5593 request: impl tonic::IntoRequest<super::RiskRatesRequest>,
5594 ) -> std::result::Result<
5595 tonic::Response<super::RiskRatesResponse>,
5596 tonic::Status,
5597 > {
5598 self.inner
5599 .ready()
5600 .await
5601 .map_err(|e| {
5602 tonic::Status::unknown(
5603 format!("Service was not ready: {}", e.into()),
5604 )
5605 })?;
5606 let codec = tonic_prost::ProstCodec::default();
5607 let path = http::uri::PathAndQuery::from_static(
5608 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetRiskRates",
5609 );
5610 let mut req = request.into_request();
5611 req.extensions_mut()
5612 .insert(
5613 GrpcMethod::new(
5614 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5615 "GetRiskRates",
5616 ),
5617 );
5618 self.inner.unary(req, path, codec).await
5619 }
5620 pub async fn get_insider_deals(
5622 &mut self,
5623 request: impl tonic::IntoRequest<super::GetInsiderDealsRequest>,
5624 ) -> std::result::Result<
5625 tonic::Response<super::GetInsiderDealsResponse>,
5626 tonic::Status,
5627 > {
5628 self.inner
5629 .ready()
5630 .await
5631 .map_err(|e| {
5632 tonic::Status::unknown(
5633 format!("Service was not ready: {}", e.into()),
5634 )
5635 })?;
5636 let codec = tonic_prost::ProstCodec::default();
5637 let path = http::uri::PathAndQuery::from_static(
5638 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/GetInsiderDeals",
5639 );
5640 let mut req = request.into_request();
5641 req.extensions_mut()
5642 .insert(
5643 GrpcMethod::new(
5644 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5645 "GetInsiderDeals",
5646 ),
5647 );
5648 self.inner.unary(req, path, codec).await
5649 }
5650 pub async fn structured_note_by(
5652 &mut self,
5653 request: impl tonic::IntoRequest<super::InstrumentRequest>,
5654 ) -> std::result::Result<
5655 tonic::Response<super::StructuredNoteResponse>,
5656 tonic::Status,
5657 > {
5658 self.inner
5659 .ready()
5660 .await
5661 .map_err(|e| {
5662 tonic::Status::unknown(
5663 format!("Service was not ready: {}", e.into()),
5664 )
5665 })?;
5666 let codec = tonic_prost::ProstCodec::default();
5667 let path = http::uri::PathAndQuery::from_static(
5668 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/StructuredNoteBy",
5669 );
5670 let mut req = request.into_request();
5671 req.extensions_mut()
5672 .insert(
5673 GrpcMethod::new(
5674 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5675 "StructuredNoteBy",
5676 ),
5677 );
5678 self.inner.unary(req, path, codec).await
5679 }
5680 pub async fn structured_notes(
5682 &mut self,
5683 request: impl tonic::IntoRequest<super::InstrumentsRequest>,
5684 ) -> std::result::Result<
5685 tonic::Response<super::StructuredNotesResponse>,
5686 tonic::Status,
5687 > {
5688 self.inner
5689 .ready()
5690 .await
5691 .map_err(|e| {
5692 tonic::Status::unknown(
5693 format!("Service was not ready: {}", e.into()),
5694 )
5695 })?;
5696 let codec = tonic_prost::ProstCodec::default();
5697 let path = http::uri::PathAndQuery::from_static(
5698 "/tinkoff.public.invest.api.contract.v1.InstrumentsService/StructuredNotes",
5699 );
5700 let mut req = request.into_request();
5701 req.extensions_mut()
5702 .insert(
5703 GrpcMethod::new(
5704 "tinkoff.public.invest.api.contract.v1.InstrumentsService",
5705 "StructuredNotes",
5706 ),
5707 );
5708 self.inner.unary(req, path, codec).await
5709 }
5710 }
5711}
5712#[derive(Clone, PartialEq, ::prost::Message)]
5714pub struct MarketDataRequest {
5715 #[prost(oneof = "market_data_request::Payload", tags = "1, 2, 3, 4, 5, 6, 7, 15")]
5716 pub payload: ::core::option::Option<market_data_request::Payload>,
5717}
5718pub mod market_data_request {
5720 #[derive(Clone, PartialEq, ::prost::Oneof)]
5721 pub enum Payload {
5722 #[prost(message, tag = "1")]
5724 SubscribeCandlesRequest(super::SubscribeCandlesRequest),
5725 #[prost(message, tag = "2")]
5727 SubscribeOrderBookRequest(super::SubscribeOrderBookRequest),
5728 #[prost(message, tag = "3")]
5730 SubscribeTradesRequest(super::SubscribeTradesRequest),
5731 #[prost(message, tag = "4")]
5733 SubscribeInfoRequest(super::SubscribeInfoRequest),
5734 #[prost(message, tag = "5")]
5736 SubscribeLastPriceRequest(super::SubscribeLastPriceRequest),
5737 #[prost(message, tag = "6")]
5739 GetMySubscriptions(super::GetMySubscriptions),
5740 #[prost(message, tag = "7")]
5742 Ping(super::PingRequest),
5743 #[prost(message, tag = "15")]
5745 PingSettings(super::PingDelaySettings),
5746 }
5747}
5748#[derive(Clone, PartialEq, ::prost::Message)]
5749pub struct MarketDataServerSideStreamRequest {
5750 #[prost(message, optional, tag = "1")]
5752 pub subscribe_candles_request: ::core::option::Option<SubscribeCandlesRequest>,
5753 #[prost(message, optional, tag = "2")]
5755 pub subscribe_order_book_request: ::core::option::Option<SubscribeOrderBookRequest>,
5756 #[prost(message, optional, tag = "3")]
5758 pub subscribe_trades_request: ::core::option::Option<SubscribeTradesRequest>,
5759 #[prost(message, optional, tag = "4")]
5761 pub subscribe_info_request: ::core::option::Option<SubscribeInfoRequest>,
5762 #[prost(message, optional, tag = "5")]
5764 pub subscribe_last_price_request: ::core::option::Option<SubscribeLastPriceRequest>,
5765 #[prost(message, optional, tag = "15")]
5767 pub ping_settings: ::core::option::Option<PingDelaySettings>,
5768}
5769#[derive(Clone, PartialEq, ::prost::Message)]
5771pub struct MarketDataResponse {
5772 #[prost(
5773 oneof = "market_data_response::Payload",
5774 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12"
5775 )]
5776 pub payload: ::core::option::Option<market_data_response::Payload>,
5777}
5778pub mod market_data_response {
5780 #[derive(Clone, PartialEq, ::prost::Oneof)]
5781 pub enum Payload {
5782 #[prost(message, tag = "1")]
5784 SubscribeCandlesResponse(super::SubscribeCandlesResponse),
5785 #[prost(message, tag = "2")]
5787 SubscribeOrderBookResponse(super::SubscribeOrderBookResponse),
5788 #[prost(message, tag = "3")]
5790 SubscribeTradesResponse(super::SubscribeTradesResponse),
5791 #[prost(message, tag = "4")]
5793 SubscribeInfoResponse(super::SubscribeInfoResponse),
5794 #[prost(message, tag = "5")]
5796 Candle(super::Candle),
5797 #[prost(message, tag = "6")]
5799 Trade(super::Trade),
5800 #[prost(message, tag = "7")]
5802 Orderbook(super::OrderBook),
5803 #[prost(message, tag = "8")]
5805 TradingStatus(super::TradingStatus),
5806 #[prost(message, tag = "9")]
5808 Ping(super::Ping),
5809 #[prost(message, tag = "10")]
5811 SubscribeLastPriceResponse(super::SubscribeLastPriceResponse),
5812 #[prost(message, tag = "11")]
5814 LastPrice(super::LastPrice),
5815 #[prost(message, tag = "12")]
5817 OpenInterest(super::OpenInterest),
5818 }
5819}
5820#[derive(Clone, PartialEq, ::prost::Message)]
5822pub struct SubscribeCandlesRequest {
5823 #[prost(enumeration = "SubscriptionAction", tag = "1")]
5825 pub subscription_action: i32,
5826 #[prost(message, repeated, tag = "2")]
5828 pub instruments: ::prost::alloc::vec::Vec<CandleInstrument>,
5829 #[prost(bool, tag = "3")]
5831 pub waiting_close: bool,
5832 #[prost(enumeration = "get_candles_request::CandleSource", optional, tag = "9")]
5834 pub candle_source_type: ::core::option::Option<i32>,
5835}
5836#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5838pub struct CandleInstrument {
5839 #[deprecated]
5841 #[prost(string, tag = "1")]
5842 pub figi: ::prost::alloc::string::String,
5843 #[prost(enumeration = "SubscriptionInterval", tag = "2")]
5845 pub interval: i32,
5846 #[prost(string, tag = "3")]
5848 pub instrument_id: ::prost::alloc::string::String,
5849}
5850#[derive(Clone, PartialEq, ::prost::Message)]
5852pub struct SubscribeCandlesResponse {
5853 #[prost(string, tag = "1")]
5855 pub tracking_id: ::prost::alloc::string::String,
5856 #[prost(message, repeated, tag = "2")]
5858 pub candles_subscriptions: ::prost::alloc::vec::Vec<CandleSubscription>,
5859}
5860#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5862pub struct CandleSubscription {
5863 #[prost(string, tag = "1")]
5865 pub figi: ::prost::alloc::string::String,
5866 #[prost(enumeration = "SubscriptionInterval", tag = "2")]
5868 pub interval: i32,
5869 #[prost(enumeration = "SubscriptionStatus", tag = "3")]
5871 pub subscription_status: i32,
5872 #[prost(string, tag = "4")]
5874 pub instrument_uid: ::prost::alloc::string::String,
5875 #[prost(bool, tag = "5")]
5877 pub waiting_close: bool,
5878 #[prost(string, tag = "6")]
5880 pub stream_id: ::prost::alloc::string::String,
5881 #[prost(string, tag = "7")]
5883 pub subscription_id: ::prost::alloc::string::String,
5884 #[prost(enumeration = "SubscriptionAction", tag = "8")]
5886 pub subscription_action: i32,
5887 #[prost(enumeration = "get_candles_request::CandleSource", optional, tag = "9")]
5889 pub candle_source_type: ::core::option::Option<i32>,
5890 #[prost(string, tag = "10")]
5892 pub ticker: ::prost::alloc::string::String,
5893 #[prost(string, tag = "11")]
5895 pub class_code: ::prost::alloc::string::String,
5896}
5897#[derive(Clone, PartialEq, ::prost::Message)]
5899pub struct SubscribeOrderBookRequest {
5900 #[prost(enumeration = "SubscriptionAction", tag = "1")]
5902 pub subscription_action: i32,
5903 #[prost(message, repeated, tag = "2")]
5905 pub instruments: ::prost::alloc::vec::Vec<OrderBookInstrument>,
5906}
5907#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5909pub struct OrderBookInstrument {
5910 #[deprecated]
5912 #[prost(string, tag = "1")]
5913 pub figi: ::prost::alloc::string::String,
5914 #[prost(int32, tag = "2")]
5916 pub depth: i32,
5917 #[prost(string, tag = "3")]
5919 pub instrument_id: ::prost::alloc::string::String,
5920 #[prost(enumeration = "OrderBookType", tag = "4")]
5922 pub order_book_type: i32,
5923}
5924#[derive(Clone, PartialEq, ::prost::Message)]
5926pub struct SubscribeOrderBookResponse {
5927 #[prost(string, tag = "1")]
5929 pub tracking_id: ::prost::alloc::string::String,
5930 #[prost(message, repeated, tag = "2")]
5932 pub order_book_subscriptions: ::prost::alloc::vec::Vec<OrderBookSubscription>,
5933}
5934#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5936pub struct OrderBookSubscription {
5937 #[prost(string, tag = "1")]
5939 pub figi: ::prost::alloc::string::String,
5940 #[prost(int32, tag = "2")]
5942 pub depth: i32,
5943 #[prost(enumeration = "SubscriptionStatus", tag = "3")]
5945 pub subscription_status: i32,
5946 #[prost(string, tag = "4")]
5948 pub instrument_uid: ::prost::alloc::string::String,
5949 #[prost(string, tag = "5")]
5951 pub stream_id: ::prost::alloc::string::String,
5952 #[prost(string, tag = "6")]
5954 pub subscription_id: ::prost::alloc::string::String,
5955 #[prost(enumeration = "OrderBookType", tag = "7")]
5957 pub order_book_type: i32,
5958 #[prost(enumeration = "SubscriptionAction", tag = "8")]
5960 pub subscription_action: i32,
5961 #[prost(string, tag = "9")]
5963 pub ticker: ::prost::alloc::string::String,
5964 #[prost(string, tag = "10")]
5966 pub class_code: ::prost::alloc::string::String,
5967}
5968#[derive(Clone, PartialEq, ::prost::Message)]
5970pub struct SubscribeTradesRequest {
5971 #[prost(enumeration = "SubscriptionAction", tag = "1")]
5973 pub subscription_action: i32,
5974 #[prost(message, repeated, tag = "2")]
5976 pub instruments: ::prost::alloc::vec::Vec<TradeInstrument>,
5977 #[prost(enumeration = "TradeSourceType", tag = "3")]
5979 pub trade_source: i32,
5980 #[prost(bool, tag = "4")]
5982 pub with_open_interest: bool,
5983}
5984#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5986pub struct TradeInstrument {
5987 #[deprecated]
5989 #[prost(string, tag = "1")]
5990 pub figi: ::prost::alloc::string::String,
5991 #[prost(string, tag = "2")]
5993 pub instrument_id: ::prost::alloc::string::String,
5994}
5995#[derive(Clone, PartialEq, ::prost::Message)]
5997pub struct SubscribeTradesResponse {
5998 #[prost(string, tag = "1")]
6000 pub tracking_id: ::prost::alloc::string::String,
6001 #[prost(message, repeated, tag = "2")]
6003 pub trade_subscriptions: ::prost::alloc::vec::Vec<TradeSubscription>,
6004 #[prost(enumeration = "TradeSourceType", tag = "3")]
6006 pub trade_source: i32,
6007}
6008#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6010pub struct TradeSubscription {
6011 #[prost(string, tag = "1")]
6013 pub figi: ::prost::alloc::string::String,
6014 #[prost(enumeration = "SubscriptionStatus", tag = "2")]
6016 pub subscription_status: i32,
6017 #[prost(string, tag = "3")]
6019 pub instrument_uid: ::prost::alloc::string::String,
6020 #[prost(string, tag = "4")]
6022 pub stream_id: ::prost::alloc::string::String,
6023 #[prost(string, tag = "5")]
6025 pub subscription_id: ::prost::alloc::string::String,
6026 #[prost(bool, tag = "6")]
6028 pub with_open_interest: bool,
6029 #[prost(enumeration = "SubscriptionAction", tag = "7")]
6031 pub subscription_action: i32,
6032 #[prost(string, tag = "8")]
6034 pub ticker: ::prost::alloc::string::String,
6035 #[prost(string, tag = "9")]
6037 pub class_code: ::prost::alloc::string::String,
6038}
6039#[derive(Clone, PartialEq, ::prost::Message)]
6041pub struct SubscribeInfoRequest {
6042 #[prost(enumeration = "SubscriptionAction", tag = "1")]
6044 pub subscription_action: i32,
6045 #[prost(message, repeated, tag = "2")]
6047 pub instruments: ::prost::alloc::vec::Vec<InfoInstrument>,
6048}
6049#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6051pub struct InfoInstrument {
6052 #[deprecated]
6054 #[prost(string, tag = "1")]
6055 pub figi: ::prost::alloc::string::String,
6056 #[prost(string, tag = "2")]
6058 pub instrument_id: ::prost::alloc::string::String,
6059}
6060#[derive(Clone, PartialEq, ::prost::Message)]
6062pub struct SubscribeInfoResponse {
6063 #[prost(string, tag = "1")]
6065 pub tracking_id: ::prost::alloc::string::String,
6066 #[prost(message, repeated, tag = "2")]
6068 pub info_subscriptions: ::prost::alloc::vec::Vec<InfoSubscription>,
6069}
6070#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6072pub struct InfoSubscription {
6073 #[prost(string, tag = "1")]
6075 pub figi: ::prost::alloc::string::String,
6076 #[prost(enumeration = "SubscriptionStatus", tag = "2")]
6078 pub subscription_status: i32,
6079 #[prost(string, tag = "3")]
6081 pub instrument_uid: ::prost::alloc::string::String,
6082 #[prost(string, tag = "4")]
6084 pub stream_id: ::prost::alloc::string::String,
6085 #[prost(string, tag = "5")]
6087 pub subscription_id: ::prost::alloc::string::String,
6088 #[prost(enumeration = "SubscriptionAction", tag = "6")]
6090 pub subscription_action: i32,
6091 #[prost(string, tag = "7")]
6093 pub ticker: ::prost::alloc::string::String,
6094 #[prost(string, tag = "8")]
6096 pub class_code: ::prost::alloc::string::String,
6097}
6098#[derive(Clone, PartialEq, ::prost::Message)]
6100pub struct SubscribeLastPriceRequest {
6101 #[prost(enumeration = "SubscriptionAction", tag = "1")]
6103 pub subscription_action: i32,
6104 #[prost(message, repeated, tag = "2")]
6106 pub instruments: ::prost::alloc::vec::Vec<LastPriceInstrument>,
6107}
6108#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6110pub struct LastPriceInstrument {
6111 #[deprecated]
6113 #[prost(string, tag = "1")]
6114 pub figi: ::prost::alloc::string::String,
6115 #[prost(string, tag = "2")]
6117 pub instrument_id: ::prost::alloc::string::String,
6118}
6119#[derive(Clone, PartialEq, ::prost::Message)]
6121pub struct SubscribeLastPriceResponse {
6122 #[prost(string, tag = "1")]
6124 pub tracking_id: ::prost::alloc::string::String,
6125 #[prost(message, repeated, tag = "2")]
6127 pub last_price_subscriptions: ::prost::alloc::vec::Vec<LastPriceSubscription>,
6128}
6129#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6131pub struct LastPriceSubscription {
6132 #[prost(string, tag = "1")]
6134 pub figi: ::prost::alloc::string::String,
6135 #[prost(enumeration = "SubscriptionStatus", tag = "2")]
6137 pub subscription_status: i32,
6138 #[prost(string, tag = "3")]
6140 pub instrument_uid: ::prost::alloc::string::String,
6141 #[prost(string, tag = "4")]
6143 pub stream_id: ::prost::alloc::string::String,
6144 #[prost(string, tag = "5")]
6146 pub subscription_id: ::prost::alloc::string::String,
6147 #[prost(enumeration = "SubscriptionAction", tag = "6")]
6149 pub subscription_action: i32,
6150 #[prost(string, tag = "7")]
6152 pub ticker: ::prost::alloc::string::String,
6153 #[prost(string, tag = "8")]
6155 pub class_code: ::prost::alloc::string::String,
6156}
6157#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6159pub struct Candle {
6160 #[prost(string, tag = "1")]
6162 pub figi: ::prost::alloc::string::String,
6163 #[prost(enumeration = "SubscriptionInterval", tag = "2")]
6165 pub interval: i32,
6166 #[prost(message, optional, tag = "3")]
6168 pub open: ::core::option::Option<Quotation>,
6169 #[prost(message, optional, tag = "4")]
6171 pub high: ::core::option::Option<Quotation>,
6172 #[prost(message, optional, tag = "5")]
6174 pub low: ::core::option::Option<Quotation>,
6175 #[prost(message, optional, tag = "6")]
6177 pub close: ::core::option::Option<Quotation>,
6178 #[prost(int64, tag = "7")]
6180 pub volume: i64,
6181 #[prost(message, optional, tag = "8")]
6183 pub time: ::core::option::Option<::prost_types::Timestamp>,
6184 #[prost(message, optional, tag = "9")]
6186 pub last_trade_ts: ::core::option::Option<::prost_types::Timestamp>,
6187 #[prost(string, tag = "10")]
6189 pub instrument_uid: ::prost::alloc::string::String,
6190 #[prost(string, tag = "11")]
6192 pub ticker: ::prost::alloc::string::String,
6193 #[prost(string, tag = "12")]
6195 pub class_code: ::prost::alloc::string::String,
6196 #[prost(int64, tag = "13")]
6198 pub volume_buy: i64,
6199 #[prost(int64, tag = "14")]
6201 pub volume_sell: i64,
6202 #[prost(enumeration = "CandleSource", tag = "19")]
6204 pub candle_source_type: i32,
6205}
6206#[derive(Clone, PartialEq, ::prost::Message)]
6208pub struct OrderBook {
6209 #[prost(string, tag = "1")]
6211 pub figi: ::prost::alloc::string::String,
6212 #[prost(int32, tag = "2")]
6214 pub depth: i32,
6215 #[prost(bool, tag = "3")]
6217 pub is_consistent: bool,
6218 #[prost(message, repeated, tag = "4")]
6220 pub bids: ::prost::alloc::vec::Vec<Order>,
6221 #[prost(message, repeated, tag = "5")]
6223 pub asks: ::prost::alloc::vec::Vec<Order>,
6224 #[prost(message, optional, tag = "6")]
6226 pub time: ::core::option::Option<::prost_types::Timestamp>,
6227 #[prost(message, optional, tag = "7")]
6229 pub limit_up: ::core::option::Option<Quotation>,
6230 #[prost(message, optional, tag = "8")]
6232 pub limit_down: ::core::option::Option<Quotation>,
6233 #[prost(string, tag = "9")]
6235 pub instrument_uid: ::prost::alloc::string::String,
6236 #[prost(enumeration = "OrderBookType", tag = "10")]
6238 pub order_book_type: i32,
6239 #[prost(string, tag = "11")]
6241 pub ticker: ::prost::alloc::string::String,
6242 #[prost(string, tag = "12")]
6244 pub class_code: ::prost::alloc::string::String,
6245}
6246#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6248pub struct Order {
6249 #[prost(message, optional, tag = "1")]
6251 pub price: ::core::option::Option<Quotation>,
6252 #[prost(int64, tag = "2")]
6254 pub quantity: i64,
6255}
6256#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6258pub struct Trade {
6259 #[prost(string, tag = "1")]
6261 pub figi: ::prost::alloc::string::String,
6262 #[prost(enumeration = "TradeDirection", tag = "2")]
6264 pub direction: i32,
6265 #[prost(message, optional, tag = "3")]
6267 pub price: ::core::option::Option<Quotation>,
6268 #[prost(int64, tag = "4")]
6270 pub quantity: i64,
6271 #[prost(message, optional, tag = "5")]
6273 pub time: ::core::option::Option<::prost_types::Timestamp>,
6274 #[prost(string, tag = "6")]
6276 pub instrument_uid: ::prost::alloc::string::String,
6277 #[prost(enumeration = "TradeSourceType", tag = "7")]
6279 pub trade_source: i32,
6280 #[prost(string, tag = "8")]
6282 pub ticker: ::prost::alloc::string::String,
6283 #[prost(string, tag = "9")]
6285 pub class_code: ::prost::alloc::string::String,
6286}
6287#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6289pub struct TradingStatus {
6290 #[prost(string, tag = "1")]
6292 pub figi: ::prost::alloc::string::String,
6293 #[prost(enumeration = "SecurityTradingStatus", tag = "2")]
6295 pub trading_status: i32,
6296 #[prost(message, optional, tag = "3")]
6298 pub time: ::core::option::Option<::prost_types::Timestamp>,
6299 #[prost(bool, tag = "4")]
6301 pub limit_order_available_flag: bool,
6302 #[prost(bool, tag = "5")]
6304 pub market_order_available_flag: bool,
6305 #[prost(string, tag = "6")]
6307 pub instrument_uid: ::prost::alloc::string::String,
6308 #[prost(string, tag = "7")]
6310 pub ticker: ::prost::alloc::string::String,
6311 #[prost(string, tag = "8")]
6313 pub class_code: ::prost::alloc::string::String,
6314}
6315#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6317pub struct GetCandlesRequest {
6318 #[deprecated]
6320 #[prost(string, optional, tag = "1")]
6321 pub figi: ::core::option::Option<::prost::alloc::string::String>,
6322 #[prost(message, optional, tag = "2")]
6324 pub from: ::core::option::Option<::prost_types::Timestamp>,
6325 #[prost(message, optional, tag = "3")]
6327 pub to: ::core::option::Option<::prost_types::Timestamp>,
6328 #[prost(enumeration = "CandleInterval", tag = "4")]
6330 pub interval: i32,
6331 #[prost(string, optional, tag = "5")]
6333 pub instrument_id: ::core::option::Option<::prost::alloc::string::String>,
6334 #[prost(enumeration = "get_candles_request::CandleSource", optional, tag = "7")]
6336 pub candle_source_type: ::core::option::Option<i32>,
6337 #[prost(int32, optional, tag = "10")]
6339 pub limit: ::core::option::Option<i32>,
6340}
6341pub mod get_candles_request {
6343 #[derive(
6344 Clone,
6345 Copy,
6346 Debug,
6347 PartialEq,
6348 Eq,
6349 Hash,
6350 PartialOrd,
6351 Ord,
6352 ::prost::Enumeration
6353 )]
6354 #[repr(i32)]
6355 pub enum CandleSource {
6356 Unspecified = 0,
6358 Exchange = 1,
6360 IncludeWeekend = 3,
6362 }
6363 impl CandleSource {
6364 pub fn as_str_name(&self) -> &'static str {
6369 match self {
6370 Self::Unspecified => "CANDLE_SOURCE_UNSPECIFIED",
6371 Self::Exchange => "CANDLE_SOURCE_EXCHANGE",
6372 Self::IncludeWeekend => "CANDLE_SOURCE_INCLUDE_WEEKEND",
6373 }
6374 }
6375 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6377 match value {
6378 "CANDLE_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
6379 "CANDLE_SOURCE_EXCHANGE" => Some(Self::Exchange),
6380 "CANDLE_SOURCE_INCLUDE_WEEKEND" => Some(Self::IncludeWeekend),
6381 _ => None,
6382 }
6383 }
6384 }
6385}
6386#[derive(Clone, PartialEq, ::prost::Message)]
6388pub struct GetCandlesResponse {
6389 #[prost(message, repeated, tag = "1")]
6391 pub candles: ::prost::alloc::vec::Vec<HistoricCandle>,
6392}
6393#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6395pub struct HistoricCandle {
6396 #[prost(message, optional, tag = "1")]
6398 pub open: ::core::option::Option<Quotation>,
6399 #[prost(message, optional, tag = "2")]
6401 pub high: ::core::option::Option<Quotation>,
6402 #[prost(message, optional, tag = "3")]
6404 pub low: ::core::option::Option<Quotation>,
6405 #[prost(message, optional, tag = "4")]
6407 pub close: ::core::option::Option<Quotation>,
6408 #[prost(int64, tag = "5")]
6410 pub volume: i64,
6411 #[prost(message, optional, tag = "6")]
6413 pub time: ::core::option::Option<::prost_types::Timestamp>,
6414 #[prost(bool, tag = "7")]
6416 pub is_complete: bool,
6417 #[prost(enumeration = "CandleSource", tag = "9")]
6419 pub candle_source: i32,
6420 #[prost(int64, tag = "10")]
6422 pub volume_buy: i64,
6423 #[prost(int64, tag = "11")]
6425 pub volume_sell: i64,
6426}
6427#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6429pub struct GetLastPricesRequest {
6430 #[deprecated]
6432 #[prost(string, repeated, tag = "1")]
6433 pub figi: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
6434 #[prost(string, repeated, tag = "2")]
6436 pub instrument_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
6437 #[prost(enumeration = "LastPriceType", tag = "3")]
6439 pub last_price_type: i32,
6440 #[prost(enumeration = "InstrumentStatus", optional, tag = "9")]
6442 pub instrument_status: ::core::option::Option<i32>,
6443}
6444#[derive(Clone, PartialEq, ::prost::Message)]
6446pub struct GetLastPricesResponse {
6447 #[prost(message, repeated, tag = "1")]
6449 pub last_prices: ::prost::alloc::vec::Vec<LastPrice>,
6450}
6451#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6453pub struct LastPrice {
6454 #[prost(string, tag = "1")]
6456 pub figi: ::prost::alloc::string::String,
6457 #[prost(message, optional, tag = "2")]
6459 pub price: ::core::option::Option<Quotation>,
6460 #[prost(message, optional, tag = "3")]
6462 pub time: ::core::option::Option<::prost_types::Timestamp>,
6463 #[prost(string, tag = "9")]
6465 pub ticker: ::prost::alloc::string::String,
6466 #[prost(string, tag = "10")]
6468 pub class_code: ::prost::alloc::string::String,
6469 #[prost(string, tag = "11")]
6471 pub instrument_uid: ::prost::alloc::string::String,
6472 #[prost(enumeration = "LastPriceType", tag = "12")]
6474 pub last_price_type: i32,
6475}
6476#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6477pub struct OpenInterest {
6478 #[prost(string, tag = "1")]
6480 pub instrument_uid: ::prost::alloc::string::String,
6481 #[prost(message, optional, tag = "2")]
6483 pub time: ::core::option::Option<::prost_types::Timestamp>,
6484 #[prost(int64, tag = "3")]
6486 pub open_interest: i64,
6487 #[prost(string, tag = "4")]
6489 pub ticker: ::prost::alloc::string::String,
6490 #[prost(string, tag = "5")]
6492 pub class_code: ::prost::alloc::string::String,
6493}
6494#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6496pub struct GetOrderBookRequest {
6497 #[deprecated]
6499 #[prost(string, optional, tag = "1")]
6500 pub figi: ::core::option::Option<::prost::alloc::string::String>,
6501 #[prost(int32, tag = "2")]
6503 pub depth: i32,
6504 #[prost(string, optional, tag = "3")]
6506 pub instrument_id: ::core::option::Option<::prost::alloc::string::String>,
6507}
6508#[derive(Clone, PartialEq, ::prost::Message)]
6510pub struct GetOrderBookResponse {
6511 #[prost(string, tag = "1")]
6513 pub figi: ::prost::alloc::string::String,
6514 #[prost(int32, tag = "2")]
6516 pub depth: i32,
6517 #[prost(message, repeated, tag = "3")]
6519 pub bids: ::prost::alloc::vec::Vec<Order>,
6520 #[prost(message, repeated, tag = "4")]
6522 pub asks: ::prost::alloc::vec::Vec<Order>,
6523 #[prost(message, optional, tag = "5")]
6525 pub last_price: ::core::option::Option<Quotation>,
6526 #[prost(message, optional, tag = "6")]
6528 pub close_price: ::core::option::Option<Quotation>,
6529 #[prost(message, optional, tag = "7")]
6531 pub limit_up: ::core::option::Option<Quotation>,
6532 #[prost(message, optional, tag = "8")]
6534 pub limit_down: ::core::option::Option<Quotation>,
6535 #[prost(string, tag = "9")]
6537 pub instrument_uid: ::prost::alloc::string::String,
6538 #[prost(string, tag = "10")]
6540 pub ticker: ::prost::alloc::string::String,
6541 #[prost(string, tag = "11")]
6543 pub class_code: ::prost::alloc::string::String,
6544 #[prost(message, optional, tag = "21")]
6546 pub last_price_ts: ::core::option::Option<::prost_types::Timestamp>,
6547 #[prost(message, optional, tag = "22")]
6549 pub close_price_ts: ::core::option::Option<::prost_types::Timestamp>,
6550 #[prost(message, optional, tag = "23")]
6552 pub orderbook_ts: ::core::option::Option<::prost_types::Timestamp>,
6553}
6554#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6556pub struct GetTradingStatusRequest {
6557 #[deprecated]
6559 #[prost(string, optional, tag = "1")]
6560 pub figi: ::core::option::Option<::prost::alloc::string::String>,
6561 #[prost(string, optional, tag = "2")]
6563 pub instrument_id: ::core::option::Option<::prost::alloc::string::String>,
6564}
6565#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6567pub struct GetTradingStatusesRequest {
6568 #[prost(string, repeated, tag = "1")]
6570 pub instrument_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
6571}
6572#[derive(Clone, PartialEq, ::prost::Message)]
6574pub struct GetTradingStatusesResponse {
6575 #[prost(message, repeated, tag = "1")]
6577 pub trading_statuses: ::prost::alloc::vec::Vec<GetTradingStatusResponse>,
6578}
6579#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6581pub struct GetTradingStatusResponse {
6582 #[prost(string, tag = "1")]
6584 pub figi: ::prost::alloc::string::String,
6585 #[prost(enumeration = "SecurityTradingStatus", tag = "2")]
6587 pub trading_status: i32,
6588 #[prost(bool, tag = "3")]
6590 pub limit_order_available_flag: bool,
6591 #[prost(bool, tag = "4")]
6593 pub market_order_available_flag: bool,
6594 #[prost(bool, tag = "5")]
6596 pub api_trade_available_flag: bool,
6597 #[prost(string, tag = "6")]
6599 pub instrument_uid: ::prost::alloc::string::String,
6600 #[prost(bool, tag = "8")]
6602 pub bestprice_order_available_flag: bool,
6603 #[prost(bool, tag = "9")]
6605 pub only_best_price: bool,
6606 #[prost(string, tag = "10")]
6608 pub ticker: ::prost::alloc::string::String,
6609 #[prost(string, tag = "11")]
6611 pub class_code: ::prost::alloc::string::String,
6612}
6613#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6615pub struct GetLastTradesRequest {
6616 #[deprecated]
6618 #[prost(string, optional, tag = "1")]
6619 pub figi: ::core::option::Option<::prost::alloc::string::String>,
6620 #[prost(message, optional, tag = "2")]
6622 pub from: ::core::option::Option<::prost_types::Timestamp>,
6623 #[prost(message, optional, tag = "3")]
6625 pub to: ::core::option::Option<::prost_types::Timestamp>,
6626 #[prost(string, optional, tag = "4")]
6628 pub instrument_id: ::core::option::Option<::prost::alloc::string::String>,
6629 #[prost(enumeration = "TradeSourceType", tag = "5")]
6631 pub trade_source: i32,
6632}
6633#[derive(Clone, PartialEq, ::prost::Message)]
6635pub struct GetLastTradesResponse {
6636 #[prost(message, repeated, tag = "1")]
6638 pub trades: ::prost::alloc::vec::Vec<Trade>,
6639}
6640#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6642pub struct GetMySubscriptions {}
6643#[derive(Clone, PartialEq, ::prost::Message)]
6645pub struct GetClosePricesRequest {
6646 #[prost(message, repeated, tag = "1")]
6648 pub instruments: ::prost::alloc::vec::Vec<InstrumentClosePriceRequest>,
6649 #[prost(enumeration = "InstrumentStatus", optional, tag = "9")]
6651 pub instrument_status: ::core::option::Option<i32>,
6652}
6653#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6655pub struct InstrumentClosePriceRequest {
6656 #[prost(string, tag = "1")]
6658 pub instrument_id: ::prost::alloc::string::String,
6659}
6660#[derive(Clone, PartialEq, ::prost::Message)]
6662pub struct GetClosePricesResponse {
6663 #[prost(message, repeated, tag = "1")]
6665 pub close_prices: ::prost::alloc::vec::Vec<InstrumentClosePriceResponse>,
6666}
6667#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6669pub struct InstrumentClosePriceResponse {
6670 #[prost(string, tag = "1")]
6672 pub figi: ::prost::alloc::string::String,
6673 #[prost(string, tag = "2")]
6675 pub instrument_uid: ::prost::alloc::string::String,
6676 #[prost(string, tag = "3")]
6678 pub ticker: ::prost::alloc::string::String,
6679 #[prost(string, tag = "4")]
6681 pub class_code: ::prost::alloc::string::String,
6682 #[prost(message, optional, tag = "11")]
6684 pub price: ::core::option::Option<Quotation>,
6685 #[prost(message, optional, tag = "12")]
6687 pub evening_session_price: ::core::option::Option<Quotation>,
6688 #[prost(message, optional, tag = "21")]
6690 pub time: ::core::option::Option<::prost_types::Timestamp>,
6691 #[prost(message, optional, tag = "23")]
6693 pub evening_session_price_time: ::core::option::Option<::prost_types::Timestamp>,
6694}
6695#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6696pub struct GetTechAnalysisRequest {
6697 #[prost(enumeration = "get_tech_analysis_request::IndicatorType", tag = "1")]
6699 pub indicator_type: i32,
6700 #[prost(string, tag = "2")]
6702 pub instrument_uid: ::prost::alloc::string::String,
6703 #[prost(message, optional, tag = "3")]
6705 pub from: ::core::option::Option<::prost_types::Timestamp>,
6706 #[prost(message, optional, tag = "4")]
6708 pub to: ::core::option::Option<::prost_types::Timestamp>,
6709 #[prost(enumeration = "get_tech_analysis_request::IndicatorInterval", tag = "5")]
6711 pub interval: i32,
6712 #[prost(enumeration = "get_tech_analysis_request::TypeOfPrice", tag = "6")]
6714 pub type_of_price: i32,
6715 #[prost(int32, tag = "7")]
6717 pub length: i32,
6718 #[prost(message, optional, tag = "8")]
6720 pub deviation: ::core::option::Option<get_tech_analysis_request::Deviation>,
6721 #[prost(message, optional, tag = "9")]
6723 pub smoothing: ::core::option::Option<get_tech_analysis_request::Smoothing>,
6724}
6725pub mod get_tech_analysis_request {
6727 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6728 pub struct Smoothing {
6729 #[prost(int32, tag = "1")]
6731 pub fast_length: i32,
6732 #[prost(int32, tag = "2")]
6734 pub slow_length: i32,
6735 #[prost(int32, tag = "3")]
6737 pub signal_smoothing: i32,
6738 }
6739 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6740 pub struct Deviation {
6741 #[prost(message, optional, tag = "1")]
6743 pub deviation_multiplier: ::core::option::Option<super::Quotation>,
6744 }
6745 #[derive(
6747 Clone,
6748 Copy,
6749 Debug,
6750 PartialEq,
6751 Eq,
6752 Hash,
6753 PartialOrd,
6754 Ord,
6755 ::prost::Enumeration
6756 )]
6757 #[repr(i32)]
6758 pub enum IndicatorInterval {
6759 Unspecified = 0,
6761 OneMinute = 1,
6763 FiveMinutes = 2,
6765 FifteenMinutes = 3,
6767 OneHour = 4,
6769 OneDay = 5,
6771 IndicatorInterval2Min = 6,
6773 IndicatorInterval3Min = 7,
6775 IndicatorInterval10Min = 8,
6777 IndicatorInterval30Min = 9,
6779 IndicatorInterval2Hour = 10,
6781 IndicatorInterval4Hour = 11,
6783 Week = 12,
6785 Month = 13,
6787 }
6788 impl IndicatorInterval {
6789 pub fn as_str_name(&self) -> &'static str {
6794 match self {
6795 Self::Unspecified => "INDICATOR_INTERVAL_UNSPECIFIED",
6796 Self::OneMinute => "INDICATOR_INTERVAL_ONE_MINUTE",
6797 Self::FiveMinutes => "INDICATOR_INTERVAL_FIVE_MINUTES",
6798 Self::FifteenMinutes => "INDICATOR_INTERVAL_FIFTEEN_MINUTES",
6799 Self::OneHour => "INDICATOR_INTERVAL_ONE_HOUR",
6800 Self::OneDay => "INDICATOR_INTERVAL_ONE_DAY",
6801 Self::IndicatorInterval2Min => "INDICATOR_INTERVAL_2_MIN",
6802 Self::IndicatorInterval3Min => "INDICATOR_INTERVAL_3_MIN",
6803 Self::IndicatorInterval10Min => "INDICATOR_INTERVAL_10_MIN",
6804 Self::IndicatorInterval30Min => "INDICATOR_INTERVAL_30_MIN",
6805 Self::IndicatorInterval2Hour => "INDICATOR_INTERVAL_2_HOUR",
6806 Self::IndicatorInterval4Hour => "INDICATOR_INTERVAL_4_HOUR",
6807 Self::Week => "INDICATOR_INTERVAL_WEEK",
6808 Self::Month => "INDICATOR_INTERVAL_MONTH",
6809 }
6810 }
6811 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6813 match value {
6814 "INDICATOR_INTERVAL_UNSPECIFIED" => Some(Self::Unspecified),
6815 "INDICATOR_INTERVAL_ONE_MINUTE" => Some(Self::OneMinute),
6816 "INDICATOR_INTERVAL_FIVE_MINUTES" => Some(Self::FiveMinutes),
6817 "INDICATOR_INTERVAL_FIFTEEN_MINUTES" => Some(Self::FifteenMinutes),
6818 "INDICATOR_INTERVAL_ONE_HOUR" => Some(Self::OneHour),
6819 "INDICATOR_INTERVAL_ONE_DAY" => Some(Self::OneDay),
6820 "INDICATOR_INTERVAL_2_MIN" => Some(Self::IndicatorInterval2Min),
6821 "INDICATOR_INTERVAL_3_MIN" => Some(Self::IndicatorInterval3Min),
6822 "INDICATOR_INTERVAL_10_MIN" => Some(Self::IndicatorInterval10Min),
6823 "INDICATOR_INTERVAL_30_MIN" => Some(Self::IndicatorInterval30Min),
6824 "INDICATOR_INTERVAL_2_HOUR" => Some(Self::IndicatorInterval2Hour),
6825 "INDICATOR_INTERVAL_4_HOUR" => Some(Self::IndicatorInterval4Hour),
6826 "INDICATOR_INTERVAL_WEEK" => Some(Self::Week),
6827 "INDICATOR_INTERVAL_MONTH" => Some(Self::Month),
6828 _ => None,
6829 }
6830 }
6831 }
6832 #[derive(
6833 Clone,
6834 Copy,
6835 Debug,
6836 PartialEq,
6837 Eq,
6838 Hash,
6839 PartialOrd,
6840 Ord,
6841 ::prost::Enumeration
6842 )]
6843 #[repr(i32)]
6844 pub enum TypeOfPrice {
6845 Unspecified = 0,
6847 Close = 1,
6849 Open = 2,
6851 High = 3,
6853 Low = 4,
6855 Avg = 5,
6857 }
6858 impl TypeOfPrice {
6859 pub fn as_str_name(&self) -> &'static str {
6864 match self {
6865 Self::Unspecified => "TYPE_OF_PRICE_UNSPECIFIED",
6866 Self::Close => "TYPE_OF_PRICE_CLOSE",
6867 Self::Open => "TYPE_OF_PRICE_OPEN",
6868 Self::High => "TYPE_OF_PRICE_HIGH",
6869 Self::Low => "TYPE_OF_PRICE_LOW",
6870 Self::Avg => "TYPE_OF_PRICE_AVG",
6871 }
6872 }
6873 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6875 match value {
6876 "TYPE_OF_PRICE_UNSPECIFIED" => Some(Self::Unspecified),
6877 "TYPE_OF_PRICE_CLOSE" => Some(Self::Close),
6878 "TYPE_OF_PRICE_OPEN" => Some(Self::Open),
6879 "TYPE_OF_PRICE_HIGH" => Some(Self::High),
6880 "TYPE_OF_PRICE_LOW" => Some(Self::Low),
6881 "TYPE_OF_PRICE_AVG" => Some(Self::Avg),
6882 _ => None,
6883 }
6884 }
6885 }
6886 #[derive(
6887 Clone,
6888 Copy,
6889 Debug,
6890 PartialEq,
6891 Eq,
6892 Hash,
6893 PartialOrd,
6894 Ord,
6895 ::prost::Enumeration
6896 )]
6897 #[repr(i32)]
6898 pub enum IndicatorType {
6899 Unspecified = 0,
6901 Bb = 1,
6903 Ema = 2,
6905 Rsi = 3,
6907 Macd = 4,
6909 Sma = 5,
6911 }
6912 impl IndicatorType {
6913 pub fn as_str_name(&self) -> &'static str {
6918 match self {
6919 Self::Unspecified => "INDICATOR_TYPE_UNSPECIFIED",
6920 Self::Bb => "INDICATOR_TYPE_BB",
6921 Self::Ema => "INDICATOR_TYPE_EMA",
6922 Self::Rsi => "INDICATOR_TYPE_RSI",
6923 Self::Macd => "INDICATOR_TYPE_MACD",
6924 Self::Sma => "INDICATOR_TYPE_SMA",
6925 }
6926 }
6927 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
6929 match value {
6930 "INDICATOR_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
6931 "INDICATOR_TYPE_BB" => Some(Self::Bb),
6932 "INDICATOR_TYPE_EMA" => Some(Self::Ema),
6933 "INDICATOR_TYPE_RSI" => Some(Self::Rsi),
6934 "INDICATOR_TYPE_MACD" => Some(Self::Macd),
6935 "INDICATOR_TYPE_SMA" => Some(Self::Sma),
6936 _ => None,
6937 }
6938 }
6939 }
6940}
6941#[derive(Clone, PartialEq, ::prost::Message)]
6942pub struct GetTechAnalysisResponse {
6943 #[prost(message, repeated, tag = "1")]
6945 pub technical_indicators: ::prost::alloc::vec::Vec<
6946 get_tech_analysis_response::TechAnalysisItem,
6947 >,
6948}
6949pub mod get_tech_analysis_response {
6951 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6952 pub struct TechAnalysisItem {
6953 #[prost(message, optional, tag = "1")]
6955 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
6956 #[prost(message, optional, tag = "2")]
6958 pub middle_band: ::core::option::Option<super::Quotation>,
6959 #[prost(message, optional, tag = "3")]
6961 pub upper_band: ::core::option::Option<super::Quotation>,
6962 #[prost(message, optional, tag = "4")]
6964 pub lower_band: ::core::option::Option<super::Quotation>,
6965 #[prost(message, optional, tag = "5")]
6967 pub signal: ::core::option::Option<super::Quotation>,
6968 #[prost(message, optional, tag = "6")]
6970 pub macd: ::core::option::Option<super::Quotation>,
6971 }
6972}
6973#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
6974pub struct GetMarketValuesRequest {
6975 #[prost(string, repeated, tag = "1")]
6977 pub instrument_id: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
6978 #[prost(enumeration = "MarketValueType", repeated, tag = "2")]
6980 pub values: ::prost::alloc::vec::Vec<i32>,
6981}
6982#[derive(Clone, PartialEq, ::prost::Message)]
6983pub struct GetMarketValuesResponse {
6984 #[prost(message, repeated, tag = "1")]
6986 pub instruments: ::prost::alloc::vec::Vec<MarketValueInstrument>,
6987}
6988#[derive(Clone, PartialEq, ::prost::Message)]
6989pub struct MarketValueInstrument {
6990 #[prost(string, tag = "1")]
6992 pub instrument_uid: ::prost::alloc::string::String,
6993 #[prost(message, repeated, tag = "2")]
6995 pub values: ::prost::alloc::vec::Vec<MarketValue>,
6996 #[prost(string, tag = "3")]
6998 pub ticker: ::prost::alloc::string::String,
6999 #[prost(string, tag = "4")]
7001 pub class_code: ::prost::alloc::string::String,
7002}
7003#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
7004pub struct MarketValue {
7005 #[prost(enumeration = "MarketValueType", optional, tag = "1")]
7007 pub r#type: ::core::option::Option<i32>,
7008 #[prost(message, optional, tag = "2")]
7010 pub value: ::core::option::Option<Quotation>,
7011 #[prost(message, optional, tag = "3")]
7013 pub time: ::core::option::Option<::prost_types::Timestamp>,
7014}
7015#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
7017#[repr(i32)]
7018pub enum SubscriptionAction {
7019 Unspecified = 0,
7021 Subscribe = 1,
7023 Unsubscribe = 2,
7025}
7026impl SubscriptionAction {
7027 pub fn as_str_name(&self) -> &'static str {
7032 match self {
7033 Self::Unspecified => "SUBSCRIPTION_ACTION_UNSPECIFIED",
7034 Self::Subscribe => "SUBSCRIPTION_ACTION_SUBSCRIBE",
7035 Self::Unsubscribe => "SUBSCRIPTION_ACTION_UNSUBSCRIBE",
7036 }
7037 }
7038 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7040 match value {
7041 "SUBSCRIPTION_ACTION_UNSPECIFIED" => Some(Self::Unspecified),
7042 "SUBSCRIPTION_ACTION_SUBSCRIBE" => Some(Self::Subscribe),
7043 "SUBSCRIPTION_ACTION_UNSUBSCRIBE" => Some(Self::Unsubscribe),
7044 _ => None,
7045 }
7046 }
7047}
7048#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
7050#[repr(i32)]
7051pub enum SubscriptionInterval {
7052 Unspecified = 0,
7054 OneMinute = 1,
7056 FiveMinutes = 2,
7058 FifteenMinutes = 3,
7060 OneHour = 4,
7062 OneDay = 5,
7064 SubscriptionInterval2Min = 6,
7066 SubscriptionInterval3Min = 7,
7068 SubscriptionInterval10Min = 8,
7070 SubscriptionInterval30Min = 9,
7072 SubscriptionInterval2Hour = 10,
7074 SubscriptionInterval4Hour = 11,
7076 Week = 12,
7078 Month = 13,
7080}
7081impl SubscriptionInterval {
7082 pub fn as_str_name(&self) -> &'static str {
7087 match self {
7088 Self::Unspecified => "SUBSCRIPTION_INTERVAL_UNSPECIFIED",
7089 Self::OneMinute => "SUBSCRIPTION_INTERVAL_ONE_MINUTE",
7090 Self::FiveMinutes => "SUBSCRIPTION_INTERVAL_FIVE_MINUTES",
7091 Self::FifteenMinutes => "SUBSCRIPTION_INTERVAL_FIFTEEN_MINUTES",
7092 Self::OneHour => "SUBSCRIPTION_INTERVAL_ONE_HOUR",
7093 Self::OneDay => "SUBSCRIPTION_INTERVAL_ONE_DAY",
7094 Self::SubscriptionInterval2Min => "SUBSCRIPTION_INTERVAL_2_MIN",
7095 Self::SubscriptionInterval3Min => "SUBSCRIPTION_INTERVAL_3_MIN",
7096 Self::SubscriptionInterval10Min => "SUBSCRIPTION_INTERVAL_10_MIN",
7097 Self::SubscriptionInterval30Min => "SUBSCRIPTION_INTERVAL_30_MIN",
7098 Self::SubscriptionInterval2Hour => "SUBSCRIPTION_INTERVAL_2_HOUR",
7099 Self::SubscriptionInterval4Hour => "SUBSCRIPTION_INTERVAL_4_HOUR",
7100 Self::Week => "SUBSCRIPTION_INTERVAL_WEEK",
7101 Self::Month => "SUBSCRIPTION_INTERVAL_MONTH",
7102 }
7103 }
7104 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7106 match value {
7107 "SUBSCRIPTION_INTERVAL_UNSPECIFIED" => Some(Self::Unspecified),
7108 "SUBSCRIPTION_INTERVAL_ONE_MINUTE" => Some(Self::OneMinute),
7109 "SUBSCRIPTION_INTERVAL_FIVE_MINUTES" => Some(Self::FiveMinutes),
7110 "SUBSCRIPTION_INTERVAL_FIFTEEN_MINUTES" => Some(Self::FifteenMinutes),
7111 "SUBSCRIPTION_INTERVAL_ONE_HOUR" => Some(Self::OneHour),
7112 "SUBSCRIPTION_INTERVAL_ONE_DAY" => Some(Self::OneDay),
7113 "SUBSCRIPTION_INTERVAL_2_MIN" => Some(Self::SubscriptionInterval2Min),
7114 "SUBSCRIPTION_INTERVAL_3_MIN" => Some(Self::SubscriptionInterval3Min),
7115 "SUBSCRIPTION_INTERVAL_10_MIN" => Some(Self::SubscriptionInterval10Min),
7116 "SUBSCRIPTION_INTERVAL_30_MIN" => Some(Self::SubscriptionInterval30Min),
7117 "SUBSCRIPTION_INTERVAL_2_HOUR" => Some(Self::SubscriptionInterval2Hour),
7118 "SUBSCRIPTION_INTERVAL_4_HOUR" => Some(Self::SubscriptionInterval4Hour),
7119 "SUBSCRIPTION_INTERVAL_WEEK" => Some(Self::Week),
7120 "SUBSCRIPTION_INTERVAL_MONTH" => Some(Self::Month),
7121 _ => None,
7122 }
7123 }
7124}
7125#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
7127#[repr(i32)]
7128pub enum SubscriptionStatus {
7129 Unspecified = 0,
7131 Success = 1,
7133 InstrumentNotFound = 2,
7135 SubscriptionActionIsInvalid = 3,
7137 DepthIsInvalid = 4,
7139 IntervalIsInvalid = 5,
7141 LimitIsExceeded = 6,
7143 InternalError = 7,
7145 TooManyRequests = 8,
7147 SubscriptionNotFound = 9,
7149 SourceIsInvalid = 10,
7151}
7152impl SubscriptionStatus {
7153 pub fn as_str_name(&self) -> &'static str {
7158 match self {
7159 Self::Unspecified => "SUBSCRIPTION_STATUS_UNSPECIFIED",
7160 Self::Success => "SUBSCRIPTION_STATUS_SUCCESS",
7161 Self::InstrumentNotFound => "SUBSCRIPTION_STATUS_INSTRUMENT_NOT_FOUND",
7162 Self::SubscriptionActionIsInvalid => {
7163 "SUBSCRIPTION_STATUS_SUBSCRIPTION_ACTION_IS_INVALID"
7164 }
7165 Self::DepthIsInvalid => "SUBSCRIPTION_STATUS_DEPTH_IS_INVALID",
7166 Self::IntervalIsInvalid => "SUBSCRIPTION_STATUS_INTERVAL_IS_INVALID",
7167 Self::LimitIsExceeded => "SUBSCRIPTION_STATUS_LIMIT_IS_EXCEEDED",
7168 Self::InternalError => "SUBSCRIPTION_STATUS_INTERNAL_ERROR",
7169 Self::TooManyRequests => "SUBSCRIPTION_STATUS_TOO_MANY_REQUESTS",
7170 Self::SubscriptionNotFound => "SUBSCRIPTION_STATUS_SUBSCRIPTION_NOT_FOUND",
7171 Self::SourceIsInvalid => "SUBSCRIPTION_STATUS_SOURCE_IS_INVALID",
7172 }
7173 }
7174 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7176 match value {
7177 "SUBSCRIPTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
7178 "SUBSCRIPTION_STATUS_SUCCESS" => Some(Self::Success),
7179 "SUBSCRIPTION_STATUS_INSTRUMENT_NOT_FOUND" => Some(Self::InstrumentNotFound),
7180 "SUBSCRIPTION_STATUS_SUBSCRIPTION_ACTION_IS_INVALID" => {
7181 Some(Self::SubscriptionActionIsInvalid)
7182 }
7183 "SUBSCRIPTION_STATUS_DEPTH_IS_INVALID" => Some(Self::DepthIsInvalid),
7184 "SUBSCRIPTION_STATUS_INTERVAL_IS_INVALID" => Some(Self::IntervalIsInvalid),
7185 "SUBSCRIPTION_STATUS_LIMIT_IS_EXCEEDED" => Some(Self::LimitIsExceeded),
7186 "SUBSCRIPTION_STATUS_INTERNAL_ERROR" => Some(Self::InternalError),
7187 "SUBSCRIPTION_STATUS_TOO_MANY_REQUESTS" => Some(Self::TooManyRequests),
7188 "SUBSCRIPTION_STATUS_SUBSCRIPTION_NOT_FOUND" => {
7189 Some(Self::SubscriptionNotFound)
7190 }
7191 "SUBSCRIPTION_STATUS_SOURCE_IS_INVALID" => Some(Self::SourceIsInvalid),
7192 _ => None,
7193 }
7194 }
7195}
7196#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
7198#[repr(i32)]
7199pub enum TradeSourceType {
7200 TradeSourceUnspecified = 0,
7202 TradeSourceExchange = 1,
7204 TradeSourceDealer = 2,
7206 TradeSourceAll = 3,
7208}
7209impl TradeSourceType {
7210 pub fn as_str_name(&self) -> &'static str {
7215 match self {
7216 Self::TradeSourceUnspecified => "TRADE_SOURCE_UNSPECIFIED",
7217 Self::TradeSourceExchange => "TRADE_SOURCE_EXCHANGE",
7218 Self::TradeSourceDealer => "TRADE_SOURCE_DEALER",
7219 Self::TradeSourceAll => "TRADE_SOURCE_ALL",
7220 }
7221 }
7222 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7224 match value {
7225 "TRADE_SOURCE_UNSPECIFIED" => Some(Self::TradeSourceUnspecified),
7226 "TRADE_SOURCE_EXCHANGE" => Some(Self::TradeSourceExchange),
7227 "TRADE_SOURCE_DEALER" => Some(Self::TradeSourceDealer),
7228 "TRADE_SOURCE_ALL" => Some(Self::TradeSourceAll),
7229 _ => None,
7230 }
7231 }
7232}
7233#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
7235#[repr(i32)]
7236pub enum TradeDirection {
7237 Unspecified = 0,
7239 Buy = 1,
7241 Sell = 2,
7243}
7244impl TradeDirection {
7245 pub fn as_str_name(&self) -> &'static str {
7250 match self {
7251 Self::Unspecified => "TRADE_DIRECTION_UNSPECIFIED",
7252 Self::Buy => "TRADE_DIRECTION_BUY",
7253 Self::Sell => "TRADE_DIRECTION_SELL",
7254 }
7255 }
7256 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7258 match value {
7259 "TRADE_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
7260 "TRADE_DIRECTION_BUY" => Some(Self::Buy),
7261 "TRADE_DIRECTION_SELL" => Some(Self::Sell),
7262 _ => None,
7263 }
7264 }
7265}
7266#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
7268#[repr(i32)]
7269pub enum CandleInterval {
7270 Unspecified = 0,
7272 CandleInterval1Min = 1,
7274 CandleInterval5Min = 2,
7276 CandleInterval15Min = 3,
7278 Hour = 4,
7280 Day = 5,
7282 CandleInterval2Min = 6,
7284 CandleInterval3Min = 7,
7286 CandleInterval10Min = 8,
7288 CandleInterval30Min = 9,
7290 CandleInterval2Hour = 10,
7292 CandleInterval4Hour = 11,
7294 Week = 12,
7296 Month = 13,
7298 CandleInterval5Sec = 14,
7300 CandleInterval10Sec = 15,
7302 CandleInterval30Sec = 16,
7304}
7305impl CandleInterval {
7306 pub fn as_str_name(&self) -> &'static str {
7311 match self {
7312 Self::Unspecified => "CANDLE_INTERVAL_UNSPECIFIED",
7313 Self::CandleInterval1Min => "CANDLE_INTERVAL_1_MIN",
7314 Self::CandleInterval5Min => "CANDLE_INTERVAL_5_MIN",
7315 Self::CandleInterval15Min => "CANDLE_INTERVAL_15_MIN",
7316 Self::Hour => "CANDLE_INTERVAL_HOUR",
7317 Self::Day => "CANDLE_INTERVAL_DAY",
7318 Self::CandleInterval2Min => "CANDLE_INTERVAL_2_MIN",
7319 Self::CandleInterval3Min => "CANDLE_INTERVAL_3_MIN",
7320 Self::CandleInterval10Min => "CANDLE_INTERVAL_10_MIN",
7321 Self::CandleInterval30Min => "CANDLE_INTERVAL_30_MIN",
7322 Self::CandleInterval2Hour => "CANDLE_INTERVAL_2_HOUR",
7323 Self::CandleInterval4Hour => "CANDLE_INTERVAL_4_HOUR",
7324 Self::Week => "CANDLE_INTERVAL_WEEK",
7325 Self::Month => "CANDLE_INTERVAL_MONTH",
7326 Self::CandleInterval5Sec => "CANDLE_INTERVAL_5_SEC",
7327 Self::CandleInterval10Sec => "CANDLE_INTERVAL_10_SEC",
7328 Self::CandleInterval30Sec => "CANDLE_INTERVAL_30_SEC",
7329 }
7330 }
7331 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7333 match value {
7334 "CANDLE_INTERVAL_UNSPECIFIED" => Some(Self::Unspecified),
7335 "CANDLE_INTERVAL_1_MIN" => Some(Self::CandleInterval1Min),
7336 "CANDLE_INTERVAL_5_MIN" => Some(Self::CandleInterval5Min),
7337 "CANDLE_INTERVAL_15_MIN" => Some(Self::CandleInterval15Min),
7338 "CANDLE_INTERVAL_HOUR" => Some(Self::Hour),
7339 "CANDLE_INTERVAL_DAY" => Some(Self::Day),
7340 "CANDLE_INTERVAL_2_MIN" => Some(Self::CandleInterval2Min),
7341 "CANDLE_INTERVAL_3_MIN" => Some(Self::CandleInterval3Min),
7342 "CANDLE_INTERVAL_10_MIN" => Some(Self::CandleInterval10Min),
7343 "CANDLE_INTERVAL_30_MIN" => Some(Self::CandleInterval30Min),
7344 "CANDLE_INTERVAL_2_HOUR" => Some(Self::CandleInterval2Hour),
7345 "CANDLE_INTERVAL_4_HOUR" => Some(Self::CandleInterval4Hour),
7346 "CANDLE_INTERVAL_WEEK" => Some(Self::Week),
7347 "CANDLE_INTERVAL_MONTH" => Some(Self::Month),
7348 "CANDLE_INTERVAL_5_SEC" => Some(Self::CandleInterval5Sec),
7349 "CANDLE_INTERVAL_10_SEC" => Some(Self::CandleInterval10Sec),
7350 "CANDLE_INTERVAL_30_SEC" => Some(Self::CandleInterval30Sec),
7351 _ => None,
7352 }
7353 }
7354}
7355#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
7356#[repr(i32)]
7357pub enum CandleSource {
7358 Unspecified = 0,
7360 Exchange = 1,
7362 DealerWeekend = 2,
7364}
7365impl CandleSource {
7366 pub fn as_str_name(&self) -> &'static str {
7371 match self {
7372 Self::Unspecified => "CANDLE_SOURCE_UNSPECIFIED",
7373 Self::Exchange => "CANDLE_SOURCE_EXCHANGE",
7374 Self::DealerWeekend => "CANDLE_SOURCE_DEALER_WEEKEND",
7375 }
7376 }
7377 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7379 match value {
7380 "CANDLE_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
7381 "CANDLE_SOURCE_EXCHANGE" => Some(Self::Exchange),
7382 "CANDLE_SOURCE_DEALER_WEEKEND" => Some(Self::DealerWeekend),
7383 _ => None,
7384 }
7385 }
7386}
7387#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
7388#[repr(i32)]
7389pub enum MarketValueType {
7390 InstrumentValueUnspecified = 0,
7392 InstrumentValueLastPrice = 1,
7394 InstrumentValueLastPriceDealer = 2,
7396 InstrumentValueClosePrice = 3,
7398 InstrumentValueEveningSessionPrice = 4,
7400 InstrumentValueOpenInterest = 5,
7402 InstrumentValueTheorPrice = 6,
7404 InstrumentValueYield = 7,
7406}
7407impl MarketValueType {
7408 pub fn as_str_name(&self) -> &'static str {
7413 match self {
7414 Self::InstrumentValueUnspecified => "INSTRUMENT_VALUE_UNSPECIFIED",
7415 Self::InstrumentValueLastPrice => "INSTRUMENT_VALUE_LAST_PRICE",
7416 Self::InstrumentValueLastPriceDealer => "INSTRUMENT_VALUE_LAST_PRICE_DEALER",
7417 Self::InstrumentValueClosePrice => "INSTRUMENT_VALUE_CLOSE_PRICE",
7418 Self::InstrumentValueEveningSessionPrice => {
7419 "INSTRUMENT_VALUE_EVENING_SESSION_PRICE"
7420 }
7421 Self::InstrumentValueOpenInterest => "INSTRUMENT_VALUE_OPEN_INTEREST",
7422 Self::InstrumentValueTheorPrice => "INSTRUMENT_VALUE_THEOR_PRICE",
7423 Self::InstrumentValueYield => "INSTRUMENT_VALUE_YIELD",
7424 }
7425 }
7426 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7428 match value {
7429 "INSTRUMENT_VALUE_UNSPECIFIED" => Some(Self::InstrumentValueUnspecified),
7430 "INSTRUMENT_VALUE_LAST_PRICE" => Some(Self::InstrumentValueLastPrice),
7431 "INSTRUMENT_VALUE_LAST_PRICE_DEALER" => {
7432 Some(Self::InstrumentValueLastPriceDealer)
7433 }
7434 "INSTRUMENT_VALUE_CLOSE_PRICE" => Some(Self::InstrumentValueClosePrice),
7435 "INSTRUMENT_VALUE_EVENING_SESSION_PRICE" => {
7436 Some(Self::InstrumentValueEveningSessionPrice)
7437 }
7438 "INSTRUMENT_VALUE_OPEN_INTEREST" => Some(Self::InstrumentValueOpenInterest),
7439 "INSTRUMENT_VALUE_THEOR_PRICE" => Some(Self::InstrumentValueTheorPrice),
7440 "INSTRUMENT_VALUE_YIELD" => Some(Self::InstrumentValueYield),
7441 _ => None,
7442 }
7443 }
7444}
7445#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
7446#[repr(i32)]
7447pub enum OrderBookType {
7448 OrderbookTypeUnspecified = 0,
7450 OrderbookTypeExchange = 1,
7452 OrderbookTypeDealer = 2,
7454 OrderbookTypeAll = 3,
7456}
7457impl OrderBookType {
7458 pub fn as_str_name(&self) -> &'static str {
7463 match self {
7464 Self::OrderbookTypeUnspecified => "ORDERBOOK_TYPE_UNSPECIFIED",
7465 Self::OrderbookTypeExchange => "ORDERBOOK_TYPE_EXCHANGE",
7466 Self::OrderbookTypeDealer => "ORDERBOOK_TYPE_DEALER",
7467 Self::OrderbookTypeAll => "ORDERBOOK_TYPE_ALL",
7468 }
7469 }
7470 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7472 match value {
7473 "ORDERBOOK_TYPE_UNSPECIFIED" => Some(Self::OrderbookTypeUnspecified),
7474 "ORDERBOOK_TYPE_EXCHANGE" => Some(Self::OrderbookTypeExchange),
7475 "ORDERBOOK_TYPE_DEALER" => Some(Self::OrderbookTypeDealer),
7476 "ORDERBOOK_TYPE_ALL" => Some(Self::OrderbookTypeAll),
7477 _ => None,
7478 }
7479 }
7480}
7481#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
7483#[repr(i32)]
7484pub enum LastPriceType {
7485 LastPriceUnspecified = 0,
7487 LastPriceExchange = 1,
7489 LastPriceDealer = 2,
7491}
7492impl LastPriceType {
7493 pub fn as_str_name(&self) -> &'static str {
7498 match self {
7499 Self::LastPriceUnspecified => "LAST_PRICE_UNSPECIFIED",
7500 Self::LastPriceExchange => "LAST_PRICE_EXCHANGE",
7501 Self::LastPriceDealer => "LAST_PRICE_DEALER",
7502 }
7503 }
7504 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
7506 match value {
7507 "LAST_PRICE_UNSPECIFIED" => Some(Self::LastPriceUnspecified),
7508 "LAST_PRICE_EXCHANGE" => Some(Self::LastPriceExchange),
7509 "LAST_PRICE_DEALER" => Some(Self::LastPriceDealer),
7510 _ => None,
7511 }
7512 }
7513}
7514pub mod market_data_service_client {
7516 #![allow(
7517 unused_variables,
7518 dead_code,
7519 missing_docs,
7520 clippy::wildcard_imports,
7521 clippy::let_unit_value,
7522 )]
7523 use tonic::codegen::*;
7524 use tonic::codegen::http::Uri;
7525 #[derive(Debug, Clone)]
7526 pub struct MarketDataServiceClient<T> {
7527 inner: tonic::client::Grpc<T>,
7528 }
7529 impl MarketDataServiceClient<tonic::transport::Channel> {
7530 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
7532 where
7533 D: TryInto<tonic::transport::Endpoint>,
7534 D::Error: Into<StdError>,
7535 {
7536 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
7537 Ok(Self::new(conn))
7538 }
7539 }
7540 impl<T> MarketDataServiceClient<T>
7541 where
7542 T: tonic::client::GrpcService<tonic::body::Body>,
7543 T::Error: Into<StdError>,
7544 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
7545 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
7546 {
7547 pub fn new(inner: T) -> Self {
7548 let inner = tonic::client::Grpc::new(inner);
7549 Self { inner }
7550 }
7551 pub fn with_origin(inner: T, origin: Uri) -> Self {
7552 let inner = tonic::client::Grpc::with_origin(inner, origin);
7553 Self { inner }
7554 }
7555 pub fn with_interceptor<F>(
7556 inner: T,
7557 interceptor: F,
7558 ) -> MarketDataServiceClient<InterceptedService<T, F>>
7559 where
7560 F: tonic::service::Interceptor,
7561 T::ResponseBody: Default,
7562 T: tonic::codegen::Service<
7563 http::Request<tonic::body::Body>,
7564 Response = http::Response<
7565 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
7566 >,
7567 >,
7568 <T as tonic::codegen::Service<
7569 http::Request<tonic::body::Body>,
7570 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
7571 {
7572 MarketDataServiceClient::new(InterceptedService::new(inner, interceptor))
7573 }
7574 #[must_use]
7579 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7580 self.inner = self.inner.send_compressed(encoding);
7581 self
7582 }
7583 #[must_use]
7585 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7586 self.inner = self.inner.accept_compressed(encoding);
7587 self
7588 }
7589 #[must_use]
7593 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7594 self.inner = self.inner.max_decoding_message_size(limit);
7595 self
7596 }
7597 #[must_use]
7601 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7602 self.inner = self.inner.max_encoding_message_size(limit);
7603 self
7604 }
7605 pub async fn get_candles(
7607 &mut self,
7608 request: impl tonic::IntoRequest<super::GetCandlesRequest>,
7609 ) -> std::result::Result<
7610 tonic::Response<super::GetCandlesResponse>,
7611 tonic::Status,
7612 > {
7613 self.inner
7614 .ready()
7615 .await
7616 .map_err(|e| {
7617 tonic::Status::unknown(
7618 format!("Service was not ready: {}", e.into()),
7619 )
7620 })?;
7621 let codec = tonic_prost::ProstCodec::default();
7622 let path = http::uri::PathAndQuery::from_static(
7623 "/tinkoff.public.invest.api.contract.v1.MarketDataService/GetCandles",
7624 );
7625 let mut req = request.into_request();
7626 req.extensions_mut()
7627 .insert(
7628 GrpcMethod::new(
7629 "tinkoff.public.invest.api.contract.v1.MarketDataService",
7630 "GetCandles",
7631 ),
7632 );
7633 self.inner.unary(req, path, codec).await
7634 }
7635 pub async fn get_last_prices(
7637 &mut self,
7638 request: impl tonic::IntoRequest<super::GetLastPricesRequest>,
7639 ) -> std::result::Result<
7640 tonic::Response<super::GetLastPricesResponse>,
7641 tonic::Status,
7642 > {
7643 self.inner
7644 .ready()
7645 .await
7646 .map_err(|e| {
7647 tonic::Status::unknown(
7648 format!("Service was not ready: {}", e.into()),
7649 )
7650 })?;
7651 let codec = tonic_prost::ProstCodec::default();
7652 let path = http::uri::PathAndQuery::from_static(
7653 "/tinkoff.public.invest.api.contract.v1.MarketDataService/GetLastPrices",
7654 );
7655 let mut req = request.into_request();
7656 req.extensions_mut()
7657 .insert(
7658 GrpcMethod::new(
7659 "tinkoff.public.invest.api.contract.v1.MarketDataService",
7660 "GetLastPrices",
7661 ),
7662 );
7663 self.inner.unary(req, path, codec).await
7664 }
7665 pub async fn get_order_book(
7667 &mut self,
7668 request: impl tonic::IntoRequest<super::GetOrderBookRequest>,
7669 ) -> std::result::Result<
7670 tonic::Response<super::GetOrderBookResponse>,
7671 tonic::Status,
7672 > {
7673 self.inner
7674 .ready()
7675 .await
7676 .map_err(|e| {
7677 tonic::Status::unknown(
7678 format!("Service was not ready: {}", e.into()),
7679 )
7680 })?;
7681 let codec = tonic_prost::ProstCodec::default();
7682 let path = http::uri::PathAndQuery::from_static(
7683 "/tinkoff.public.invest.api.contract.v1.MarketDataService/GetOrderBook",
7684 );
7685 let mut req = request.into_request();
7686 req.extensions_mut()
7687 .insert(
7688 GrpcMethod::new(
7689 "tinkoff.public.invest.api.contract.v1.MarketDataService",
7690 "GetOrderBook",
7691 ),
7692 );
7693 self.inner.unary(req, path, codec).await
7694 }
7695 pub async fn get_trading_status(
7697 &mut self,
7698 request: impl tonic::IntoRequest<super::GetTradingStatusRequest>,
7699 ) -> std::result::Result<
7700 tonic::Response<super::GetTradingStatusResponse>,
7701 tonic::Status,
7702 > {
7703 self.inner
7704 .ready()
7705 .await
7706 .map_err(|e| {
7707 tonic::Status::unknown(
7708 format!("Service was not ready: {}", e.into()),
7709 )
7710 })?;
7711 let codec = tonic_prost::ProstCodec::default();
7712 let path = http::uri::PathAndQuery::from_static(
7713 "/tinkoff.public.invest.api.contract.v1.MarketDataService/GetTradingStatus",
7714 );
7715 let mut req = request.into_request();
7716 req.extensions_mut()
7717 .insert(
7718 GrpcMethod::new(
7719 "tinkoff.public.invest.api.contract.v1.MarketDataService",
7720 "GetTradingStatus",
7721 ),
7722 );
7723 self.inner.unary(req, path, codec).await
7724 }
7725 pub async fn get_trading_statuses(
7727 &mut self,
7728 request: impl tonic::IntoRequest<super::GetTradingStatusesRequest>,
7729 ) -> std::result::Result<
7730 tonic::Response<super::GetTradingStatusesResponse>,
7731 tonic::Status,
7732 > {
7733 self.inner
7734 .ready()
7735 .await
7736 .map_err(|e| {
7737 tonic::Status::unknown(
7738 format!("Service was not ready: {}", e.into()),
7739 )
7740 })?;
7741 let codec = tonic_prost::ProstCodec::default();
7742 let path = http::uri::PathAndQuery::from_static(
7743 "/tinkoff.public.invest.api.contract.v1.MarketDataService/GetTradingStatuses",
7744 );
7745 let mut req = request.into_request();
7746 req.extensions_mut()
7747 .insert(
7748 GrpcMethod::new(
7749 "tinkoff.public.invest.api.contract.v1.MarketDataService",
7750 "GetTradingStatuses",
7751 ),
7752 );
7753 self.inner.unary(req, path, codec).await
7754 }
7755 pub async fn get_last_trades(
7758 &mut self,
7759 request: impl tonic::IntoRequest<super::GetLastTradesRequest>,
7760 ) -> std::result::Result<
7761 tonic::Response<super::GetLastTradesResponse>,
7762 tonic::Status,
7763 > {
7764 self.inner
7765 .ready()
7766 .await
7767 .map_err(|e| {
7768 tonic::Status::unknown(
7769 format!("Service was not ready: {}", e.into()),
7770 )
7771 })?;
7772 let codec = tonic_prost::ProstCodec::default();
7773 let path = http::uri::PathAndQuery::from_static(
7774 "/tinkoff.public.invest.api.contract.v1.MarketDataService/GetLastTrades",
7775 );
7776 let mut req = request.into_request();
7777 req.extensions_mut()
7778 .insert(
7779 GrpcMethod::new(
7780 "tinkoff.public.invest.api.contract.v1.MarketDataService",
7781 "GetLastTrades",
7782 ),
7783 );
7784 self.inner.unary(req, path, codec).await
7785 }
7786 pub async fn get_close_prices(
7788 &mut self,
7789 request: impl tonic::IntoRequest<super::GetClosePricesRequest>,
7790 ) -> std::result::Result<
7791 tonic::Response<super::GetClosePricesResponse>,
7792 tonic::Status,
7793 > {
7794 self.inner
7795 .ready()
7796 .await
7797 .map_err(|e| {
7798 tonic::Status::unknown(
7799 format!("Service was not ready: {}", e.into()),
7800 )
7801 })?;
7802 let codec = tonic_prost::ProstCodec::default();
7803 let path = http::uri::PathAndQuery::from_static(
7804 "/tinkoff.public.invest.api.contract.v1.MarketDataService/GetClosePrices",
7805 );
7806 let mut req = request.into_request();
7807 req.extensions_mut()
7808 .insert(
7809 GrpcMethod::new(
7810 "tinkoff.public.invest.api.contract.v1.MarketDataService",
7811 "GetClosePrices",
7812 ),
7813 );
7814 self.inner.unary(req, path, codec).await
7815 }
7816 pub async fn get_tech_analysis(
7818 &mut self,
7819 request: impl tonic::IntoRequest<super::GetTechAnalysisRequest>,
7820 ) -> std::result::Result<
7821 tonic::Response<super::GetTechAnalysisResponse>,
7822 tonic::Status,
7823 > {
7824 self.inner
7825 .ready()
7826 .await
7827 .map_err(|e| {
7828 tonic::Status::unknown(
7829 format!("Service was not ready: {}", e.into()),
7830 )
7831 })?;
7832 let codec = tonic_prost::ProstCodec::default();
7833 let path = http::uri::PathAndQuery::from_static(
7834 "/tinkoff.public.invest.api.contract.v1.MarketDataService/GetTechAnalysis",
7835 );
7836 let mut req = request.into_request();
7837 req.extensions_mut()
7838 .insert(
7839 GrpcMethod::new(
7840 "tinkoff.public.invest.api.contract.v1.MarketDataService",
7841 "GetTechAnalysis",
7842 ),
7843 );
7844 self.inner.unary(req, path, codec).await
7845 }
7846 pub async fn get_market_values(
7848 &mut self,
7849 request: impl tonic::IntoRequest<super::GetMarketValuesRequest>,
7850 ) -> std::result::Result<
7851 tonic::Response<super::GetMarketValuesResponse>,
7852 tonic::Status,
7853 > {
7854 self.inner
7855 .ready()
7856 .await
7857 .map_err(|e| {
7858 tonic::Status::unknown(
7859 format!("Service was not ready: {}", e.into()),
7860 )
7861 })?;
7862 let codec = tonic_prost::ProstCodec::default();
7863 let path = http::uri::PathAndQuery::from_static(
7864 "/tinkoff.public.invest.api.contract.v1.MarketDataService/GetMarketValues",
7865 );
7866 let mut req = request.into_request();
7867 req.extensions_mut()
7868 .insert(
7869 GrpcMethod::new(
7870 "tinkoff.public.invest.api.contract.v1.MarketDataService",
7871 "GetMarketValues",
7872 ),
7873 );
7874 self.inner.unary(req, path, codec).await
7875 }
7876 }
7877}
7878pub mod market_data_stream_service_client {
7880 #![allow(
7881 unused_variables,
7882 dead_code,
7883 missing_docs,
7884 clippy::wildcard_imports,
7885 clippy::let_unit_value,
7886 )]
7887 use tonic::codegen::*;
7888 use tonic::codegen::http::Uri;
7889 #[derive(Debug, Clone)]
7890 pub struct MarketDataStreamServiceClient<T> {
7891 inner: tonic::client::Grpc<T>,
7892 }
7893 impl MarketDataStreamServiceClient<tonic::transport::Channel> {
7894 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
7896 where
7897 D: TryInto<tonic::transport::Endpoint>,
7898 D::Error: Into<StdError>,
7899 {
7900 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
7901 Ok(Self::new(conn))
7902 }
7903 }
7904 impl<T> MarketDataStreamServiceClient<T>
7905 where
7906 T: tonic::client::GrpcService<tonic::body::Body>,
7907 T::Error: Into<StdError>,
7908 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
7909 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
7910 {
7911 pub fn new(inner: T) -> Self {
7912 let inner = tonic::client::Grpc::new(inner);
7913 Self { inner }
7914 }
7915 pub fn with_origin(inner: T, origin: Uri) -> Self {
7916 let inner = tonic::client::Grpc::with_origin(inner, origin);
7917 Self { inner }
7918 }
7919 pub fn with_interceptor<F>(
7920 inner: T,
7921 interceptor: F,
7922 ) -> MarketDataStreamServiceClient<InterceptedService<T, F>>
7923 where
7924 F: tonic::service::Interceptor,
7925 T::ResponseBody: Default,
7926 T: tonic::codegen::Service<
7927 http::Request<tonic::body::Body>,
7928 Response = http::Response<
7929 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
7930 >,
7931 >,
7932 <T as tonic::codegen::Service<
7933 http::Request<tonic::body::Body>,
7934 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
7935 {
7936 MarketDataStreamServiceClient::new(
7937 InterceptedService::new(inner, interceptor),
7938 )
7939 }
7940 #[must_use]
7945 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7946 self.inner = self.inner.send_compressed(encoding);
7947 self
7948 }
7949 #[must_use]
7951 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7952 self.inner = self.inner.accept_compressed(encoding);
7953 self
7954 }
7955 #[must_use]
7959 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7960 self.inner = self.inner.max_decoding_message_size(limit);
7961 self
7962 }
7963 #[must_use]
7967 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7968 self.inner = self.inner.max_encoding_message_size(limit);
7969 self
7970 }
7971 pub async fn market_data_stream(
7973 &mut self,
7974 request: impl tonic::IntoStreamingRequest<Message = super::MarketDataRequest>,
7975 ) -> std::result::Result<
7976 tonic::Response<tonic::codec::Streaming<super::MarketDataResponse>>,
7977 tonic::Status,
7978 > {
7979 self.inner
7980 .ready()
7981 .await
7982 .map_err(|e| {
7983 tonic::Status::unknown(
7984 format!("Service was not ready: {}", e.into()),
7985 )
7986 })?;
7987 let codec = tonic_prost::ProstCodec::default();
7988 let path = http::uri::PathAndQuery::from_static(
7989 "/tinkoff.public.invest.api.contract.v1.MarketDataStreamService/MarketDataStream",
7990 );
7991 let mut req = request.into_streaming_request();
7992 req.extensions_mut()
7993 .insert(
7994 GrpcMethod::new(
7995 "tinkoff.public.invest.api.contract.v1.MarketDataStreamService",
7996 "MarketDataStream",
7997 ),
7998 );
7999 self.inner.streaming(req, path, codec).await
8000 }
8001 pub async fn market_data_server_side_stream(
8003 &mut self,
8004 request: impl tonic::IntoRequest<super::MarketDataServerSideStreamRequest>,
8005 ) -> std::result::Result<
8006 tonic::Response<tonic::codec::Streaming<super::MarketDataResponse>>,
8007 tonic::Status,
8008 > {
8009 self.inner
8010 .ready()
8011 .await
8012 .map_err(|e| {
8013 tonic::Status::unknown(
8014 format!("Service was not ready: {}", e.into()),
8015 )
8016 })?;
8017 let codec = tonic_prost::ProstCodec::default();
8018 let path = http::uri::PathAndQuery::from_static(
8019 "/tinkoff.public.invest.api.contract.v1.MarketDataStreamService/MarketDataServerSideStream",
8020 );
8021 let mut req = request.into_request();
8022 req.extensions_mut()
8023 .insert(
8024 GrpcMethod::new(
8025 "tinkoff.public.invest.api.contract.v1.MarketDataStreamService",
8026 "MarketDataServerSideStream",
8027 ),
8028 );
8029 self.inner.server_streaming(req, path, codec).await
8030 }
8031 }
8032}
8033#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8035pub struct OperationsRequest {
8036 #[prost(string, tag = "1")]
8038 pub account_id: ::prost::alloc::string::String,
8039 #[prost(message, optional, tag = "2")]
8041 pub from: ::core::option::Option<::prost_types::Timestamp>,
8042 #[prost(message, optional, tag = "3")]
8044 pub to: ::core::option::Option<::prost_types::Timestamp>,
8045 #[prost(enumeration = "OperationState", optional, tag = "4")]
8047 pub state: ::core::option::Option<i32>,
8048 #[prost(string, optional, tag = "5")]
8050 pub figi: ::core::option::Option<::prost::alloc::string::String>,
8051}
8052#[derive(Clone, PartialEq, ::prost::Message)]
8054pub struct OperationsResponse {
8055 #[prost(message, repeated, tag = "1")]
8057 pub operations: ::prost::alloc::vec::Vec<Operation>,
8058}
8059#[derive(Clone, PartialEq, ::prost::Message)]
8061pub struct Operation {
8062 #[prost(string, tag = "1")]
8064 pub id: ::prost::alloc::string::String,
8065 #[prost(string, tag = "2")]
8067 pub parent_operation_id: ::prost::alloc::string::String,
8068 #[prost(string, tag = "3")]
8070 pub currency: ::prost::alloc::string::String,
8071 #[prost(message, optional, tag = "4")]
8073 pub payment: ::core::option::Option<MoneyValue>,
8074 #[prost(message, optional, tag = "5")]
8076 pub price: ::core::option::Option<MoneyValue>,
8077 #[prost(enumeration = "OperationState", tag = "6")]
8079 pub state: i32,
8080 #[prost(int64, tag = "7")]
8082 pub quantity: i64,
8083 #[prost(int64, tag = "8")]
8085 pub quantity_rest: i64,
8086 #[prost(string, tag = "9")]
8088 pub figi: ::prost::alloc::string::String,
8089 #[prost(string, tag = "10")]
8091 pub instrument_type: ::prost::alloc::string::String,
8092 #[prost(message, optional, tag = "11")]
8094 pub date: ::core::option::Option<::prost_types::Timestamp>,
8095 #[prost(string, tag = "12")]
8097 pub r#type: ::prost::alloc::string::String,
8098 #[prost(enumeration = "OperationType", tag = "13")]
8100 pub operation_type: i32,
8101 #[prost(message, repeated, tag = "14")]
8103 pub trades: ::prost::alloc::vec::Vec<OperationTrade>,
8104 #[prost(string, tag = "16")]
8106 pub asset_uid: ::prost::alloc::string::String,
8107 #[prost(string, tag = "17")]
8109 pub position_uid: ::prost::alloc::string::String,
8110 #[prost(string, tag = "18")]
8112 pub instrument_uid: ::prost::alloc::string::String,
8113 #[prost(message, repeated, tag = "19")]
8115 pub child_operations: ::prost::alloc::vec::Vec<ChildOperationItem>,
8116}
8117#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8119pub struct OperationTrade {
8120 #[prost(string, tag = "1")]
8122 pub trade_id: ::prost::alloc::string::String,
8123 #[prost(message, optional, tag = "2")]
8125 pub date_time: ::core::option::Option<::prost_types::Timestamp>,
8126 #[prost(int64, tag = "3")]
8128 pub quantity: i64,
8129 #[prost(message, optional, tag = "4")]
8131 pub price: ::core::option::Option<MoneyValue>,
8132}
8133#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8135pub struct PortfolioRequest {
8136 #[prost(string, tag = "1")]
8138 pub account_id: ::prost::alloc::string::String,
8139 #[prost(enumeration = "portfolio_request::CurrencyRequest", optional, tag = "2")]
8141 pub currency: ::core::option::Option<i32>,
8142}
8143pub mod portfolio_request {
8145 #[derive(
8146 Clone,
8147 Copy,
8148 Debug,
8149 PartialEq,
8150 Eq,
8151 Hash,
8152 PartialOrd,
8153 Ord,
8154 ::prost::Enumeration
8155 )]
8156 #[repr(i32)]
8157 pub enum CurrencyRequest {
8158 Rub = 0,
8160 Usd = 1,
8162 Eur = 2,
8164 }
8165 impl CurrencyRequest {
8166 pub fn as_str_name(&self) -> &'static str {
8171 match self {
8172 Self::Rub => "RUB",
8173 Self::Usd => "USD",
8174 Self::Eur => "EUR",
8175 }
8176 }
8177 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
8179 match value {
8180 "RUB" => Some(Self::Rub),
8181 "USD" => Some(Self::Usd),
8182 "EUR" => Some(Self::Eur),
8183 _ => None,
8184 }
8185 }
8186 }
8187}
8188#[derive(Clone, PartialEq, ::prost::Message)]
8190pub struct PortfolioResponse {
8191 #[prost(message, optional, tag = "1")]
8193 pub total_amount_shares: ::core::option::Option<MoneyValue>,
8194 #[prost(message, optional, tag = "2")]
8196 pub total_amount_bonds: ::core::option::Option<MoneyValue>,
8197 #[prost(message, optional, tag = "3")]
8199 pub total_amount_etf: ::core::option::Option<MoneyValue>,
8200 #[prost(message, optional, tag = "4")]
8202 pub total_amount_currencies: ::core::option::Option<MoneyValue>,
8203 #[prost(message, optional, tag = "5")]
8205 pub total_amount_futures: ::core::option::Option<MoneyValue>,
8206 #[prost(message, optional, tag = "6")]
8208 pub expected_yield: ::core::option::Option<Quotation>,
8209 #[prost(message, repeated, tag = "7")]
8211 pub positions: ::prost::alloc::vec::Vec<PortfolioPosition>,
8212 #[prost(string, tag = "8")]
8214 pub account_id: ::prost::alloc::string::String,
8215 #[prost(message, optional, tag = "9")]
8217 pub total_amount_options: ::core::option::Option<MoneyValue>,
8218 #[prost(message, optional, tag = "10")]
8220 pub total_amount_sp: ::core::option::Option<MoneyValue>,
8221 #[prost(message, optional, tag = "11")]
8223 pub total_amount_portfolio: ::core::option::Option<MoneyValue>,
8224 #[prost(message, repeated, tag = "12")]
8226 pub virtual_positions: ::prost::alloc::vec::Vec<VirtualPortfolioPosition>,
8227 #[prost(message, optional, tag = "15")]
8229 pub daily_yield: ::core::option::Option<MoneyValue>,
8230 #[prost(message, optional, tag = "16")]
8232 pub daily_yield_relative: ::core::option::Option<Quotation>,
8233 #[prost(message, optional, tag = "17")]
8235 pub total_amount_dfa: ::core::option::Option<MoneyValue>,
8236}
8237#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8239pub struct PositionsRequest {
8240 #[prost(string, tag = "1")]
8242 pub account_id: ::prost::alloc::string::String,
8243}
8244#[derive(Clone, PartialEq, ::prost::Message)]
8246pub struct PositionsResponse {
8247 #[prost(message, repeated, tag = "1")]
8249 pub money: ::prost::alloc::vec::Vec<MoneyValue>,
8250 #[prost(message, repeated, tag = "2")]
8252 pub blocked: ::prost::alloc::vec::Vec<MoneyValue>,
8253 #[prost(message, repeated, tag = "3")]
8255 pub securities: ::prost::alloc::vec::Vec<PositionsSecurities>,
8256 #[prost(bool, tag = "4")]
8258 pub limits_loading_in_progress: bool,
8259 #[prost(message, repeated, tag = "5")]
8261 pub futures: ::prost::alloc::vec::Vec<PositionsFutures>,
8262 #[prost(message, repeated, tag = "6")]
8264 pub options: ::prost::alloc::vec::Vec<PositionsOptions>,
8265 #[prost(string, tag = "15")]
8267 pub account_id: ::prost::alloc::string::String,
8268}
8269#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8271pub struct WithdrawLimitsRequest {
8272 #[prost(string, tag = "1")]
8274 pub account_id: ::prost::alloc::string::String,
8275}
8276#[derive(Clone, PartialEq, ::prost::Message)]
8278pub struct WithdrawLimitsResponse {
8279 #[prost(message, repeated, tag = "1")]
8281 pub money: ::prost::alloc::vec::Vec<MoneyValue>,
8282 #[prost(message, repeated, tag = "2")]
8284 pub blocked: ::prost::alloc::vec::Vec<MoneyValue>,
8285 #[prost(message, repeated, tag = "3")]
8287 pub blocked_guarantee: ::prost::alloc::vec::Vec<MoneyValue>,
8288}
8289#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8291pub struct PortfolioPosition {
8292 #[prost(string, tag = "1")]
8294 pub figi: ::prost::alloc::string::String,
8295 #[prost(string, tag = "2")]
8297 pub instrument_type: ::prost::alloc::string::String,
8298 #[prost(message, optional, tag = "3")]
8300 pub quantity: ::core::option::Option<Quotation>,
8301 #[prost(message, optional, tag = "4")]
8303 pub average_position_price: ::core::option::Option<MoneyValue>,
8304 #[prost(message, optional, tag = "5")]
8306 pub expected_yield: ::core::option::Option<Quotation>,
8307 #[prost(message, optional, tag = "6")]
8309 pub current_nkd: ::core::option::Option<MoneyValue>,
8310 #[deprecated]
8312 #[prost(message, optional, tag = "7")]
8313 pub average_position_price_pt: ::core::option::Option<Quotation>,
8314 #[prost(message, optional, tag = "8")]
8316 pub current_price: ::core::option::Option<MoneyValue>,
8317 #[prost(message, optional, tag = "9")]
8319 pub average_position_price_fifo: ::core::option::Option<MoneyValue>,
8320 #[deprecated]
8322 #[prost(message, optional, tag = "10")]
8323 pub quantity_lots: ::core::option::Option<Quotation>,
8324 #[prost(bool, tag = "21")]
8326 pub blocked: bool,
8327 #[prost(message, optional, tag = "22")]
8329 pub blocked_lots: ::core::option::Option<Quotation>,
8330 #[prost(string, tag = "24")]
8332 pub position_uid: ::prost::alloc::string::String,
8333 #[prost(string, tag = "25")]
8335 pub instrument_uid: ::prost::alloc::string::String,
8336 #[prost(message, optional, tag = "26")]
8338 pub var_margin: ::core::option::Option<MoneyValue>,
8339 #[prost(message, optional, tag = "27")]
8341 pub expected_yield_fifo: ::core::option::Option<Quotation>,
8342 #[prost(message, optional, tag = "31")]
8344 pub daily_yield: ::core::option::Option<MoneyValue>,
8345 #[prost(string, tag = "32")]
8347 pub ticker: ::prost::alloc::string::String,
8348 #[prost(string, tag = "33")]
8350 pub class_code: ::prost::alloc::string::String,
8351}
8352#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8353pub struct VirtualPortfolioPosition {
8354 #[prost(string, tag = "1")]
8356 pub position_uid: ::prost::alloc::string::String,
8357 #[prost(string, tag = "2")]
8359 pub instrument_uid: ::prost::alloc::string::String,
8360 #[prost(string, tag = "3")]
8362 pub figi: ::prost::alloc::string::String,
8363 #[prost(string, tag = "4")]
8365 pub instrument_type: ::prost::alloc::string::String,
8366 #[prost(message, optional, tag = "5")]
8368 pub quantity: ::core::option::Option<Quotation>,
8369 #[prost(message, optional, tag = "6")]
8371 pub average_position_price: ::core::option::Option<MoneyValue>,
8372 #[prost(message, optional, tag = "7")]
8374 pub expected_yield: ::core::option::Option<Quotation>,
8375 #[prost(message, optional, tag = "8")]
8377 pub expected_yield_fifo: ::core::option::Option<Quotation>,
8378 #[prost(message, optional, tag = "9")]
8380 pub expire_date: ::core::option::Option<::prost_types::Timestamp>,
8381 #[prost(message, optional, tag = "10")]
8383 pub current_price: ::core::option::Option<MoneyValue>,
8384 #[prost(message, optional, tag = "11")]
8386 pub average_position_price_fifo: ::core::option::Option<MoneyValue>,
8387 #[prost(message, optional, tag = "31")]
8389 pub daily_yield: ::core::option::Option<MoneyValue>,
8390 #[prost(string, tag = "32")]
8392 pub ticker: ::prost::alloc::string::String,
8393 #[prost(string, tag = "33")]
8395 pub class_code: ::prost::alloc::string::String,
8396}
8397#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8399pub struct PositionsSecurities {
8400 #[prost(string, tag = "1")]
8402 pub figi: ::prost::alloc::string::String,
8403 #[prost(int64, tag = "2")]
8405 pub blocked: i64,
8406 #[prost(int64, tag = "3")]
8408 pub balance: i64,
8409 #[prost(string, tag = "4")]
8411 pub position_uid: ::prost::alloc::string::String,
8412 #[prost(string, tag = "5")]
8414 pub instrument_uid: ::prost::alloc::string::String,
8415 #[prost(string, tag = "6")]
8417 pub ticker: ::prost::alloc::string::String,
8418 #[prost(string, tag = "7")]
8420 pub class_code: ::prost::alloc::string::String,
8421 #[prost(bool, tag = "11")]
8423 pub exchange_blocked: bool,
8424 #[prost(string, tag = "16")]
8426 pub instrument_type: ::prost::alloc::string::String,
8427}
8428#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8430pub struct PositionsFutures {
8431 #[prost(string, tag = "1")]
8433 pub figi: ::prost::alloc::string::String,
8434 #[prost(int64, tag = "2")]
8436 pub blocked: i64,
8437 #[prost(int64, tag = "3")]
8439 pub balance: i64,
8440 #[prost(string, tag = "4")]
8442 pub position_uid: ::prost::alloc::string::String,
8443 #[prost(string, tag = "5")]
8445 pub instrument_uid: ::prost::alloc::string::String,
8446 #[prost(string, tag = "6")]
8448 pub ticker: ::prost::alloc::string::String,
8449 #[prost(string, tag = "7")]
8451 pub class_code: ::prost::alloc::string::String,
8452}
8453#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8455pub struct PositionsOptions {
8456 #[prost(string, tag = "1")]
8458 pub position_uid: ::prost::alloc::string::String,
8459 #[prost(string, tag = "2")]
8461 pub instrument_uid: ::prost::alloc::string::String,
8462 #[prost(string, tag = "3")]
8464 pub ticker: ::prost::alloc::string::String,
8465 #[prost(string, tag = "4")]
8467 pub class_code: ::prost::alloc::string::String,
8468 #[prost(int64, tag = "11")]
8470 pub blocked: i64,
8471 #[prost(int64, tag = "21")]
8473 pub balance: i64,
8474}
8475#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8476pub struct BrokerReportRequest {
8477 #[prost(oneof = "broker_report_request::Payload", tags = "1, 2")]
8478 pub payload: ::core::option::Option<broker_report_request::Payload>,
8479}
8480pub mod broker_report_request {
8482 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
8483 pub enum Payload {
8484 #[prost(message, tag = "1")]
8485 GenerateBrokerReportRequest(super::GenerateBrokerReportRequest),
8486 #[prost(message, tag = "2")]
8487 GetBrokerReportRequest(super::GetBrokerReportRequest),
8488 }
8489}
8490#[derive(Clone, PartialEq, ::prost::Message)]
8491pub struct BrokerReportResponse {
8492 #[prost(oneof = "broker_report_response::Payload", tags = "1, 2")]
8493 pub payload: ::core::option::Option<broker_report_response::Payload>,
8494}
8495pub mod broker_report_response {
8497 #[derive(Clone, PartialEq, ::prost::Oneof)]
8498 pub enum Payload {
8499 #[prost(message, tag = "1")]
8500 GenerateBrokerReportResponse(super::GenerateBrokerReportResponse),
8501 #[prost(message, tag = "2")]
8502 GetBrokerReportResponse(super::GetBrokerReportResponse),
8503 }
8504}
8505#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8506pub struct GenerateBrokerReportRequest {
8507 #[prost(string, tag = "1")]
8509 pub account_id: ::prost::alloc::string::String,
8510 #[prost(message, optional, tag = "2")]
8512 pub from: ::core::option::Option<::prost_types::Timestamp>,
8513 #[prost(message, optional, tag = "3")]
8515 pub to: ::core::option::Option<::prost_types::Timestamp>,
8516}
8517#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8518pub struct GenerateBrokerReportResponse {
8519 #[prost(string, tag = "1")]
8521 pub task_id: ::prost::alloc::string::String,
8522}
8523#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8524pub struct GetBrokerReportRequest {
8525 #[prost(string, tag = "1")]
8527 pub task_id: ::prost::alloc::string::String,
8528 #[prost(int32, optional, tag = "2")]
8530 pub page: ::core::option::Option<i32>,
8531}
8532#[derive(Clone, PartialEq, ::prost::Message)]
8533pub struct GetBrokerReportResponse {
8534 #[prost(message, repeated, tag = "1")]
8535 pub broker_report: ::prost::alloc::vec::Vec<BrokerReport>,
8536 #[prost(int32, tag = "2")]
8538 pub items_count: i32,
8539 #[prost(int32, tag = "3")]
8541 pub pages_count: i32,
8542 #[prost(int32, tag = "4")]
8544 pub page: i32,
8545 #[prost(string, tag = "5")]
8547 pub task_id: ::prost::alloc::string::String,
8548}
8549#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8550pub struct BrokerReport {
8551 #[prost(string, tag = "1")]
8553 pub trade_id: ::prost::alloc::string::String,
8554 #[prost(string, tag = "2")]
8556 pub order_id: ::prost::alloc::string::String,
8557 #[prost(string, tag = "3")]
8559 pub figi: ::prost::alloc::string::String,
8560 #[prost(string, tag = "4")]
8562 pub execute_sign: ::prost::alloc::string::String,
8563 #[prost(message, optional, tag = "5")]
8565 pub trade_datetime: ::core::option::Option<::prost_types::Timestamp>,
8566 #[prost(string, tag = "6")]
8568 pub exchange: ::prost::alloc::string::String,
8569 #[prost(string, tag = "7")]
8571 pub class_code: ::prost::alloc::string::String,
8572 #[prost(string, tag = "8")]
8574 pub direction: ::prost::alloc::string::String,
8575 #[prost(string, tag = "9")]
8577 pub name: ::prost::alloc::string::String,
8578 #[prost(string, tag = "10")]
8580 pub ticker: ::prost::alloc::string::String,
8581 #[prost(message, optional, tag = "11")]
8583 pub price: ::core::option::Option<MoneyValue>,
8584 #[prost(int64, tag = "12")]
8586 pub quantity: i64,
8587 #[prost(message, optional, tag = "13")]
8589 pub order_amount: ::core::option::Option<MoneyValue>,
8590 #[prost(message, optional, tag = "14")]
8592 pub aci_value: ::core::option::Option<Quotation>,
8593 #[prost(message, optional, tag = "15")]
8595 pub total_order_amount: ::core::option::Option<MoneyValue>,
8596 #[prost(message, optional, tag = "16")]
8598 pub broker_commission: ::core::option::Option<MoneyValue>,
8599 #[prost(message, optional, tag = "17")]
8601 pub exchange_commission: ::core::option::Option<MoneyValue>,
8602 #[prost(message, optional, tag = "18")]
8604 pub exchange_clearing_commission: ::core::option::Option<MoneyValue>,
8605 #[prost(message, optional, tag = "19")]
8607 pub repo_rate: ::core::option::Option<Quotation>,
8608 #[prost(string, tag = "20")]
8610 pub party: ::prost::alloc::string::String,
8611 #[prost(message, optional, tag = "21")]
8613 pub clear_value_date: ::core::option::Option<::prost_types::Timestamp>,
8614 #[prost(message, optional, tag = "22")]
8616 pub sec_value_date: ::core::option::Option<::prost_types::Timestamp>,
8617 #[prost(string, tag = "23")]
8619 pub broker_status: ::prost::alloc::string::String,
8620 #[prost(string, tag = "24")]
8622 pub separate_agreement_type: ::prost::alloc::string::String,
8623 #[prost(string, tag = "25")]
8625 pub separate_agreement_number: ::prost::alloc::string::String,
8626 #[prost(string, tag = "26")]
8628 pub separate_agreement_date: ::prost::alloc::string::String,
8629 #[prost(string, tag = "27")]
8631 pub delivery_type: ::prost::alloc::string::String,
8632}
8633#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8634pub struct GetDividendsForeignIssuerRequest {
8635 #[prost(oneof = "get_dividends_foreign_issuer_request::Payload", tags = "1, 2")]
8636 pub payload: ::core::option::Option<get_dividends_foreign_issuer_request::Payload>,
8637}
8638pub mod get_dividends_foreign_issuer_request {
8640 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
8641 pub enum Payload {
8642 #[prost(message, tag = "1")]
8644 GenerateDivForeignIssuerReport(
8645 super::GenerateDividendsForeignIssuerReportRequest,
8646 ),
8647 #[prost(message, tag = "2")]
8649 GetDivForeignIssuerReport(super::GetDividendsForeignIssuerReportRequest),
8650 }
8651}
8652#[derive(Clone, PartialEq, ::prost::Message)]
8653pub struct GetDividendsForeignIssuerResponse {
8654 #[prost(oneof = "get_dividends_foreign_issuer_response::Payload", tags = "1, 2")]
8655 pub payload: ::core::option::Option<get_dividends_foreign_issuer_response::Payload>,
8656}
8657pub mod get_dividends_foreign_issuer_response {
8659 #[derive(Clone, PartialEq, ::prost::Oneof)]
8660 pub enum Payload {
8661 #[prost(message, tag = "1")]
8663 GenerateDivForeignIssuerReportResponse(
8664 super::GenerateDividendsForeignIssuerReportResponse,
8665 ),
8666 #[prost(message, tag = "2")]
8668 DivForeignIssuerReport(super::GetDividendsForeignIssuerReportResponse),
8669 }
8670}
8671#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8673pub struct GenerateDividendsForeignIssuerReportRequest {
8674 #[prost(string, tag = "1")]
8676 pub account_id: ::prost::alloc::string::String,
8677 #[prost(message, optional, tag = "2")]
8679 pub from: ::core::option::Option<::prost_types::Timestamp>,
8680 #[prost(message, optional, tag = "3")]
8682 pub to: ::core::option::Option<::prost_types::Timestamp>,
8683}
8684#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8686pub struct GetDividendsForeignIssuerReportRequest {
8687 #[prost(string, tag = "1")]
8689 pub task_id: ::prost::alloc::string::String,
8690 #[prost(int32, optional, tag = "2")]
8692 pub page: ::core::option::Option<i32>,
8693}
8694#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8696pub struct GenerateDividendsForeignIssuerReportResponse {
8697 #[prost(string, tag = "1")]
8699 pub task_id: ::prost::alloc::string::String,
8700}
8701#[derive(Clone, PartialEq, ::prost::Message)]
8702pub struct GetDividendsForeignIssuerReportResponse {
8703 #[prost(message, repeated, tag = "1")]
8704 pub dividends_foreign_issuer_report: ::prost::alloc::vec::Vec<
8705 DividendsForeignIssuerReport,
8706 >,
8707 #[prost(int32, tag = "2")]
8709 pub items_count: i32,
8710 #[prost(int32, tag = "3")]
8712 pub pages_count: i32,
8713 #[prost(int32, tag = "4")]
8715 pub page: i32,
8716}
8717#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8719pub struct DividendsForeignIssuerReport {
8720 #[prost(message, optional, tag = "1")]
8722 pub record_date: ::core::option::Option<::prost_types::Timestamp>,
8723 #[prost(message, optional, tag = "2")]
8725 pub payment_date: ::core::option::Option<::prost_types::Timestamp>,
8726 #[prost(string, tag = "3")]
8728 pub security_name: ::prost::alloc::string::String,
8729 #[prost(string, tag = "4")]
8731 pub isin: ::prost::alloc::string::String,
8732 #[prost(string, tag = "5")]
8734 pub issuer_country: ::prost::alloc::string::String,
8735 #[prost(int64, tag = "6")]
8737 pub quantity: i64,
8738 #[prost(message, optional, tag = "7")]
8740 pub dividend: ::core::option::Option<Quotation>,
8741 #[prost(message, optional, tag = "8")]
8743 pub external_commission: ::core::option::Option<Quotation>,
8744 #[prost(message, optional, tag = "9")]
8746 pub dividend_gross: ::core::option::Option<Quotation>,
8747 #[prost(message, optional, tag = "10")]
8749 pub tax: ::core::option::Option<Quotation>,
8750 #[prost(message, optional, tag = "11")]
8752 pub dividend_amount: ::core::option::Option<Quotation>,
8753 #[prost(string, tag = "12")]
8755 pub currency: ::prost::alloc::string::String,
8756}
8757#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8759pub struct PortfolioStreamRequest {
8760 #[prost(string, repeated, tag = "1")]
8762 pub accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
8763 #[prost(message, optional, tag = "15")]
8765 pub ping_settings: ::core::option::Option<PingDelaySettings>,
8766}
8767#[derive(Clone, PartialEq, ::prost::Message)]
8769pub struct PortfolioStreamResponse {
8770 #[prost(oneof = "portfolio_stream_response::Payload", tags = "1, 2, 3")]
8771 pub payload: ::core::option::Option<portfolio_stream_response::Payload>,
8772}
8773pub mod portfolio_stream_response {
8775 #[derive(Clone, PartialEq, ::prost::Oneof)]
8776 pub enum Payload {
8777 #[prost(message, tag = "1")]
8779 Subscriptions(super::PortfolioSubscriptionResult),
8780 #[prost(message, tag = "2")]
8782 Portfolio(super::PortfolioResponse),
8783 #[prost(message, tag = "3")]
8785 Ping(super::Ping),
8786 }
8787}
8788#[derive(Clone, PartialEq, ::prost::Message)]
8790pub struct PortfolioSubscriptionResult {
8791 #[prost(message, repeated, tag = "1")]
8793 pub accounts: ::prost::alloc::vec::Vec<AccountSubscriptionStatus>,
8794 #[prost(string, tag = "7")]
8796 pub tracking_id: ::prost::alloc::string::String,
8797 #[prost(string, tag = "8")]
8799 pub stream_id: ::prost::alloc::string::String,
8800}
8801#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8803pub struct AccountSubscriptionStatus {
8804 #[prost(string, tag = "1")]
8806 pub account_id: ::prost::alloc::string::String,
8807 #[prost(enumeration = "PortfolioSubscriptionStatus", tag = "6")]
8809 pub subscription_status: i32,
8810}
8811#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8813pub struct GetOperationsByCursorRequest {
8814 #[prost(string, tag = "1")]
8816 pub account_id: ::prost::alloc::string::String,
8817 #[prost(string, optional, tag = "2")]
8819 pub instrument_id: ::core::option::Option<::prost::alloc::string::String>,
8820 #[prost(message, optional, tag = "6")]
8822 pub from: ::core::option::Option<::prost_types::Timestamp>,
8823 #[prost(message, optional, tag = "7")]
8825 pub to: ::core::option::Option<::prost_types::Timestamp>,
8826 #[prost(string, optional, tag = "11")]
8828 pub cursor: ::core::option::Option<::prost::alloc::string::String>,
8829 #[prost(int32, optional, tag = "12")]
8831 pub limit: ::core::option::Option<i32>,
8832 #[prost(enumeration = "OperationType", repeated, tag = "13")]
8834 pub operation_types: ::prost::alloc::vec::Vec<i32>,
8835 #[prost(enumeration = "OperationState", optional, tag = "14")]
8837 pub state: ::core::option::Option<i32>,
8838 #[prost(bool, optional, tag = "15")]
8840 pub without_commissions: ::core::option::Option<bool>,
8841 #[prost(bool, optional, tag = "16")]
8843 pub without_trades: ::core::option::Option<bool>,
8844 #[prost(bool, optional, tag = "17")]
8846 pub without_overnights: ::core::option::Option<bool>,
8847}
8848#[derive(Clone, PartialEq, ::prost::Message)]
8850pub struct GetOperationsByCursorResponse {
8851 #[prost(bool, tag = "1")]
8853 pub has_next: bool,
8854 #[prost(string, tag = "2")]
8856 pub next_cursor: ::prost::alloc::string::String,
8857 #[prost(message, repeated, tag = "6")]
8859 pub items: ::prost::alloc::vec::Vec<OperationItem>,
8860}
8861#[derive(Clone, PartialEq, ::prost::Message)]
8863pub struct OperationItem {
8864 #[prost(string, tag = "1")]
8866 pub cursor: ::prost::alloc::string::String,
8867 #[prost(string, tag = "6")]
8869 pub broker_account_id: ::prost::alloc::string::String,
8870 #[prost(string, tag = "16")]
8872 pub id: ::prost::alloc::string::String,
8873 #[prost(string, tag = "17")]
8875 pub parent_operation_id: ::prost::alloc::string::String,
8876 #[prost(string, tag = "18")]
8878 pub name: ::prost::alloc::string::String,
8879 #[prost(message, optional, tag = "21")]
8881 pub date: ::core::option::Option<::prost_types::Timestamp>,
8882 #[prost(enumeration = "OperationType", tag = "22")]
8884 pub r#type: i32,
8885 #[prost(string, tag = "23")]
8887 pub description: ::prost::alloc::string::String,
8888 #[prost(enumeration = "OperationState", tag = "24")]
8890 pub state: i32,
8891 #[prost(string, tag = "31")]
8893 pub instrument_uid: ::prost::alloc::string::String,
8894 #[prost(string, tag = "32")]
8896 pub figi: ::prost::alloc::string::String,
8897 #[prost(string, tag = "33")]
8899 pub instrument_type: ::prost::alloc::string::String,
8900 #[prost(enumeration = "InstrumentType", tag = "34")]
8902 pub instrument_kind: i32,
8903 #[prost(string, tag = "35")]
8905 pub position_uid: ::prost::alloc::string::String,
8906 #[prost(string, tag = "36")]
8908 pub ticker: ::prost::alloc::string::String,
8909 #[prost(string, tag = "37")]
8911 pub class_code: ::prost::alloc::string::String,
8912 #[prost(message, optional, tag = "41")]
8914 pub payment: ::core::option::Option<MoneyValue>,
8915 #[prost(message, optional, tag = "42")]
8917 pub price: ::core::option::Option<MoneyValue>,
8918 #[prost(message, optional, tag = "43")]
8920 pub commission: ::core::option::Option<MoneyValue>,
8921 #[prost(message, optional, tag = "44")]
8923 pub r#yield: ::core::option::Option<MoneyValue>,
8924 #[prost(message, optional, tag = "45")]
8926 pub yield_relative: ::core::option::Option<Quotation>,
8927 #[prost(message, optional, tag = "46")]
8929 pub accrued_int: ::core::option::Option<MoneyValue>,
8930 #[prost(int64, tag = "51")]
8932 pub quantity: i64,
8933 #[prost(int64, tag = "52")]
8935 pub quantity_rest: i64,
8936 #[prost(int64, tag = "53")]
8938 pub quantity_done: i64,
8939 #[prost(message, optional, tag = "56")]
8941 pub cancel_date_time: ::core::option::Option<::prost_types::Timestamp>,
8942 #[prost(string, tag = "57")]
8944 pub cancel_reason: ::prost::alloc::string::String,
8945 #[prost(message, optional, tag = "61")]
8947 pub trades_info: ::core::option::Option<OperationItemTrades>,
8948 #[prost(string, tag = "64")]
8950 pub asset_uid: ::prost::alloc::string::String,
8951 #[prost(message, repeated, tag = "65")]
8953 pub child_operations: ::prost::alloc::vec::Vec<ChildOperationItem>,
8954}
8955#[derive(Clone, PartialEq, ::prost::Message)]
8957pub struct OperationItemTrades {
8958 #[prost(message, repeated, tag = "6")]
8959 pub trades: ::prost::alloc::vec::Vec<OperationItemTrade>,
8960}
8961#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8963pub struct OperationItemTrade {
8964 #[prost(string, tag = "1")]
8966 pub num: ::prost::alloc::string::String,
8967 #[prost(message, optional, tag = "6")]
8969 pub date: ::core::option::Option<::prost_types::Timestamp>,
8970 #[prost(int64, tag = "11")]
8972 pub quantity: i64,
8973 #[prost(message, optional, tag = "16")]
8975 pub price: ::core::option::Option<MoneyValue>,
8976 #[prost(message, optional, tag = "21")]
8978 pub r#yield: ::core::option::Option<MoneyValue>,
8979 #[prost(message, optional, tag = "22")]
8981 pub yield_relative: ::core::option::Option<Quotation>,
8982}
8983#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
8985pub struct PositionsStreamRequest {
8986 #[prost(string, repeated, tag = "1")]
8988 pub accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
8989 #[prost(bool, tag = "3")]
8991 pub with_initial_positions: bool,
8992 #[prost(message, optional, tag = "15")]
8994 pub ping_settings: ::core::option::Option<PingDelaySettings>,
8995}
8996#[derive(Clone, PartialEq, ::prost::Message)]
8998pub struct PositionsStreamResponse {
8999 #[prost(oneof = "positions_stream_response::Payload", tags = "1, 2, 3, 5")]
9000 pub payload: ::core::option::Option<positions_stream_response::Payload>,
9001}
9002pub mod positions_stream_response {
9004 #[derive(Clone, PartialEq, ::prost::Oneof)]
9005 pub enum Payload {
9006 #[prost(message, tag = "1")]
9008 Subscriptions(super::PositionsSubscriptionResult),
9009 #[prost(message, tag = "2")]
9011 Position(super::PositionData),
9012 #[prost(message, tag = "3")]
9014 Ping(super::Ping),
9015 #[prost(message, tag = "5")]
9017 InitialPositions(super::PositionsResponse),
9018 }
9019}
9020#[derive(Clone, PartialEq, ::prost::Message)]
9022pub struct PositionsSubscriptionResult {
9023 #[prost(message, repeated, tag = "1")]
9025 pub accounts: ::prost::alloc::vec::Vec<PositionsSubscriptionStatus>,
9026 #[prost(string, tag = "7")]
9028 pub tracking_id: ::prost::alloc::string::String,
9029 #[prost(string, tag = "8")]
9031 pub stream_id: ::prost::alloc::string::String,
9032}
9033#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9035pub struct PositionsSubscriptionStatus {
9036 #[prost(string, tag = "1")]
9038 pub account_id: ::prost::alloc::string::String,
9039 #[prost(enumeration = "PositionsAccountSubscriptionStatus", tag = "6")]
9041 pub subscription_status: i32,
9042}
9043#[derive(Clone, PartialEq, ::prost::Message)]
9045pub struct PositionData {
9046 #[prost(string, tag = "1")]
9048 pub account_id: ::prost::alloc::string::String,
9049 #[prost(message, repeated, tag = "2")]
9051 pub money: ::prost::alloc::vec::Vec<PositionsMoney>,
9052 #[prost(message, repeated, tag = "3")]
9054 pub securities: ::prost::alloc::vec::Vec<PositionsSecurities>,
9055 #[prost(message, repeated, tag = "4")]
9057 pub futures: ::prost::alloc::vec::Vec<PositionsFutures>,
9058 #[prost(message, repeated, tag = "5")]
9060 pub options: ::prost::alloc::vec::Vec<PositionsOptions>,
9061 #[prost(message, optional, tag = "6")]
9063 pub date: ::core::option::Option<::prost_types::Timestamp>,
9064}
9065#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9067pub struct PositionsMoney {
9068 #[prost(message, optional, tag = "1")]
9070 pub available_value: ::core::option::Option<MoneyValue>,
9071 #[prost(message, optional, tag = "2")]
9073 pub blocked_value: ::core::option::Option<MoneyValue>,
9074}
9075#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9076pub struct ChildOperationItem {
9077 #[prost(string, tag = "1")]
9079 pub instrument_uid: ::prost::alloc::string::String,
9080 #[prost(message, optional, tag = "2")]
9082 pub payment: ::core::option::Option<MoneyValue>,
9083}
9084#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9086pub struct OperationsStreamRequest {
9087 #[prost(string, repeated, tag = "1")]
9089 pub accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
9090 #[prost(message, optional, tag = "15")]
9092 pub ping_settings: ::core::option::Option<PingDelaySettings>,
9093}
9094#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9096pub struct OperationsStreamResponse {
9097 #[prost(oneof = "operations_stream_response::Payload", tags = "1, 2, 3")]
9098 pub payload: ::core::option::Option<operations_stream_response::Payload>,
9099}
9100pub mod operations_stream_response {
9102 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
9103 pub enum Payload {
9104 #[prost(message, tag = "1")]
9106 Subscriptions(super::OperationsSubscriptionResult),
9107 #[prost(message, tag = "2")]
9109 Operation(super::OperationData),
9110 #[prost(message, tag = "3")]
9112 Ping(super::Ping),
9113 }
9114}
9115#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9117pub struct OperationsSubscriptionResult {
9118 #[prost(string, repeated, tag = "1")]
9120 pub accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
9121 #[prost(enumeration = "OperationsAccountSubscriptionStatus", tag = "2")]
9123 pub subscription_status: i32,
9124 #[prost(string, tag = "7")]
9126 pub tracking_id: ::prost::alloc::string::String,
9127 #[prost(string, tag = "8")]
9129 pub stream_id: ::prost::alloc::string::String,
9130}
9131#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
9133pub struct OperationData {
9134 #[prost(string, tag = "1")]
9136 pub broker_account_id: ::prost::alloc::string::String,
9137 #[prost(string, tag = "2")]
9139 pub id: ::prost::alloc::string::String,
9140 #[prost(string, tag = "3")]
9142 pub parent_operation_id: ::prost::alloc::string::String,
9143 #[prost(string, tag = "4")]
9145 pub name: ::prost::alloc::string::String,
9146 #[prost(message, optional, tag = "5")]
9148 pub date: ::core::option::Option<::prost_types::Timestamp>,
9149 #[prost(enumeration = "OperationType", tag = "6")]
9151 pub r#type: i32,
9152 #[prost(enumeration = "OperationState", tag = "7")]
9154 pub state: i32,
9155 #[prost(string, tag = "8")]
9157 pub instrument_uid: ::prost::alloc::string::String,
9158 #[prost(string, tag = "9")]
9160 pub figi: ::prost::alloc::string::String,
9161 #[prost(string, tag = "10")]
9163 pub instrument_type: ::prost::alloc::string::String,
9164 #[prost(enumeration = "InstrumentType", tag = "11")]
9166 pub instrument_kind: i32,
9167 #[prost(string, tag = "12")]
9169 pub position_uid: ::prost::alloc::string::String,
9170 #[prost(string, tag = "13")]
9172 pub ticker: ::prost::alloc::string::String,
9173 #[prost(string, tag = "14")]
9175 pub class_code: ::prost::alloc::string::String,
9176 #[prost(message, optional, tag = "15")]
9178 pub payment: ::core::option::Option<MoneyValue>,
9179}
9180#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
9182#[repr(i32)]
9183pub enum OperationState {
9184 Unspecified = 0,
9186 Executed = 1,
9188 Canceled = 2,
9190 Progress = 3,
9192}
9193impl OperationState {
9194 pub fn as_str_name(&self) -> &'static str {
9199 match self {
9200 Self::Unspecified => "OPERATION_STATE_UNSPECIFIED",
9201 Self::Executed => "OPERATION_STATE_EXECUTED",
9202 Self::Canceled => "OPERATION_STATE_CANCELED",
9203 Self::Progress => "OPERATION_STATE_PROGRESS",
9204 }
9205 }
9206 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
9208 match value {
9209 "OPERATION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
9210 "OPERATION_STATE_EXECUTED" => Some(Self::Executed),
9211 "OPERATION_STATE_CANCELED" => Some(Self::Canceled),
9212 "OPERATION_STATE_PROGRESS" => Some(Self::Progress),
9213 _ => None,
9214 }
9215 }
9216}
9217#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
9219#[repr(i32)]
9220pub enum OperationType {
9221 Unspecified = 0,
9223 Input = 1,
9225 BondTax = 2,
9227 OutputSecurities = 3,
9229 Overnight = 4,
9231 Tax = 5,
9233 BondRepaymentFull = 6,
9235 SellCard = 7,
9237 DividendTax = 8,
9239 Output = 9,
9241 BondRepayment = 10,
9243 TaxCorrection = 11,
9245 ServiceFee = 12,
9247 BenefitTax = 13,
9249 MarginFee = 14,
9251 Buy = 15,
9253 BuyCard = 16,
9255 InputSecurities = 17,
9257 SellMargin = 18,
9259 BrokerFee = 19,
9261 BuyMargin = 20,
9263 Dividend = 21,
9265 Sell = 22,
9267 Coupon = 23,
9269 SuccessFee = 24,
9271 DividendTransfer = 25,
9273 AccruingVarmargin = 26,
9275 WritingOffVarmargin = 27,
9277 DeliveryBuy = 28,
9279 DeliverySell = 29,
9281 TrackMfee = 30,
9283 TrackPfee = 31,
9285 TaxProgressive = 32,
9287 BondTaxProgressive = 33,
9289 DividendTaxProgressive = 34,
9291 BenefitTaxProgressive = 35,
9293 TaxCorrectionProgressive = 36,
9295 TaxRepoProgressive = 37,
9297 TaxRepo = 38,
9299 TaxRepoHold = 39,
9301 TaxRepoRefund = 40,
9303 TaxRepoHoldProgressive = 41,
9305 TaxRepoRefundProgressive = 42,
9307 DivExt = 43,
9309 TaxCorrectionCoupon = 44,
9311 CashFee = 45,
9313 OutFee = 46,
9315 OutStampDuty = 47,
9317 OutputSwift = 50,
9322 InputSwift = 51,
9327 OutputAcquiring = 53,
9329 InputAcquiring = 54,
9334 OutputPenalty = 55,
9339 AdviceFee = 56,
9344 TransIisBs = 57,
9346 TransBsBs = 58,
9348 OutMulti = 59,
9350 InpMulti = 60,
9352 OverPlacement = 61,
9354 OverCom = 62,
9356 OverIncome = 63,
9358 OptionExpiration = 64,
9360 FutureExpiration = 65,
9362 OtherFee = 66,
9364 Other = 67,
9366 DfaRedemption = 68,
9368 PrimaryOrder = 69,
9370}
9371impl OperationType {
9372 pub fn as_str_name(&self) -> &'static str {
9377 match self {
9378 Self::Unspecified => "OPERATION_TYPE_UNSPECIFIED",
9379 Self::Input => "OPERATION_TYPE_INPUT",
9380 Self::BondTax => "OPERATION_TYPE_BOND_TAX",
9381 Self::OutputSecurities => "OPERATION_TYPE_OUTPUT_SECURITIES",
9382 Self::Overnight => "OPERATION_TYPE_OVERNIGHT",
9383 Self::Tax => "OPERATION_TYPE_TAX",
9384 Self::BondRepaymentFull => "OPERATION_TYPE_BOND_REPAYMENT_FULL",
9385 Self::SellCard => "OPERATION_TYPE_SELL_CARD",
9386 Self::DividendTax => "OPERATION_TYPE_DIVIDEND_TAX",
9387 Self::Output => "OPERATION_TYPE_OUTPUT",
9388 Self::BondRepayment => "OPERATION_TYPE_BOND_REPAYMENT",
9389 Self::TaxCorrection => "OPERATION_TYPE_TAX_CORRECTION",
9390 Self::ServiceFee => "OPERATION_TYPE_SERVICE_FEE",
9391 Self::BenefitTax => "OPERATION_TYPE_BENEFIT_TAX",
9392 Self::MarginFee => "OPERATION_TYPE_MARGIN_FEE",
9393 Self::Buy => "OPERATION_TYPE_BUY",
9394 Self::BuyCard => "OPERATION_TYPE_BUY_CARD",
9395 Self::InputSecurities => "OPERATION_TYPE_INPUT_SECURITIES",
9396 Self::SellMargin => "OPERATION_TYPE_SELL_MARGIN",
9397 Self::BrokerFee => "OPERATION_TYPE_BROKER_FEE",
9398 Self::BuyMargin => "OPERATION_TYPE_BUY_MARGIN",
9399 Self::Dividend => "OPERATION_TYPE_DIVIDEND",
9400 Self::Sell => "OPERATION_TYPE_SELL",
9401 Self::Coupon => "OPERATION_TYPE_COUPON",
9402 Self::SuccessFee => "OPERATION_TYPE_SUCCESS_FEE",
9403 Self::DividendTransfer => "OPERATION_TYPE_DIVIDEND_TRANSFER",
9404 Self::AccruingVarmargin => "OPERATION_TYPE_ACCRUING_VARMARGIN",
9405 Self::WritingOffVarmargin => "OPERATION_TYPE_WRITING_OFF_VARMARGIN",
9406 Self::DeliveryBuy => "OPERATION_TYPE_DELIVERY_BUY",
9407 Self::DeliverySell => "OPERATION_TYPE_DELIVERY_SELL",
9408 Self::TrackMfee => "OPERATION_TYPE_TRACK_MFEE",
9409 Self::TrackPfee => "OPERATION_TYPE_TRACK_PFEE",
9410 Self::TaxProgressive => "OPERATION_TYPE_TAX_PROGRESSIVE",
9411 Self::BondTaxProgressive => "OPERATION_TYPE_BOND_TAX_PROGRESSIVE",
9412 Self::DividendTaxProgressive => "OPERATION_TYPE_DIVIDEND_TAX_PROGRESSIVE",
9413 Self::BenefitTaxProgressive => "OPERATION_TYPE_BENEFIT_TAX_PROGRESSIVE",
9414 Self::TaxCorrectionProgressive => "OPERATION_TYPE_TAX_CORRECTION_PROGRESSIVE",
9415 Self::TaxRepoProgressive => "OPERATION_TYPE_TAX_REPO_PROGRESSIVE",
9416 Self::TaxRepo => "OPERATION_TYPE_TAX_REPO",
9417 Self::TaxRepoHold => "OPERATION_TYPE_TAX_REPO_HOLD",
9418 Self::TaxRepoRefund => "OPERATION_TYPE_TAX_REPO_REFUND",
9419 Self::TaxRepoHoldProgressive => "OPERATION_TYPE_TAX_REPO_HOLD_PROGRESSIVE",
9420 Self::TaxRepoRefundProgressive => {
9421 "OPERATION_TYPE_TAX_REPO_REFUND_PROGRESSIVE"
9422 }
9423 Self::DivExt => "OPERATION_TYPE_DIV_EXT",
9424 Self::TaxCorrectionCoupon => "OPERATION_TYPE_TAX_CORRECTION_COUPON",
9425 Self::CashFee => "OPERATION_TYPE_CASH_FEE",
9426 Self::OutFee => "OPERATION_TYPE_OUT_FEE",
9427 Self::OutStampDuty => "OPERATION_TYPE_OUT_STAMP_DUTY",
9428 Self::OutputSwift => "OPERATION_TYPE_OUTPUT_SWIFT",
9429 Self::InputSwift => "OPERATION_TYPE_INPUT_SWIFT",
9430 Self::OutputAcquiring => "OPERATION_TYPE_OUTPUT_ACQUIRING",
9431 Self::InputAcquiring => "OPERATION_TYPE_INPUT_ACQUIRING",
9432 Self::OutputPenalty => "OPERATION_TYPE_OUTPUT_PENALTY",
9433 Self::AdviceFee => "OPERATION_TYPE_ADVICE_FEE",
9434 Self::TransIisBs => "OPERATION_TYPE_TRANS_IIS_BS",
9435 Self::TransBsBs => "OPERATION_TYPE_TRANS_BS_BS",
9436 Self::OutMulti => "OPERATION_TYPE_OUT_MULTI",
9437 Self::InpMulti => "OPERATION_TYPE_INP_MULTI",
9438 Self::OverPlacement => "OPERATION_TYPE_OVER_PLACEMENT",
9439 Self::OverCom => "OPERATION_TYPE_OVER_COM",
9440 Self::OverIncome => "OPERATION_TYPE_OVER_INCOME",
9441 Self::OptionExpiration => "OPERATION_TYPE_OPTION_EXPIRATION",
9442 Self::FutureExpiration => "OPERATION_TYPE_FUTURE_EXPIRATION",
9443 Self::OtherFee => "OPERATION_TYPE_OTHER_FEE",
9444 Self::Other => "OPERATION_TYPE_OTHER",
9445 Self::DfaRedemption => "OPERATION_TYPE_DFA_REDEMPTION",
9446 Self::PrimaryOrder => "OPERATION_TYPE_PRIMARY_ORDER",
9447 }
9448 }
9449 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
9451 match value {
9452 "OPERATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
9453 "OPERATION_TYPE_INPUT" => Some(Self::Input),
9454 "OPERATION_TYPE_BOND_TAX" => Some(Self::BondTax),
9455 "OPERATION_TYPE_OUTPUT_SECURITIES" => Some(Self::OutputSecurities),
9456 "OPERATION_TYPE_OVERNIGHT" => Some(Self::Overnight),
9457 "OPERATION_TYPE_TAX" => Some(Self::Tax),
9458 "OPERATION_TYPE_BOND_REPAYMENT_FULL" => Some(Self::BondRepaymentFull),
9459 "OPERATION_TYPE_SELL_CARD" => Some(Self::SellCard),
9460 "OPERATION_TYPE_DIVIDEND_TAX" => Some(Self::DividendTax),
9461 "OPERATION_TYPE_OUTPUT" => Some(Self::Output),
9462 "OPERATION_TYPE_BOND_REPAYMENT" => Some(Self::BondRepayment),
9463 "OPERATION_TYPE_TAX_CORRECTION" => Some(Self::TaxCorrection),
9464 "OPERATION_TYPE_SERVICE_FEE" => Some(Self::ServiceFee),
9465 "OPERATION_TYPE_BENEFIT_TAX" => Some(Self::BenefitTax),
9466 "OPERATION_TYPE_MARGIN_FEE" => Some(Self::MarginFee),
9467 "OPERATION_TYPE_BUY" => Some(Self::Buy),
9468 "OPERATION_TYPE_BUY_CARD" => Some(Self::BuyCard),
9469 "OPERATION_TYPE_INPUT_SECURITIES" => Some(Self::InputSecurities),
9470 "OPERATION_TYPE_SELL_MARGIN" => Some(Self::SellMargin),
9471 "OPERATION_TYPE_BROKER_FEE" => Some(Self::BrokerFee),
9472 "OPERATION_TYPE_BUY_MARGIN" => Some(Self::BuyMargin),
9473 "OPERATION_TYPE_DIVIDEND" => Some(Self::Dividend),
9474 "OPERATION_TYPE_SELL" => Some(Self::Sell),
9475 "OPERATION_TYPE_COUPON" => Some(Self::Coupon),
9476 "OPERATION_TYPE_SUCCESS_FEE" => Some(Self::SuccessFee),
9477 "OPERATION_TYPE_DIVIDEND_TRANSFER" => Some(Self::DividendTransfer),
9478 "OPERATION_TYPE_ACCRUING_VARMARGIN" => Some(Self::AccruingVarmargin),
9479 "OPERATION_TYPE_WRITING_OFF_VARMARGIN" => Some(Self::WritingOffVarmargin),
9480 "OPERATION_TYPE_DELIVERY_BUY" => Some(Self::DeliveryBuy),
9481 "OPERATION_TYPE_DELIVERY_SELL" => Some(Self::DeliverySell),
9482 "OPERATION_TYPE_TRACK_MFEE" => Some(Self::TrackMfee),
9483 "OPERATION_TYPE_TRACK_PFEE" => Some(Self::TrackPfee),
9484 "OPERATION_TYPE_TAX_PROGRESSIVE" => Some(Self::TaxProgressive),
9485 "OPERATION_TYPE_BOND_TAX_PROGRESSIVE" => Some(Self::BondTaxProgressive),
9486 "OPERATION_TYPE_DIVIDEND_TAX_PROGRESSIVE" => {
9487 Some(Self::DividendTaxProgressive)
9488 }
9489 "OPERATION_TYPE_BENEFIT_TAX_PROGRESSIVE" => Some(Self::BenefitTaxProgressive),
9490 "OPERATION_TYPE_TAX_CORRECTION_PROGRESSIVE" => {
9491 Some(Self::TaxCorrectionProgressive)
9492 }
9493 "OPERATION_TYPE_TAX_REPO_PROGRESSIVE" => Some(Self::TaxRepoProgressive),
9494 "OPERATION_TYPE_TAX_REPO" => Some(Self::TaxRepo),
9495 "OPERATION_TYPE_TAX_REPO_HOLD" => Some(Self::TaxRepoHold),
9496 "OPERATION_TYPE_TAX_REPO_REFUND" => Some(Self::TaxRepoRefund),
9497 "OPERATION_TYPE_TAX_REPO_HOLD_PROGRESSIVE" => {
9498 Some(Self::TaxRepoHoldProgressive)
9499 }
9500 "OPERATION_TYPE_TAX_REPO_REFUND_PROGRESSIVE" => {
9501 Some(Self::TaxRepoRefundProgressive)
9502 }
9503 "OPERATION_TYPE_DIV_EXT" => Some(Self::DivExt),
9504 "OPERATION_TYPE_TAX_CORRECTION_COUPON" => Some(Self::TaxCorrectionCoupon),
9505 "OPERATION_TYPE_CASH_FEE" => Some(Self::CashFee),
9506 "OPERATION_TYPE_OUT_FEE" => Some(Self::OutFee),
9507 "OPERATION_TYPE_OUT_STAMP_DUTY" => Some(Self::OutStampDuty),
9508 "OPERATION_TYPE_OUTPUT_SWIFT" => Some(Self::OutputSwift),
9509 "OPERATION_TYPE_INPUT_SWIFT" => Some(Self::InputSwift),
9510 "OPERATION_TYPE_OUTPUT_ACQUIRING" => Some(Self::OutputAcquiring),
9511 "OPERATION_TYPE_INPUT_ACQUIRING" => Some(Self::InputAcquiring),
9512 "OPERATION_TYPE_OUTPUT_PENALTY" => Some(Self::OutputPenalty),
9513 "OPERATION_TYPE_ADVICE_FEE" => Some(Self::AdviceFee),
9514 "OPERATION_TYPE_TRANS_IIS_BS" => Some(Self::TransIisBs),
9515 "OPERATION_TYPE_TRANS_BS_BS" => Some(Self::TransBsBs),
9516 "OPERATION_TYPE_OUT_MULTI" => Some(Self::OutMulti),
9517 "OPERATION_TYPE_INP_MULTI" => Some(Self::InpMulti),
9518 "OPERATION_TYPE_OVER_PLACEMENT" => Some(Self::OverPlacement),
9519 "OPERATION_TYPE_OVER_COM" => Some(Self::OverCom),
9520 "OPERATION_TYPE_OVER_INCOME" => Some(Self::OverIncome),
9521 "OPERATION_TYPE_OPTION_EXPIRATION" => Some(Self::OptionExpiration),
9522 "OPERATION_TYPE_FUTURE_EXPIRATION" => Some(Self::FutureExpiration),
9523 "OPERATION_TYPE_OTHER_FEE" => Some(Self::OtherFee),
9524 "OPERATION_TYPE_OTHER" => Some(Self::Other),
9525 "OPERATION_TYPE_DFA_REDEMPTION" => Some(Self::DfaRedemption),
9526 "OPERATION_TYPE_PRIMARY_ORDER" => Some(Self::PrimaryOrder),
9527 _ => None,
9528 }
9529 }
9530}
9531#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
9533#[repr(i32)]
9534pub enum PortfolioSubscriptionStatus {
9535 Unspecified = 0,
9537 Success = 1,
9539 AccountNotFound = 2,
9541 InternalError = 3,
9543}
9544impl PortfolioSubscriptionStatus {
9545 pub fn as_str_name(&self) -> &'static str {
9550 match self {
9551 Self::Unspecified => "PORTFOLIO_SUBSCRIPTION_STATUS_UNSPECIFIED",
9552 Self::Success => "PORTFOLIO_SUBSCRIPTION_STATUS_SUCCESS",
9553 Self::AccountNotFound => "PORTFOLIO_SUBSCRIPTION_STATUS_ACCOUNT_NOT_FOUND",
9554 Self::InternalError => "PORTFOLIO_SUBSCRIPTION_STATUS_INTERNAL_ERROR",
9555 }
9556 }
9557 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
9559 match value {
9560 "PORTFOLIO_SUBSCRIPTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
9561 "PORTFOLIO_SUBSCRIPTION_STATUS_SUCCESS" => Some(Self::Success),
9562 "PORTFOLIO_SUBSCRIPTION_STATUS_ACCOUNT_NOT_FOUND" => {
9563 Some(Self::AccountNotFound)
9564 }
9565 "PORTFOLIO_SUBSCRIPTION_STATUS_INTERNAL_ERROR" => Some(Self::InternalError),
9566 _ => None,
9567 }
9568 }
9569}
9570#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
9572#[repr(i32)]
9573pub enum PositionsAccountSubscriptionStatus {
9574 PositionsSubscriptionStatusUnspecified = 0,
9576 PositionsSubscriptionStatusSuccess = 1,
9578 PositionsSubscriptionStatusAccountNotFound = 2,
9580 PositionsSubscriptionStatusInternalError = 3,
9582}
9583impl PositionsAccountSubscriptionStatus {
9584 pub fn as_str_name(&self) -> &'static str {
9589 match self {
9590 Self::PositionsSubscriptionStatusUnspecified => {
9591 "POSITIONS_SUBSCRIPTION_STATUS_UNSPECIFIED"
9592 }
9593 Self::PositionsSubscriptionStatusSuccess => {
9594 "POSITIONS_SUBSCRIPTION_STATUS_SUCCESS"
9595 }
9596 Self::PositionsSubscriptionStatusAccountNotFound => {
9597 "POSITIONS_SUBSCRIPTION_STATUS_ACCOUNT_NOT_FOUND"
9598 }
9599 Self::PositionsSubscriptionStatusInternalError => {
9600 "POSITIONS_SUBSCRIPTION_STATUS_INTERNAL_ERROR"
9601 }
9602 }
9603 }
9604 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
9606 match value {
9607 "POSITIONS_SUBSCRIPTION_STATUS_UNSPECIFIED" => {
9608 Some(Self::PositionsSubscriptionStatusUnspecified)
9609 }
9610 "POSITIONS_SUBSCRIPTION_STATUS_SUCCESS" => {
9611 Some(Self::PositionsSubscriptionStatusSuccess)
9612 }
9613 "POSITIONS_SUBSCRIPTION_STATUS_ACCOUNT_NOT_FOUND" => {
9614 Some(Self::PositionsSubscriptionStatusAccountNotFound)
9615 }
9616 "POSITIONS_SUBSCRIPTION_STATUS_INTERNAL_ERROR" => {
9617 Some(Self::PositionsSubscriptionStatusInternalError)
9618 }
9619 _ => None,
9620 }
9621 }
9622}
9623#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
9625#[repr(i32)]
9626pub enum OperationsAccountSubscriptionStatus {
9627 OperationsSubscriptionStatusUnspecified = 0,
9629 OperationsSubscriptionStatusSuccess = 1,
9631 OperationsSubscriptionStatusAccountNotFound = 2,
9633 OperationsSubscriptionStatusInternalError = 3,
9635}
9636impl OperationsAccountSubscriptionStatus {
9637 pub fn as_str_name(&self) -> &'static str {
9642 match self {
9643 Self::OperationsSubscriptionStatusUnspecified => {
9644 "OPERATIONS_SUBSCRIPTION_STATUS_UNSPECIFIED"
9645 }
9646 Self::OperationsSubscriptionStatusSuccess => {
9647 "OPERATIONS_SUBSCRIPTION_STATUS_SUCCESS"
9648 }
9649 Self::OperationsSubscriptionStatusAccountNotFound => {
9650 "OPERATIONS_SUBSCRIPTION_STATUS_ACCOUNT_NOT_FOUND"
9651 }
9652 Self::OperationsSubscriptionStatusInternalError => {
9653 "OPERATIONS_SUBSCRIPTION_STATUS_INTERNAL_ERROR"
9654 }
9655 }
9656 }
9657 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
9659 match value {
9660 "OPERATIONS_SUBSCRIPTION_STATUS_UNSPECIFIED" => {
9661 Some(Self::OperationsSubscriptionStatusUnspecified)
9662 }
9663 "OPERATIONS_SUBSCRIPTION_STATUS_SUCCESS" => {
9664 Some(Self::OperationsSubscriptionStatusSuccess)
9665 }
9666 "OPERATIONS_SUBSCRIPTION_STATUS_ACCOUNT_NOT_FOUND" => {
9667 Some(Self::OperationsSubscriptionStatusAccountNotFound)
9668 }
9669 "OPERATIONS_SUBSCRIPTION_STATUS_INTERNAL_ERROR" => {
9670 Some(Self::OperationsSubscriptionStatusInternalError)
9671 }
9672 _ => None,
9673 }
9674 }
9675}
9676pub mod operations_service_client {
9678 #![allow(
9679 unused_variables,
9680 dead_code,
9681 missing_docs,
9682 clippy::wildcard_imports,
9683 clippy::let_unit_value,
9684 )]
9685 use tonic::codegen::*;
9686 use tonic::codegen::http::Uri;
9687 #[derive(Debug, Clone)]
9688 pub struct OperationsServiceClient<T> {
9689 inner: tonic::client::Grpc<T>,
9690 }
9691 impl OperationsServiceClient<tonic::transport::Channel> {
9692 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
9694 where
9695 D: TryInto<tonic::transport::Endpoint>,
9696 D::Error: Into<StdError>,
9697 {
9698 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
9699 Ok(Self::new(conn))
9700 }
9701 }
9702 impl<T> OperationsServiceClient<T>
9703 where
9704 T: tonic::client::GrpcService<tonic::body::Body>,
9705 T::Error: Into<StdError>,
9706 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
9707 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
9708 {
9709 pub fn new(inner: T) -> Self {
9710 let inner = tonic::client::Grpc::new(inner);
9711 Self { inner }
9712 }
9713 pub fn with_origin(inner: T, origin: Uri) -> Self {
9714 let inner = tonic::client::Grpc::with_origin(inner, origin);
9715 Self { inner }
9716 }
9717 pub fn with_interceptor<F>(
9718 inner: T,
9719 interceptor: F,
9720 ) -> OperationsServiceClient<InterceptedService<T, F>>
9721 where
9722 F: tonic::service::Interceptor,
9723 T::ResponseBody: Default,
9724 T: tonic::codegen::Service<
9725 http::Request<tonic::body::Body>,
9726 Response = http::Response<
9727 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
9728 >,
9729 >,
9730 <T as tonic::codegen::Service<
9731 http::Request<tonic::body::Body>,
9732 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
9733 {
9734 OperationsServiceClient::new(InterceptedService::new(inner, interceptor))
9735 }
9736 #[must_use]
9741 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
9742 self.inner = self.inner.send_compressed(encoding);
9743 self
9744 }
9745 #[must_use]
9747 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
9748 self.inner = self.inner.accept_compressed(encoding);
9749 self
9750 }
9751 #[must_use]
9755 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
9756 self.inner = self.inner.max_decoding_message_size(limit);
9757 self
9758 }
9759 #[must_use]
9763 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
9764 self.inner = self.inner.max_encoding_message_size(limit);
9765 self
9766 }
9767 pub async fn get_operations(
9770 &mut self,
9771 request: impl tonic::IntoRequest<super::OperationsRequest>,
9772 ) -> std::result::Result<
9773 tonic::Response<super::OperationsResponse>,
9774 tonic::Status,
9775 > {
9776 self.inner
9777 .ready()
9778 .await
9779 .map_err(|e| {
9780 tonic::Status::unknown(
9781 format!("Service was not ready: {}", e.into()),
9782 )
9783 })?;
9784 let codec = tonic_prost::ProstCodec::default();
9785 let path = http::uri::PathAndQuery::from_static(
9786 "/tinkoff.public.invest.api.contract.v1.OperationsService/GetOperations",
9787 );
9788 let mut req = request.into_request();
9789 req.extensions_mut()
9790 .insert(
9791 GrpcMethod::new(
9792 "tinkoff.public.invest.api.contract.v1.OperationsService",
9793 "GetOperations",
9794 ),
9795 );
9796 self.inner.unary(req, path, codec).await
9797 }
9798 pub async fn get_portfolio(
9800 &mut self,
9801 request: impl tonic::IntoRequest<super::PortfolioRequest>,
9802 ) -> std::result::Result<
9803 tonic::Response<super::PortfolioResponse>,
9804 tonic::Status,
9805 > {
9806 self.inner
9807 .ready()
9808 .await
9809 .map_err(|e| {
9810 tonic::Status::unknown(
9811 format!("Service was not ready: {}", e.into()),
9812 )
9813 })?;
9814 let codec = tonic_prost::ProstCodec::default();
9815 let path = http::uri::PathAndQuery::from_static(
9816 "/tinkoff.public.invest.api.contract.v1.OperationsService/GetPortfolio",
9817 );
9818 let mut req = request.into_request();
9819 req.extensions_mut()
9820 .insert(
9821 GrpcMethod::new(
9822 "tinkoff.public.invest.api.contract.v1.OperationsService",
9823 "GetPortfolio",
9824 ),
9825 );
9826 self.inner.unary(req, path, codec).await
9827 }
9828 pub async fn get_positions(
9830 &mut self,
9831 request: impl tonic::IntoRequest<super::PositionsRequest>,
9832 ) -> std::result::Result<
9833 tonic::Response<super::PositionsResponse>,
9834 tonic::Status,
9835 > {
9836 self.inner
9837 .ready()
9838 .await
9839 .map_err(|e| {
9840 tonic::Status::unknown(
9841 format!("Service was not ready: {}", e.into()),
9842 )
9843 })?;
9844 let codec = tonic_prost::ProstCodec::default();
9845 let path = http::uri::PathAndQuery::from_static(
9846 "/tinkoff.public.invest.api.contract.v1.OperationsService/GetPositions",
9847 );
9848 let mut req = request.into_request();
9849 req.extensions_mut()
9850 .insert(
9851 GrpcMethod::new(
9852 "tinkoff.public.invest.api.contract.v1.OperationsService",
9853 "GetPositions",
9854 ),
9855 );
9856 self.inner.unary(req, path, codec).await
9857 }
9858 pub async fn get_withdraw_limits(
9860 &mut self,
9861 request: impl tonic::IntoRequest<super::WithdrawLimitsRequest>,
9862 ) -> std::result::Result<
9863 tonic::Response<super::WithdrawLimitsResponse>,
9864 tonic::Status,
9865 > {
9866 self.inner
9867 .ready()
9868 .await
9869 .map_err(|e| {
9870 tonic::Status::unknown(
9871 format!("Service was not ready: {}", e.into()),
9872 )
9873 })?;
9874 let codec = tonic_prost::ProstCodec::default();
9875 let path = http::uri::PathAndQuery::from_static(
9876 "/tinkoff.public.invest.api.contract.v1.OperationsService/GetWithdrawLimits",
9877 );
9878 let mut req = request.into_request();
9879 req.extensions_mut()
9880 .insert(
9881 GrpcMethod::new(
9882 "tinkoff.public.invest.api.contract.v1.OperationsService",
9883 "GetWithdrawLimits",
9884 ),
9885 );
9886 self.inner.unary(req, path, codec).await
9887 }
9888 pub async fn get_broker_report(
9890 &mut self,
9891 request: impl tonic::IntoRequest<super::BrokerReportRequest>,
9892 ) -> std::result::Result<
9893 tonic::Response<super::BrokerReportResponse>,
9894 tonic::Status,
9895 > {
9896 self.inner
9897 .ready()
9898 .await
9899 .map_err(|e| {
9900 tonic::Status::unknown(
9901 format!("Service was not ready: {}", e.into()),
9902 )
9903 })?;
9904 let codec = tonic_prost::ProstCodec::default();
9905 let path = http::uri::PathAndQuery::from_static(
9906 "/tinkoff.public.invest.api.contract.v1.OperationsService/GetBrokerReport",
9907 );
9908 let mut req = request.into_request();
9909 req.extensions_mut()
9910 .insert(
9911 GrpcMethod::new(
9912 "tinkoff.public.invest.api.contract.v1.OperationsService",
9913 "GetBrokerReport",
9914 ),
9915 );
9916 self.inner.unary(req, path, codec).await
9917 }
9918 pub async fn get_dividends_foreign_issuer(
9920 &mut self,
9921 request: impl tonic::IntoRequest<super::GetDividendsForeignIssuerRequest>,
9922 ) -> std::result::Result<
9923 tonic::Response<super::GetDividendsForeignIssuerResponse>,
9924 tonic::Status,
9925 > {
9926 self.inner
9927 .ready()
9928 .await
9929 .map_err(|e| {
9930 tonic::Status::unknown(
9931 format!("Service was not ready: {}", e.into()),
9932 )
9933 })?;
9934 let codec = tonic_prost::ProstCodec::default();
9935 let path = http::uri::PathAndQuery::from_static(
9936 "/tinkoff.public.invest.api.contract.v1.OperationsService/GetDividendsForeignIssuer",
9937 );
9938 let mut req = request.into_request();
9939 req.extensions_mut()
9940 .insert(
9941 GrpcMethod::new(
9942 "tinkoff.public.invest.api.contract.v1.OperationsService",
9943 "GetDividendsForeignIssuer",
9944 ),
9945 );
9946 self.inner.unary(req, path, codec).await
9947 }
9948 pub async fn get_operations_by_cursor(
9951 &mut self,
9952 request: impl tonic::IntoRequest<super::GetOperationsByCursorRequest>,
9953 ) -> std::result::Result<
9954 tonic::Response<super::GetOperationsByCursorResponse>,
9955 tonic::Status,
9956 > {
9957 self.inner
9958 .ready()
9959 .await
9960 .map_err(|e| {
9961 tonic::Status::unknown(
9962 format!("Service was not ready: {}", e.into()),
9963 )
9964 })?;
9965 let codec = tonic_prost::ProstCodec::default();
9966 let path = http::uri::PathAndQuery::from_static(
9967 "/tinkoff.public.invest.api.contract.v1.OperationsService/GetOperationsByCursor",
9968 );
9969 let mut req = request.into_request();
9970 req.extensions_mut()
9971 .insert(
9972 GrpcMethod::new(
9973 "tinkoff.public.invest.api.contract.v1.OperationsService",
9974 "GetOperationsByCursor",
9975 ),
9976 );
9977 self.inner.unary(req, path, codec).await
9978 }
9979 }
9980}
9981pub mod operations_stream_service_client {
9983 #![allow(
9984 unused_variables,
9985 dead_code,
9986 missing_docs,
9987 clippy::wildcard_imports,
9988 clippy::let_unit_value,
9989 )]
9990 use tonic::codegen::*;
9991 use tonic::codegen::http::Uri;
9992 #[derive(Debug, Clone)]
9993 pub struct OperationsStreamServiceClient<T> {
9994 inner: tonic::client::Grpc<T>,
9995 }
9996 impl OperationsStreamServiceClient<tonic::transport::Channel> {
9997 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
9999 where
10000 D: TryInto<tonic::transport::Endpoint>,
10001 D::Error: Into<StdError>,
10002 {
10003 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
10004 Ok(Self::new(conn))
10005 }
10006 }
10007 impl<T> OperationsStreamServiceClient<T>
10008 where
10009 T: tonic::client::GrpcService<tonic::body::Body>,
10010 T::Error: Into<StdError>,
10011 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
10012 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
10013 {
10014 pub fn new(inner: T) -> Self {
10015 let inner = tonic::client::Grpc::new(inner);
10016 Self { inner }
10017 }
10018 pub fn with_origin(inner: T, origin: Uri) -> Self {
10019 let inner = tonic::client::Grpc::with_origin(inner, origin);
10020 Self { inner }
10021 }
10022 pub fn with_interceptor<F>(
10023 inner: T,
10024 interceptor: F,
10025 ) -> OperationsStreamServiceClient<InterceptedService<T, F>>
10026 where
10027 F: tonic::service::Interceptor,
10028 T::ResponseBody: Default,
10029 T: tonic::codegen::Service<
10030 http::Request<tonic::body::Body>,
10031 Response = http::Response<
10032 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
10033 >,
10034 >,
10035 <T as tonic::codegen::Service<
10036 http::Request<tonic::body::Body>,
10037 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
10038 {
10039 OperationsStreamServiceClient::new(
10040 InterceptedService::new(inner, interceptor),
10041 )
10042 }
10043 #[must_use]
10048 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
10049 self.inner = self.inner.send_compressed(encoding);
10050 self
10051 }
10052 #[must_use]
10054 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
10055 self.inner = self.inner.accept_compressed(encoding);
10056 self
10057 }
10058 #[must_use]
10062 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
10063 self.inner = self.inner.max_decoding_message_size(limit);
10064 self
10065 }
10066 #[must_use]
10070 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
10071 self.inner = self.inner.max_encoding_message_size(limit);
10072 self
10073 }
10074 pub async fn portfolio_stream(
10076 &mut self,
10077 request: impl tonic::IntoRequest<super::PortfolioStreamRequest>,
10078 ) -> std::result::Result<
10079 tonic::Response<tonic::codec::Streaming<super::PortfolioStreamResponse>>,
10080 tonic::Status,
10081 > {
10082 self.inner
10083 .ready()
10084 .await
10085 .map_err(|e| {
10086 tonic::Status::unknown(
10087 format!("Service was not ready: {}", e.into()),
10088 )
10089 })?;
10090 let codec = tonic_prost::ProstCodec::default();
10091 let path = http::uri::PathAndQuery::from_static(
10092 "/tinkoff.public.invest.api.contract.v1.OperationsStreamService/PortfolioStream",
10093 );
10094 let mut req = request.into_request();
10095 req.extensions_mut()
10096 .insert(
10097 GrpcMethod::new(
10098 "tinkoff.public.invest.api.contract.v1.OperationsStreamService",
10099 "PortfolioStream",
10100 ),
10101 );
10102 self.inner.server_streaming(req, path, codec).await
10103 }
10104 pub async fn positions_stream(
10106 &mut self,
10107 request: impl tonic::IntoRequest<super::PositionsStreamRequest>,
10108 ) -> std::result::Result<
10109 tonic::Response<tonic::codec::Streaming<super::PositionsStreamResponse>>,
10110 tonic::Status,
10111 > {
10112 self.inner
10113 .ready()
10114 .await
10115 .map_err(|e| {
10116 tonic::Status::unknown(
10117 format!("Service was not ready: {}", e.into()),
10118 )
10119 })?;
10120 let codec = tonic_prost::ProstCodec::default();
10121 let path = http::uri::PathAndQuery::from_static(
10122 "/tinkoff.public.invest.api.contract.v1.OperationsStreamService/PositionsStream",
10123 );
10124 let mut req = request.into_request();
10125 req.extensions_mut()
10126 .insert(
10127 GrpcMethod::new(
10128 "tinkoff.public.invest.api.contract.v1.OperationsStreamService",
10129 "PositionsStream",
10130 ),
10131 );
10132 self.inner.server_streaming(req, path, codec).await
10133 }
10134 pub async fn operations_stream(
10136 &mut self,
10137 request: impl tonic::IntoRequest<super::OperationsStreamRequest>,
10138 ) -> std::result::Result<
10139 tonic::Response<tonic::codec::Streaming<super::OperationsStreamResponse>>,
10140 tonic::Status,
10141 > {
10142 self.inner
10143 .ready()
10144 .await
10145 .map_err(|e| {
10146 tonic::Status::unknown(
10147 format!("Service was not ready: {}", e.into()),
10148 )
10149 })?;
10150 let codec = tonic_prost::ProstCodec::default();
10151 let path = http::uri::PathAndQuery::from_static(
10152 "/tinkoff.public.invest.api.contract.v1.OperationsStreamService/OperationsStream",
10153 );
10154 let mut req = request.into_request();
10155 req.extensions_mut()
10156 .insert(
10157 GrpcMethod::new(
10158 "tinkoff.public.invest.api.contract.v1.OperationsStreamService",
10159 "OperationsStream",
10160 ),
10161 );
10162 self.inner.server_streaming(req, path, codec).await
10163 }
10164 }
10165}
10166#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10168pub struct TradesStreamRequest {
10169 #[prost(string, repeated, tag = "1")]
10171 pub accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10172 #[prost(int32, optional, tag = "15")]
10174 pub ping_delay_ms: ::core::option::Option<i32>,
10175}
10176#[derive(Clone, PartialEq, ::prost::Message)]
10178pub struct TradesStreamResponse {
10179 #[prost(oneof = "trades_stream_response::Payload", tags = "1, 2, 3")]
10180 pub payload: ::core::option::Option<trades_stream_response::Payload>,
10181}
10182pub mod trades_stream_response {
10184 #[derive(Clone, PartialEq, ::prost::Oneof)]
10185 pub enum Payload {
10186 #[prost(message, tag = "1")]
10188 OrderTrades(super::OrderTrades),
10189 #[prost(message, tag = "2")]
10191 Ping(super::Ping),
10192 #[prost(message, tag = "3")]
10194 Subscription(super::SubscriptionResponse),
10195 }
10196}
10197#[derive(Clone, PartialEq, ::prost::Message)]
10199pub struct OrderTrades {
10200 #[prost(string, tag = "1")]
10202 pub order_id: ::prost::alloc::string::String,
10203 #[prost(message, optional, tag = "2")]
10205 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
10206 #[prost(enumeration = "OrderDirection", tag = "3")]
10208 pub direction: i32,
10209 #[prost(string, tag = "4")]
10211 pub figi: ::prost::alloc::string::String,
10212 #[prost(message, repeated, tag = "5")]
10214 pub trades: ::prost::alloc::vec::Vec<OrderTrade>,
10215 #[prost(string, tag = "6")]
10217 pub account_id: ::prost::alloc::string::String,
10218 #[prost(string, tag = "7")]
10220 pub instrument_uid: ::prost::alloc::string::String,
10221}
10222#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10224pub struct OrderTrade {
10225 #[prost(message, optional, tag = "1")]
10227 pub date_time: ::core::option::Option<::prost_types::Timestamp>,
10228 #[prost(message, optional, tag = "2")]
10230 pub price: ::core::option::Option<Quotation>,
10231 #[prost(int64, tag = "3")]
10233 pub quantity: i64,
10234 #[prost(string, tag = "4")]
10236 pub trade_id: ::prost::alloc::string::String,
10237}
10238#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10240pub struct PostOrderRequest {
10241 #[deprecated]
10243 #[prost(string, optional, tag = "1")]
10244 pub figi: ::core::option::Option<::prost::alloc::string::String>,
10245 #[prost(int64, tag = "2")]
10247 pub quantity: i64,
10248 #[prost(message, optional, tag = "3")]
10250 pub price: ::core::option::Option<Quotation>,
10251 #[prost(enumeration = "OrderDirection", tag = "4")]
10253 pub direction: i32,
10254 #[prost(string, tag = "5")]
10256 pub account_id: ::prost::alloc::string::String,
10257 #[prost(enumeration = "OrderType", tag = "6")]
10259 pub order_type: i32,
10260 #[prost(string, tag = "7")]
10262 pub order_id: ::prost::alloc::string::String,
10263 #[prost(string, tag = "8")]
10265 pub instrument_id: ::prost::alloc::string::String,
10266 #[prost(enumeration = "TimeInForceType", tag = "9")]
10268 pub time_in_force: i32,
10269 #[prost(enumeration = "PriceType", tag = "10")]
10271 pub price_type: i32,
10272 #[prost(bool, tag = "11")]
10274 pub confirm_margin_trade: bool,
10275}
10276#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10278pub struct PostOrderResponse {
10279 #[prost(string, tag = "1")]
10281 pub order_id: ::prost::alloc::string::String,
10282 #[prost(enumeration = "OrderExecutionReportStatus", tag = "2")]
10284 pub execution_report_status: i32,
10285 #[prost(int64, tag = "3")]
10287 pub lots_requested: i64,
10288 #[prost(int64, tag = "4")]
10290 pub lots_executed: i64,
10291 #[prost(message, optional, tag = "5")]
10293 pub initial_order_price: ::core::option::Option<MoneyValue>,
10294 #[prost(message, optional, tag = "6")]
10296 pub executed_order_price: ::core::option::Option<MoneyValue>,
10297 #[prost(message, optional, tag = "7")]
10299 pub total_order_amount: ::core::option::Option<MoneyValue>,
10300 #[prost(message, optional, tag = "8")]
10302 pub initial_commission: ::core::option::Option<MoneyValue>,
10303 #[prost(message, optional, tag = "9")]
10305 pub executed_commission: ::core::option::Option<MoneyValue>,
10306 #[prost(message, optional, tag = "10")]
10308 pub aci_value: ::core::option::Option<MoneyValue>,
10309 #[prost(string, tag = "11")]
10311 pub figi: ::prost::alloc::string::String,
10312 #[prost(enumeration = "OrderDirection", tag = "12")]
10314 pub direction: i32,
10315 #[prost(message, optional, tag = "13")]
10317 pub initial_security_price: ::core::option::Option<MoneyValue>,
10318 #[prost(enumeration = "OrderType", tag = "14")]
10320 pub order_type: i32,
10321 #[prost(string, tag = "15")]
10323 pub message: ::prost::alloc::string::String,
10324 #[prost(message, optional, tag = "16")]
10326 pub initial_order_price_pt: ::core::option::Option<Quotation>,
10327 #[prost(string, tag = "17")]
10329 pub instrument_uid: ::prost::alloc::string::String,
10330 #[prost(string, tag = "18")]
10332 pub ticker: ::prost::alloc::string::String,
10333 #[prost(string, tag = "19")]
10335 pub class_code: ::prost::alloc::string::String,
10336 #[prost(string, tag = "20")]
10338 pub order_request_id: ::prost::alloc::string::String,
10339 #[prost(message, optional, tag = "254")]
10341 pub response_metadata: ::core::option::Option<ResponseMetadata>,
10342}
10343#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10345pub struct PostOrderAsyncRequest {
10346 #[prost(string, tag = "1")]
10348 pub instrument_id: ::prost::alloc::string::String,
10349 #[prost(int64, tag = "2")]
10351 pub quantity: i64,
10352 #[prost(message, optional, tag = "3")]
10354 pub price: ::core::option::Option<Quotation>,
10355 #[prost(enumeration = "OrderDirection", tag = "4")]
10357 pub direction: i32,
10358 #[prost(string, tag = "5")]
10360 pub account_id: ::prost::alloc::string::String,
10361 #[prost(enumeration = "OrderType", tag = "6")]
10363 pub order_type: i32,
10364 #[prost(string, tag = "7")]
10366 pub order_id: ::prost::alloc::string::String,
10367 #[prost(enumeration = "TimeInForceType", optional, tag = "8")]
10369 pub time_in_force: ::core::option::Option<i32>,
10370 #[prost(enumeration = "PriceType", optional, tag = "9")]
10372 pub price_type: ::core::option::Option<i32>,
10373 #[prost(bool, tag = "10")]
10375 pub confirm_margin_trade: bool,
10376}
10377#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10379pub struct PostOrderAsyncResponse {
10380 #[prost(string, tag = "1")]
10382 pub order_request_id: ::prost::alloc::string::String,
10383 #[prost(enumeration = "OrderExecutionReportStatus", tag = "2")]
10385 pub execution_report_status: i32,
10386 #[prost(string, optional, tag = "3")]
10388 pub trade_intent_id: ::core::option::Option<::prost::alloc::string::String>,
10389}
10390#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10392pub struct CancelOrderRequest {
10393 #[prost(string, tag = "1")]
10395 pub account_id: ::prost::alloc::string::String,
10396 #[prost(string, tag = "2")]
10398 pub order_id: ::prost::alloc::string::String,
10399 #[prost(enumeration = "OrderIdType", optional, tag = "3")]
10401 pub order_id_type: ::core::option::Option<i32>,
10402}
10403#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10405pub struct CancelOrderResponse {
10406 #[prost(message, optional, tag = "1")]
10408 pub time: ::core::option::Option<::prost_types::Timestamp>,
10409 #[prost(message, optional, tag = "254")]
10411 pub response_metadata: ::core::option::Option<ResponseMetadata>,
10412}
10413#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10415pub struct GetOrderStateRequest {
10416 #[prost(string, tag = "1")]
10418 pub account_id: ::prost::alloc::string::String,
10419 #[prost(string, tag = "2")]
10421 pub order_id: ::prost::alloc::string::String,
10422 #[prost(enumeration = "PriceType", tag = "3")]
10424 pub price_type: i32,
10425 #[prost(enumeration = "OrderIdType", optional, tag = "4")]
10427 pub order_id_type: ::core::option::Option<i32>,
10428}
10429#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10431pub struct GetOrdersRequest {
10432 #[prost(string, tag = "1")]
10434 pub account_id: ::prost::alloc::string::String,
10435 #[prost(message, optional, tag = "2")]
10437 pub advanced_filters: ::core::option::Option<
10438 get_orders_request::GetOrdersRequestFilters,
10439 >,
10440}
10441pub mod get_orders_request {
10443 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10444 pub struct GetOrdersRequestFilters {
10445 #[prost(message, optional, tag = "1")]
10447 pub from: ::core::option::Option<::prost_types::Timestamp>,
10448 #[prost(message, optional, tag = "2")]
10450 pub to: ::core::option::Option<::prost_types::Timestamp>,
10451 #[prost(enumeration = "super::OrderExecutionReportStatus", repeated, tag = "3")]
10453 pub execution_status: ::prost::alloc::vec::Vec<i32>,
10454 }
10455}
10456#[derive(Clone, PartialEq, ::prost::Message)]
10458pub struct GetOrdersResponse {
10459 #[prost(message, repeated, tag = "1")]
10461 pub orders: ::prost::alloc::vec::Vec<OrderState>,
10462}
10463#[derive(Clone, PartialEq, ::prost::Message)]
10465pub struct OrderState {
10466 #[prost(string, tag = "1")]
10468 pub order_id: ::prost::alloc::string::String,
10469 #[prost(enumeration = "OrderExecutionReportStatus", tag = "2")]
10471 pub execution_report_status: i32,
10472 #[prost(int64, tag = "3")]
10474 pub lots_requested: i64,
10475 #[prost(int64, tag = "4")]
10477 pub lots_executed: i64,
10478 #[prost(message, optional, tag = "5")]
10480 pub initial_order_price: ::core::option::Option<MoneyValue>,
10481 #[prost(message, optional, tag = "6")]
10483 pub executed_order_price: ::core::option::Option<MoneyValue>,
10484 #[prost(message, optional, tag = "7")]
10486 pub total_order_amount: ::core::option::Option<MoneyValue>,
10487 #[prost(message, optional, tag = "8")]
10489 pub average_position_price: ::core::option::Option<MoneyValue>,
10490 #[prost(message, optional, tag = "9")]
10492 pub initial_commission: ::core::option::Option<MoneyValue>,
10493 #[prost(message, optional, tag = "10")]
10495 pub executed_commission: ::core::option::Option<MoneyValue>,
10496 #[prost(string, tag = "11")]
10498 pub figi: ::prost::alloc::string::String,
10499 #[prost(enumeration = "OrderDirection", tag = "12")]
10501 pub direction: i32,
10502 #[prost(message, optional, tag = "13")]
10504 pub initial_security_price: ::core::option::Option<MoneyValue>,
10505 #[prost(message, repeated, tag = "14")]
10507 pub stages: ::prost::alloc::vec::Vec<OrderStage>,
10508 #[prost(message, optional, tag = "15")]
10510 pub service_commission: ::core::option::Option<MoneyValue>,
10511 #[prost(string, tag = "16")]
10513 pub currency: ::prost::alloc::string::String,
10514 #[prost(enumeration = "OrderType", tag = "17")]
10516 pub order_type: i32,
10517 #[prost(message, optional, tag = "18")]
10519 pub order_date: ::core::option::Option<::prost_types::Timestamp>,
10520 #[prost(string, tag = "19")]
10522 pub instrument_uid: ::prost::alloc::string::String,
10523 #[prost(string, tag = "20")]
10525 pub order_request_id: ::prost::alloc::string::String,
10526 #[prost(string, tag = "21")]
10528 pub ticker: ::prost::alloc::string::String,
10529 #[prost(string, tag = "22")]
10531 pub class_code: ::prost::alloc::string::String,
10532}
10533#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10535pub struct OrderStage {
10536 #[prost(message, optional, tag = "1")]
10538 pub price: ::core::option::Option<MoneyValue>,
10539 #[prost(int64, tag = "2")]
10541 pub quantity: i64,
10542 #[prost(string, tag = "3")]
10544 pub trade_id: ::prost::alloc::string::String,
10545 #[prost(message, optional, tag = "5")]
10547 pub execution_time: ::core::option::Option<::prost_types::Timestamp>,
10548}
10549#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10551pub struct ReplaceOrderRequest {
10552 #[prost(string, tag = "1")]
10554 pub account_id: ::prost::alloc::string::String,
10555 #[prost(enumeration = "OrderIdType", optional, tag = "5")]
10557 pub order_id_type: ::core::option::Option<i32>,
10558 #[prost(string, tag = "6")]
10560 pub order_id: ::prost::alloc::string::String,
10561 #[prost(string, tag = "7")]
10563 pub idempotency_key: ::prost::alloc::string::String,
10564 #[prost(int64, tag = "11")]
10566 pub quantity: i64,
10567 #[prost(message, optional, tag = "12")]
10569 pub price: ::core::option::Option<Quotation>,
10570 #[prost(enumeration = "PriceType", optional, tag = "13")]
10572 pub price_type: ::core::option::Option<i32>,
10573 #[prost(bool, tag = "14")]
10575 pub confirm_margin_trade: bool,
10576}
10577#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10579pub struct GetMaxLotsRequest {
10580 #[prost(string, tag = "1")]
10582 pub account_id: ::prost::alloc::string::String,
10583 #[prost(string, tag = "2")]
10585 pub instrument_id: ::prost::alloc::string::String,
10586 #[prost(message, optional, tag = "3")]
10588 pub price: ::core::option::Option<Quotation>,
10589}
10590#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10592pub struct GetMaxLotsResponse {
10593 #[prost(string, tag = "1")]
10595 pub currency: ::prost::alloc::string::String,
10596 #[prost(message, optional, tag = "2")]
10598 pub buy_limits: ::core::option::Option<get_max_lots_response::BuyLimitsView>,
10599 #[prost(message, optional, tag = "3")]
10601 pub buy_margin_limits: ::core::option::Option<get_max_lots_response::BuyLimitsView>,
10602 #[prost(message, optional, tag = "4")]
10604 pub sell_limits: ::core::option::Option<get_max_lots_response::SellLimitsView>,
10605 #[prost(message, optional, tag = "5")]
10607 pub sell_margin_limits: ::core::option::Option<
10608 get_max_lots_response::SellLimitsView,
10609 >,
10610}
10611pub mod get_max_lots_response {
10613 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
10614 pub struct BuyLimitsView {
10615 #[prost(message, optional, tag = "1")]
10617 pub buy_money_amount: ::core::option::Option<super::Quotation>,
10618 #[prost(int64, tag = "2")]
10620 pub buy_max_lots: i64,
10621 #[prost(int64, tag = "3")]
10623 pub buy_max_market_lots: i64,
10624 }
10625 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
10626 pub struct SellLimitsView {
10627 #[prost(int64, tag = "1")]
10629 pub sell_max_lots: i64,
10630 }
10631}
10632#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10634pub struct GetOrderPriceRequest {
10635 #[prost(string, tag = "1")]
10637 pub account_id: ::prost::alloc::string::String,
10638 #[prost(string, tag = "2")]
10640 pub instrument_id: ::prost::alloc::string::String,
10641 #[prost(message, optional, tag = "3")]
10643 pub price: ::core::option::Option<Quotation>,
10644 #[prost(enumeration = "OrderDirection", tag = "12")]
10646 pub direction: i32,
10647 #[prost(int64, tag = "13")]
10649 pub quantity: i64,
10650}
10651#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10653pub struct GetOrderPriceResponse {
10654 #[prost(message, optional, tag = "1")]
10656 pub total_order_amount: ::core::option::Option<MoneyValue>,
10657 #[prost(message, optional, tag = "5")]
10659 pub initial_order_amount: ::core::option::Option<MoneyValue>,
10660 #[prost(int64, tag = "3")]
10662 pub lots_requested: i64,
10663 #[prost(message, optional, tag = "7")]
10665 pub executed_commission: ::core::option::Option<MoneyValue>,
10666 #[prost(message, optional, tag = "8")]
10668 pub executed_commission_rub: ::core::option::Option<MoneyValue>,
10669 #[prost(message, optional, tag = "9")]
10671 pub service_commission: ::core::option::Option<MoneyValue>,
10672 #[prost(message, optional, tag = "10")]
10674 pub deal_commission: ::core::option::Option<MoneyValue>,
10675 #[prost(oneof = "get_order_price_response::InstrumentExtra", tags = "12, 13")]
10676 pub instrument_extra: ::core::option::Option<
10677 get_order_price_response::InstrumentExtra,
10678 >,
10679}
10680pub mod get_order_price_response {
10682 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10683 pub struct ExtraBond {
10684 #[prost(message, optional, tag = "2")]
10686 pub aci_value: ::core::option::Option<super::MoneyValue>,
10687 #[prost(message, optional, tag = "3")]
10689 pub nominal_conversion_rate: ::core::option::Option<super::Quotation>,
10690 }
10691 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10692 pub struct ExtraFuture {
10693 #[prost(message, optional, tag = "2")]
10695 pub initial_margin: ::core::option::Option<super::MoneyValue>,
10696 }
10697 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
10698 pub enum InstrumentExtra {
10699 #[prost(message, tag = "12")]
10701 ExtraBond(ExtraBond),
10702 #[prost(message, tag = "13")]
10704 ExtraFuture(ExtraFuture),
10705 }
10706}
10707#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10709pub struct OrderStateStreamRequest {
10710 #[prost(string, repeated, tag = "1")]
10712 pub accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10713 #[prost(int32, optional, tag = "15")]
10715 pub ping_delay_millis: ::core::option::Option<i32>,
10716}
10717#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10719pub struct SubscriptionResponse {
10720 #[prost(string, tag = "1")]
10722 pub tracking_id: ::prost::alloc::string::String,
10723 #[prost(enumeration = "ResultSubscriptionStatus", tag = "2")]
10725 pub status: i32,
10726 #[prost(string, tag = "4")]
10728 pub stream_id: ::prost::alloc::string::String,
10729 #[prost(string, repeated, tag = "5")]
10731 pub accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
10732 #[prost(message, optional, tag = "7")]
10733 pub error: ::core::option::Option<ErrorDetail>,
10734}
10735#[derive(Clone, PartialEq, ::prost::Message)]
10737pub struct OrderStateStreamResponse {
10738 #[prost(oneof = "order_state_stream_response::Payload", tags = "1, 2, 3")]
10739 pub payload: ::core::option::Option<order_state_stream_response::Payload>,
10740}
10741pub mod order_state_stream_response {
10743 #[derive(Clone, PartialEq, ::prost::Message)]
10745 pub struct OrderState {
10746 #[prost(string, tag = "1")]
10748 pub order_id: ::prost::alloc::string::String,
10749 #[prost(string, optional, tag = "2")]
10751 pub order_request_id: ::core::option::Option<::prost::alloc::string::String>,
10752 #[prost(string, tag = "3")]
10754 pub client_code: ::prost::alloc::string::String,
10755 #[prost(message, optional, tag = "4")]
10757 pub created_at: ::core::option::Option<::prost_types::Timestamp>,
10758 #[prost(enumeration = "super::OrderExecutionReportStatus", tag = "5")]
10760 pub execution_report_status: i32,
10761 #[prost(enumeration = "StatusCauseInfo", optional, tag = "6")]
10763 pub status_info: ::core::option::Option<i32>,
10764 #[prost(string, tag = "7")]
10766 pub ticker: ::prost::alloc::string::String,
10767 #[prost(string, tag = "8")]
10769 pub class_code: ::prost::alloc::string::String,
10770 #[prost(int32, tag = "9")]
10772 pub lot_size: i32,
10773 #[prost(enumeration = "super::OrderDirection", tag = "10")]
10775 pub direction: i32,
10776 #[prost(enumeration = "super::TimeInForceType", tag = "11")]
10778 pub time_in_force: i32,
10779 #[prost(enumeration = "super::OrderType", tag = "12")]
10781 pub order_type: i32,
10782 #[prost(string, tag = "13")]
10784 pub account_id: ::prost::alloc::string::String,
10785 #[prost(string, tag = "14")]
10787 pub trade_order_id: ::prost::alloc::string::String,
10788 #[prost(message, optional, tag = "22")]
10790 pub initial_order_price: ::core::option::Option<super::MoneyValue>,
10791 #[prost(message, optional, tag = "23")]
10793 pub order_price: ::core::option::Option<super::MoneyValue>,
10794 #[prost(message, optional, tag = "24")]
10796 pub amount: ::core::option::Option<super::MoneyValue>,
10797 #[prost(message, optional, tag = "25")]
10799 pub executed_order_price: ::core::option::Option<super::MoneyValue>,
10800 #[prost(string, tag = "26")]
10802 pub currency: ::prost::alloc::string::String,
10803 #[prost(int64, tag = "27")]
10805 pub lots_requested: i64,
10806 #[prost(int64, tag = "28")]
10808 pub lots_executed: i64,
10809 #[prost(int64, tag = "29")]
10811 pub lots_left: i64,
10812 #[prost(int64, tag = "30")]
10814 pub lots_cancelled: i64,
10815 #[prost(enumeration = "MarkerType", optional, tag = "31")]
10817 pub marker: ::core::option::Option<i32>,
10818 #[prost(message, repeated, tag = "33")]
10823 pub trades: ::prost::alloc::vec::Vec<super::OrderTrade>,
10824 #[prost(message, optional, tag = "35")]
10826 pub completion_time: ::core::option::Option<::prost_types::Timestamp>,
10827 #[prost(string, tag = "36")]
10829 pub exchange: ::prost::alloc::string::String,
10830 #[prost(string, tag = "41")]
10832 pub instrument_uid: ::prost::alloc::string::String,
10833 }
10834 #[derive(
10836 Clone,
10837 Copy,
10838 Debug,
10839 PartialEq,
10840 Eq,
10841 Hash,
10842 PartialOrd,
10843 Ord,
10844 ::prost::Enumeration
10845 )]
10846 #[repr(i32)]
10847 pub enum MarkerType {
10848 MarkerUnknown = 0,
10850 MarkerBroker = 1,
10852 MarkerChat = 2,
10854 MarkerPaper = 3,
10856 MarkerMargin = 4,
10858 MarkerTkbnm = 5,
10860 MarkerShort = 6,
10862 MarkerSpecmm = 7,
10864 MarkerPo = 8,
10865 }
10866 impl MarkerType {
10867 pub fn as_str_name(&self) -> &'static str {
10872 match self {
10873 Self::MarkerUnknown => "MARKER_UNKNOWN",
10874 Self::MarkerBroker => "MARKER_BROKER",
10875 Self::MarkerChat => "MARKER_CHAT",
10876 Self::MarkerPaper => "MARKER_PAPER",
10877 Self::MarkerMargin => "MARKER_MARGIN",
10878 Self::MarkerTkbnm => "MARKER_TKBNM",
10879 Self::MarkerShort => "MARKER_SHORT",
10880 Self::MarkerSpecmm => "MARKER_SPECMM",
10881 Self::MarkerPo => "MARKER_PO",
10882 }
10883 }
10884 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
10886 match value {
10887 "MARKER_UNKNOWN" => Some(Self::MarkerUnknown),
10888 "MARKER_BROKER" => Some(Self::MarkerBroker),
10889 "MARKER_CHAT" => Some(Self::MarkerChat),
10890 "MARKER_PAPER" => Some(Self::MarkerPaper),
10891 "MARKER_MARGIN" => Some(Self::MarkerMargin),
10892 "MARKER_TKBNM" => Some(Self::MarkerTkbnm),
10893 "MARKER_SHORT" => Some(Self::MarkerShort),
10894 "MARKER_SPECMM" => Some(Self::MarkerSpecmm),
10895 "MARKER_PO" => Some(Self::MarkerPo),
10896 _ => None,
10897 }
10898 }
10899 }
10900 #[derive(
10902 Clone,
10903 Copy,
10904 Debug,
10905 PartialEq,
10906 Eq,
10907 Hash,
10908 PartialOrd,
10909 Ord,
10910 ::prost::Enumeration
10911 )]
10912 #[repr(i32)]
10913 pub enum StatusCauseInfo {
10914 CauseUnspecified = 0,
10916 CauseCancelledByClient = 15,
10918 CauseCancelledByExchange = 1,
10920 CauseCancelledNotEnoughPosition = 2,
10922 CauseCancelledByClientBlock = 3,
10924 CauseRejectedByBroker = 4,
10926 CauseRejectedByExchange = 5,
10928 CauseCancelledByBroker = 6,
10930 }
10931 impl StatusCauseInfo {
10932 pub fn as_str_name(&self) -> &'static str {
10937 match self {
10938 Self::CauseUnspecified => "CAUSE_UNSPECIFIED",
10939 Self::CauseCancelledByClient => "CAUSE_CANCELLED_BY_CLIENT",
10940 Self::CauseCancelledByExchange => "CAUSE_CANCELLED_BY_EXCHANGE",
10941 Self::CauseCancelledNotEnoughPosition => {
10942 "CAUSE_CANCELLED_NOT_ENOUGH_POSITION"
10943 }
10944 Self::CauseCancelledByClientBlock => "CAUSE_CANCELLED_BY_CLIENT_BLOCK",
10945 Self::CauseRejectedByBroker => "CAUSE_REJECTED_BY_BROKER",
10946 Self::CauseRejectedByExchange => "CAUSE_REJECTED_BY_EXCHANGE",
10947 Self::CauseCancelledByBroker => "CAUSE_CANCELLED_BY_BROKER",
10948 }
10949 }
10950 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
10952 match value {
10953 "CAUSE_UNSPECIFIED" => Some(Self::CauseUnspecified),
10954 "CAUSE_CANCELLED_BY_CLIENT" => Some(Self::CauseCancelledByClient),
10955 "CAUSE_CANCELLED_BY_EXCHANGE" => Some(Self::CauseCancelledByExchange),
10956 "CAUSE_CANCELLED_NOT_ENOUGH_POSITION" => {
10957 Some(Self::CauseCancelledNotEnoughPosition)
10958 }
10959 "CAUSE_CANCELLED_BY_CLIENT_BLOCK" => {
10960 Some(Self::CauseCancelledByClientBlock)
10961 }
10962 "CAUSE_REJECTED_BY_BROKER" => Some(Self::CauseRejectedByBroker),
10963 "CAUSE_REJECTED_BY_EXCHANGE" => Some(Self::CauseRejectedByExchange),
10964 "CAUSE_CANCELLED_BY_BROKER" => Some(Self::CauseCancelledByBroker),
10965 _ => None,
10966 }
10967 }
10968 }
10969 #[derive(Clone, PartialEq, ::prost::Oneof)]
10970 pub enum Payload {
10971 #[prost(message, tag = "1")]
10973 OrderState(OrderState),
10974 #[prost(message, tag = "2")]
10976 Ping(super::Ping),
10977 #[prost(message, tag = "3")]
10979 Subscription(super::SubscriptionResponse),
10980 }
10981}
10982#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
10984#[repr(i32)]
10985pub enum OrderDirection {
10986 Unspecified = 0,
10988 Buy = 1,
10990 Sell = 2,
10992}
10993impl OrderDirection {
10994 pub fn as_str_name(&self) -> &'static str {
10999 match self {
11000 Self::Unspecified => "ORDER_DIRECTION_UNSPECIFIED",
11001 Self::Buy => "ORDER_DIRECTION_BUY",
11002 Self::Sell => "ORDER_DIRECTION_SELL",
11003 }
11004 }
11005 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
11007 match value {
11008 "ORDER_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
11009 "ORDER_DIRECTION_BUY" => Some(Self::Buy),
11010 "ORDER_DIRECTION_SELL" => Some(Self::Sell),
11011 _ => None,
11012 }
11013 }
11014}
11015#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
11017#[repr(i32)]
11018pub enum OrderType {
11019 Unspecified = 0,
11021 Limit = 1,
11023 Market = 2,
11025 Bestprice = 3,
11027}
11028impl OrderType {
11029 pub fn as_str_name(&self) -> &'static str {
11034 match self {
11035 Self::Unspecified => "ORDER_TYPE_UNSPECIFIED",
11036 Self::Limit => "ORDER_TYPE_LIMIT",
11037 Self::Market => "ORDER_TYPE_MARKET",
11038 Self::Bestprice => "ORDER_TYPE_BESTPRICE",
11039 }
11040 }
11041 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
11043 match value {
11044 "ORDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
11045 "ORDER_TYPE_LIMIT" => Some(Self::Limit),
11046 "ORDER_TYPE_MARKET" => Some(Self::Market),
11047 "ORDER_TYPE_BESTPRICE" => Some(Self::Bestprice),
11048 _ => None,
11049 }
11050 }
11051}
11052#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
11054#[repr(i32)]
11055pub enum OrderExecutionReportStatus {
11056 ExecutionReportStatusUnspecified = 0,
11057 ExecutionReportStatusFill = 1,
11059 ExecutionReportStatusRejected = 2,
11061 ExecutionReportStatusCancelled = 3,
11063 ExecutionReportStatusNew = 4,
11065 ExecutionReportStatusPartiallyfill = 5,
11067}
11068impl OrderExecutionReportStatus {
11069 pub fn as_str_name(&self) -> &'static str {
11074 match self {
11075 Self::ExecutionReportStatusUnspecified => {
11076 "EXECUTION_REPORT_STATUS_UNSPECIFIED"
11077 }
11078 Self::ExecutionReportStatusFill => "EXECUTION_REPORT_STATUS_FILL",
11079 Self::ExecutionReportStatusRejected => "EXECUTION_REPORT_STATUS_REJECTED",
11080 Self::ExecutionReportStatusCancelled => "EXECUTION_REPORT_STATUS_CANCELLED",
11081 Self::ExecutionReportStatusNew => "EXECUTION_REPORT_STATUS_NEW",
11082 Self::ExecutionReportStatusPartiallyfill => {
11083 "EXECUTION_REPORT_STATUS_PARTIALLYFILL"
11084 }
11085 }
11086 }
11087 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
11089 match value {
11090 "EXECUTION_REPORT_STATUS_UNSPECIFIED" => {
11091 Some(Self::ExecutionReportStatusUnspecified)
11092 }
11093 "EXECUTION_REPORT_STATUS_FILL" => Some(Self::ExecutionReportStatusFill),
11094 "EXECUTION_REPORT_STATUS_REJECTED" => {
11095 Some(Self::ExecutionReportStatusRejected)
11096 }
11097 "EXECUTION_REPORT_STATUS_CANCELLED" => {
11098 Some(Self::ExecutionReportStatusCancelled)
11099 }
11100 "EXECUTION_REPORT_STATUS_NEW" => Some(Self::ExecutionReportStatusNew),
11101 "EXECUTION_REPORT_STATUS_PARTIALLYFILL" => {
11102 Some(Self::ExecutionReportStatusPartiallyfill)
11103 }
11104 _ => None,
11105 }
11106 }
11107}
11108#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
11110#[repr(i32)]
11111pub enum TimeInForceType {
11112 TimeInForceUnspecified = 0,
11114 TimeInForceDay = 1,
11116 TimeInForceFillAndKill = 2,
11118 TimeInForceFillOrKill = 3,
11120}
11121impl TimeInForceType {
11122 pub fn as_str_name(&self) -> &'static str {
11127 match self {
11128 Self::TimeInForceUnspecified => "TIME_IN_FORCE_UNSPECIFIED",
11129 Self::TimeInForceDay => "TIME_IN_FORCE_DAY",
11130 Self::TimeInForceFillAndKill => "TIME_IN_FORCE_FILL_AND_KILL",
11131 Self::TimeInForceFillOrKill => "TIME_IN_FORCE_FILL_OR_KILL",
11132 }
11133 }
11134 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
11136 match value {
11137 "TIME_IN_FORCE_UNSPECIFIED" => Some(Self::TimeInForceUnspecified),
11138 "TIME_IN_FORCE_DAY" => Some(Self::TimeInForceDay),
11139 "TIME_IN_FORCE_FILL_AND_KILL" => Some(Self::TimeInForceFillAndKill),
11140 "TIME_IN_FORCE_FILL_OR_KILL" => Some(Self::TimeInForceFillOrKill),
11141 _ => None,
11142 }
11143 }
11144}
11145#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
11147#[repr(i32)]
11148pub enum OrderIdType {
11149 Unspecified = 0,
11151 Exchange = 1,
11153 Request = 2,
11155}
11156impl OrderIdType {
11157 pub fn as_str_name(&self) -> &'static str {
11162 match self {
11163 Self::Unspecified => "ORDER_ID_TYPE_UNSPECIFIED",
11164 Self::Exchange => "ORDER_ID_TYPE_EXCHANGE",
11165 Self::Request => "ORDER_ID_TYPE_REQUEST",
11166 }
11167 }
11168 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
11170 match value {
11171 "ORDER_ID_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
11172 "ORDER_ID_TYPE_EXCHANGE" => Some(Self::Exchange),
11173 "ORDER_ID_TYPE_REQUEST" => Some(Self::Request),
11174 _ => None,
11175 }
11176 }
11177}
11178pub mod orders_stream_service_client {
11180 #![allow(
11181 unused_variables,
11182 dead_code,
11183 missing_docs,
11184 clippy::wildcard_imports,
11185 clippy::let_unit_value,
11186 )]
11187 use tonic::codegen::*;
11188 use tonic::codegen::http::Uri;
11189 #[derive(Debug, Clone)]
11190 pub struct OrdersStreamServiceClient<T> {
11191 inner: tonic::client::Grpc<T>,
11192 }
11193 impl OrdersStreamServiceClient<tonic::transport::Channel> {
11194 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
11196 where
11197 D: TryInto<tonic::transport::Endpoint>,
11198 D::Error: Into<StdError>,
11199 {
11200 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
11201 Ok(Self::new(conn))
11202 }
11203 }
11204 impl<T> OrdersStreamServiceClient<T>
11205 where
11206 T: tonic::client::GrpcService<tonic::body::Body>,
11207 T::Error: Into<StdError>,
11208 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
11209 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
11210 {
11211 pub fn new(inner: T) -> Self {
11212 let inner = tonic::client::Grpc::new(inner);
11213 Self { inner }
11214 }
11215 pub fn with_origin(inner: T, origin: Uri) -> Self {
11216 let inner = tonic::client::Grpc::with_origin(inner, origin);
11217 Self { inner }
11218 }
11219 pub fn with_interceptor<F>(
11220 inner: T,
11221 interceptor: F,
11222 ) -> OrdersStreamServiceClient<InterceptedService<T, F>>
11223 where
11224 F: tonic::service::Interceptor,
11225 T::ResponseBody: Default,
11226 T: tonic::codegen::Service<
11227 http::Request<tonic::body::Body>,
11228 Response = http::Response<
11229 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
11230 >,
11231 >,
11232 <T as tonic::codegen::Service<
11233 http::Request<tonic::body::Body>,
11234 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
11235 {
11236 OrdersStreamServiceClient::new(InterceptedService::new(inner, interceptor))
11237 }
11238 #[must_use]
11243 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
11244 self.inner = self.inner.send_compressed(encoding);
11245 self
11246 }
11247 #[must_use]
11249 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
11250 self.inner = self.inner.accept_compressed(encoding);
11251 self
11252 }
11253 #[must_use]
11257 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
11258 self.inner = self.inner.max_decoding_message_size(limit);
11259 self
11260 }
11261 #[must_use]
11265 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
11266 self.inner = self.inner.max_encoding_message_size(limit);
11267 self
11268 }
11269 pub async fn trades_stream(
11271 &mut self,
11272 request: impl tonic::IntoRequest<super::TradesStreamRequest>,
11273 ) -> std::result::Result<
11274 tonic::Response<tonic::codec::Streaming<super::TradesStreamResponse>>,
11275 tonic::Status,
11276 > {
11277 self.inner
11278 .ready()
11279 .await
11280 .map_err(|e| {
11281 tonic::Status::unknown(
11282 format!("Service was not ready: {}", e.into()),
11283 )
11284 })?;
11285 let codec = tonic_prost::ProstCodec::default();
11286 let path = http::uri::PathAndQuery::from_static(
11287 "/tinkoff.public.invest.api.contract.v1.OrdersStreamService/TradesStream",
11288 );
11289 let mut req = request.into_request();
11290 req.extensions_mut()
11291 .insert(
11292 GrpcMethod::new(
11293 "tinkoff.public.invest.api.contract.v1.OrdersStreamService",
11294 "TradesStream",
11295 ),
11296 );
11297 self.inner.server_streaming(req, path, codec).await
11298 }
11299 pub async fn order_state_stream(
11302 &mut self,
11303 request: impl tonic::IntoRequest<super::OrderStateStreamRequest>,
11304 ) -> std::result::Result<
11305 tonic::Response<tonic::codec::Streaming<super::OrderStateStreamResponse>>,
11306 tonic::Status,
11307 > {
11308 self.inner
11309 .ready()
11310 .await
11311 .map_err(|e| {
11312 tonic::Status::unknown(
11313 format!("Service was not ready: {}", e.into()),
11314 )
11315 })?;
11316 let codec = tonic_prost::ProstCodec::default();
11317 let path = http::uri::PathAndQuery::from_static(
11318 "/tinkoff.public.invest.api.contract.v1.OrdersStreamService/OrderStateStream",
11319 );
11320 let mut req = request.into_request();
11321 req.extensions_mut()
11322 .insert(
11323 GrpcMethod::new(
11324 "tinkoff.public.invest.api.contract.v1.OrdersStreamService",
11325 "OrderStateStream",
11326 ),
11327 );
11328 self.inner.server_streaming(req, path, codec).await
11329 }
11330 }
11331}
11332pub mod orders_service_client {
11334 #![allow(
11335 unused_variables,
11336 dead_code,
11337 missing_docs,
11338 clippy::wildcard_imports,
11339 clippy::let_unit_value,
11340 )]
11341 use tonic::codegen::*;
11342 use tonic::codegen::http::Uri;
11343 #[derive(Debug, Clone)]
11344 pub struct OrdersServiceClient<T> {
11345 inner: tonic::client::Grpc<T>,
11346 }
11347 impl OrdersServiceClient<tonic::transport::Channel> {
11348 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
11350 where
11351 D: TryInto<tonic::transport::Endpoint>,
11352 D::Error: Into<StdError>,
11353 {
11354 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
11355 Ok(Self::new(conn))
11356 }
11357 }
11358 impl<T> OrdersServiceClient<T>
11359 where
11360 T: tonic::client::GrpcService<tonic::body::Body>,
11361 T::Error: Into<StdError>,
11362 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
11363 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
11364 {
11365 pub fn new(inner: T) -> Self {
11366 let inner = tonic::client::Grpc::new(inner);
11367 Self { inner }
11368 }
11369 pub fn with_origin(inner: T, origin: Uri) -> Self {
11370 let inner = tonic::client::Grpc::with_origin(inner, origin);
11371 Self { inner }
11372 }
11373 pub fn with_interceptor<F>(
11374 inner: T,
11375 interceptor: F,
11376 ) -> OrdersServiceClient<InterceptedService<T, F>>
11377 where
11378 F: tonic::service::Interceptor,
11379 T::ResponseBody: Default,
11380 T: tonic::codegen::Service<
11381 http::Request<tonic::body::Body>,
11382 Response = http::Response<
11383 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
11384 >,
11385 >,
11386 <T as tonic::codegen::Service<
11387 http::Request<tonic::body::Body>,
11388 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
11389 {
11390 OrdersServiceClient::new(InterceptedService::new(inner, interceptor))
11391 }
11392 #[must_use]
11397 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
11398 self.inner = self.inner.send_compressed(encoding);
11399 self
11400 }
11401 #[must_use]
11403 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
11404 self.inner = self.inner.accept_compressed(encoding);
11405 self
11406 }
11407 #[must_use]
11411 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
11412 self.inner = self.inner.max_decoding_message_size(limit);
11413 self
11414 }
11415 #[must_use]
11419 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
11420 self.inner = self.inner.max_encoding_message_size(limit);
11421 self
11422 }
11423 pub async fn post_order(
11425 &mut self,
11426 request: impl tonic::IntoRequest<super::PostOrderRequest>,
11427 ) -> std::result::Result<
11428 tonic::Response<super::PostOrderResponse>,
11429 tonic::Status,
11430 > {
11431 self.inner
11432 .ready()
11433 .await
11434 .map_err(|e| {
11435 tonic::Status::unknown(
11436 format!("Service was not ready: {}", e.into()),
11437 )
11438 })?;
11439 let codec = tonic_prost::ProstCodec::default();
11440 let path = http::uri::PathAndQuery::from_static(
11441 "/tinkoff.public.invest.api.contract.v1.OrdersService/PostOrder",
11442 );
11443 let mut req = request.into_request();
11444 req.extensions_mut()
11445 .insert(
11446 GrpcMethod::new(
11447 "tinkoff.public.invest.api.contract.v1.OrdersService",
11448 "PostOrder",
11449 ),
11450 );
11451 self.inner.unary(req, path, codec).await
11452 }
11453 pub async fn post_order_async(
11456 &mut self,
11457 request: impl tonic::IntoRequest<super::PostOrderAsyncRequest>,
11458 ) -> std::result::Result<
11459 tonic::Response<super::PostOrderAsyncResponse>,
11460 tonic::Status,
11461 > {
11462 self.inner
11463 .ready()
11464 .await
11465 .map_err(|e| {
11466 tonic::Status::unknown(
11467 format!("Service was not ready: {}", e.into()),
11468 )
11469 })?;
11470 let codec = tonic_prost::ProstCodec::default();
11471 let path = http::uri::PathAndQuery::from_static(
11472 "/tinkoff.public.invest.api.contract.v1.OrdersService/PostOrderAsync",
11473 );
11474 let mut req = request.into_request();
11475 req.extensions_mut()
11476 .insert(
11477 GrpcMethod::new(
11478 "tinkoff.public.invest.api.contract.v1.OrdersService",
11479 "PostOrderAsync",
11480 ),
11481 );
11482 self.inner.unary(req, path, codec).await
11483 }
11484 pub async fn cancel_order(
11486 &mut self,
11487 request: impl tonic::IntoRequest<super::CancelOrderRequest>,
11488 ) -> std::result::Result<
11489 tonic::Response<super::CancelOrderResponse>,
11490 tonic::Status,
11491 > {
11492 self.inner
11493 .ready()
11494 .await
11495 .map_err(|e| {
11496 tonic::Status::unknown(
11497 format!("Service was not ready: {}", e.into()),
11498 )
11499 })?;
11500 let codec = tonic_prost::ProstCodec::default();
11501 let path = http::uri::PathAndQuery::from_static(
11502 "/tinkoff.public.invest.api.contract.v1.OrdersService/CancelOrder",
11503 );
11504 let mut req = request.into_request();
11505 req.extensions_mut()
11506 .insert(
11507 GrpcMethod::new(
11508 "tinkoff.public.invest.api.contract.v1.OrdersService",
11509 "CancelOrder",
11510 ),
11511 );
11512 self.inner.unary(req, path, codec).await
11513 }
11514 pub async fn get_order_state(
11516 &mut self,
11517 request: impl tonic::IntoRequest<super::GetOrderStateRequest>,
11518 ) -> std::result::Result<tonic::Response<super::OrderState>, tonic::Status> {
11519 self.inner
11520 .ready()
11521 .await
11522 .map_err(|e| {
11523 tonic::Status::unknown(
11524 format!("Service was not ready: {}", e.into()),
11525 )
11526 })?;
11527 let codec = tonic_prost::ProstCodec::default();
11528 let path = http::uri::PathAndQuery::from_static(
11529 "/tinkoff.public.invest.api.contract.v1.OrdersService/GetOrderState",
11530 );
11531 let mut req = request.into_request();
11532 req.extensions_mut()
11533 .insert(
11534 GrpcMethod::new(
11535 "tinkoff.public.invest.api.contract.v1.OrdersService",
11536 "GetOrderState",
11537 ),
11538 );
11539 self.inner.unary(req, path, codec).await
11540 }
11541 pub async fn get_orders(
11543 &mut self,
11544 request: impl tonic::IntoRequest<super::GetOrdersRequest>,
11545 ) -> std::result::Result<
11546 tonic::Response<super::GetOrdersResponse>,
11547 tonic::Status,
11548 > {
11549 self.inner
11550 .ready()
11551 .await
11552 .map_err(|e| {
11553 tonic::Status::unknown(
11554 format!("Service was not ready: {}", e.into()),
11555 )
11556 })?;
11557 let codec = tonic_prost::ProstCodec::default();
11558 let path = http::uri::PathAndQuery::from_static(
11559 "/tinkoff.public.invest.api.contract.v1.OrdersService/GetOrders",
11560 );
11561 let mut req = request.into_request();
11562 req.extensions_mut()
11563 .insert(
11564 GrpcMethod::new(
11565 "tinkoff.public.invest.api.contract.v1.OrdersService",
11566 "GetOrders",
11567 ),
11568 );
11569 self.inner.unary(req, path, codec).await
11570 }
11571 pub async fn replace_order(
11573 &mut self,
11574 request: impl tonic::IntoRequest<super::ReplaceOrderRequest>,
11575 ) -> std::result::Result<
11576 tonic::Response<super::PostOrderResponse>,
11577 tonic::Status,
11578 > {
11579 self.inner
11580 .ready()
11581 .await
11582 .map_err(|e| {
11583 tonic::Status::unknown(
11584 format!("Service was not ready: {}", e.into()),
11585 )
11586 })?;
11587 let codec = tonic_prost::ProstCodec::default();
11588 let path = http::uri::PathAndQuery::from_static(
11589 "/tinkoff.public.invest.api.contract.v1.OrdersService/ReplaceOrder",
11590 );
11591 let mut req = request.into_request();
11592 req.extensions_mut()
11593 .insert(
11594 GrpcMethod::new(
11595 "tinkoff.public.invest.api.contract.v1.OrdersService",
11596 "ReplaceOrder",
11597 ),
11598 );
11599 self.inner.unary(req, path, codec).await
11600 }
11601 pub async fn get_max_lots(
11603 &mut self,
11604 request: impl tonic::IntoRequest<super::GetMaxLotsRequest>,
11605 ) -> std::result::Result<
11606 tonic::Response<super::GetMaxLotsResponse>,
11607 tonic::Status,
11608 > {
11609 self.inner
11610 .ready()
11611 .await
11612 .map_err(|e| {
11613 tonic::Status::unknown(
11614 format!("Service was not ready: {}", e.into()),
11615 )
11616 })?;
11617 let codec = tonic_prost::ProstCodec::default();
11618 let path = http::uri::PathAndQuery::from_static(
11619 "/tinkoff.public.invest.api.contract.v1.OrdersService/GetMaxLots",
11620 );
11621 let mut req = request.into_request();
11622 req.extensions_mut()
11623 .insert(
11624 GrpcMethod::new(
11625 "tinkoff.public.invest.api.contract.v1.OrdersService",
11626 "GetMaxLots",
11627 ),
11628 );
11629 self.inner.unary(req, path, codec).await
11630 }
11631 pub async fn get_order_price(
11633 &mut self,
11634 request: impl tonic::IntoRequest<super::GetOrderPriceRequest>,
11635 ) -> std::result::Result<
11636 tonic::Response<super::GetOrderPriceResponse>,
11637 tonic::Status,
11638 > {
11639 self.inner
11640 .ready()
11641 .await
11642 .map_err(|e| {
11643 tonic::Status::unknown(
11644 format!("Service was not ready: {}", e.into()),
11645 )
11646 })?;
11647 let codec = tonic_prost::ProstCodec::default();
11648 let path = http::uri::PathAndQuery::from_static(
11649 "/tinkoff.public.invest.api.contract.v1.OrdersService/GetOrderPrice",
11650 );
11651 let mut req = request.into_request();
11652 req.extensions_mut()
11653 .insert(
11654 GrpcMethod::new(
11655 "tinkoff.public.invest.api.contract.v1.OrdersService",
11656 "GetOrderPrice",
11657 ),
11658 );
11659 self.inner.unary(req, path, codec).await
11660 }
11661 }
11662}
11663#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
11665pub struct PostStopOrderRequest {
11666 #[deprecated]
11668 #[prost(string, optional, tag = "1")]
11669 pub figi: ::core::option::Option<::prost::alloc::string::String>,
11670 #[prost(int64, tag = "2")]
11672 pub quantity: i64,
11673 #[prost(message, optional, tag = "3")]
11675 pub price: ::core::option::Option<Quotation>,
11676 #[prost(message, optional, tag = "4")]
11678 pub stop_price: ::core::option::Option<Quotation>,
11679 #[prost(enumeration = "StopOrderDirection", tag = "5")]
11681 pub direction: i32,
11682 #[prost(string, tag = "6")]
11684 pub account_id: ::prost::alloc::string::String,
11685 #[prost(enumeration = "StopOrderExpirationType", tag = "7")]
11687 pub expiration_type: i32,
11688 #[prost(enumeration = "StopOrderType", tag = "8")]
11690 pub stop_order_type: i32,
11691 #[prost(message, optional, tag = "9")]
11693 pub expire_date: ::core::option::Option<::prost_types::Timestamp>,
11694 #[prost(string, tag = "10")]
11696 pub instrument_id: ::prost::alloc::string::String,
11697 #[prost(enumeration = "ExchangeOrderType", tag = "11")]
11699 pub exchange_order_type: i32,
11700 #[prost(enumeration = "TakeProfitType", tag = "12")]
11702 pub take_profit_type: i32,
11703 #[prost(message, optional, tag = "13")]
11705 pub trailing_data: ::core::option::Option<post_stop_order_request::TrailingData>,
11706 #[prost(enumeration = "PriceType", tag = "14")]
11708 pub price_type: i32,
11709 #[prost(string, tag = "15")]
11711 pub order_id: ::prost::alloc::string::String,
11712 #[prost(bool, tag = "16")]
11714 pub confirm_margin_trade: bool,
11715 #[prost(bool, optional, tag = "17")]
11717 pub instant_execution: ::core::option::Option<bool>,
11718}
11719pub mod post_stop_order_request {
11721 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
11722 pub struct TrailingData {
11723 #[prost(message, optional, tag = "1")]
11725 pub indent: ::core::option::Option<super::Quotation>,
11726 #[prost(enumeration = "super::TrailingValueType", tag = "2")]
11728 pub indent_type: i32,
11729 #[prost(message, optional, tag = "3")]
11731 pub spread: ::core::option::Option<super::Quotation>,
11732 #[prost(enumeration = "super::TrailingValueType", tag = "4")]
11734 pub spread_type: i32,
11735 }
11736}
11737#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
11739pub struct PostStopOrderResponse {
11740 #[prost(string, tag = "1")]
11742 pub stop_order_id: ::prost::alloc::string::String,
11743 #[prost(string, tag = "2")]
11745 pub order_request_id: ::prost::alloc::string::String,
11746 #[prost(message, optional, tag = "254")]
11748 pub response_metadata: ::core::option::Option<ResponseMetadata>,
11749}
11750#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
11752pub struct GetStopOrdersRequest {
11753 #[prost(string, tag = "1")]
11755 pub account_id: ::prost::alloc::string::String,
11756 #[prost(enumeration = "StopOrderStatusOption", tag = "2")]
11758 pub status: i32,
11759 #[prost(message, optional, tag = "3")]
11761 pub from: ::core::option::Option<::prost_types::Timestamp>,
11762 #[prost(message, optional, tag = "4")]
11764 pub to: ::core::option::Option<::prost_types::Timestamp>,
11765}
11766#[derive(Clone, PartialEq, ::prost::Message)]
11768pub struct GetStopOrdersResponse {
11769 #[prost(message, repeated, tag = "1")]
11771 pub stop_orders: ::prost::alloc::vec::Vec<StopOrder>,
11772}
11773#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
11775pub struct CancelStopOrderRequest {
11776 #[prost(string, tag = "1")]
11778 pub account_id: ::prost::alloc::string::String,
11779 #[prost(string, tag = "2")]
11781 pub stop_order_id: ::prost::alloc::string::String,
11782}
11783#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
11785pub struct CancelStopOrderResponse {
11786 #[prost(message, optional, tag = "1")]
11788 pub time: ::core::option::Option<::prost_types::Timestamp>,
11789}
11790#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
11792pub struct StopOrder {
11793 #[prost(string, tag = "1")]
11795 pub stop_order_id: ::prost::alloc::string::String,
11796 #[prost(int64, tag = "2")]
11798 pub lots_requested: i64,
11799 #[prost(string, tag = "3")]
11801 pub figi: ::prost::alloc::string::String,
11802 #[prost(enumeration = "StopOrderDirection", tag = "4")]
11804 pub direction: i32,
11805 #[prost(string, tag = "5")]
11807 pub currency: ::prost::alloc::string::String,
11808 #[prost(enumeration = "StopOrderType", tag = "6")]
11810 pub order_type: i32,
11811 #[prost(message, optional, tag = "7")]
11813 pub create_date: ::core::option::Option<::prost_types::Timestamp>,
11814 #[prost(message, optional, tag = "8")]
11816 pub activation_date_time: ::core::option::Option<::prost_types::Timestamp>,
11817 #[prost(message, optional, tag = "9")]
11819 pub expiration_time: ::core::option::Option<::prost_types::Timestamp>,
11820 #[prost(message, optional, tag = "10")]
11822 pub price: ::core::option::Option<MoneyValue>,
11823 #[prost(message, optional, tag = "11")]
11825 pub stop_price: ::core::option::Option<MoneyValue>,
11826 #[prost(string, tag = "12")]
11828 pub instrument_uid: ::prost::alloc::string::String,
11829 #[prost(enumeration = "TakeProfitType", tag = "13")]
11831 pub take_profit_type: i32,
11832 #[prost(message, optional, tag = "14")]
11834 pub trailing_data: ::core::option::Option<stop_order::TrailingData>,
11835 #[prost(enumeration = "StopOrderStatusOption", tag = "15")]
11837 pub status: i32,
11838 #[prost(enumeration = "ExchangeOrderType", tag = "16")]
11840 pub exchange_order_type: i32,
11841 #[prost(string, optional, tag = "17")]
11843 pub exchange_order_id: ::core::option::Option<::prost::alloc::string::String>,
11844 #[prost(string, tag = "18")]
11846 pub ticker: ::prost::alloc::string::String,
11847 #[prost(string, tag = "19")]
11849 pub class_code: ::prost::alloc::string::String,
11850 #[prost(bool, tag = "20")]
11852 pub instant_execution: bool,
11853}
11854pub mod stop_order {
11856 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
11857 pub struct TrailingData {
11858 #[prost(message, optional, tag = "1")]
11860 pub indent: ::core::option::Option<super::Quotation>,
11861 #[prost(enumeration = "super::TrailingValueType", tag = "2")]
11863 pub indent_type: i32,
11864 #[prost(message, optional, tag = "3")]
11866 pub spread: ::core::option::Option<super::Quotation>,
11867 #[prost(enumeration = "super::TrailingValueType", tag = "4")]
11869 pub spread_type: i32,
11870 #[prost(enumeration = "super::TrailingStopStatus", tag = "5")]
11872 pub status: i32,
11873 #[prost(message, optional, tag = "7")]
11875 pub price: ::core::option::Option<super::Quotation>,
11876 #[prost(message, optional, tag = "8")]
11878 pub extr: ::core::option::Option<super::Quotation>,
11879 }
11880}
11881#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
11883#[repr(i32)]
11884pub enum StopOrderDirection {
11885 Unspecified = 0,
11887 Buy = 1,
11889 Sell = 2,
11891}
11892impl StopOrderDirection {
11893 pub fn as_str_name(&self) -> &'static str {
11898 match self {
11899 Self::Unspecified => "STOP_ORDER_DIRECTION_UNSPECIFIED",
11900 Self::Buy => "STOP_ORDER_DIRECTION_BUY",
11901 Self::Sell => "STOP_ORDER_DIRECTION_SELL",
11902 }
11903 }
11904 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
11906 match value {
11907 "STOP_ORDER_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
11908 "STOP_ORDER_DIRECTION_BUY" => Some(Self::Buy),
11909 "STOP_ORDER_DIRECTION_SELL" => Some(Self::Sell),
11910 _ => None,
11911 }
11912 }
11913}
11914#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
11916#[repr(i32)]
11917pub enum StopOrderExpirationType {
11918 Unspecified = 0,
11920 GoodTillCancel = 1,
11922 GoodTillDate = 2,
11924}
11925impl StopOrderExpirationType {
11926 pub fn as_str_name(&self) -> &'static str {
11931 match self {
11932 Self::Unspecified => "STOP_ORDER_EXPIRATION_TYPE_UNSPECIFIED",
11933 Self::GoodTillCancel => "STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_CANCEL",
11934 Self::GoodTillDate => "STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_DATE",
11935 }
11936 }
11937 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
11939 match value {
11940 "STOP_ORDER_EXPIRATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
11941 "STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_CANCEL" => Some(Self::GoodTillCancel),
11942 "STOP_ORDER_EXPIRATION_TYPE_GOOD_TILL_DATE" => Some(Self::GoodTillDate),
11943 _ => None,
11944 }
11945 }
11946}
11947#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
11949#[repr(i32)]
11950pub enum StopOrderType {
11951 Unspecified = 0,
11953 TakeProfit = 1,
11955 StopLoss = 2,
11957 StopLimit = 3,
11959}
11960impl StopOrderType {
11961 pub fn as_str_name(&self) -> &'static str {
11966 match self {
11967 Self::Unspecified => "STOP_ORDER_TYPE_UNSPECIFIED",
11968 Self::TakeProfit => "STOP_ORDER_TYPE_TAKE_PROFIT",
11969 Self::StopLoss => "STOP_ORDER_TYPE_STOP_LOSS",
11970 Self::StopLimit => "STOP_ORDER_TYPE_STOP_LIMIT",
11971 }
11972 }
11973 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
11975 match value {
11976 "STOP_ORDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
11977 "STOP_ORDER_TYPE_TAKE_PROFIT" => Some(Self::TakeProfit),
11978 "STOP_ORDER_TYPE_STOP_LOSS" => Some(Self::StopLoss),
11979 "STOP_ORDER_TYPE_STOP_LIMIT" => Some(Self::StopLimit),
11980 _ => None,
11981 }
11982 }
11983}
11984#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
11986#[repr(i32)]
11987pub enum StopOrderStatusOption {
11988 StopOrderStatusUnspecified = 0,
11990 StopOrderStatusAll = 1,
11992 StopOrderStatusActive = 2,
11994 StopOrderStatusExecuted = 3,
11996 StopOrderStatusCanceled = 4,
11998 StopOrderStatusExpired = 5,
12000}
12001impl StopOrderStatusOption {
12002 pub fn as_str_name(&self) -> &'static str {
12007 match self {
12008 Self::StopOrderStatusUnspecified => "STOP_ORDER_STATUS_UNSPECIFIED",
12009 Self::StopOrderStatusAll => "STOP_ORDER_STATUS_ALL",
12010 Self::StopOrderStatusActive => "STOP_ORDER_STATUS_ACTIVE",
12011 Self::StopOrderStatusExecuted => "STOP_ORDER_STATUS_EXECUTED",
12012 Self::StopOrderStatusCanceled => "STOP_ORDER_STATUS_CANCELED",
12013 Self::StopOrderStatusExpired => "STOP_ORDER_STATUS_EXPIRED",
12014 }
12015 }
12016 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
12018 match value {
12019 "STOP_ORDER_STATUS_UNSPECIFIED" => Some(Self::StopOrderStatusUnspecified),
12020 "STOP_ORDER_STATUS_ALL" => Some(Self::StopOrderStatusAll),
12021 "STOP_ORDER_STATUS_ACTIVE" => Some(Self::StopOrderStatusActive),
12022 "STOP_ORDER_STATUS_EXECUTED" => Some(Self::StopOrderStatusExecuted),
12023 "STOP_ORDER_STATUS_CANCELED" => Some(Self::StopOrderStatusCanceled),
12024 "STOP_ORDER_STATUS_EXPIRED" => Some(Self::StopOrderStatusExpired),
12025 _ => None,
12026 }
12027 }
12028}
12029#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
12031#[repr(i32)]
12032pub enum ExchangeOrderType {
12033 Unspecified = 0,
12035 Market = 1,
12037 Limit = 2,
12039}
12040impl ExchangeOrderType {
12041 pub fn as_str_name(&self) -> &'static str {
12046 match self {
12047 Self::Unspecified => "EXCHANGE_ORDER_TYPE_UNSPECIFIED",
12048 Self::Market => "EXCHANGE_ORDER_TYPE_MARKET",
12049 Self::Limit => "EXCHANGE_ORDER_TYPE_LIMIT",
12050 }
12051 }
12052 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
12054 match value {
12055 "EXCHANGE_ORDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
12056 "EXCHANGE_ORDER_TYPE_MARKET" => Some(Self::Market),
12057 "EXCHANGE_ORDER_TYPE_LIMIT" => Some(Self::Limit),
12058 _ => None,
12059 }
12060 }
12061}
12062#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
12064#[repr(i32)]
12065pub enum TakeProfitType {
12066 Unspecified = 0,
12068 Regular = 1,
12070 Trailing = 2,
12072}
12073impl TakeProfitType {
12074 pub fn as_str_name(&self) -> &'static str {
12079 match self {
12080 Self::Unspecified => "TAKE_PROFIT_TYPE_UNSPECIFIED",
12081 Self::Regular => "TAKE_PROFIT_TYPE_REGULAR",
12082 Self::Trailing => "TAKE_PROFIT_TYPE_TRAILING",
12083 }
12084 }
12085 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
12087 match value {
12088 "TAKE_PROFIT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
12089 "TAKE_PROFIT_TYPE_REGULAR" => Some(Self::Regular),
12090 "TAKE_PROFIT_TYPE_TRAILING" => Some(Self::Trailing),
12091 _ => None,
12092 }
12093 }
12094}
12095#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
12097#[repr(i32)]
12098pub enum TrailingValueType {
12099 TrailingValueUnspecified = 0,
12101 TrailingValueAbsolute = 1,
12103 TrailingValueRelative = 2,
12105}
12106impl TrailingValueType {
12107 pub fn as_str_name(&self) -> &'static str {
12112 match self {
12113 Self::TrailingValueUnspecified => "TRAILING_VALUE_UNSPECIFIED",
12114 Self::TrailingValueAbsolute => "TRAILING_VALUE_ABSOLUTE",
12115 Self::TrailingValueRelative => "TRAILING_VALUE_RELATIVE",
12116 }
12117 }
12118 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
12120 match value {
12121 "TRAILING_VALUE_UNSPECIFIED" => Some(Self::TrailingValueUnspecified),
12122 "TRAILING_VALUE_ABSOLUTE" => Some(Self::TrailingValueAbsolute),
12123 "TRAILING_VALUE_RELATIVE" => Some(Self::TrailingValueRelative),
12124 _ => None,
12125 }
12126 }
12127}
12128#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
12130#[repr(i32)]
12131pub enum TrailingStopStatus {
12132 TrailingStopUnspecified = 0,
12134 TrailingStopActive = 1,
12136 TrailingStopActivated = 2,
12138}
12139impl TrailingStopStatus {
12140 pub fn as_str_name(&self) -> &'static str {
12145 match self {
12146 Self::TrailingStopUnspecified => "TRAILING_STOP_UNSPECIFIED",
12147 Self::TrailingStopActive => "TRAILING_STOP_ACTIVE",
12148 Self::TrailingStopActivated => "TRAILING_STOP_ACTIVATED",
12149 }
12150 }
12151 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
12153 match value {
12154 "TRAILING_STOP_UNSPECIFIED" => Some(Self::TrailingStopUnspecified),
12155 "TRAILING_STOP_ACTIVE" => Some(Self::TrailingStopActive),
12156 "TRAILING_STOP_ACTIVATED" => Some(Self::TrailingStopActivated),
12157 _ => None,
12158 }
12159 }
12160}
12161pub mod stop_orders_service_client {
12163 #![allow(
12164 unused_variables,
12165 dead_code,
12166 missing_docs,
12167 clippy::wildcard_imports,
12168 clippy::let_unit_value,
12169 )]
12170 use tonic::codegen::*;
12171 use tonic::codegen::http::Uri;
12172 #[derive(Debug, Clone)]
12173 pub struct StopOrdersServiceClient<T> {
12174 inner: tonic::client::Grpc<T>,
12175 }
12176 impl StopOrdersServiceClient<tonic::transport::Channel> {
12177 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
12179 where
12180 D: TryInto<tonic::transport::Endpoint>,
12181 D::Error: Into<StdError>,
12182 {
12183 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
12184 Ok(Self::new(conn))
12185 }
12186 }
12187 impl<T> StopOrdersServiceClient<T>
12188 where
12189 T: tonic::client::GrpcService<tonic::body::Body>,
12190 T::Error: Into<StdError>,
12191 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
12192 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
12193 {
12194 pub fn new(inner: T) -> Self {
12195 let inner = tonic::client::Grpc::new(inner);
12196 Self { inner }
12197 }
12198 pub fn with_origin(inner: T, origin: Uri) -> Self {
12199 let inner = tonic::client::Grpc::with_origin(inner, origin);
12200 Self { inner }
12201 }
12202 pub fn with_interceptor<F>(
12203 inner: T,
12204 interceptor: F,
12205 ) -> StopOrdersServiceClient<InterceptedService<T, F>>
12206 where
12207 F: tonic::service::Interceptor,
12208 T::ResponseBody: Default,
12209 T: tonic::codegen::Service<
12210 http::Request<tonic::body::Body>,
12211 Response = http::Response<
12212 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
12213 >,
12214 >,
12215 <T as tonic::codegen::Service<
12216 http::Request<tonic::body::Body>,
12217 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
12218 {
12219 StopOrdersServiceClient::new(InterceptedService::new(inner, interceptor))
12220 }
12221 #[must_use]
12226 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
12227 self.inner = self.inner.send_compressed(encoding);
12228 self
12229 }
12230 #[must_use]
12232 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
12233 self.inner = self.inner.accept_compressed(encoding);
12234 self
12235 }
12236 #[must_use]
12240 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
12241 self.inner = self.inner.max_decoding_message_size(limit);
12242 self
12243 }
12244 #[must_use]
12248 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
12249 self.inner = self.inner.max_encoding_message_size(limit);
12250 self
12251 }
12252 pub async fn post_stop_order(
12254 &mut self,
12255 request: impl tonic::IntoRequest<super::PostStopOrderRequest>,
12256 ) -> std::result::Result<
12257 tonic::Response<super::PostStopOrderResponse>,
12258 tonic::Status,
12259 > {
12260 self.inner
12261 .ready()
12262 .await
12263 .map_err(|e| {
12264 tonic::Status::unknown(
12265 format!("Service was not ready: {}", e.into()),
12266 )
12267 })?;
12268 let codec = tonic_prost::ProstCodec::default();
12269 let path = http::uri::PathAndQuery::from_static(
12270 "/tinkoff.public.invest.api.contract.v1.StopOrdersService/PostStopOrder",
12271 );
12272 let mut req = request.into_request();
12273 req.extensions_mut()
12274 .insert(
12275 GrpcMethod::new(
12276 "tinkoff.public.invest.api.contract.v1.StopOrdersService",
12277 "PostStopOrder",
12278 ),
12279 );
12280 self.inner.unary(req, path, codec).await
12281 }
12282 pub async fn get_stop_orders(
12284 &mut self,
12285 request: impl tonic::IntoRequest<super::GetStopOrdersRequest>,
12286 ) -> std::result::Result<
12287 tonic::Response<super::GetStopOrdersResponse>,
12288 tonic::Status,
12289 > {
12290 self.inner
12291 .ready()
12292 .await
12293 .map_err(|e| {
12294 tonic::Status::unknown(
12295 format!("Service was not ready: {}", e.into()),
12296 )
12297 })?;
12298 let codec = tonic_prost::ProstCodec::default();
12299 let path = http::uri::PathAndQuery::from_static(
12300 "/tinkoff.public.invest.api.contract.v1.StopOrdersService/GetStopOrders",
12301 );
12302 let mut req = request.into_request();
12303 req.extensions_mut()
12304 .insert(
12305 GrpcMethod::new(
12306 "tinkoff.public.invest.api.contract.v1.StopOrdersService",
12307 "GetStopOrders",
12308 ),
12309 );
12310 self.inner.unary(req, path, codec).await
12311 }
12312 pub async fn cancel_stop_order(
12314 &mut self,
12315 request: impl tonic::IntoRequest<super::CancelStopOrderRequest>,
12316 ) -> std::result::Result<
12317 tonic::Response<super::CancelStopOrderResponse>,
12318 tonic::Status,
12319 > {
12320 self.inner
12321 .ready()
12322 .await
12323 .map_err(|e| {
12324 tonic::Status::unknown(
12325 format!("Service was not ready: {}", e.into()),
12326 )
12327 })?;
12328 let codec = tonic_prost::ProstCodec::default();
12329 let path = http::uri::PathAndQuery::from_static(
12330 "/tinkoff.public.invest.api.contract.v1.StopOrdersService/CancelStopOrder",
12331 );
12332 let mut req = request.into_request();
12333 req.extensions_mut()
12334 .insert(
12335 GrpcMethod::new(
12336 "tinkoff.public.invest.api.contract.v1.StopOrdersService",
12337 "CancelStopOrder",
12338 ),
12339 );
12340 self.inner.unary(req, path, codec).await
12341 }
12342 }
12343}
12344#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
12346pub struct GetAccountsRequest {
12347 #[prost(enumeration = "AccountStatus", optional, tag = "1")]
12349 pub status: ::core::option::Option<i32>,
12350}
12351#[derive(Clone, PartialEq, ::prost::Message)]
12353pub struct GetAccountsResponse {
12354 #[prost(message, repeated, tag = "1")]
12356 pub accounts: ::prost::alloc::vec::Vec<Account>,
12357}
12358#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12360pub struct Account {
12361 #[prost(string, tag = "1")]
12363 pub id: ::prost::alloc::string::String,
12364 #[prost(enumeration = "AccountType", tag = "2")]
12366 pub r#type: i32,
12367 #[prost(string, tag = "3")]
12369 pub name: ::prost::alloc::string::String,
12370 #[prost(enumeration = "AccountStatus", tag = "4")]
12372 pub status: i32,
12373 #[prost(message, optional, tag = "5")]
12375 pub opened_date: ::core::option::Option<::prost_types::Timestamp>,
12376 #[prost(message, optional, tag = "6")]
12378 pub closed_date: ::core::option::Option<::prost_types::Timestamp>,
12379 #[prost(enumeration = "AccessLevel", tag = "7")]
12381 pub access_level: i32,
12382}
12383#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12385pub struct GetMarginAttributesRequest {
12386 #[prost(string, tag = "1")]
12388 pub account_id: ::prost::alloc::string::String,
12389}
12390#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12392pub struct GetMarginAttributesResponse {
12393 #[prost(message, optional, tag = "1")]
12395 pub liquid_portfolio: ::core::option::Option<MoneyValue>,
12396 #[prost(message, optional, tag = "2")]
12398 pub starting_margin: ::core::option::Option<MoneyValue>,
12399 #[prost(message, optional, tag = "3")]
12401 pub minimal_margin: ::core::option::Option<MoneyValue>,
12402 #[prost(message, optional, tag = "4")]
12404 pub funds_sufficiency_level: ::core::option::Option<Quotation>,
12405 #[prost(message, optional, tag = "5")]
12407 pub amount_of_missing_funds: ::core::option::Option<MoneyValue>,
12408 #[prost(message, optional, tag = "6")]
12410 pub corrected_margin: ::core::option::Option<MoneyValue>,
12411 #[prost(message, optional, tag = "7")]
12413 pub guarantee_for_futures: ::core::option::Option<MoneyValue>,
12414}
12415#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
12417pub struct GetUserTariffRequest {}
12418#[derive(Clone, PartialEq, ::prost::Message)]
12420pub struct GetUserTariffResponse {
12421 #[prost(message, repeated, tag = "1")]
12423 pub unary_limits: ::prost::alloc::vec::Vec<UnaryLimit>,
12424 #[prost(message, repeated, tag = "2")]
12426 pub stream_limits: ::prost::alloc::vec::Vec<StreamLimit>,
12427}
12428#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12430pub struct UnaryLimit {
12431 #[prost(int32, tag = "1")]
12433 pub limit_per_minute: i32,
12434 #[prost(string, repeated, tag = "2")]
12436 pub methods: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
12437 #[prost(int32, optional, tag = "3")]
12439 pub limit_per_second: ::core::option::Option<i32>,
12440}
12441#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12443pub struct StreamLimit {
12444 #[prost(int32, tag = "1")]
12446 pub limit: i32,
12447 #[prost(string, repeated, tag = "2")]
12449 pub streams: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
12450 #[prost(int32, tag = "3")]
12452 pub open: i32,
12453}
12454#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
12456pub struct GetInfoRequest {}
12457#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12459pub struct GetInfoResponse {
12460 #[prost(bool, tag = "1")]
12462 pub prem_status: bool,
12463 #[prost(bool, tag = "2")]
12465 pub qual_status: bool,
12466 #[prost(string, repeated, tag = "3")]
12468 pub qualified_for_work_with: ::prost::alloc::vec::Vec<
12469 ::prost::alloc::string::String,
12470 >,
12471 #[prost(string, tag = "4")]
12473 pub tariff: ::prost::alloc::string::String,
12474 #[prost(string, tag = "9")]
12476 pub user_id: ::prost::alloc::string::String,
12477 #[prost(string, tag = "12")]
12479 pub risk_level_code: ::prost::alloc::string::String,
12480}
12481#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
12483pub struct GetBankAccountsRequest {}
12484#[derive(Clone, PartialEq, ::prost::Message)]
12486pub struct GetBankAccountsResponse {
12487 #[prost(message, repeated, tag = "1")]
12489 pub bank_accounts: ::prost::alloc::vec::Vec<BankAccount>,
12490}
12491#[derive(Clone, PartialEq, ::prost::Message)]
12493pub struct BankAccount {
12494 #[prost(string, tag = "1")]
12496 pub id: ::prost::alloc::string::String,
12497 #[prost(string, tag = "2")]
12499 pub name: ::prost::alloc::string::String,
12500 #[prost(message, repeated, tag = "3")]
12502 pub money: ::prost::alloc::vec::Vec<MoneyValue>,
12503 #[prost(message, optional, tag = "4")]
12505 pub opened_date: ::core::option::Option<::prost_types::Timestamp>,
12506 #[prost(enumeration = "AccountType", tag = "5")]
12508 pub r#type: i32,
12509}
12510#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12511pub struct CurrencyTransferRequest {
12512 #[prost(string, tag = "1")]
12514 pub from_account_id: ::prost::alloc::string::String,
12515 #[prost(string, tag = "2")]
12517 pub to_account_id: ::prost::alloc::string::String,
12518 #[prost(message, optional, tag = "3")]
12520 pub amount: ::core::option::Option<MoneyValue>,
12521 #[prost(string, tag = "4")]
12523 pub transaction_id: ::prost::alloc::string::String,
12524}
12525#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
12526pub struct CurrencyTransferResponse {}
12527#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12528pub struct PayInRequest {
12529 #[prost(string, tag = "1")]
12531 pub from_account_id: ::prost::alloc::string::String,
12532 #[prost(string, tag = "2")]
12534 pub to_account_id: ::prost::alloc::string::String,
12535 #[prost(message, optional, tag = "3")]
12537 pub amount: ::core::option::Option<MoneyValue>,
12538}
12539#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
12540pub struct PayInResponse {}
12541#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12542pub struct GetAccountValuesRequest {
12543 #[prost(string, repeated, tag = "1")]
12545 pub accounts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
12546 #[prost(enumeration = "AccountValue", repeated, tag = "2")]
12548 pub values: ::prost::alloc::vec::Vec<i32>,
12549}
12550#[derive(Clone, PartialEq, ::prost::Message)]
12551pub struct GetAccountValuesResponse {
12552 #[prost(message, repeated, tag = "1")]
12554 pub accounts: ::prost::alloc::vec::Vec<AccountValuesWithParameters>,
12555}
12556#[derive(Clone, PartialEq, ::prost::Message)]
12557pub struct AccountValuesWithParameters {
12558 #[prost(string, tag = "1")]
12560 pub account_id: ::prost::alloc::string::String,
12561 #[prost(message, repeated, tag = "2")]
12563 pub values: ::prost::alloc::vec::Vec<InstrumentParameter>,
12564}
12565#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12566pub struct InstrumentParameter {
12567 #[prost(enumeration = "AccountValue", tag = "1")]
12569 pub name: i32,
12570 #[prost(message, optional, tag = "2")]
12572 pub value: ::core::option::Option<MoneyValue>,
12573}
12574#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
12576#[repr(i32)]
12577pub enum AccountType {
12578 Unspecified = 0,
12580 Tinkoff = 1,
12582 TinkoffIis = 2,
12584 InvestBox = 3,
12586 InvestFund = 4,
12588 Debit = 5,
12590 Saving = 6,
12592 Dfa = 7,
12594}
12595impl AccountType {
12596 pub fn as_str_name(&self) -> &'static str {
12601 match self {
12602 Self::Unspecified => "ACCOUNT_TYPE_UNSPECIFIED",
12603 Self::Tinkoff => "ACCOUNT_TYPE_TINKOFF",
12604 Self::TinkoffIis => "ACCOUNT_TYPE_TINKOFF_IIS",
12605 Self::InvestBox => "ACCOUNT_TYPE_INVEST_BOX",
12606 Self::InvestFund => "ACCOUNT_TYPE_INVEST_FUND",
12607 Self::Debit => "ACCOUNT_TYPE_DEBIT",
12608 Self::Saving => "ACCOUNT_TYPE_SAVING",
12609 Self::Dfa => "ACCOUNT_TYPE_DFA",
12610 }
12611 }
12612 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
12614 match value {
12615 "ACCOUNT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
12616 "ACCOUNT_TYPE_TINKOFF" => Some(Self::Tinkoff),
12617 "ACCOUNT_TYPE_TINKOFF_IIS" => Some(Self::TinkoffIis),
12618 "ACCOUNT_TYPE_INVEST_BOX" => Some(Self::InvestBox),
12619 "ACCOUNT_TYPE_INVEST_FUND" => Some(Self::InvestFund),
12620 "ACCOUNT_TYPE_DEBIT" => Some(Self::Debit),
12621 "ACCOUNT_TYPE_SAVING" => Some(Self::Saving),
12622 "ACCOUNT_TYPE_DFA" => Some(Self::Dfa),
12623 _ => None,
12624 }
12625 }
12626}
12627#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
12629#[repr(i32)]
12630pub enum AccountStatus {
12631 Unspecified = 0,
12633 New = 1,
12635 Open = 2,
12637 Closed = 3,
12639 All = 4,
12641}
12642impl AccountStatus {
12643 pub fn as_str_name(&self) -> &'static str {
12648 match self {
12649 Self::Unspecified => "ACCOUNT_STATUS_UNSPECIFIED",
12650 Self::New => "ACCOUNT_STATUS_NEW",
12651 Self::Open => "ACCOUNT_STATUS_OPEN",
12652 Self::Closed => "ACCOUNT_STATUS_CLOSED",
12653 Self::All => "ACCOUNT_STATUS_ALL",
12654 }
12655 }
12656 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
12658 match value {
12659 "ACCOUNT_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
12660 "ACCOUNT_STATUS_NEW" => Some(Self::New),
12661 "ACCOUNT_STATUS_OPEN" => Some(Self::Open),
12662 "ACCOUNT_STATUS_CLOSED" => Some(Self::Closed),
12663 "ACCOUNT_STATUS_ALL" => Some(Self::All),
12664 _ => None,
12665 }
12666 }
12667}
12668#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
12670#[repr(i32)]
12671pub enum AccessLevel {
12672 AccountAccessLevelUnspecified = 0,
12674 AccountAccessLevelFullAccess = 1,
12676 AccountAccessLevelReadOnly = 2,
12678 AccountAccessLevelNoAccess = 3,
12680}
12681impl AccessLevel {
12682 pub fn as_str_name(&self) -> &'static str {
12687 match self {
12688 Self::AccountAccessLevelUnspecified => "ACCOUNT_ACCESS_LEVEL_UNSPECIFIED",
12689 Self::AccountAccessLevelFullAccess => "ACCOUNT_ACCESS_LEVEL_FULL_ACCESS",
12690 Self::AccountAccessLevelReadOnly => "ACCOUNT_ACCESS_LEVEL_READ_ONLY",
12691 Self::AccountAccessLevelNoAccess => "ACCOUNT_ACCESS_LEVEL_NO_ACCESS",
12692 }
12693 }
12694 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
12696 match value {
12697 "ACCOUNT_ACCESS_LEVEL_UNSPECIFIED" => {
12698 Some(Self::AccountAccessLevelUnspecified)
12699 }
12700 "ACCOUNT_ACCESS_LEVEL_FULL_ACCESS" => {
12701 Some(Self::AccountAccessLevelFullAccess)
12702 }
12703 "ACCOUNT_ACCESS_LEVEL_READ_ONLY" => Some(Self::AccountAccessLevelReadOnly),
12704 "ACCOUNT_ACCESS_LEVEL_NO_ACCESS" => Some(Self::AccountAccessLevelNoAccess),
12705 _ => None,
12706 }
12707 }
12708}
12709#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
12710#[repr(i32)]
12711pub enum AccountValue {
12712 Unspecified = 0,
12714 MarginFee = 1,
12716 AmountWithoutExtraFee = 2,
12718}
12719impl AccountValue {
12720 pub fn as_str_name(&self) -> &'static str {
12725 match self {
12726 Self::Unspecified => "ACCOUNT_VALUE_UNSPECIFIED",
12727 Self::MarginFee => "ACCOUNT_VALUE_MARGIN_FEE",
12728 Self::AmountWithoutExtraFee => "ACCOUNT_VALUE_AMOUNT_WITHOUT_EXTRA_FEE",
12729 }
12730 }
12731 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
12733 match value {
12734 "ACCOUNT_VALUE_UNSPECIFIED" => Some(Self::Unspecified),
12735 "ACCOUNT_VALUE_MARGIN_FEE" => Some(Self::MarginFee),
12736 "ACCOUNT_VALUE_AMOUNT_WITHOUT_EXTRA_FEE" => Some(Self::AmountWithoutExtraFee),
12737 _ => None,
12738 }
12739 }
12740}
12741pub mod users_service_client {
12743 #![allow(
12744 unused_variables,
12745 dead_code,
12746 missing_docs,
12747 clippy::wildcard_imports,
12748 clippy::let_unit_value,
12749 )]
12750 use tonic::codegen::*;
12751 use tonic::codegen::http::Uri;
12752 #[derive(Debug, Clone)]
12753 pub struct UsersServiceClient<T> {
12754 inner: tonic::client::Grpc<T>,
12755 }
12756 impl UsersServiceClient<tonic::transport::Channel> {
12757 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
12759 where
12760 D: TryInto<tonic::transport::Endpoint>,
12761 D::Error: Into<StdError>,
12762 {
12763 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
12764 Ok(Self::new(conn))
12765 }
12766 }
12767 impl<T> UsersServiceClient<T>
12768 where
12769 T: tonic::client::GrpcService<tonic::body::Body>,
12770 T::Error: Into<StdError>,
12771 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
12772 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
12773 {
12774 pub fn new(inner: T) -> Self {
12775 let inner = tonic::client::Grpc::new(inner);
12776 Self { inner }
12777 }
12778 pub fn with_origin(inner: T, origin: Uri) -> Self {
12779 let inner = tonic::client::Grpc::with_origin(inner, origin);
12780 Self { inner }
12781 }
12782 pub fn with_interceptor<F>(
12783 inner: T,
12784 interceptor: F,
12785 ) -> UsersServiceClient<InterceptedService<T, F>>
12786 where
12787 F: tonic::service::Interceptor,
12788 T::ResponseBody: Default,
12789 T: tonic::codegen::Service<
12790 http::Request<tonic::body::Body>,
12791 Response = http::Response<
12792 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
12793 >,
12794 >,
12795 <T as tonic::codegen::Service<
12796 http::Request<tonic::body::Body>,
12797 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
12798 {
12799 UsersServiceClient::new(InterceptedService::new(inner, interceptor))
12800 }
12801 #[must_use]
12806 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
12807 self.inner = self.inner.send_compressed(encoding);
12808 self
12809 }
12810 #[must_use]
12812 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
12813 self.inner = self.inner.accept_compressed(encoding);
12814 self
12815 }
12816 #[must_use]
12820 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
12821 self.inner = self.inner.max_decoding_message_size(limit);
12822 self
12823 }
12824 #[must_use]
12828 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
12829 self.inner = self.inner.max_encoding_message_size(limit);
12830 self
12831 }
12832 pub async fn get_accounts(
12835 &mut self,
12836 request: impl tonic::IntoRequest<super::GetAccountsRequest>,
12837 ) -> std::result::Result<
12838 tonic::Response<super::GetAccountsResponse>,
12839 tonic::Status,
12840 > {
12841 self.inner
12842 .ready()
12843 .await
12844 .map_err(|e| {
12845 tonic::Status::unknown(
12846 format!("Service was not ready: {}", e.into()),
12847 )
12848 })?;
12849 let codec = tonic_prost::ProstCodec::default();
12850 let path = http::uri::PathAndQuery::from_static(
12851 "/tinkoff.public.invest.api.contract.v1.UsersService/GetAccounts",
12852 );
12853 let mut req = request.into_request();
12854 req.extensions_mut()
12855 .insert(
12856 GrpcMethod::new(
12857 "tinkoff.public.invest.api.contract.v1.UsersService",
12858 "GetAccounts",
12859 ),
12860 );
12861 self.inner.unary(req, path, codec).await
12862 }
12863 pub async fn get_margin_attributes(
12866 &mut self,
12867 request: impl tonic::IntoRequest<super::GetMarginAttributesRequest>,
12868 ) -> std::result::Result<
12869 tonic::Response<super::GetMarginAttributesResponse>,
12870 tonic::Status,
12871 > {
12872 self.inner
12873 .ready()
12874 .await
12875 .map_err(|e| {
12876 tonic::Status::unknown(
12877 format!("Service was not ready: {}", e.into()),
12878 )
12879 })?;
12880 let codec = tonic_prost::ProstCodec::default();
12881 let path = http::uri::PathAndQuery::from_static(
12882 "/tinkoff.public.invest.api.contract.v1.UsersService/GetMarginAttributes",
12883 );
12884 let mut req = request.into_request();
12885 req.extensions_mut()
12886 .insert(
12887 GrpcMethod::new(
12888 "tinkoff.public.invest.api.contract.v1.UsersService",
12889 "GetMarginAttributes",
12890 ),
12891 );
12892 self.inner.unary(req, path, codec).await
12893 }
12894 pub async fn get_user_tariff(
12897 &mut self,
12898 request: impl tonic::IntoRequest<super::GetUserTariffRequest>,
12899 ) -> std::result::Result<
12900 tonic::Response<super::GetUserTariffResponse>,
12901 tonic::Status,
12902 > {
12903 self.inner
12904 .ready()
12905 .await
12906 .map_err(|e| {
12907 tonic::Status::unknown(
12908 format!("Service was not ready: {}", e.into()),
12909 )
12910 })?;
12911 let codec = tonic_prost::ProstCodec::default();
12912 let path = http::uri::PathAndQuery::from_static(
12913 "/tinkoff.public.invest.api.contract.v1.UsersService/GetUserTariff",
12914 );
12915 let mut req = request.into_request();
12916 req.extensions_mut()
12917 .insert(
12918 GrpcMethod::new(
12919 "tinkoff.public.invest.api.contract.v1.UsersService",
12920 "GetUserTariff",
12921 ),
12922 );
12923 self.inner.unary(req, path, codec).await
12924 }
12925 pub async fn get_info(
12928 &mut self,
12929 request: impl tonic::IntoRequest<super::GetInfoRequest>,
12930 ) -> std::result::Result<
12931 tonic::Response<super::GetInfoResponse>,
12932 tonic::Status,
12933 > {
12934 self.inner
12935 .ready()
12936 .await
12937 .map_err(|e| {
12938 tonic::Status::unknown(
12939 format!("Service was not ready: {}", e.into()),
12940 )
12941 })?;
12942 let codec = tonic_prost::ProstCodec::default();
12943 let path = http::uri::PathAndQuery::from_static(
12944 "/tinkoff.public.invest.api.contract.v1.UsersService/GetInfo",
12945 );
12946 let mut req = request.into_request();
12947 req.extensions_mut()
12948 .insert(
12949 GrpcMethod::new(
12950 "tinkoff.public.invest.api.contract.v1.UsersService",
12951 "GetInfo",
12952 ),
12953 );
12954 self.inner.unary(req, path, codec).await
12955 }
12956 pub async fn get_bank_accounts(
12959 &mut self,
12960 request: impl tonic::IntoRequest<super::GetBankAccountsRequest>,
12961 ) -> std::result::Result<
12962 tonic::Response<super::GetBankAccountsResponse>,
12963 tonic::Status,
12964 > {
12965 self.inner
12966 .ready()
12967 .await
12968 .map_err(|e| {
12969 tonic::Status::unknown(
12970 format!("Service was not ready: {}", e.into()),
12971 )
12972 })?;
12973 let codec = tonic_prost::ProstCodec::default();
12974 let path = http::uri::PathAndQuery::from_static(
12975 "/tinkoff.public.invest.api.contract.v1.UsersService/GetBankAccounts",
12976 );
12977 let mut req = request.into_request();
12978 req.extensions_mut()
12979 .insert(
12980 GrpcMethod::new(
12981 "tinkoff.public.invest.api.contract.v1.UsersService",
12982 "GetBankAccounts",
12983 ),
12984 );
12985 self.inner.unary(req, path, codec).await
12986 }
12987 pub async fn currency_transfer(
12990 &mut self,
12991 request: impl tonic::IntoRequest<super::CurrencyTransferRequest>,
12992 ) -> std::result::Result<
12993 tonic::Response<super::CurrencyTransferResponse>,
12994 tonic::Status,
12995 > {
12996 self.inner
12997 .ready()
12998 .await
12999 .map_err(|e| {
13000 tonic::Status::unknown(
13001 format!("Service was not ready: {}", e.into()),
13002 )
13003 })?;
13004 let codec = tonic_prost::ProstCodec::default();
13005 let path = http::uri::PathAndQuery::from_static(
13006 "/tinkoff.public.invest.api.contract.v1.UsersService/CurrencyTransfer",
13007 );
13008 let mut req = request.into_request();
13009 req.extensions_mut()
13010 .insert(
13011 GrpcMethod::new(
13012 "tinkoff.public.invest.api.contract.v1.UsersService",
13013 "CurrencyTransfer",
13014 ),
13015 );
13016 self.inner.unary(req, path, codec).await
13017 }
13018 pub async fn pay_in(
13021 &mut self,
13022 request: impl tonic::IntoRequest<super::PayInRequest>,
13023 ) -> std::result::Result<tonic::Response<super::PayInResponse>, tonic::Status> {
13024 self.inner
13025 .ready()
13026 .await
13027 .map_err(|e| {
13028 tonic::Status::unknown(
13029 format!("Service was not ready: {}", e.into()),
13030 )
13031 })?;
13032 let codec = tonic_prost::ProstCodec::default();
13033 let path = http::uri::PathAndQuery::from_static(
13034 "/tinkoff.public.invest.api.contract.v1.UsersService/PayIn",
13035 );
13036 let mut req = request.into_request();
13037 req.extensions_mut()
13038 .insert(
13039 GrpcMethod::new(
13040 "tinkoff.public.invest.api.contract.v1.UsersService",
13041 "PayIn",
13042 ),
13043 );
13044 self.inner.unary(req, path, codec).await
13045 }
13046 pub async fn get_account_values(
13049 &mut self,
13050 request: impl tonic::IntoRequest<super::GetAccountValuesRequest>,
13051 ) -> std::result::Result<
13052 tonic::Response<super::GetAccountValuesResponse>,
13053 tonic::Status,
13054 > {
13055 self.inner
13056 .ready()
13057 .await
13058 .map_err(|e| {
13059 tonic::Status::unknown(
13060 format!("Service was not ready: {}", e.into()),
13061 )
13062 })?;
13063 let codec = tonic_prost::ProstCodec::default();
13064 let path = http::uri::PathAndQuery::from_static(
13065 "/tinkoff.public.invest.api.contract.v1.UsersService/GetAccountValues",
13066 );
13067 let mut req = request.into_request();
13068 req.extensions_mut()
13069 .insert(
13070 GrpcMethod::new(
13071 "tinkoff.public.invest.api.contract.v1.UsersService",
13072 "GetAccountValues",
13073 ),
13074 );
13075 self.inner.unary(req, path, codec).await
13076 }
13077 }
13078}
13079#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
13081pub struct OpenSandboxAccountRequest {
13082 #[prost(string, optional, tag = "1")]
13084 pub name: ::core::option::Option<::prost::alloc::string::String>,
13085}
13086#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
13088pub struct OpenSandboxAccountResponse {
13089 #[prost(string, tag = "1")]
13091 pub account_id: ::prost::alloc::string::String,
13092}
13093#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
13095pub struct CloseSandboxAccountRequest {
13096 #[prost(string, tag = "1")]
13098 pub account_id: ::prost::alloc::string::String,
13099}
13100#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
13104pub struct CloseSandboxAccountResponse {}
13105#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
13107pub struct SandboxPayInRequest {
13108 #[prost(string, tag = "1")]
13110 pub account_id: ::prost::alloc::string::String,
13111 #[prost(message, optional, tag = "2")]
13113 pub amount: ::core::option::Option<MoneyValue>,
13114}
13115#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
13117pub struct SandboxPayInResponse {
13118 #[prost(message, optional, tag = "1")]
13120 pub balance: ::core::option::Option<MoneyValue>,
13121}
13122pub mod sandbox_service_client {
13124 #![allow(
13125 unused_variables,
13126 dead_code,
13127 missing_docs,
13128 clippy::wildcard_imports,
13129 clippy::let_unit_value,
13130 )]
13131 use tonic::codegen::*;
13132 use tonic::codegen::http::Uri;
13133 #[derive(Debug, Clone)]
13134 pub struct SandboxServiceClient<T> {
13135 inner: tonic::client::Grpc<T>,
13136 }
13137 impl SandboxServiceClient<tonic::transport::Channel> {
13138 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
13140 where
13141 D: TryInto<tonic::transport::Endpoint>,
13142 D::Error: Into<StdError>,
13143 {
13144 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
13145 Ok(Self::new(conn))
13146 }
13147 }
13148 impl<T> SandboxServiceClient<T>
13149 where
13150 T: tonic::client::GrpcService<tonic::body::Body>,
13151 T::Error: Into<StdError>,
13152 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
13153 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
13154 {
13155 pub fn new(inner: T) -> Self {
13156 let inner = tonic::client::Grpc::new(inner);
13157 Self { inner }
13158 }
13159 pub fn with_origin(inner: T, origin: Uri) -> Self {
13160 let inner = tonic::client::Grpc::with_origin(inner, origin);
13161 Self { inner }
13162 }
13163 pub fn with_interceptor<F>(
13164 inner: T,
13165 interceptor: F,
13166 ) -> SandboxServiceClient<InterceptedService<T, F>>
13167 where
13168 F: tonic::service::Interceptor,
13169 T::ResponseBody: Default,
13170 T: tonic::codegen::Service<
13171 http::Request<tonic::body::Body>,
13172 Response = http::Response<
13173 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
13174 >,
13175 >,
13176 <T as tonic::codegen::Service<
13177 http::Request<tonic::body::Body>,
13178 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
13179 {
13180 SandboxServiceClient::new(InterceptedService::new(inner, interceptor))
13181 }
13182 #[must_use]
13187 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
13188 self.inner = self.inner.send_compressed(encoding);
13189 self
13190 }
13191 #[must_use]
13193 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
13194 self.inner = self.inner.accept_compressed(encoding);
13195 self
13196 }
13197 #[must_use]
13201 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
13202 self.inner = self.inner.max_decoding_message_size(limit);
13203 self
13204 }
13205 #[must_use]
13209 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
13210 self.inner = self.inner.max_encoding_message_size(limit);
13211 self
13212 }
13213 pub async fn open_sandbox_account(
13215 &mut self,
13216 request: impl tonic::IntoRequest<super::OpenSandboxAccountRequest>,
13217 ) -> std::result::Result<
13218 tonic::Response<super::OpenSandboxAccountResponse>,
13219 tonic::Status,
13220 > {
13221 self.inner
13222 .ready()
13223 .await
13224 .map_err(|e| {
13225 tonic::Status::unknown(
13226 format!("Service was not ready: {}", e.into()),
13227 )
13228 })?;
13229 let codec = tonic_prost::ProstCodec::default();
13230 let path = http::uri::PathAndQuery::from_static(
13231 "/tinkoff.public.invest.api.contract.v1.SandboxService/OpenSandboxAccount",
13232 );
13233 let mut req = request.into_request();
13234 req.extensions_mut()
13235 .insert(
13236 GrpcMethod::new(
13237 "tinkoff.public.invest.api.contract.v1.SandboxService",
13238 "OpenSandboxAccount",
13239 ),
13240 );
13241 self.inner.unary(req, path, codec).await
13242 }
13243 pub async fn get_sandbox_accounts(
13245 &mut self,
13246 request: impl tonic::IntoRequest<super::GetAccountsRequest>,
13247 ) -> std::result::Result<
13248 tonic::Response<super::GetAccountsResponse>,
13249 tonic::Status,
13250 > {
13251 self.inner
13252 .ready()
13253 .await
13254 .map_err(|e| {
13255 tonic::Status::unknown(
13256 format!("Service was not ready: {}", e.into()),
13257 )
13258 })?;
13259 let codec = tonic_prost::ProstCodec::default();
13260 let path = http::uri::PathAndQuery::from_static(
13261 "/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxAccounts",
13262 );
13263 let mut req = request.into_request();
13264 req.extensions_mut()
13265 .insert(
13266 GrpcMethod::new(
13267 "tinkoff.public.invest.api.contract.v1.SandboxService",
13268 "GetSandboxAccounts",
13269 ),
13270 );
13271 self.inner.unary(req, path, codec).await
13272 }
13273 pub async fn close_sandbox_account(
13275 &mut self,
13276 request: impl tonic::IntoRequest<super::CloseSandboxAccountRequest>,
13277 ) -> std::result::Result<
13278 tonic::Response<super::CloseSandboxAccountResponse>,
13279 tonic::Status,
13280 > {
13281 self.inner
13282 .ready()
13283 .await
13284 .map_err(|e| {
13285 tonic::Status::unknown(
13286 format!("Service was not ready: {}", e.into()),
13287 )
13288 })?;
13289 let codec = tonic_prost::ProstCodec::default();
13290 let path = http::uri::PathAndQuery::from_static(
13291 "/tinkoff.public.invest.api.contract.v1.SandboxService/CloseSandboxAccount",
13292 );
13293 let mut req = request.into_request();
13294 req.extensions_mut()
13295 .insert(
13296 GrpcMethod::new(
13297 "tinkoff.public.invest.api.contract.v1.SandboxService",
13298 "CloseSandboxAccount",
13299 ),
13300 );
13301 self.inner.unary(req, path, codec).await
13302 }
13303 pub async fn post_sandbox_order(
13305 &mut self,
13306 request: impl tonic::IntoRequest<super::PostOrderRequest>,
13307 ) -> std::result::Result<
13308 tonic::Response<super::PostOrderResponse>,
13309 tonic::Status,
13310 > {
13311 self.inner
13312 .ready()
13313 .await
13314 .map_err(|e| {
13315 tonic::Status::unknown(
13316 format!("Service was not ready: {}", e.into()),
13317 )
13318 })?;
13319 let codec = tonic_prost::ProstCodec::default();
13320 let path = http::uri::PathAndQuery::from_static(
13321 "/tinkoff.public.invest.api.contract.v1.SandboxService/PostSandboxOrder",
13322 );
13323 let mut req = request.into_request();
13324 req.extensions_mut()
13325 .insert(
13326 GrpcMethod::new(
13327 "tinkoff.public.invest.api.contract.v1.SandboxService",
13328 "PostSandboxOrder",
13329 ),
13330 );
13331 self.inner.unary(req, path, codec).await
13332 }
13333 pub async fn post_sandbox_order_async(
13336 &mut self,
13337 request: impl tonic::IntoRequest<super::PostOrderAsyncRequest>,
13338 ) -> std::result::Result<
13339 tonic::Response<super::PostOrderAsyncResponse>,
13340 tonic::Status,
13341 > {
13342 self.inner
13343 .ready()
13344 .await
13345 .map_err(|e| {
13346 tonic::Status::unknown(
13347 format!("Service was not ready: {}", e.into()),
13348 )
13349 })?;
13350 let codec = tonic_prost::ProstCodec::default();
13351 let path = http::uri::PathAndQuery::from_static(
13352 "/tinkoff.public.invest.api.contract.v1.SandboxService/PostSandboxOrderAsync",
13353 );
13354 let mut req = request.into_request();
13355 req.extensions_mut()
13356 .insert(
13357 GrpcMethod::new(
13358 "tinkoff.public.invest.api.contract.v1.SandboxService",
13359 "PostSandboxOrderAsync",
13360 ),
13361 );
13362 self.inner.unary(req, path, codec).await
13363 }
13364 pub async fn replace_sandbox_order(
13366 &mut self,
13367 request: impl tonic::IntoRequest<super::ReplaceOrderRequest>,
13368 ) -> std::result::Result<
13369 tonic::Response<super::PostOrderResponse>,
13370 tonic::Status,
13371 > {
13372 self.inner
13373 .ready()
13374 .await
13375 .map_err(|e| {
13376 tonic::Status::unknown(
13377 format!("Service was not ready: {}", e.into()),
13378 )
13379 })?;
13380 let codec = tonic_prost::ProstCodec::default();
13381 let path = http::uri::PathAndQuery::from_static(
13382 "/tinkoff.public.invest.api.contract.v1.SandboxService/ReplaceSandboxOrder",
13383 );
13384 let mut req = request.into_request();
13385 req.extensions_mut()
13386 .insert(
13387 GrpcMethod::new(
13388 "tinkoff.public.invest.api.contract.v1.SandboxService",
13389 "ReplaceSandboxOrder",
13390 ),
13391 );
13392 self.inner.unary(req, path, codec).await
13393 }
13394 pub async fn get_sandbox_orders(
13396 &mut self,
13397 request: impl tonic::IntoRequest<super::GetOrdersRequest>,
13398 ) -> std::result::Result<
13399 tonic::Response<super::GetOrdersResponse>,
13400 tonic::Status,
13401 > {
13402 self.inner
13403 .ready()
13404 .await
13405 .map_err(|e| {
13406 tonic::Status::unknown(
13407 format!("Service was not ready: {}", e.into()),
13408 )
13409 })?;
13410 let codec = tonic_prost::ProstCodec::default();
13411 let path = http::uri::PathAndQuery::from_static(
13412 "/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxOrders",
13413 );
13414 let mut req = request.into_request();
13415 req.extensions_mut()
13416 .insert(
13417 GrpcMethod::new(
13418 "tinkoff.public.invest.api.contract.v1.SandboxService",
13419 "GetSandboxOrders",
13420 ),
13421 );
13422 self.inner.unary(req, path, codec).await
13423 }
13424 pub async fn cancel_sandbox_order(
13426 &mut self,
13427 request: impl tonic::IntoRequest<super::CancelOrderRequest>,
13428 ) -> std::result::Result<
13429 tonic::Response<super::CancelOrderResponse>,
13430 tonic::Status,
13431 > {
13432 self.inner
13433 .ready()
13434 .await
13435 .map_err(|e| {
13436 tonic::Status::unknown(
13437 format!("Service was not ready: {}", e.into()),
13438 )
13439 })?;
13440 let codec = tonic_prost::ProstCodec::default();
13441 let path = http::uri::PathAndQuery::from_static(
13442 "/tinkoff.public.invest.api.contract.v1.SandboxService/CancelSandboxOrder",
13443 );
13444 let mut req = request.into_request();
13445 req.extensions_mut()
13446 .insert(
13447 GrpcMethod::new(
13448 "tinkoff.public.invest.api.contract.v1.SandboxService",
13449 "CancelSandboxOrder",
13450 ),
13451 );
13452 self.inner.unary(req, path, codec).await
13453 }
13454 pub async fn get_sandbox_order_state(
13456 &mut self,
13457 request: impl tonic::IntoRequest<super::GetOrderStateRequest>,
13458 ) -> std::result::Result<tonic::Response<super::OrderState>, tonic::Status> {
13459 self.inner
13460 .ready()
13461 .await
13462 .map_err(|e| {
13463 tonic::Status::unknown(
13464 format!("Service was not ready: {}", e.into()),
13465 )
13466 })?;
13467 let codec = tonic_prost::ProstCodec::default();
13468 let path = http::uri::PathAndQuery::from_static(
13469 "/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxOrderState",
13470 );
13471 let mut req = request.into_request();
13472 req.extensions_mut()
13473 .insert(
13474 GrpcMethod::new(
13475 "tinkoff.public.invest.api.contract.v1.SandboxService",
13476 "GetSandboxOrderState",
13477 ),
13478 );
13479 self.inner.unary(req, path, codec).await
13480 }
13481 pub async fn get_sandbox_order_price(
13483 &mut self,
13484 request: impl tonic::IntoRequest<super::GetOrderPriceRequest>,
13485 ) -> std::result::Result<
13486 tonic::Response<super::GetOrderPriceResponse>,
13487 tonic::Status,
13488 > {
13489 self.inner
13490 .ready()
13491 .await
13492 .map_err(|e| {
13493 tonic::Status::unknown(
13494 format!("Service was not ready: {}", e.into()),
13495 )
13496 })?;
13497 let codec = tonic_prost::ProstCodec::default();
13498 let path = http::uri::PathAndQuery::from_static(
13499 "/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxOrderPrice",
13500 );
13501 let mut req = request.into_request();
13502 req.extensions_mut()
13503 .insert(
13504 GrpcMethod::new(
13505 "tinkoff.public.invest.api.contract.v1.SandboxService",
13506 "GetSandboxOrderPrice",
13507 ),
13508 );
13509 self.inner.unary(req, path, codec).await
13510 }
13511 pub async fn get_sandbox_positions(
13513 &mut self,
13514 request: impl tonic::IntoRequest<super::PositionsRequest>,
13515 ) -> std::result::Result<
13516 tonic::Response<super::PositionsResponse>,
13517 tonic::Status,
13518 > {
13519 self.inner
13520 .ready()
13521 .await
13522 .map_err(|e| {
13523 tonic::Status::unknown(
13524 format!("Service was not ready: {}", e.into()),
13525 )
13526 })?;
13527 let codec = tonic_prost::ProstCodec::default();
13528 let path = http::uri::PathAndQuery::from_static(
13529 "/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxPositions",
13530 );
13531 let mut req = request.into_request();
13532 req.extensions_mut()
13533 .insert(
13534 GrpcMethod::new(
13535 "tinkoff.public.invest.api.contract.v1.SandboxService",
13536 "GetSandboxPositions",
13537 ),
13538 );
13539 self.inner.unary(req, path, codec).await
13540 }
13541 pub async fn get_sandbox_operations(
13544 &mut self,
13545 request: impl tonic::IntoRequest<super::OperationsRequest>,
13546 ) -> std::result::Result<
13547 tonic::Response<super::OperationsResponse>,
13548 tonic::Status,
13549 > {
13550 self.inner
13551 .ready()
13552 .await
13553 .map_err(|e| {
13554 tonic::Status::unknown(
13555 format!("Service was not ready: {}", e.into()),
13556 )
13557 })?;
13558 let codec = tonic_prost::ProstCodec::default();
13559 let path = http::uri::PathAndQuery::from_static(
13560 "/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxOperations",
13561 );
13562 let mut req = request.into_request();
13563 req.extensions_mut()
13564 .insert(
13565 GrpcMethod::new(
13566 "tinkoff.public.invest.api.contract.v1.SandboxService",
13567 "GetSandboxOperations",
13568 ),
13569 );
13570 self.inner.unary(req, path, codec).await
13571 }
13572 pub async fn get_sandbox_operations_by_cursor(
13575 &mut self,
13576 request: impl tonic::IntoRequest<super::GetOperationsByCursorRequest>,
13577 ) -> std::result::Result<
13578 tonic::Response<super::GetOperationsByCursorResponse>,
13579 tonic::Status,
13580 > {
13581 self.inner
13582 .ready()
13583 .await
13584 .map_err(|e| {
13585 tonic::Status::unknown(
13586 format!("Service was not ready: {}", e.into()),
13587 )
13588 })?;
13589 let codec = tonic_prost::ProstCodec::default();
13590 let path = http::uri::PathAndQuery::from_static(
13591 "/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxOperationsByCursor",
13592 );
13593 let mut req = request.into_request();
13594 req.extensions_mut()
13595 .insert(
13596 GrpcMethod::new(
13597 "tinkoff.public.invest.api.contract.v1.SandboxService",
13598 "GetSandboxOperationsByCursor",
13599 ),
13600 );
13601 self.inner.unary(req, path, codec).await
13602 }
13603 pub async fn get_sandbox_portfolio(
13605 &mut self,
13606 request: impl tonic::IntoRequest<super::PortfolioRequest>,
13607 ) -> std::result::Result<
13608 tonic::Response<super::PortfolioResponse>,
13609 tonic::Status,
13610 > {
13611 self.inner
13612 .ready()
13613 .await
13614 .map_err(|e| {
13615 tonic::Status::unknown(
13616 format!("Service was not ready: {}", e.into()),
13617 )
13618 })?;
13619 let codec = tonic_prost::ProstCodec::default();
13620 let path = http::uri::PathAndQuery::from_static(
13621 "/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxPortfolio",
13622 );
13623 let mut req = request.into_request();
13624 req.extensions_mut()
13625 .insert(
13626 GrpcMethod::new(
13627 "tinkoff.public.invest.api.contract.v1.SandboxService",
13628 "GetSandboxPortfolio",
13629 ),
13630 );
13631 self.inner.unary(req, path, codec).await
13632 }
13633 pub async fn sandbox_pay_in(
13635 &mut self,
13636 request: impl tonic::IntoRequest<super::SandboxPayInRequest>,
13637 ) -> std::result::Result<
13638 tonic::Response<super::SandboxPayInResponse>,
13639 tonic::Status,
13640 > {
13641 self.inner
13642 .ready()
13643 .await
13644 .map_err(|e| {
13645 tonic::Status::unknown(
13646 format!("Service was not ready: {}", e.into()),
13647 )
13648 })?;
13649 let codec = tonic_prost::ProstCodec::default();
13650 let path = http::uri::PathAndQuery::from_static(
13651 "/tinkoff.public.invest.api.contract.v1.SandboxService/SandboxPayIn",
13652 );
13653 let mut req = request.into_request();
13654 req.extensions_mut()
13655 .insert(
13656 GrpcMethod::new(
13657 "tinkoff.public.invest.api.contract.v1.SandboxService",
13658 "SandboxPayIn",
13659 ),
13660 );
13661 self.inner.unary(req, path, codec).await
13662 }
13663 pub async fn get_sandbox_withdraw_limits(
13665 &mut self,
13666 request: impl tonic::IntoRequest<super::WithdrawLimitsRequest>,
13667 ) -> std::result::Result<
13668 tonic::Response<super::WithdrawLimitsResponse>,
13669 tonic::Status,
13670 > {
13671 self.inner
13672 .ready()
13673 .await
13674 .map_err(|e| {
13675 tonic::Status::unknown(
13676 format!("Service was not ready: {}", e.into()),
13677 )
13678 })?;
13679 let codec = tonic_prost::ProstCodec::default();
13680 let path = http::uri::PathAndQuery::from_static(
13681 "/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxWithdrawLimits",
13682 );
13683 let mut req = request.into_request();
13684 req.extensions_mut()
13685 .insert(
13686 GrpcMethod::new(
13687 "tinkoff.public.invest.api.contract.v1.SandboxService",
13688 "GetSandboxWithdrawLimits",
13689 ),
13690 );
13691 self.inner.unary(req, path, codec).await
13692 }
13693 pub async fn get_sandbox_max_lots(
13695 &mut self,
13696 request: impl tonic::IntoRequest<super::GetMaxLotsRequest>,
13697 ) -> std::result::Result<
13698 tonic::Response<super::GetMaxLotsResponse>,
13699 tonic::Status,
13700 > {
13701 self.inner
13702 .ready()
13703 .await
13704 .map_err(|e| {
13705 tonic::Status::unknown(
13706 format!("Service was not ready: {}", e.into()),
13707 )
13708 })?;
13709 let codec = tonic_prost::ProstCodec::default();
13710 let path = http::uri::PathAndQuery::from_static(
13711 "/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxMaxLots",
13712 );
13713 let mut req = request.into_request();
13714 req.extensions_mut()
13715 .insert(
13716 GrpcMethod::new(
13717 "tinkoff.public.invest.api.contract.v1.SandboxService",
13718 "GetSandboxMaxLots",
13719 ),
13720 );
13721 self.inner.unary(req, path, codec).await
13722 }
13723 pub async fn post_sandbox_stop_order(
13725 &mut self,
13726 request: impl tonic::IntoRequest<super::PostStopOrderRequest>,
13727 ) -> std::result::Result<
13728 tonic::Response<super::PostStopOrderResponse>,
13729 tonic::Status,
13730 > {
13731 self.inner
13732 .ready()
13733 .await
13734 .map_err(|e| {
13735 tonic::Status::unknown(
13736 format!("Service was not ready: {}", e.into()),
13737 )
13738 })?;
13739 let codec = tonic_prost::ProstCodec::default();
13740 let path = http::uri::PathAndQuery::from_static(
13741 "/tinkoff.public.invest.api.contract.v1.SandboxService/PostSandboxStopOrder",
13742 );
13743 let mut req = request.into_request();
13744 req.extensions_mut()
13745 .insert(
13746 GrpcMethod::new(
13747 "tinkoff.public.invest.api.contract.v1.SandboxService",
13748 "PostSandboxStopOrder",
13749 ),
13750 );
13751 self.inner.unary(req, path, codec).await
13752 }
13753 pub async fn get_sandbox_stop_orders(
13755 &mut self,
13756 request: impl tonic::IntoRequest<super::GetStopOrdersRequest>,
13757 ) -> std::result::Result<
13758 tonic::Response<super::GetStopOrdersResponse>,
13759 tonic::Status,
13760 > {
13761 self.inner
13762 .ready()
13763 .await
13764 .map_err(|e| {
13765 tonic::Status::unknown(
13766 format!("Service was not ready: {}", e.into()),
13767 )
13768 })?;
13769 let codec = tonic_prost::ProstCodec::default();
13770 let path = http::uri::PathAndQuery::from_static(
13771 "/tinkoff.public.invest.api.contract.v1.SandboxService/GetSandboxStopOrders",
13772 );
13773 let mut req = request.into_request();
13774 req.extensions_mut()
13775 .insert(
13776 GrpcMethod::new(
13777 "tinkoff.public.invest.api.contract.v1.SandboxService",
13778 "GetSandboxStopOrders",
13779 ),
13780 );
13781 self.inner.unary(req, path, codec).await
13782 }
13783 pub async fn cancel_sandbox_stop_order(
13785 &mut self,
13786 request: impl tonic::IntoRequest<super::CancelStopOrderRequest>,
13787 ) -> std::result::Result<
13788 tonic::Response<super::CancelStopOrderResponse>,
13789 tonic::Status,
13790 > {
13791 self.inner
13792 .ready()
13793 .await
13794 .map_err(|e| {
13795 tonic::Status::unknown(
13796 format!("Service was not ready: {}", e.into()),
13797 )
13798 })?;
13799 let codec = tonic_prost::ProstCodec::default();
13800 let path = http::uri::PathAndQuery::from_static(
13801 "/tinkoff.public.invest.api.contract.v1.SandboxService/CancelSandboxStopOrder",
13802 );
13803 let mut req = request.into_request();
13804 req.extensions_mut()
13805 .insert(
13806 GrpcMethod::new(
13807 "tinkoff.public.invest.api.contract.v1.SandboxService",
13808 "CancelSandboxStopOrder",
13809 ),
13810 );
13811 self.inner.unary(req, path, codec).await
13812 }
13813 }
13814}
13815#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
13817pub struct GetStrategiesRequest {
13818 #[prost(string, optional, tag = "1")]
13820 pub strategy_id: ::core::option::Option<::prost::alloc::string::String>,
13821}
13822#[derive(Clone, PartialEq, ::prost::Message)]
13824pub struct GetStrategiesResponse {
13825 #[prost(message, repeated, tag = "1")]
13826 pub strategies: ::prost::alloc::vec::Vec<Strategy>,
13827}
13828#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
13830pub struct Strategy {
13831 #[prost(string, tag = "1")]
13833 pub strategy_id: ::prost::alloc::string::String,
13834 #[prost(string, tag = "2")]
13836 pub strategy_name: ::prost::alloc::string::String,
13837 #[prost(string, optional, tag = "3")]
13839 pub strategy_description: ::core::option::Option<::prost::alloc::string::String>,
13840 #[prost(string, optional, tag = "4")]
13842 pub strategy_url: ::core::option::Option<::prost::alloc::string::String>,
13843 #[prost(enumeration = "StrategyType", tag = "5")]
13845 pub strategy_type: i32,
13846 #[prost(int32, tag = "6")]
13848 pub active_signals: i32,
13849 #[prost(int32, tag = "7")]
13851 pub total_signals: i32,
13852 #[prost(int64, tag = "8")]
13854 pub time_in_position: i64,
13855 #[prost(message, optional, tag = "9")]
13857 pub average_signal_yield: ::core::option::Option<Quotation>,
13858 #[prost(message, optional, tag = "10")]
13860 pub average_signal_yield_year: ::core::option::Option<Quotation>,
13861 #[prost(message, optional, tag = "11")]
13863 pub r#yield: ::core::option::Option<Quotation>,
13864 #[prost(message, optional, tag = "12")]
13866 pub yield_year: ::core::option::Option<Quotation>,
13867}
13868#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
13870pub struct GetSignalsRequest {
13871 #[prost(string, optional, tag = "1")]
13873 pub signal_id: ::core::option::Option<::prost::alloc::string::String>,
13874 #[prost(string, optional, tag = "2")]
13876 pub strategy_id: ::core::option::Option<::prost::alloc::string::String>,
13877 #[prost(enumeration = "StrategyType", optional, tag = "3")]
13879 pub strategy_type: ::core::option::Option<i32>,
13880 #[prost(string, optional, tag = "4")]
13885 pub instrument_uid: ::core::option::Option<::prost::alloc::string::String>,
13886 #[prost(message, optional, tag = "5")]
13891 pub from: ::core::option::Option<::prost_types::Timestamp>,
13892 #[prost(message, optional, tag = "6")]
13897 pub to: ::core::option::Option<::prost_types::Timestamp>,
13898 #[prost(enumeration = "SignalDirection", optional, tag = "7")]
13903 pub direction: ::core::option::Option<i32>,
13904 #[prost(enumeration = "SignalState", optional, tag = "8")]
13906 pub active: ::core::option::Option<i32>,
13907 #[prost(message, optional, tag = "9")]
13909 pub paging: ::core::option::Option<Page>,
13910}
13911#[derive(Clone, PartialEq, ::prost::Message)]
13913pub struct GetSignalsResponse {
13914 #[prost(message, repeated, tag = "1")]
13916 pub signals: ::prost::alloc::vec::Vec<Signal>,
13917 #[prost(message, optional, tag = "2")]
13919 pub paging: ::core::option::Option<PageResponse>,
13920}
13921#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
13923pub struct Signal {
13924 #[prost(string, tag = "1")]
13926 pub signal_id: ::prost::alloc::string::String,
13927 #[prost(string, tag = "2")]
13929 pub strategy_id: ::prost::alloc::string::String,
13930 #[prost(string, tag = "3")]
13932 pub strategy_name: ::prost::alloc::string::String,
13933 #[prost(string, tag = "4")]
13935 pub instrument_uid: ::prost::alloc::string::String,
13936 #[prost(message, optional, tag = "5")]
13938 pub create_dt: ::core::option::Option<::prost_types::Timestamp>,
13939 #[prost(enumeration = "SignalDirection", tag = "6")]
13941 pub direction: i32,
13942 #[prost(message, optional, tag = "7")]
13944 pub initial_price: ::core::option::Option<Quotation>,
13945 #[prost(string, optional, tag = "8")]
13947 pub info: ::core::option::Option<::prost::alloc::string::String>,
13948 #[prost(string, tag = "9")]
13950 pub name: ::prost::alloc::string::String,
13951 #[prost(message, optional, tag = "10")]
13953 pub target_price: ::core::option::Option<Quotation>,
13954 #[prost(message, optional, tag = "11")]
13956 pub end_dt: ::core::option::Option<::prost_types::Timestamp>,
13957 #[prost(int32, optional, tag = "12")]
13959 pub probability: ::core::option::Option<i32>,
13960 #[prost(message, optional, tag = "13")]
13962 pub stoploss: ::core::option::Option<Quotation>,
13963 #[prost(message, optional, tag = "14")]
13965 pub close_price: ::core::option::Option<Quotation>,
13966 #[prost(message, optional, tag = "15")]
13968 pub close_dt: ::core::option::Option<::prost_types::Timestamp>,
13969}
13970#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
13972#[repr(i32)]
13973pub enum StrategyType {
13974 Unspecified = 0,
13976 Technical = 1,
13978 Fundamental = 2,
13980}
13981impl StrategyType {
13982 pub fn as_str_name(&self) -> &'static str {
13987 match self {
13988 Self::Unspecified => "STRATEGY_TYPE_UNSPECIFIED",
13989 Self::Technical => "STRATEGY_TYPE_TECHNICAL",
13990 Self::Fundamental => "STRATEGY_TYPE_FUNDAMENTAL",
13991 }
13992 }
13993 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
13995 match value {
13996 "STRATEGY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
13997 "STRATEGY_TYPE_TECHNICAL" => Some(Self::Technical),
13998 "STRATEGY_TYPE_FUNDAMENTAL" => Some(Self::Fundamental),
13999 _ => None,
14000 }
14001 }
14002}
14003#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
14005#[repr(i32)]
14006pub enum SignalDirection {
14007 Unspecified = 0,
14009 Buy = 1,
14011 Sell = 2,
14013}
14014impl SignalDirection {
14015 pub fn as_str_name(&self) -> &'static str {
14020 match self {
14021 Self::Unspecified => "SIGNAL_DIRECTION_UNSPECIFIED",
14022 Self::Buy => "SIGNAL_DIRECTION_BUY",
14023 Self::Sell => "SIGNAL_DIRECTION_SELL",
14024 }
14025 }
14026 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
14028 match value {
14029 "SIGNAL_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
14030 "SIGNAL_DIRECTION_BUY" => Some(Self::Buy),
14031 "SIGNAL_DIRECTION_SELL" => Some(Self::Sell),
14032 _ => None,
14033 }
14034 }
14035}
14036#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
14038#[repr(i32)]
14039pub enum SignalState {
14040 Unspecified = 0,
14042 Active = 1,
14044 Closed = 2,
14046 All = 3,
14048}
14049impl SignalState {
14050 pub fn as_str_name(&self) -> &'static str {
14055 match self {
14056 Self::Unspecified => "SIGNAL_STATE_UNSPECIFIED",
14057 Self::Active => "SIGNAL_STATE_ACTIVE",
14058 Self::Closed => "SIGNAL_STATE_CLOSED",
14059 Self::All => "SIGNAL_STATE_ALL",
14060 }
14061 }
14062 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
14064 match value {
14065 "SIGNAL_STATE_UNSPECIFIED" => Some(Self::Unspecified),
14066 "SIGNAL_STATE_ACTIVE" => Some(Self::Active),
14067 "SIGNAL_STATE_CLOSED" => Some(Self::Closed),
14068 "SIGNAL_STATE_ALL" => Some(Self::All),
14069 _ => None,
14070 }
14071 }
14072}
14073pub mod signal_service_client {
14075 #![allow(
14076 unused_variables,
14077 dead_code,
14078 missing_docs,
14079 clippy::wildcard_imports,
14080 clippy::let_unit_value,
14081 )]
14082 use tonic::codegen::*;
14083 use tonic::codegen::http::Uri;
14084 #[derive(Debug, Clone)]
14085 pub struct SignalServiceClient<T> {
14086 inner: tonic::client::Grpc<T>,
14087 }
14088 impl SignalServiceClient<tonic::transport::Channel> {
14089 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
14091 where
14092 D: TryInto<tonic::transport::Endpoint>,
14093 D::Error: Into<StdError>,
14094 {
14095 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
14096 Ok(Self::new(conn))
14097 }
14098 }
14099 impl<T> SignalServiceClient<T>
14100 where
14101 T: tonic::client::GrpcService<tonic::body::Body>,
14102 T::Error: Into<StdError>,
14103 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
14104 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
14105 {
14106 pub fn new(inner: T) -> Self {
14107 let inner = tonic::client::Grpc::new(inner);
14108 Self { inner }
14109 }
14110 pub fn with_origin(inner: T, origin: Uri) -> Self {
14111 let inner = tonic::client::Grpc::with_origin(inner, origin);
14112 Self { inner }
14113 }
14114 pub fn with_interceptor<F>(
14115 inner: T,
14116 interceptor: F,
14117 ) -> SignalServiceClient<InterceptedService<T, F>>
14118 where
14119 F: tonic::service::Interceptor,
14120 T::ResponseBody: Default,
14121 T: tonic::codegen::Service<
14122 http::Request<tonic::body::Body>,
14123 Response = http::Response<
14124 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
14125 >,
14126 >,
14127 <T as tonic::codegen::Service<
14128 http::Request<tonic::body::Body>,
14129 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
14130 {
14131 SignalServiceClient::new(InterceptedService::new(inner, interceptor))
14132 }
14133 #[must_use]
14138 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
14139 self.inner = self.inner.send_compressed(encoding);
14140 self
14141 }
14142 #[must_use]
14144 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
14145 self.inner = self.inner.accept_compressed(encoding);
14146 self
14147 }
14148 #[must_use]
14152 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
14153 self.inner = self.inner.max_decoding_message_size(limit);
14154 self
14155 }
14156 #[must_use]
14160 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
14161 self.inner = self.inner.max_encoding_message_size(limit);
14162 self
14163 }
14164 pub async fn get_strategies(
14166 &mut self,
14167 request: impl tonic::IntoRequest<super::GetStrategiesRequest>,
14168 ) -> std::result::Result<
14169 tonic::Response<super::GetStrategiesResponse>,
14170 tonic::Status,
14171 > {
14172 self.inner
14173 .ready()
14174 .await
14175 .map_err(|e| {
14176 tonic::Status::unknown(
14177 format!("Service was not ready: {}", e.into()),
14178 )
14179 })?;
14180 let codec = tonic_prost::ProstCodec::default();
14181 let path = http::uri::PathAndQuery::from_static(
14182 "/tinkoff.public.invest.api.contract.v1.SignalService/GetStrategies",
14183 );
14184 let mut req = request.into_request();
14185 req.extensions_mut()
14186 .insert(
14187 GrpcMethod::new(
14188 "tinkoff.public.invest.api.contract.v1.SignalService",
14189 "GetStrategies",
14190 ),
14191 );
14192 self.inner.unary(req, path, codec).await
14193 }
14194 pub async fn get_signals(
14196 &mut self,
14197 request: impl tonic::IntoRequest<super::GetSignalsRequest>,
14198 ) -> std::result::Result<
14199 tonic::Response<super::GetSignalsResponse>,
14200 tonic::Status,
14201 > {
14202 self.inner
14203 .ready()
14204 .await
14205 .map_err(|e| {
14206 tonic::Status::unknown(
14207 format!("Service was not ready: {}", e.into()),
14208 )
14209 })?;
14210 let codec = tonic_prost::ProstCodec::default();
14211 let path = http::uri::PathAndQuery::from_static(
14212 "/tinkoff.public.invest.api.contract.v1.SignalService/GetSignals",
14213 );
14214 let mut req = request.into_request();
14215 req.extensions_mut()
14216 .insert(
14217 GrpcMethod::new(
14218 "tinkoff.public.invest.api.contract.v1.SignalService",
14219 "GetSignals",
14220 ),
14221 );
14222 self.inner.unary(req, path, codec).await
14223 }
14224 }
14225}