1#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct BlockRateLimitConfiguration {
5 #[deprecated]
14 #[prost(message, repeated, tag = "1")]
15 pub max_short_term_orders_per_n_blocks: ::prost::alloc::vec::Vec<
16 MaxPerNBlocksRateLimit,
17 >,
18 #[prost(message, repeated, tag = "2")]
25 pub max_stateful_orders_per_n_blocks: ::prost::alloc::vec::Vec<
26 MaxPerNBlocksRateLimit,
27 >,
28 #[deprecated]
37 #[prost(message, repeated, tag = "3")]
38 pub max_short_term_order_cancellations_per_n_blocks: ::prost::alloc::vec::Vec<
39 MaxPerNBlocksRateLimit,
40 >,
41 #[prost(message, repeated, tag = "4")]
48 pub max_short_term_orders_and_cancels_per_n_blocks: ::prost::alloc::vec::Vec<
49 MaxPerNBlocksRateLimit,
50 >,
51}
52impl ::prost::Name for BlockRateLimitConfiguration {
53 const NAME: &'static str = "BlockRateLimitConfiguration";
54 const PACKAGE: &'static str = "dydxprotocol.clob";
55 fn full_name() -> ::prost::alloc::string::String {
56 "dydxprotocol.clob.BlockRateLimitConfiguration".into()
57 }
58 fn type_url() -> ::prost::alloc::string::String {
59 "/dydxprotocol.clob.BlockRateLimitConfiguration".into()
60 }
61}
62#[derive(Clone, Copy, PartialEq, ::prost::Message)]
64pub struct MaxPerNBlocksRateLimit {
65 #[prost(uint32, tag = "1")]
68 pub num_blocks: u32,
69 #[prost(uint32, tag = "2")]
72 pub limit: u32,
73}
74impl ::prost::Name for MaxPerNBlocksRateLimit {
75 const NAME: &'static str = "MaxPerNBlocksRateLimit";
76 const PACKAGE: &'static str = "dydxprotocol.clob";
77 fn full_name() -> ::prost::alloc::string::String {
78 "dydxprotocol.clob.MaxPerNBlocksRateLimit".into()
79 }
80 fn type_url() -> ::prost::alloc::string::String {
81 "/dydxprotocol.clob.MaxPerNBlocksRateLimit".into()
82 }
83}
84#[derive(Clone, Copy, PartialEq, ::prost::Message)]
87pub struct PerpetualClobMetadata {
88 #[prost(uint32, tag = "1")]
90 pub perpetual_id: u32,
91}
92impl ::prost::Name for PerpetualClobMetadata {
93 const NAME: &'static str = "PerpetualClobMetadata";
94 const PACKAGE: &'static str = "dydxprotocol.clob";
95 fn full_name() -> ::prost::alloc::string::String {
96 "dydxprotocol.clob.PerpetualClobMetadata".into()
97 }
98 fn type_url() -> ::prost::alloc::string::String {
99 "/dydxprotocol.clob.PerpetualClobMetadata".into()
100 }
101}
102#[derive(Clone, Copy, PartialEq, ::prost::Message)]
105pub struct SpotClobMetadata {
106 #[prost(uint32, tag = "1")]
108 pub base_asset_id: u32,
109 #[prost(uint32, tag = "2")]
111 pub quote_asset_id: u32,
112}
113impl ::prost::Name for SpotClobMetadata {
114 const NAME: &'static str = "SpotClobMetadata";
115 const PACKAGE: &'static str = "dydxprotocol.clob";
116 fn full_name() -> ::prost::alloc::string::String {
117 "dydxprotocol.clob.SpotClobMetadata".into()
118 }
119 fn type_url() -> ::prost::alloc::string::String {
120 "/dydxprotocol.clob.SpotClobMetadata".into()
121 }
122}
123#[derive(Clone, Copy, PartialEq, ::prost::Message)]
126pub struct ClobPair {
127 #[prost(uint32, tag = "1")]
129 pub id: u32,
130 #[prost(uint64, tag = "4")]
132 pub step_base_quantums: u64,
133 #[prost(uint32, tag = "5")]
138 pub subticks_per_tick: u32,
139 #[prost(sint32, tag = "6")]
142 pub quantum_conversion_exponent: i32,
143 #[prost(enumeration = "clob_pair::Status", tag = "7")]
144 pub status: i32,
145 #[prost(oneof = "clob_pair::Metadata", tags = "2, 3")]
148 pub metadata: ::core::option::Option<clob_pair::Metadata>,
149}
150pub mod clob_pair {
152 #[derive(
154 Clone,
155 Copy,
156 Debug,
157 PartialEq,
158 Eq,
159 Hash,
160 PartialOrd,
161 Ord,
162 ::prost::Enumeration
163 )]
164 #[repr(i32)]
165 pub enum Status {
166 Unspecified = 0,
168 Active = 1,
170 Paused = 2,
173 CancelOnly = 3,
176 PostOnly = 4,
179 Initializing = 5,
183 FinalSettlement = 6,
188 }
189 impl Status {
190 pub fn as_str_name(&self) -> &'static str {
195 match self {
196 Self::Unspecified => "STATUS_UNSPECIFIED",
197 Self::Active => "STATUS_ACTIVE",
198 Self::Paused => "STATUS_PAUSED",
199 Self::CancelOnly => "STATUS_CANCEL_ONLY",
200 Self::PostOnly => "STATUS_POST_ONLY",
201 Self::Initializing => "STATUS_INITIALIZING",
202 Self::FinalSettlement => "STATUS_FINAL_SETTLEMENT",
203 }
204 }
205 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
207 match value {
208 "STATUS_UNSPECIFIED" => Some(Self::Unspecified),
209 "STATUS_ACTIVE" => Some(Self::Active),
210 "STATUS_PAUSED" => Some(Self::Paused),
211 "STATUS_CANCEL_ONLY" => Some(Self::CancelOnly),
212 "STATUS_POST_ONLY" => Some(Self::PostOnly),
213 "STATUS_INITIALIZING" => Some(Self::Initializing),
214 "STATUS_FINAL_SETTLEMENT" => Some(Self::FinalSettlement),
215 _ => None,
216 }
217 }
218 }
219 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
222 pub enum Metadata {
223 #[prost(message, tag = "2")]
224 PerpetualClobMetadata(super::PerpetualClobMetadata),
225 #[prost(message, tag = "3")]
226 SpotClobMetadata(super::SpotClobMetadata),
227 }
228}
229impl ::prost::Name for ClobPair {
230 const NAME: &'static str = "ClobPair";
231 const PACKAGE: &'static str = "dydxprotocol.clob";
232 fn full_name() -> ::prost::alloc::string::String {
233 "dydxprotocol.clob.ClobPair".into()
234 }
235 fn type_url() -> ::prost::alloc::string::String {
236 "/dydxprotocol.clob.ClobPair".into()
237 }
238}
239#[derive(Clone, PartialEq, ::prost::Message)]
242pub struct EquityTierLimitConfiguration {
243 #[prost(message, repeated, tag = "1")]
246 pub short_term_order_equity_tiers: ::prost::alloc::vec::Vec<EquityTierLimit>,
247 #[prost(message, repeated, tag = "2")]
250 pub stateful_order_equity_tiers: ::prost::alloc::vec::Vec<EquityTierLimit>,
251}
252impl ::prost::Name for EquityTierLimitConfiguration {
253 const NAME: &'static str = "EquityTierLimitConfiguration";
254 const PACKAGE: &'static str = "dydxprotocol.clob";
255 fn full_name() -> ::prost::alloc::string::String {
256 "dydxprotocol.clob.EquityTierLimitConfiguration".into()
257 }
258 fn type_url() -> ::prost::alloc::string::String {
259 "/dydxprotocol.clob.EquityTierLimitConfiguration".into()
260 }
261}
262#[derive(Clone, PartialEq, ::prost::Message)]
264pub struct EquityTierLimit {
265 #[prost(bytes = "vec", tag = "1")]
267 pub usd_tnc_required: ::prost::alloc::vec::Vec<u8>,
268 #[prost(uint32, tag = "2")]
270 pub limit: u32,
271}
272impl ::prost::Name for EquityTierLimit {
273 const NAME: &'static str = "EquityTierLimit";
274 const PACKAGE: &'static str = "dydxprotocol.clob";
275 fn full_name() -> ::prost::alloc::string::String {
276 "dydxprotocol.clob.EquityTierLimit".into()
277 }
278 fn type_url() -> ::prost::alloc::string::String {
279 "/dydxprotocol.clob.EquityTierLimit".into()
280 }
281}
282#[derive(Clone, Copy, PartialEq, ::prost::Message)]
285pub struct ClobStagedFinalizeBlockEvent {
286 #[prost(oneof = "clob_staged_finalize_block_event::Event", tags = "1")]
288 pub event: ::core::option::Option<clob_staged_finalize_block_event::Event>,
289}
290pub mod clob_staged_finalize_block_event {
292 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
294 pub enum Event {
295 #[prost(message, tag = "1")]
297 CreateClobPair(super::ClobPair),
298 }
299}
300impl ::prost::Name for ClobStagedFinalizeBlockEvent {
301 const NAME: &'static str = "ClobStagedFinalizeBlockEvent";
302 const PACKAGE: &'static str = "dydxprotocol.clob";
303 fn full_name() -> ::prost::alloc::string::String {
304 "dydxprotocol.clob.ClobStagedFinalizeBlockEvent".into()
305 }
306 fn type_url() -> ::prost::alloc::string::String {
307 "/dydxprotocol.clob.ClobStagedFinalizeBlockEvent".into()
308 }
309}
310#[derive(Clone, Copy, PartialEq, ::prost::Message)]
312pub struct LiquidationsConfig {
313 #[prost(uint32, tag = "1")]
316 pub max_liquidation_fee_ppm: u32,
317 #[prost(message, optional, tag = "2")]
320 pub position_block_limits: ::core::option::Option<PositionBlockLimits>,
321 #[prost(message, optional, tag = "3")]
324 pub subaccount_block_limits: ::core::option::Option<SubaccountBlockLimits>,
325 #[prost(message, optional, tag = "4")]
328 pub fillable_price_config: ::core::option::Option<FillablePriceConfig>,
329}
330impl ::prost::Name for LiquidationsConfig {
331 const NAME: &'static str = "LiquidationsConfig";
332 const PACKAGE: &'static str = "dydxprotocol.clob";
333 fn full_name() -> ::prost::alloc::string::String {
334 "dydxprotocol.clob.LiquidationsConfig".into()
335 }
336 fn type_url() -> ::prost::alloc::string::String {
337 "/dydxprotocol.clob.LiquidationsConfig".into()
338 }
339}
340#[derive(Clone, Copy, PartialEq, ::prost::Message)]
343pub struct PositionBlockLimits {
344 #[prost(uint64, tag = "1")]
348 pub min_position_notional_liquidated: u64,
349 #[prost(uint32, tag = "2")]
352 pub max_position_portion_liquidated_ppm: u32,
353}
354impl ::prost::Name for PositionBlockLimits {
355 const NAME: &'static str = "PositionBlockLimits";
356 const PACKAGE: &'static str = "dydxprotocol.clob";
357 fn full_name() -> ::prost::alloc::string::String {
358 "dydxprotocol.clob.PositionBlockLimits".into()
359 }
360 fn type_url() -> ::prost::alloc::string::String {
361 "/dydxprotocol.clob.PositionBlockLimits".into()
362 }
363}
364#[derive(Clone, Copy, PartialEq, ::prost::Message)]
368pub struct SubaccountBlockLimits {
369 #[prost(uint64, tag = "1")]
372 pub max_notional_liquidated: u64,
373 #[prost(uint64, tag = "2")]
376 pub max_quantums_insurance_lost: u64,
377}
378impl ::prost::Name for SubaccountBlockLimits {
379 const NAME: &'static str = "SubaccountBlockLimits";
380 const PACKAGE: &'static str = "dydxprotocol.clob";
381 fn full_name() -> ::prost::alloc::string::String {
382 "dydxprotocol.clob.SubaccountBlockLimits".into()
383 }
384 fn type_url() -> ::prost::alloc::string::String {
385 "/dydxprotocol.clob.SubaccountBlockLimits".into()
386 }
387}
388#[derive(Clone, Copy, PartialEq, ::prost::Message)]
391pub struct FillablePriceConfig {
392 #[prost(uint32, tag = "1")]
394 pub bankruptcy_adjustment_ppm: u32,
395 #[prost(uint32, tag = "2")]
398 pub spread_to_maintenance_margin_ratio_ppm: u32,
399}
400impl ::prost::Name for FillablePriceConfig {
401 const NAME: &'static str = "FillablePriceConfig";
402 const PACKAGE: &'static str = "dydxprotocol.clob";
403 fn full_name() -> ::prost::alloc::string::String {
404 "dydxprotocol.clob.FillablePriceConfig".into()
405 }
406 fn type_url() -> ::prost::alloc::string::String {
407 "/dydxprotocol.clob.FillablePriceConfig".into()
408 }
409}
410#[derive(Clone, PartialEq, ::prost::Message)]
412pub struct GenesisState {
413 #[prost(message, repeated, tag = "1")]
414 pub clob_pairs: ::prost::alloc::vec::Vec<ClobPair>,
415 #[prost(message, optional, tag = "2")]
416 pub liquidations_config: ::core::option::Option<LiquidationsConfig>,
417 #[prost(message, optional, tag = "3")]
418 pub block_rate_limit_config: ::core::option::Option<BlockRateLimitConfiguration>,
419 #[prost(message, optional, tag = "4")]
420 pub equity_tier_limit_config: ::core::option::Option<EquityTierLimitConfiguration>,
421}
422impl ::prost::Name for GenesisState {
423 const NAME: &'static str = "GenesisState";
424 const PACKAGE: &'static str = "dydxprotocol.clob";
425 fn full_name() -> ::prost::alloc::string::String {
426 "dydxprotocol.clob.GenesisState".into()
427 }
428 fn type_url() -> ::prost::alloc::string::String {
429 "/dydxprotocol.clob.GenesisState".into()
430 }
431}
432#[derive(Clone, PartialEq, ::prost::Message)]
437pub struct PerpetualLiquidationInfo {
438 #[prost(message, optional, tag = "1")]
441 pub subaccount_id: ::core::option::Option<super::subaccounts::SubaccountId>,
442 #[prost(uint32, tag = "2")]
444 pub perpetual_id: u32,
445}
446impl ::prost::Name for PerpetualLiquidationInfo {
447 const NAME: &'static str = "PerpetualLiquidationInfo";
448 const PACKAGE: &'static str = "dydxprotocol.clob";
449 fn full_name() -> ::prost::alloc::string::String {
450 "dydxprotocol.clob.PerpetualLiquidationInfo".into()
451 }
452 fn type_url() -> ::prost::alloc::string::String {
453 "/dydxprotocol.clob.PerpetualLiquidationInfo".into()
454 }
455}
456#[derive(Clone, PartialEq, ::prost::Message)]
459pub struct SubaccountLiquidationInfo {
460 #[prost(uint32, repeated, tag = "1")]
463 pub perpetuals_liquidated: ::prost::alloc::vec::Vec<u32>,
464 #[prost(uint64, tag = "2")]
467 pub notional_liquidated: u64,
468 #[prost(uint64, tag = "3")]
471 pub quantums_insurance_lost: u64,
472}
473impl ::prost::Name for SubaccountLiquidationInfo {
474 const NAME: &'static str = "SubaccountLiquidationInfo";
475 const PACKAGE: &'static str = "dydxprotocol.clob";
476 fn full_name() -> ::prost::alloc::string::String {
477 "dydxprotocol.clob.SubaccountLiquidationInfo".into()
478 }
479 fn type_url() -> ::prost::alloc::string::String {
480 "/dydxprotocol.clob.SubaccountLiquidationInfo".into()
481 }
482}
483#[derive(Clone, PartialEq, ::prost::Message)]
486pub struct SubaccountOpenPositionInfo {
487 #[prost(uint32, tag = "1")]
489 pub perpetual_id: u32,
490 #[prost(message, repeated, tag = "2")]
492 pub subaccounts_with_long_position: ::prost::alloc::vec::Vec<
493 super::subaccounts::SubaccountId,
494 >,
495 #[prost(message, repeated, tag = "3")]
497 pub subaccounts_with_short_position: ::prost::alloc::vec::Vec<
498 super::subaccounts::SubaccountId,
499 >,
500}
501impl ::prost::Name for SubaccountOpenPositionInfo {
502 const NAME: &'static str = "SubaccountOpenPositionInfo";
503 const PACKAGE: &'static str = "dydxprotocol.clob";
504 fn full_name() -> ::prost::alloc::string::String {
505 "dydxprotocol.clob.SubaccountOpenPositionInfo".into()
506 }
507 fn type_url() -> ::prost::alloc::string::String {
508 "/dydxprotocol.clob.SubaccountOpenPositionInfo".into()
509 }
510}
511#[derive(Clone, PartialEq, ::prost::Message)]
513pub struct OrderId {
514 #[prost(message, optional, tag = "1")]
520 pub subaccount_id: ::core::option::Option<super::subaccounts::SubaccountId>,
521 #[prost(fixed32, tag = "2")]
525 pub client_id: u32,
526 #[prost(uint32, tag = "3")]
539 pub order_flags: u32,
540 #[prost(uint32, tag = "4")]
542 pub clob_pair_id: u32,
543}
544impl ::prost::Name for OrderId {
545 const NAME: &'static str = "OrderId";
546 const PACKAGE: &'static str = "dydxprotocol.clob";
547 fn full_name() -> ::prost::alloc::string::String {
548 "dydxprotocol.clob.OrderId".into()
549 }
550 fn type_url() -> ::prost::alloc::string::String {
551 "/dydxprotocol.clob.OrderId".into()
552 }
553}
554#[derive(Clone, PartialEq, ::prost::Message)]
557pub struct OrdersFilledDuringLatestBlock {
558 #[prost(message, repeated, tag = "1")]
561 pub order_ids: ::prost::alloc::vec::Vec<OrderId>,
562}
563impl ::prost::Name for OrdersFilledDuringLatestBlock {
564 const NAME: &'static str = "OrdersFilledDuringLatestBlock";
565 const PACKAGE: &'static str = "dydxprotocol.clob";
566 fn full_name() -> ::prost::alloc::string::String {
567 "dydxprotocol.clob.OrdersFilledDuringLatestBlock".into()
568 }
569 fn type_url() -> ::prost::alloc::string::String {
570 "/dydxprotocol.clob.OrdersFilledDuringLatestBlock".into()
571 }
572}
573#[derive(Clone, PartialEq, ::prost::Message)]
576pub struct PotentiallyPrunableOrders {
577 #[prost(message, repeated, tag = "1")]
580 pub order_ids: ::prost::alloc::vec::Vec<OrderId>,
581}
582impl ::prost::Name for PotentiallyPrunableOrders {
583 const NAME: &'static str = "PotentiallyPrunableOrders";
584 const PACKAGE: &'static str = "dydxprotocol.clob";
585 fn full_name() -> ::prost::alloc::string::String {
586 "dydxprotocol.clob.PotentiallyPrunableOrders".into()
587 }
588 fn type_url() -> ::prost::alloc::string::String {
589 "/dydxprotocol.clob.PotentiallyPrunableOrders".into()
590 }
591}
592#[derive(Clone, Copy, PartialEq, ::prost::Message)]
597pub struct OrderFillState {
598 #[prost(uint64, tag = "1")]
600 pub fill_amount: u64,
601 #[prost(uint32, tag = "2")]
604 pub prunable_block_height: u32,
605}
606impl ::prost::Name for OrderFillState {
607 const NAME: &'static str = "OrderFillState";
608 const PACKAGE: &'static str = "dydxprotocol.clob";
609 fn full_name() -> ::prost::alloc::string::String {
610 "dydxprotocol.clob.OrderFillState".into()
611 }
612 fn type_url() -> ::prost::alloc::string::String {
613 "/dydxprotocol.clob.OrderFillState".into()
614 }
615}
616#[derive(Clone, PartialEq, ::prost::Message)]
625pub struct StatefulOrderTimeSliceValue {
626 #[prost(message, repeated, tag = "1")]
630 pub order_ids: ::prost::alloc::vec::Vec<OrderId>,
631}
632impl ::prost::Name for StatefulOrderTimeSliceValue {
633 const NAME: &'static str = "StatefulOrderTimeSliceValue";
634 const PACKAGE: &'static str = "dydxprotocol.clob";
635 fn full_name() -> ::prost::alloc::string::String {
636 "dydxprotocol.clob.StatefulOrderTimeSliceValue".into()
637 }
638 fn type_url() -> ::prost::alloc::string::String {
639 "/dydxprotocol.clob.StatefulOrderTimeSliceValue".into()
640 }
641}
642#[derive(Clone, PartialEq, ::prost::Message)]
646pub struct LongTermOrderPlacement {
647 #[prost(message, optional, tag = "1")]
648 pub order: ::core::option::Option<Order>,
649 #[prost(message, optional, tag = "2")]
652 pub placement_index: ::core::option::Option<TransactionOrdering>,
653}
654impl ::prost::Name for LongTermOrderPlacement {
655 const NAME: &'static str = "LongTermOrderPlacement";
656 const PACKAGE: &'static str = "dydxprotocol.clob";
657 fn full_name() -> ::prost::alloc::string::String {
658 "dydxprotocol.clob.LongTermOrderPlacement".into()
659 }
660 fn type_url() -> ::prost::alloc::string::String {
661 "/dydxprotocol.clob.LongTermOrderPlacement".into()
662 }
663}
664#[derive(Clone, PartialEq, ::prost::Message)]
669pub struct TwapOrderPlacement {
670 #[prost(message, optional, tag = "1")]
671 pub order: ::core::option::Option<Order>,
672 #[prost(uint32, tag = "2")]
674 pub remaining_legs: u32,
675 #[prost(uint64, tag = "3")]
677 pub remaining_quantums: u64,
678}
679impl ::prost::Name for TwapOrderPlacement {
680 const NAME: &'static str = "TwapOrderPlacement";
681 const PACKAGE: &'static str = "dydxprotocol.clob";
682 fn full_name() -> ::prost::alloc::string::String {
683 "dydxprotocol.clob.TwapOrderPlacement".into()
684 }
685 fn type_url() -> ::prost::alloc::string::String {
686 "/dydxprotocol.clob.TwapOrderPlacement".into()
687 }
688}
689#[derive(Clone, PartialEq, ::prost::Message)]
693pub struct ConditionalOrderPlacement {
694 #[prost(message, optional, tag = "1")]
695 pub order: ::core::option::Option<Order>,
696 #[prost(message, optional, tag = "2")]
698 pub placement_index: ::core::option::Option<TransactionOrdering>,
699 #[prost(message, optional, tag = "3")]
703 pub trigger_index: ::core::option::Option<TransactionOrdering>,
704}
705impl ::prost::Name for ConditionalOrderPlacement {
706 const NAME: &'static str = "ConditionalOrderPlacement";
707 const PACKAGE: &'static str = "dydxprotocol.clob";
708 fn full_name() -> ::prost::alloc::string::String {
709 "dydxprotocol.clob.ConditionalOrderPlacement".into()
710 }
711 fn type_url() -> ::prost::alloc::string::String {
712 "/dydxprotocol.clob.ConditionalOrderPlacement".into()
713 }
714}
715#[derive(Clone, PartialEq, ::prost::Message)]
718pub struct Order {
719 #[prost(message, optional, tag = "1")]
721 pub order_id: ::core::option::Option<OrderId>,
722 #[prost(enumeration = "order::Side", tag = "2")]
723 pub side: i32,
724 #[prost(uint64, tag = "3")]
727 pub quantums: u64,
728 #[prost(uint64, tag = "4")]
732 pub subticks: u64,
733 #[prost(enumeration = "order::TimeInForce", tag = "7")]
735 pub time_in_force: i32,
736 #[prost(bool, tag = "8")]
743 pub reduce_only: bool,
744 #[prost(uint32, tag = "9")]
747 pub client_metadata: u32,
748 #[prost(enumeration = "order::ConditionType", tag = "10")]
749 pub condition_type: i32,
750 #[prost(uint64, tag = "11")]
757 pub conditional_order_trigger_subticks: u64,
758 #[prost(message, optional, tag = "12")]
761 pub twap_parameters: ::core::option::Option<TwapParameters>,
762 #[prost(message, optional, tag = "13")]
765 pub builder_code_parameters: ::core::option::Option<BuilderCodeParameters>,
766 #[prost(string, tag = "14")]
769 pub order_router_address: ::prost::alloc::string::String,
770 #[prost(oneof = "order::GoodTilOneof", tags = "5, 6")]
772 pub good_til_oneof: ::core::option::Option<order::GoodTilOneof>,
773}
774pub mod order {
776 #[derive(
780 Clone,
781 Copy,
782 Debug,
783 PartialEq,
784 Eq,
785 Hash,
786 PartialOrd,
787 Ord,
788 ::prost::Enumeration
789 )]
790 #[repr(i32)]
791 pub enum Side {
792 Unspecified = 0,
794 Buy = 1,
796 Sell = 2,
798 }
799 impl Side {
800 pub fn as_str_name(&self) -> &'static str {
805 match self {
806 Self::Unspecified => "SIDE_UNSPECIFIED",
807 Self::Buy => "SIDE_BUY",
808 Self::Sell => "SIDE_SELL",
809 }
810 }
811 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
813 match value {
814 "SIDE_UNSPECIFIED" => Some(Self::Unspecified),
815 "SIDE_BUY" => Some(Self::Buy),
816 "SIDE_SELL" => Some(Self::Sell),
817 _ => None,
818 }
819 }
820 }
821 #[derive(
824 Clone,
825 Copy,
826 Debug,
827 PartialEq,
828 Eq,
829 Hash,
830 PartialOrd,
831 Ord,
832 ::prost::Enumeration
833 )]
834 #[repr(i32)]
835 pub enum TimeInForce {
836 Unspecified = 0,
840 Ioc = 1,
845 PostOnly = 2,
850 FillOrKill = 3,
853 }
854 impl TimeInForce {
855 pub fn as_str_name(&self) -> &'static str {
860 match self {
861 Self::Unspecified => "TIME_IN_FORCE_UNSPECIFIED",
862 Self::Ioc => "TIME_IN_FORCE_IOC",
863 Self::PostOnly => "TIME_IN_FORCE_POST_ONLY",
864 Self::FillOrKill => "TIME_IN_FORCE_FILL_OR_KILL",
865 }
866 }
867 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
869 match value {
870 "TIME_IN_FORCE_UNSPECIFIED" => Some(Self::Unspecified),
871 "TIME_IN_FORCE_IOC" => Some(Self::Ioc),
872 "TIME_IN_FORCE_POST_ONLY" => Some(Self::PostOnly),
873 "TIME_IN_FORCE_FILL_OR_KILL" => Some(Self::FillOrKill),
874 _ => None,
875 }
876 }
877 }
878 #[derive(
879 Clone,
880 Copy,
881 Debug,
882 PartialEq,
883 Eq,
884 Hash,
885 PartialOrd,
886 Ord,
887 ::prost::Enumeration
888 )]
889 #[repr(i32)]
890 pub enum ConditionType {
891 Unspecified = 0,
894 StopLoss = 1,
898 TakeProfit = 2,
902 }
903 impl ConditionType {
904 pub fn as_str_name(&self) -> &'static str {
909 match self {
910 Self::Unspecified => "CONDITION_TYPE_UNSPECIFIED",
911 Self::StopLoss => "CONDITION_TYPE_STOP_LOSS",
912 Self::TakeProfit => "CONDITION_TYPE_TAKE_PROFIT",
913 }
914 }
915 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
917 match value {
918 "CONDITION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
919 "CONDITION_TYPE_STOP_LOSS" => Some(Self::StopLoss),
920 "CONDITION_TYPE_TAKE_PROFIT" => Some(Self::TakeProfit),
921 _ => None,
922 }
923 }
924 }
925 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
927 pub enum GoodTilOneof {
928 #[prost(uint32, tag = "5")]
932 GoodTilBlock(u32),
933 #[prost(fixed32, tag = "6")]
940 GoodTilBlockTime(u32),
941 }
942}
943impl ::prost::Name for Order {
944 const NAME: &'static str = "Order";
945 const PACKAGE: &'static str = "dydxprotocol.clob";
946 fn full_name() -> ::prost::alloc::string::String {
947 "dydxprotocol.clob.Order".into()
948 }
949 fn type_url() -> ::prost::alloc::string::String {
950 "/dydxprotocol.clob.Order".into()
951 }
952}
953#[derive(Clone, Copy, PartialEq, ::prost::Message)]
955pub struct TwapParameters {
956 #[prost(uint32, tag = "1")]
959 pub duration: u32,
960 #[prost(uint32, tag = "2")]
964 pub interval: u32,
965 #[prost(uint32, tag = "3")]
969 pub price_tolerance: u32,
970}
971impl ::prost::Name for TwapParameters {
972 const NAME: &'static str = "TwapParameters";
973 const PACKAGE: &'static str = "dydxprotocol.clob";
974 fn full_name() -> ::prost::alloc::string::String {
975 "dydxprotocol.clob.TwapParameters".into()
976 }
977 fn type_url() -> ::prost::alloc::string::String {
978 "/dydxprotocol.clob.TwapParameters".into()
979 }
980}
981#[derive(Clone, PartialEq, ::prost::Message)]
985pub struct BuilderCodeParameters {
986 #[prost(string, tag = "1")]
988 pub builder_address: ::prost::alloc::string::String,
989 #[prost(uint32, tag = "2")]
991 pub fee_ppm: u32,
992}
993impl ::prost::Name for BuilderCodeParameters {
994 const NAME: &'static str = "BuilderCodeParameters";
995 const PACKAGE: &'static str = "dydxprotocol.clob";
996 fn full_name() -> ::prost::alloc::string::String {
997 "dydxprotocol.clob.BuilderCodeParameters".into()
998 }
999 fn type_url() -> ::prost::alloc::string::String {
1000 "/dydxprotocol.clob.BuilderCodeParameters".into()
1001 }
1002}
1003#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1008pub struct TransactionOrdering {
1009 #[prost(uint32, tag = "1")]
1011 pub block_height: u32,
1012 #[prost(uint32, tag = "2")]
1014 pub transaction_index: u32,
1015}
1016impl ::prost::Name for TransactionOrdering {
1017 const NAME: &'static str = "TransactionOrdering";
1018 const PACKAGE: &'static str = "dydxprotocol.clob";
1019 fn full_name() -> ::prost::alloc::string::String {
1020 "dydxprotocol.clob.TransactionOrdering".into()
1021 }
1022 fn type_url() -> ::prost::alloc::string::String {
1023 "/dydxprotocol.clob.TransactionOrdering".into()
1024 }
1025}
1026#[derive(Clone, PartialEq, ::prost::Message)]
1029pub struct StreamLiquidationOrder {
1030 #[prost(message, optional, tag = "1")]
1032 pub liquidation_info: ::core::option::Option<PerpetualLiquidationInfo>,
1033 #[prost(uint32, tag = "2")]
1036 pub clob_pair_id: u32,
1037 #[prost(bool, tag = "3")]
1040 pub is_buy: bool,
1041 #[prost(uint64, tag = "4")]
1043 pub quantums: u64,
1044 #[prost(uint64, tag = "5")]
1046 pub subticks: u64,
1047}
1048impl ::prost::Name for StreamLiquidationOrder {
1049 const NAME: &'static str = "StreamLiquidationOrder";
1050 const PACKAGE: &'static str = "dydxprotocol.clob";
1051 fn full_name() -> ::prost::alloc::string::String {
1052 "dydxprotocol.clob.StreamLiquidationOrder".into()
1053 }
1054 fn type_url() -> ::prost::alloc::string::String {
1055 "/dydxprotocol.clob.StreamLiquidationOrder".into()
1056 }
1057}
1058#[derive(Clone, PartialEq, ::prost::Message)]
1062pub struct ClobMatch {
1063 #[prost(oneof = "clob_match::Match", tags = "1, 2, 3")]
1065 pub r#match: ::core::option::Option<clob_match::Match>,
1066}
1067pub mod clob_match {
1069 #[derive(Clone, PartialEq, ::prost::Oneof)]
1071 pub enum Match {
1072 #[prost(message, tag = "1")]
1073 MatchOrders(super::MatchOrders),
1074 #[prost(message, tag = "2")]
1075 MatchPerpetualLiquidation(super::MatchPerpetualLiquidation),
1076 #[prost(message, tag = "3")]
1077 MatchPerpetualDeleveraging(super::MatchPerpetualDeleveraging),
1078 }
1079}
1080impl ::prost::Name for ClobMatch {
1081 const NAME: &'static str = "ClobMatch";
1082 const PACKAGE: &'static str = "dydxprotocol.clob";
1083 fn full_name() -> ::prost::alloc::string::String {
1084 "dydxprotocol.clob.ClobMatch".into()
1085 }
1086 fn type_url() -> ::prost::alloc::string::String {
1087 "/dydxprotocol.clob.ClobMatch".into()
1088 }
1089}
1090#[derive(Clone, PartialEq, ::prost::Message)]
1092pub struct MakerFill {
1093 #[prost(uint64, tag = "1")]
1096 pub fill_amount: u64,
1097 #[prost(message, optional, tag = "2")]
1099 pub maker_order_id: ::core::option::Option<OrderId>,
1100}
1101impl ::prost::Name for MakerFill {
1102 const NAME: &'static str = "MakerFill";
1103 const PACKAGE: &'static str = "dydxprotocol.clob";
1104 fn full_name() -> ::prost::alloc::string::String {
1105 "dydxprotocol.clob.MakerFill".into()
1106 }
1107 fn type_url() -> ::prost::alloc::string::String {
1108 "/dydxprotocol.clob.MakerFill".into()
1109 }
1110}
1111#[derive(Clone, PartialEq, ::prost::Message)]
1113pub struct MatchOrders {
1114 #[prost(message, optional, tag = "1")]
1116 pub taker_order_id: ::core::option::Option<OrderId>,
1117 #[prost(message, repeated, tag = "2")]
1119 pub fills: ::prost::alloc::vec::Vec<MakerFill>,
1120}
1121impl ::prost::Name for MatchOrders {
1122 const NAME: &'static str = "MatchOrders";
1123 const PACKAGE: &'static str = "dydxprotocol.clob";
1124 fn full_name() -> ::prost::alloc::string::String {
1125 "dydxprotocol.clob.MatchOrders".into()
1126 }
1127 fn type_url() -> ::prost::alloc::string::String {
1128 "/dydxprotocol.clob.MatchOrders".into()
1129 }
1130}
1131#[derive(Clone, PartialEq, ::prost::Message)]
1134pub struct MatchPerpetualLiquidation {
1135 #[prost(message, optional, tag = "1")]
1137 pub liquidated: ::core::option::Option<super::subaccounts::SubaccountId>,
1138 #[prost(uint32, tag = "2")]
1140 pub clob_pair_id: u32,
1141 #[prost(uint32, tag = "3")]
1143 pub perpetual_id: u32,
1144 #[prost(uint64, tag = "4")]
1146 pub total_size: u64,
1147 #[prost(bool, tag = "5")]
1149 pub is_buy: bool,
1150 #[prost(message, repeated, tag = "6")]
1152 pub fills: ::prost::alloc::vec::Vec<MakerFill>,
1153}
1154impl ::prost::Name for MatchPerpetualLiquidation {
1155 const NAME: &'static str = "MatchPerpetualLiquidation";
1156 const PACKAGE: &'static str = "dydxprotocol.clob";
1157 fn full_name() -> ::prost::alloc::string::String {
1158 "dydxprotocol.clob.MatchPerpetualLiquidation".into()
1159 }
1160 fn type_url() -> ::prost::alloc::string::String {
1161 "/dydxprotocol.clob.MatchPerpetualLiquidation".into()
1162 }
1163}
1164#[derive(Clone, PartialEq, ::prost::Message)]
1167pub struct MatchPerpetualDeleveraging {
1168 #[prost(message, optional, tag = "1")]
1170 pub liquidated: ::core::option::Option<super::subaccounts::SubaccountId>,
1171 #[prost(uint32, tag = "2")]
1173 pub perpetual_id: u32,
1174 #[prost(message, repeated, tag = "3")]
1176 pub fills: ::prost::alloc::vec::Vec<match_perpetual_deleveraging::Fill>,
1177 #[prost(bool, tag = "4")]
1182 pub is_final_settlement: bool,
1183}
1184pub mod match_perpetual_deleveraging {
1186 #[derive(Clone, PartialEq, ::prost::Message)]
1188 pub struct Fill {
1189 #[prost(message, optional, tag = "1")]
1192 pub offsetting_subaccount_id: ::core::option::Option<
1193 super::super::subaccounts::SubaccountId,
1194 >,
1195 #[prost(uint64, tag = "2")]
1199 pub fill_amount: u64,
1200 }
1201 impl ::prost::Name for Fill {
1202 const NAME: &'static str = "Fill";
1203 const PACKAGE: &'static str = "dydxprotocol.clob";
1204 fn full_name() -> ::prost::alloc::string::String {
1205 "dydxprotocol.clob.MatchPerpetualDeleveraging.Fill".into()
1206 }
1207 fn type_url() -> ::prost::alloc::string::String {
1208 "/dydxprotocol.clob.MatchPerpetualDeleveraging.Fill".into()
1209 }
1210 }
1211}
1212impl ::prost::Name for MatchPerpetualDeleveraging {
1213 const NAME: &'static str = "MatchPerpetualDeleveraging";
1214 const PACKAGE: &'static str = "dydxprotocol.clob";
1215 fn full_name() -> ::prost::alloc::string::String {
1216 "dydxprotocol.clob.MatchPerpetualDeleveraging".into()
1217 }
1218 fn type_url() -> ::prost::alloc::string::String {
1219 "/dydxprotocol.clob.MatchPerpetualDeleveraging".into()
1220 }
1221}
1222#[derive(Clone, PartialEq, ::prost::Message)]
1224pub struct MevMatch {
1225 #[prost(message, optional, tag = "1")]
1226 pub taker_order_subaccount_id: ::core::option::Option<
1227 super::subaccounts::SubaccountId,
1228 >,
1229 #[prost(int32, tag = "2")]
1230 pub taker_fee_ppm: i32,
1231 #[prost(message, optional, tag = "3")]
1232 pub maker_order_subaccount_id: ::core::option::Option<
1233 super::subaccounts::SubaccountId,
1234 >,
1235 #[prost(uint64, tag = "4")]
1236 pub maker_order_subticks: u64,
1237 #[prost(bool, tag = "5")]
1238 pub maker_order_is_buy: bool,
1239 #[prost(int32, tag = "6")]
1240 pub maker_fee_ppm: i32,
1241 #[prost(uint32, tag = "7")]
1242 pub clob_pair_id: u32,
1243 #[prost(uint64, tag = "8")]
1244 pub fill_amount: u64,
1245}
1246impl ::prost::Name for MevMatch {
1247 const NAME: &'static str = "MEVMatch";
1248 const PACKAGE: &'static str = "dydxprotocol.clob";
1249 fn full_name() -> ::prost::alloc::string::String {
1250 "dydxprotocol.clob.MEVMatch".into()
1251 }
1252 fn type_url() -> ::prost::alloc::string::String {
1253 "/dydxprotocol.clob.MEVMatch".into()
1254 }
1255}
1256#[derive(Clone, PartialEq, ::prost::Message)]
1259pub struct MevLiquidationMatch {
1260 #[prost(message, optional, tag = "1")]
1261 pub liquidated_subaccount_id: ::core::option::Option<
1262 super::subaccounts::SubaccountId,
1263 >,
1264 #[prost(int64, tag = "2")]
1265 pub insurance_fund_delta_quote_quantums: i64,
1266 #[prost(message, optional, tag = "3")]
1267 pub maker_order_subaccount_id: ::core::option::Option<
1268 super::subaccounts::SubaccountId,
1269 >,
1270 #[prost(uint64, tag = "4")]
1271 pub maker_order_subticks: u64,
1272 #[prost(bool, tag = "5")]
1273 pub maker_order_is_buy: bool,
1274 #[prost(int32, tag = "6")]
1275 pub maker_fee_ppm: i32,
1276 #[prost(uint32, tag = "7")]
1277 pub clob_pair_id: u32,
1278 #[prost(uint64, tag = "8")]
1279 pub fill_amount: u64,
1280}
1281impl ::prost::Name for MevLiquidationMatch {
1282 const NAME: &'static str = "MEVLiquidationMatch";
1283 const PACKAGE: &'static str = "dydxprotocol.clob";
1284 fn full_name() -> ::prost::alloc::string::String {
1285 "dydxprotocol.clob.MEVLiquidationMatch".into()
1286 }
1287 fn type_url() -> ::prost::alloc::string::String {
1288 "/dydxprotocol.clob.MEVLiquidationMatch".into()
1289 }
1290}
1291#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1293pub struct ClobMidPrice {
1294 #[prost(message, optional, tag = "1")]
1295 pub clob_pair: ::core::option::Option<ClobPair>,
1296 #[prost(uint64, tag = "2")]
1297 pub subticks: u64,
1298}
1299impl ::prost::Name for ClobMidPrice {
1300 const NAME: &'static str = "ClobMidPrice";
1301 const PACKAGE: &'static str = "dydxprotocol.clob";
1302 fn full_name() -> ::prost::alloc::string::String {
1303 "dydxprotocol.clob.ClobMidPrice".into()
1304 }
1305 fn type_url() -> ::prost::alloc::string::String {
1306 "/dydxprotocol.clob.ClobMidPrice".into()
1307 }
1308}
1309#[derive(Clone, PartialEq, ::prost::Message)]
1312pub struct ValidatorMevMatches {
1313 #[prost(message, repeated, tag = "1")]
1314 pub matches: ::prost::alloc::vec::Vec<MevMatch>,
1315 #[prost(message, repeated, tag = "2")]
1316 pub liquidation_matches: ::prost::alloc::vec::Vec<MevLiquidationMatch>,
1317}
1318impl ::prost::Name for ValidatorMevMatches {
1319 const NAME: &'static str = "ValidatorMevMatches";
1320 const PACKAGE: &'static str = "dydxprotocol.clob";
1321 fn full_name() -> ::prost::alloc::string::String {
1322 "dydxprotocol.clob.ValidatorMevMatches".into()
1323 }
1324 fn type_url() -> ::prost::alloc::string::String {
1325 "/dydxprotocol.clob.ValidatorMevMatches".into()
1326 }
1327}
1328#[derive(Clone, PartialEq, ::prost::Message)]
1331pub struct MevNodeToNodeMetrics {
1332 #[prost(message, optional, tag = "1")]
1333 pub validator_mev_matches: ::core::option::Option<ValidatorMevMatches>,
1334 #[prost(message, repeated, tag = "2")]
1335 pub clob_mid_prices: ::prost::alloc::vec::Vec<ClobMidPrice>,
1336 #[prost(message, optional, tag = "3")]
1337 pub bp_mev_matches: ::core::option::Option<ValidatorMevMatches>,
1338 #[prost(uint64, tag = "4")]
1339 pub proposal_receive_time: u64,
1340}
1341impl ::prost::Name for MevNodeToNodeMetrics {
1342 const NAME: &'static str = "MevNodeToNodeMetrics";
1343 const PACKAGE: &'static str = "dydxprotocol.clob";
1344 fn full_name() -> ::prost::alloc::string::String {
1345 "dydxprotocol.clob.MevNodeToNodeMetrics".into()
1346 }
1347 fn type_url() -> ::prost::alloc::string::String {
1348 "/dydxprotocol.clob.MevNodeToNodeMetrics".into()
1349 }
1350}
1351#[derive(Clone, PartialEq, ::prost::Message)]
1353pub struct OrderRemoval {
1354 #[prost(message, optional, tag = "1")]
1355 pub order_id: ::core::option::Option<OrderId>,
1356 #[prost(enumeration = "order_removal::RemovalReason", tag = "2")]
1357 pub removal_reason: i32,
1358}
1359pub mod order_removal {
1361 #[derive(
1362 Clone,
1363 Copy,
1364 Debug,
1365 PartialEq,
1366 Eq,
1367 Hash,
1368 PartialOrd,
1369 Ord,
1370 ::prost::Enumeration
1371 )]
1372 #[repr(i32)]
1373 pub enum RemovalReason {
1374 Unspecified = 0,
1378 Undercollateralized = 1,
1382 InvalidReduceOnly = 2,
1387 PostOnlyWouldCrossMakerOrder = 3,
1391 InvalidSelfTrade = 4,
1395 ConditionalFokCouldNotBeFullyFilled = 5,
1400 ConditionalIocWouldRestOnBook = 6,
1405 FullyFilled = 7,
1408 ViolatesIsolatedSubaccountConstraints = 8,
1411 PermissionedKeyExpired = 9,
1414 }
1415 impl RemovalReason {
1416 pub fn as_str_name(&self) -> &'static str {
1421 match self {
1422 Self::Unspecified => "REMOVAL_REASON_UNSPECIFIED",
1423 Self::Undercollateralized => "REMOVAL_REASON_UNDERCOLLATERALIZED",
1424 Self::InvalidReduceOnly => "REMOVAL_REASON_INVALID_REDUCE_ONLY",
1425 Self::PostOnlyWouldCrossMakerOrder => {
1426 "REMOVAL_REASON_POST_ONLY_WOULD_CROSS_MAKER_ORDER"
1427 }
1428 Self::InvalidSelfTrade => "REMOVAL_REASON_INVALID_SELF_TRADE",
1429 Self::ConditionalFokCouldNotBeFullyFilled => {
1430 "REMOVAL_REASON_CONDITIONAL_FOK_COULD_NOT_BE_FULLY_FILLED"
1431 }
1432 Self::ConditionalIocWouldRestOnBook => {
1433 "REMOVAL_REASON_CONDITIONAL_IOC_WOULD_REST_ON_BOOK"
1434 }
1435 Self::FullyFilled => "REMOVAL_REASON_FULLY_FILLED",
1436 Self::ViolatesIsolatedSubaccountConstraints => {
1437 "REMOVAL_REASON_VIOLATES_ISOLATED_SUBACCOUNT_CONSTRAINTS"
1438 }
1439 Self::PermissionedKeyExpired => "REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED",
1440 }
1441 }
1442 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1444 match value {
1445 "REMOVAL_REASON_UNSPECIFIED" => Some(Self::Unspecified),
1446 "REMOVAL_REASON_UNDERCOLLATERALIZED" => Some(Self::Undercollateralized),
1447 "REMOVAL_REASON_INVALID_REDUCE_ONLY" => Some(Self::InvalidReduceOnly),
1448 "REMOVAL_REASON_POST_ONLY_WOULD_CROSS_MAKER_ORDER" => {
1449 Some(Self::PostOnlyWouldCrossMakerOrder)
1450 }
1451 "REMOVAL_REASON_INVALID_SELF_TRADE" => Some(Self::InvalidSelfTrade),
1452 "REMOVAL_REASON_CONDITIONAL_FOK_COULD_NOT_BE_FULLY_FILLED" => {
1453 Some(Self::ConditionalFokCouldNotBeFullyFilled)
1454 }
1455 "REMOVAL_REASON_CONDITIONAL_IOC_WOULD_REST_ON_BOOK" => {
1456 Some(Self::ConditionalIocWouldRestOnBook)
1457 }
1458 "REMOVAL_REASON_FULLY_FILLED" => Some(Self::FullyFilled),
1459 "REMOVAL_REASON_VIOLATES_ISOLATED_SUBACCOUNT_CONSTRAINTS" => {
1460 Some(Self::ViolatesIsolatedSubaccountConstraints)
1461 }
1462 "REMOVAL_REASON_PERMISSIONED_KEY_EXPIRED" => {
1463 Some(Self::PermissionedKeyExpired)
1464 }
1465 _ => None,
1466 }
1467 }
1468 }
1469}
1470impl ::prost::Name for OrderRemoval {
1471 const NAME: &'static str = "OrderRemoval";
1472 const PACKAGE: &'static str = "dydxprotocol.clob";
1473 fn full_name() -> ::prost::alloc::string::String {
1474 "dydxprotocol.clob.OrderRemoval".into()
1475 }
1476 fn type_url() -> ::prost::alloc::string::String {
1477 "/dydxprotocol.clob.OrderRemoval".into()
1478 }
1479}
1480#[derive(Clone, PartialEq, ::prost::Message)]
1482pub struct MsgCreateClobPair {
1483 #[prost(string, tag = "1")]
1485 pub authority: ::prost::alloc::string::String,
1486 #[prost(message, optional, tag = "2")]
1488 pub clob_pair: ::core::option::Option<ClobPair>,
1489}
1490impl ::prost::Name for MsgCreateClobPair {
1491 const NAME: &'static str = "MsgCreateClobPair";
1492 const PACKAGE: &'static str = "dydxprotocol.clob";
1493 fn full_name() -> ::prost::alloc::string::String {
1494 "dydxprotocol.clob.MsgCreateClobPair".into()
1495 }
1496 fn type_url() -> ::prost::alloc::string::String {
1497 "/dydxprotocol.clob.MsgCreateClobPair".into()
1498 }
1499}
1500#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1502pub struct MsgCreateClobPairResponse {}
1503impl ::prost::Name for MsgCreateClobPairResponse {
1504 const NAME: &'static str = "MsgCreateClobPairResponse";
1505 const PACKAGE: &'static str = "dydxprotocol.clob";
1506 fn full_name() -> ::prost::alloc::string::String {
1507 "dydxprotocol.clob.MsgCreateClobPairResponse".into()
1508 }
1509 fn type_url() -> ::prost::alloc::string::String {
1510 "/dydxprotocol.clob.MsgCreateClobPairResponse".into()
1511 }
1512}
1513#[derive(Clone, PartialEq, ::prost::Message)]
1516pub struct MsgProposedOperations {
1517 #[prost(message, repeated, tag = "1")]
1519 pub operations_queue: ::prost::alloc::vec::Vec<OperationRaw>,
1520}
1521impl ::prost::Name for MsgProposedOperations {
1522 const NAME: &'static str = "MsgProposedOperations";
1523 const PACKAGE: &'static str = "dydxprotocol.clob";
1524 fn full_name() -> ::prost::alloc::string::String {
1525 "dydxprotocol.clob.MsgProposedOperations".into()
1526 }
1527 fn type_url() -> ::prost::alloc::string::String {
1528 "/dydxprotocol.clob.MsgProposedOperations".into()
1529 }
1530}
1531#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1534pub struct MsgProposedOperationsResponse {}
1535impl ::prost::Name for MsgProposedOperationsResponse {
1536 const NAME: &'static str = "MsgProposedOperationsResponse";
1537 const PACKAGE: &'static str = "dydxprotocol.clob";
1538 fn full_name() -> ::prost::alloc::string::String {
1539 "dydxprotocol.clob.MsgProposedOperationsResponse".into()
1540 }
1541 fn type_url() -> ::prost::alloc::string::String {
1542 "/dydxprotocol.clob.MsgProposedOperationsResponse".into()
1543 }
1544}
1545#[derive(Clone, PartialEq, ::prost::Message)]
1547pub struct MsgPlaceOrder {
1548 #[prost(message, optional, tag = "1")]
1549 pub order: ::core::option::Option<Order>,
1550}
1551impl ::prost::Name for MsgPlaceOrder {
1552 const NAME: &'static str = "MsgPlaceOrder";
1553 const PACKAGE: &'static str = "dydxprotocol.clob";
1554 fn full_name() -> ::prost::alloc::string::String {
1555 "dydxprotocol.clob.MsgPlaceOrder".into()
1556 }
1557 fn type_url() -> ::prost::alloc::string::String {
1558 "/dydxprotocol.clob.MsgPlaceOrder".into()
1559 }
1560}
1561#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1563pub struct MsgPlaceOrderResponse {}
1564impl ::prost::Name for MsgPlaceOrderResponse {
1565 const NAME: &'static str = "MsgPlaceOrderResponse";
1566 const PACKAGE: &'static str = "dydxprotocol.clob";
1567 fn full_name() -> ::prost::alloc::string::String {
1568 "dydxprotocol.clob.MsgPlaceOrderResponse".into()
1569 }
1570 fn type_url() -> ::prost::alloc::string::String {
1571 "/dydxprotocol.clob.MsgPlaceOrderResponse".into()
1572 }
1573}
1574#[derive(Clone, PartialEq, ::prost::Message)]
1576pub struct MsgCancelOrder {
1577 #[prost(message, optional, tag = "1")]
1578 pub order_id: ::core::option::Option<OrderId>,
1579 #[prost(oneof = "msg_cancel_order::GoodTilOneof", tags = "2, 3")]
1581 pub good_til_oneof: ::core::option::Option<msg_cancel_order::GoodTilOneof>,
1582}
1583pub mod msg_cancel_order {
1585 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1587 pub enum GoodTilOneof {
1588 #[prost(uint32, tag = "2")]
1591 GoodTilBlock(u32),
1592 #[prost(fixed32, tag = "3")]
1598 GoodTilBlockTime(u32),
1599 }
1600}
1601impl ::prost::Name for MsgCancelOrder {
1602 const NAME: &'static str = "MsgCancelOrder";
1603 const PACKAGE: &'static str = "dydxprotocol.clob";
1604 fn full_name() -> ::prost::alloc::string::String {
1605 "dydxprotocol.clob.MsgCancelOrder".into()
1606 }
1607 fn type_url() -> ::prost::alloc::string::String {
1608 "/dydxprotocol.clob.MsgCancelOrder".into()
1609 }
1610}
1611#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1613pub struct MsgCancelOrderResponse {}
1614impl ::prost::Name for MsgCancelOrderResponse {
1615 const NAME: &'static str = "MsgCancelOrderResponse";
1616 const PACKAGE: &'static str = "dydxprotocol.clob";
1617 fn full_name() -> ::prost::alloc::string::String {
1618 "dydxprotocol.clob.MsgCancelOrderResponse".into()
1619 }
1620 fn type_url() -> ::prost::alloc::string::String {
1621 "/dydxprotocol.clob.MsgCancelOrderResponse".into()
1622 }
1623}
1624#[derive(Clone, PartialEq, ::prost::Message)]
1628pub struct MsgBatchCancel {
1629 #[prost(message, optional, tag = "1")]
1631 pub subaccount_id: ::core::option::Option<super::subaccounts::SubaccountId>,
1632 #[prost(message, repeated, tag = "2")]
1634 pub short_term_cancels: ::prost::alloc::vec::Vec<OrderBatch>,
1635 #[prost(uint32, tag = "3")]
1637 pub good_til_block: u32,
1638}
1639impl ::prost::Name for MsgBatchCancel {
1640 const NAME: &'static str = "MsgBatchCancel";
1641 const PACKAGE: &'static str = "dydxprotocol.clob";
1642 fn full_name() -> ::prost::alloc::string::String {
1643 "dydxprotocol.clob.MsgBatchCancel".into()
1644 }
1645 fn type_url() -> ::prost::alloc::string::String {
1646 "/dydxprotocol.clob.MsgBatchCancel".into()
1647 }
1648}
1649#[derive(Clone, PartialEq, ::prost::Message)]
1653pub struct OrderBatch {
1654 #[prost(uint32, tag = "1")]
1656 pub clob_pair_id: u32,
1657 #[prost(uint32, repeated, tag = "2")]
1661 pub client_ids: ::prost::alloc::vec::Vec<u32>,
1662}
1663impl ::prost::Name for OrderBatch {
1664 const NAME: &'static str = "OrderBatch";
1665 const PACKAGE: &'static str = "dydxprotocol.clob";
1666 fn full_name() -> ::prost::alloc::string::String {
1667 "dydxprotocol.clob.OrderBatch".into()
1668 }
1669 fn type_url() -> ::prost::alloc::string::String {
1670 "/dydxprotocol.clob.OrderBatch".into()
1671 }
1672}
1673#[derive(Clone, PartialEq, ::prost::Message)]
1676pub struct MsgBatchCancelResponse {
1677 #[prost(message, repeated, tag = "1")]
1679 pub short_term_succeeded: ::prost::alloc::vec::Vec<OrderBatch>,
1680 #[prost(message, repeated, tag = "2")]
1682 pub short_term_failed: ::prost::alloc::vec::Vec<OrderBatch>,
1683}
1684impl ::prost::Name for MsgBatchCancelResponse {
1685 const NAME: &'static str = "MsgBatchCancelResponse";
1686 const PACKAGE: &'static str = "dydxprotocol.clob";
1687 fn full_name() -> ::prost::alloc::string::String {
1688 "dydxprotocol.clob.MsgBatchCancelResponse".into()
1689 }
1690 fn type_url() -> ::prost::alloc::string::String {
1691 "/dydxprotocol.clob.MsgBatchCancelResponse".into()
1692 }
1693}
1694#[derive(Clone, PartialEq, ::prost::Message)]
1696pub struct MsgUpdateClobPair {
1697 #[prost(string, tag = "1")]
1699 pub authority: ::prost::alloc::string::String,
1700 #[prost(message, optional, tag = "2")]
1702 pub clob_pair: ::core::option::Option<ClobPair>,
1703}
1704impl ::prost::Name for MsgUpdateClobPair {
1705 const NAME: &'static str = "MsgUpdateClobPair";
1706 const PACKAGE: &'static str = "dydxprotocol.clob";
1707 fn full_name() -> ::prost::alloc::string::String {
1708 "dydxprotocol.clob.MsgUpdateClobPair".into()
1709 }
1710 fn type_url() -> ::prost::alloc::string::String {
1711 "/dydxprotocol.clob.MsgUpdateClobPair".into()
1712 }
1713}
1714#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1717pub struct MsgUpdateClobPairResponse {}
1718impl ::prost::Name for MsgUpdateClobPairResponse {
1719 const NAME: &'static str = "MsgUpdateClobPairResponse";
1720 const PACKAGE: &'static str = "dydxprotocol.clob";
1721 fn full_name() -> ::prost::alloc::string::String {
1722 "dydxprotocol.clob.MsgUpdateClobPairResponse".into()
1723 }
1724 fn type_url() -> ::prost::alloc::string::String {
1725 "/dydxprotocol.clob.MsgUpdateClobPairResponse".into()
1726 }
1727}
1728#[derive(Clone, PartialEq, ::prost::Message)]
1731pub struct OperationRaw {
1732 #[prost(oneof = "operation_raw::Operation", tags = "1, 2, 3")]
1735 pub operation: ::core::option::Option<operation_raw::Operation>,
1736}
1737pub mod operation_raw {
1739 #[derive(Clone, PartialEq, ::prost::Oneof)]
1742 pub enum Operation {
1743 #[prost(message, tag = "1")]
1744 Match(super::ClobMatch),
1745 #[prost(bytes, tag = "2")]
1746 ShortTermOrderPlacement(::prost::alloc::vec::Vec<u8>),
1747 #[prost(message, tag = "3")]
1748 OrderRemoval(super::OrderRemoval),
1749 }
1750}
1751impl ::prost::Name for OperationRaw {
1752 const NAME: &'static str = "OperationRaw";
1753 const PACKAGE: &'static str = "dydxprotocol.clob";
1754 fn full_name() -> ::prost::alloc::string::String {
1755 "dydxprotocol.clob.OperationRaw".into()
1756 }
1757 fn type_url() -> ::prost::alloc::string::String {
1758 "/dydxprotocol.clob.OperationRaw".into()
1759 }
1760}
1761#[derive(Clone, PartialEq, ::prost::Message)]
1764pub struct MsgUpdateEquityTierLimitConfiguration {
1765 #[prost(string, tag = "1")]
1766 pub authority: ::prost::alloc::string::String,
1767 #[prost(message, optional, tag = "2")]
1770 pub equity_tier_limit_config: ::core::option::Option<EquityTierLimitConfiguration>,
1771}
1772impl ::prost::Name for MsgUpdateEquityTierLimitConfiguration {
1773 const NAME: &'static str = "MsgUpdateEquityTierLimitConfiguration";
1774 const PACKAGE: &'static str = "dydxprotocol.clob";
1775 fn full_name() -> ::prost::alloc::string::String {
1776 "dydxprotocol.clob.MsgUpdateEquityTierLimitConfiguration".into()
1777 }
1778 fn type_url() -> ::prost::alloc::string::String {
1779 "/dydxprotocol.clob.MsgUpdateEquityTierLimitConfiguration".into()
1780 }
1781}
1782#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1785pub struct MsgUpdateEquityTierLimitConfigurationResponse {}
1786impl ::prost::Name for MsgUpdateEquityTierLimitConfigurationResponse {
1787 const NAME: &'static str = "MsgUpdateEquityTierLimitConfigurationResponse";
1788 const PACKAGE: &'static str = "dydxprotocol.clob";
1789 fn full_name() -> ::prost::alloc::string::String {
1790 "dydxprotocol.clob.MsgUpdateEquityTierLimitConfigurationResponse".into()
1791 }
1792 fn type_url() -> ::prost::alloc::string::String {
1793 "/dydxprotocol.clob.MsgUpdateEquityTierLimitConfigurationResponse".into()
1794 }
1795}
1796#[derive(Clone, PartialEq, ::prost::Message)]
1799pub struct MsgUpdateBlockRateLimitConfiguration {
1800 #[prost(string, tag = "1")]
1801 pub authority: ::prost::alloc::string::String,
1802 #[prost(message, optional, tag = "3")]
1805 pub block_rate_limit_config: ::core::option::Option<BlockRateLimitConfiguration>,
1806}
1807impl ::prost::Name for MsgUpdateBlockRateLimitConfiguration {
1808 const NAME: &'static str = "MsgUpdateBlockRateLimitConfiguration";
1809 const PACKAGE: &'static str = "dydxprotocol.clob";
1810 fn full_name() -> ::prost::alloc::string::String {
1811 "dydxprotocol.clob.MsgUpdateBlockRateLimitConfiguration".into()
1812 }
1813 fn type_url() -> ::prost::alloc::string::String {
1814 "/dydxprotocol.clob.MsgUpdateBlockRateLimitConfiguration".into()
1815 }
1816}
1817#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1820pub struct MsgUpdateBlockRateLimitConfigurationResponse {}
1821impl ::prost::Name for MsgUpdateBlockRateLimitConfigurationResponse {
1822 const NAME: &'static str = "MsgUpdateBlockRateLimitConfigurationResponse";
1823 const PACKAGE: &'static str = "dydxprotocol.clob";
1824 fn full_name() -> ::prost::alloc::string::String {
1825 "dydxprotocol.clob.MsgUpdateBlockRateLimitConfigurationResponse".into()
1826 }
1827 fn type_url() -> ::prost::alloc::string::String {
1828 "/dydxprotocol.clob.MsgUpdateBlockRateLimitConfigurationResponse".into()
1829 }
1830}
1831#[derive(Clone, PartialEq, ::prost::Message)]
1834pub struct MsgUpdateLiquidationsConfig {
1835 #[prost(string, tag = "1")]
1837 pub authority: ::prost::alloc::string::String,
1838 #[prost(message, optional, tag = "2")]
1841 pub liquidations_config: ::core::option::Option<LiquidationsConfig>,
1842}
1843impl ::prost::Name for MsgUpdateLiquidationsConfig {
1844 const NAME: &'static str = "MsgUpdateLiquidationsConfig";
1845 const PACKAGE: &'static str = "dydxprotocol.clob";
1846 fn full_name() -> ::prost::alloc::string::String {
1847 "dydxprotocol.clob.MsgUpdateLiquidationsConfig".into()
1848 }
1849 fn type_url() -> ::prost::alloc::string::String {
1850 "/dydxprotocol.clob.MsgUpdateLiquidationsConfig".into()
1851 }
1852}
1853#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1855pub struct MsgUpdateLiquidationsConfigResponse {}
1856impl ::prost::Name for MsgUpdateLiquidationsConfigResponse {
1857 const NAME: &'static str = "MsgUpdateLiquidationsConfigResponse";
1858 const PACKAGE: &'static str = "dydxprotocol.clob";
1859 fn full_name() -> ::prost::alloc::string::String {
1860 "dydxprotocol.clob.MsgUpdateLiquidationsConfigResponse".into()
1861 }
1862 fn type_url() -> ::prost::alloc::string::String {
1863 "/dydxprotocol.clob.MsgUpdateLiquidationsConfigResponse".into()
1864 }
1865}
1866pub mod msg_client {
1868 #![allow(
1869 unused_variables,
1870 dead_code,
1871 missing_docs,
1872 clippy::wildcard_imports,
1873 clippy::let_unit_value,
1874 )]
1875 use tonic::codegen::*;
1876 use tonic::codegen::http::Uri;
1877 #[derive(Debug, Clone)]
1879 pub struct MsgClient<T> {
1880 inner: tonic::client::Grpc<T>,
1881 }
1882 #[cfg(feature = "grpc-transport")]
1883 impl MsgClient<tonic::transport::Channel> {
1884 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1886 where
1887 D: TryInto<tonic::transport::Endpoint>,
1888 D::Error: Into<StdError>,
1889 {
1890 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1891 Ok(Self::new(conn))
1892 }
1893 }
1894 impl<T> MsgClient<T>
1895 where
1896 T: tonic::client::GrpcService<tonic::body::Body>,
1897 T::Error: Into<StdError>,
1898 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1899 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1900 {
1901 pub fn new(inner: T) -> Self {
1902 let inner = tonic::client::Grpc::new(inner);
1903 Self { inner }
1904 }
1905 pub fn with_origin(inner: T, origin: Uri) -> Self {
1906 let inner = tonic::client::Grpc::with_origin(inner, origin);
1907 Self { inner }
1908 }
1909 pub fn with_interceptor<F>(
1910 inner: T,
1911 interceptor: F,
1912 ) -> MsgClient<InterceptedService<T, F>>
1913 where
1914 F: tonic::service::Interceptor,
1915 T::ResponseBody: Default,
1916 T: tonic::codegen::Service<
1917 http::Request<tonic::body::Body>,
1918 Response = http::Response<
1919 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1920 >,
1921 >,
1922 <T as tonic::codegen::Service<
1923 http::Request<tonic::body::Body>,
1924 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1925 {
1926 MsgClient::new(InterceptedService::new(inner, interceptor))
1927 }
1928 #[must_use]
1933 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1934 self.inner = self.inner.send_compressed(encoding);
1935 self
1936 }
1937 #[must_use]
1939 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1940 self.inner = self.inner.accept_compressed(encoding);
1941 self
1942 }
1943 #[must_use]
1947 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1948 self.inner = self.inner.max_decoding_message_size(limit);
1949 self
1950 }
1951 #[must_use]
1955 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1956 self.inner = self.inner.max_encoding_message_size(limit);
1957 self
1958 }
1959 pub async fn proposed_operations(
1962 &mut self,
1963 request: impl tonic::IntoRequest<super::MsgProposedOperations>,
1964 ) -> std::result::Result<
1965 tonic::Response<super::MsgProposedOperationsResponse>,
1966 tonic::Status,
1967 > {
1968 self.inner
1969 .ready()
1970 .await
1971 .map_err(|e| {
1972 tonic::Status::unknown(
1973 format!("Service was not ready: {}", e.into()),
1974 )
1975 })?;
1976 let codec = tonic::codec::ProstCodec::default();
1977 let path = http::uri::PathAndQuery::from_static(
1978 "/dydxprotocol.clob.Msg/ProposedOperations",
1979 );
1980 let mut req = request.into_request();
1981 req.extensions_mut()
1982 .insert(GrpcMethod::new("dydxprotocol.clob.Msg", "ProposedOperations"));
1983 self.inner.unary(req, path, codec).await
1984 }
1985 pub async fn place_order(
1987 &mut self,
1988 request: impl tonic::IntoRequest<super::MsgPlaceOrder>,
1989 ) -> std::result::Result<
1990 tonic::Response<super::MsgPlaceOrderResponse>,
1991 tonic::Status,
1992 > {
1993 self.inner
1994 .ready()
1995 .await
1996 .map_err(|e| {
1997 tonic::Status::unknown(
1998 format!("Service was not ready: {}", e.into()),
1999 )
2000 })?;
2001 let codec = tonic::codec::ProstCodec::default();
2002 let path = http::uri::PathAndQuery::from_static(
2003 "/dydxprotocol.clob.Msg/PlaceOrder",
2004 );
2005 let mut req = request.into_request();
2006 req.extensions_mut()
2007 .insert(GrpcMethod::new("dydxprotocol.clob.Msg", "PlaceOrder"));
2008 self.inner.unary(req, path, codec).await
2009 }
2010 pub async fn cancel_order(
2012 &mut self,
2013 request: impl tonic::IntoRequest<super::MsgCancelOrder>,
2014 ) -> std::result::Result<
2015 tonic::Response<super::MsgCancelOrderResponse>,
2016 tonic::Status,
2017 > {
2018 self.inner
2019 .ready()
2020 .await
2021 .map_err(|e| {
2022 tonic::Status::unknown(
2023 format!("Service was not ready: {}", e.into()),
2024 )
2025 })?;
2026 let codec = tonic::codec::ProstCodec::default();
2027 let path = http::uri::PathAndQuery::from_static(
2028 "/dydxprotocol.clob.Msg/CancelOrder",
2029 );
2030 let mut req = request.into_request();
2031 req.extensions_mut()
2032 .insert(GrpcMethod::new("dydxprotocol.clob.Msg", "CancelOrder"));
2033 self.inner.unary(req, path, codec).await
2034 }
2035 pub async fn batch_cancel(
2037 &mut self,
2038 request: impl tonic::IntoRequest<super::MsgBatchCancel>,
2039 ) -> std::result::Result<
2040 tonic::Response<super::MsgBatchCancelResponse>,
2041 tonic::Status,
2042 > {
2043 self.inner
2044 .ready()
2045 .await
2046 .map_err(|e| {
2047 tonic::Status::unknown(
2048 format!("Service was not ready: {}", e.into()),
2049 )
2050 })?;
2051 let codec = tonic::codec::ProstCodec::default();
2052 let path = http::uri::PathAndQuery::from_static(
2053 "/dydxprotocol.clob.Msg/BatchCancel",
2054 );
2055 let mut req = request.into_request();
2056 req.extensions_mut()
2057 .insert(GrpcMethod::new("dydxprotocol.clob.Msg", "BatchCancel"));
2058 self.inner.unary(req, path, codec).await
2059 }
2060 pub async fn create_clob_pair(
2062 &mut self,
2063 request: impl tonic::IntoRequest<super::MsgCreateClobPair>,
2064 ) -> std::result::Result<
2065 tonic::Response<super::MsgCreateClobPairResponse>,
2066 tonic::Status,
2067 > {
2068 self.inner
2069 .ready()
2070 .await
2071 .map_err(|e| {
2072 tonic::Status::unknown(
2073 format!("Service was not ready: {}", e.into()),
2074 )
2075 })?;
2076 let codec = tonic::codec::ProstCodec::default();
2077 let path = http::uri::PathAndQuery::from_static(
2078 "/dydxprotocol.clob.Msg/CreateClobPair",
2079 );
2080 let mut req = request.into_request();
2081 req.extensions_mut()
2082 .insert(GrpcMethod::new("dydxprotocol.clob.Msg", "CreateClobPair"));
2083 self.inner.unary(req, path, codec).await
2084 }
2085 pub async fn update_clob_pair(
2090 &mut self,
2091 request: impl tonic::IntoRequest<super::MsgUpdateClobPair>,
2092 ) -> std::result::Result<
2093 tonic::Response<super::MsgUpdateClobPairResponse>,
2094 tonic::Status,
2095 > {
2096 self.inner
2097 .ready()
2098 .await
2099 .map_err(|e| {
2100 tonic::Status::unknown(
2101 format!("Service was not ready: {}", e.into()),
2102 )
2103 })?;
2104 let codec = tonic::codec::ProstCodec::default();
2105 let path = http::uri::PathAndQuery::from_static(
2106 "/dydxprotocol.clob.Msg/UpdateClobPair",
2107 );
2108 let mut req = request.into_request();
2109 req.extensions_mut()
2110 .insert(GrpcMethod::new("dydxprotocol.clob.Msg", "UpdateClobPair"));
2111 self.inner.unary(req, path, codec).await
2112 }
2113 pub async fn update_equity_tier_limit_configuration(
2116 &mut self,
2117 request: impl tonic::IntoRequest<
2118 super::MsgUpdateEquityTierLimitConfiguration,
2119 >,
2120 ) -> std::result::Result<
2121 tonic::Response<super::MsgUpdateEquityTierLimitConfigurationResponse>,
2122 tonic::Status,
2123 > {
2124 self.inner
2125 .ready()
2126 .await
2127 .map_err(|e| {
2128 tonic::Status::unknown(
2129 format!("Service was not ready: {}", e.into()),
2130 )
2131 })?;
2132 let codec = tonic::codec::ProstCodec::default();
2133 let path = http::uri::PathAndQuery::from_static(
2134 "/dydxprotocol.clob.Msg/UpdateEquityTierLimitConfiguration",
2135 );
2136 let mut req = request.into_request();
2137 req.extensions_mut()
2138 .insert(
2139 GrpcMethod::new(
2140 "dydxprotocol.clob.Msg",
2141 "UpdateEquityTierLimitConfiguration",
2142 ),
2143 );
2144 self.inner.unary(req, path, codec).await
2145 }
2146 pub async fn update_block_rate_limit_configuration(
2149 &mut self,
2150 request: impl tonic::IntoRequest<super::MsgUpdateBlockRateLimitConfiguration>,
2151 ) -> std::result::Result<
2152 tonic::Response<super::MsgUpdateBlockRateLimitConfigurationResponse>,
2153 tonic::Status,
2154 > {
2155 self.inner
2156 .ready()
2157 .await
2158 .map_err(|e| {
2159 tonic::Status::unknown(
2160 format!("Service was not ready: {}", e.into()),
2161 )
2162 })?;
2163 let codec = tonic::codec::ProstCodec::default();
2164 let path = http::uri::PathAndQuery::from_static(
2165 "/dydxprotocol.clob.Msg/UpdateBlockRateLimitConfiguration",
2166 );
2167 let mut req = request.into_request();
2168 req.extensions_mut()
2169 .insert(
2170 GrpcMethod::new(
2171 "dydxprotocol.clob.Msg",
2172 "UpdateBlockRateLimitConfiguration",
2173 ),
2174 );
2175 self.inner.unary(req, path, codec).await
2176 }
2177 pub async fn update_liquidations_config(
2179 &mut self,
2180 request: impl tonic::IntoRequest<super::MsgUpdateLiquidationsConfig>,
2181 ) -> std::result::Result<
2182 tonic::Response<super::MsgUpdateLiquidationsConfigResponse>,
2183 tonic::Status,
2184 > {
2185 self.inner
2186 .ready()
2187 .await
2188 .map_err(|e| {
2189 tonic::Status::unknown(
2190 format!("Service was not ready: {}", e.into()),
2191 )
2192 })?;
2193 let codec = tonic::codec::ProstCodec::default();
2194 let path = http::uri::PathAndQuery::from_static(
2195 "/dydxprotocol.clob.Msg/UpdateLiquidationsConfig",
2196 );
2197 let mut req = request.into_request();
2198 req.extensions_mut()
2199 .insert(
2200 GrpcMethod::new("dydxprotocol.clob.Msg", "UpdateLiquidationsConfig"),
2201 );
2202 self.inner.unary(req, path, codec).await
2203 }
2204 }
2205}
2206#[derive(Clone, PartialEq, ::prost::Message)]
2209pub struct Operation {
2210 #[prost(oneof = "operation::Operation", tags = "1, 2, 3, 4")]
2214 pub operation: ::core::option::Option<operation::Operation>,
2215}
2216pub mod operation {
2218 #[derive(Clone, PartialEq, ::prost::Oneof)]
2222 pub enum Operation {
2223 #[prost(message, tag = "1")]
2224 Match(super::ClobMatch),
2225 #[prost(message, tag = "2")]
2226 ShortTermOrderPlacement(super::MsgPlaceOrder),
2227 #[prost(message, tag = "3")]
2228 ShortTermOrderCancellation(super::MsgCancelOrder),
2229 #[prost(message, tag = "4")]
2230 PreexistingStatefulOrder(super::OrderId),
2231 }
2232}
2233impl ::prost::Name for Operation {
2234 const NAME: &'static str = "Operation";
2235 const PACKAGE: &'static str = "dydxprotocol.clob";
2236 fn full_name() -> ::prost::alloc::string::String {
2237 "dydxprotocol.clob.Operation".into()
2238 }
2239 fn type_url() -> ::prost::alloc::string::String {
2240 "/dydxprotocol.clob.Operation".into()
2241 }
2242}
2243#[derive(Clone, PartialEq, ::prost::Message)]
2246pub struct InternalOperation {
2247 #[prost(oneof = "internal_operation::Operation", tags = "1, 2, 3, 4")]
2251 pub operation: ::core::option::Option<internal_operation::Operation>,
2252}
2253pub mod internal_operation {
2255 #[derive(Clone, PartialEq, ::prost::Oneof)]
2259 pub enum Operation {
2260 #[prost(message, tag = "1")]
2261 Match(super::ClobMatch),
2262 #[prost(message, tag = "2")]
2263 ShortTermOrderPlacement(super::MsgPlaceOrder),
2264 #[prost(message, tag = "3")]
2265 PreexistingStatefulOrder(super::OrderId),
2266 #[prost(message, tag = "4")]
2267 OrderRemoval(super::OrderRemoval),
2268 }
2269}
2270impl ::prost::Name for InternalOperation {
2271 const NAME: &'static str = "InternalOperation";
2272 const PACKAGE: &'static str = "dydxprotocol.clob";
2273 fn full_name() -> ::prost::alloc::string::String {
2274 "dydxprotocol.clob.InternalOperation".into()
2275 }
2276 fn type_url() -> ::prost::alloc::string::String {
2277 "/dydxprotocol.clob.InternalOperation".into()
2278 }
2279}
2280#[derive(Clone, PartialEq, ::prost::Message)]
2292pub struct ProcessProposerMatchesEvents {
2293 #[deprecated]
2294 #[prost(message, repeated, tag = "1")]
2295 pub placed_long_term_order_ids: ::prost::alloc::vec::Vec<OrderId>,
2296 #[prost(message, repeated, tag = "2")]
2297 pub expired_stateful_order_ids: ::prost::alloc::vec::Vec<OrderId>,
2298 #[prost(message, repeated, tag = "3")]
2299 pub order_ids_filled_in_last_block: ::prost::alloc::vec::Vec<OrderId>,
2300 #[deprecated]
2301 #[prost(message, repeated, tag = "4")]
2302 pub placed_stateful_cancellation_order_ids: ::prost::alloc::vec::Vec<OrderId>,
2303 #[prost(message, repeated, tag = "5")]
2304 pub removed_stateful_order_ids: ::prost::alloc::vec::Vec<OrderId>,
2305 #[prost(message, repeated, tag = "6")]
2306 pub conditional_order_ids_triggered_in_last_block: ::prost::alloc::vec::Vec<OrderId>,
2307 #[deprecated]
2308 #[prost(message, repeated, tag = "7")]
2309 pub placed_conditional_order_ids: ::prost::alloc::vec::Vec<OrderId>,
2310 #[prost(uint32, tag = "8")]
2311 pub block_height: u32,
2312}
2313impl ::prost::Name for ProcessProposerMatchesEvents {
2314 const NAME: &'static str = "ProcessProposerMatchesEvents";
2315 const PACKAGE: &'static str = "dydxprotocol.clob";
2316 fn full_name() -> ::prost::alloc::string::String {
2317 "dydxprotocol.clob.ProcessProposerMatchesEvents".into()
2318 }
2319 fn type_url() -> ::prost::alloc::string::String {
2320 "/dydxprotocol.clob.ProcessProposerMatchesEvents".into()
2321 }
2322}
2323#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2325pub struct QueryGetClobPairRequest {
2326 #[prost(uint32, tag = "1")]
2327 pub id: u32,
2328}
2329impl ::prost::Name for QueryGetClobPairRequest {
2330 const NAME: &'static str = "QueryGetClobPairRequest";
2331 const PACKAGE: &'static str = "dydxprotocol.clob";
2332 fn full_name() -> ::prost::alloc::string::String {
2333 "dydxprotocol.clob.QueryGetClobPairRequest".into()
2334 }
2335 fn type_url() -> ::prost::alloc::string::String {
2336 "/dydxprotocol.clob.QueryGetClobPairRequest".into()
2337 }
2338}
2339#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2341pub struct QueryClobPairResponse {
2342 #[prost(message, optional, tag = "1")]
2343 pub clob_pair: ::core::option::Option<ClobPair>,
2344}
2345impl ::prost::Name for QueryClobPairResponse {
2346 const NAME: &'static str = "QueryClobPairResponse";
2347 const PACKAGE: &'static str = "dydxprotocol.clob";
2348 fn full_name() -> ::prost::alloc::string::String {
2349 "dydxprotocol.clob.QueryClobPairResponse".into()
2350 }
2351 fn type_url() -> ::prost::alloc::string::String {
2352 "/dydxprotocol.clob.QueryClobPairResponse".into()
2353 }
2354}
2355#[derive(Clone, PartialEq, ::prost::Message)]
2357pub struct QueryAllClobPairRequest {
2358 #[prost(message, optional, tag = "1")]
2359 pub pagination: ::core::option::Option<
2360 super::super::cosmos::base::query::v1beta1::PageRequest,
2361 >,
2362}
2363impl ::prost::Name for QueryAllClobPairRequest {
2364 const NAME: &'static str = "QueryAllClobPairRequest";
2365 const PACKAGE: &'static str = "dydxprotocol.clob";
2366 fn full_name() -> ::prost::alloc::string::String {
2367 "dydxprotocol.clob.QueryAllClobPairRequest".into()
2368 }
2369 fn type_url() -> ::prost::alloc::string::String {
2370 "/dydxprotocol.clob.QueryAllClobPairRequest".into()
2371 }
2372}
2373#[derive(Clone, PartialEq, ::prost::Message)]
2375pub struct QueryClobPairAllResponse {
2376 #[prost(message, repeated, tag = "1")]
2377 pub clob_pair: ::prost::alloc::vec::Vec<ClobPair>,
2378 #[prost(message, optional, tag = "2")]
2379 pub pagination: ::core::option::Option<
2380 super::super::cosmos::base::query::v1beta1::PageResponse,
2381 >,
2382}
2383impl ::prost::Name for QueryClobPairAllResponse {
2384 const NAME: &'static str = "QueryClobPairAllResponse";
2385 const PACKAGE: &'static str = "dydxprotocol.clob";
2386 fn full_name() -> ::prost::alloc::string::String {
2387 "dydxprotocol.clob.QueryClobPairAllResponse".into()
2388 }
2389 fn type_url() -> ::prost::alloc::string::String {
2390 "/dydxprotocol.clob.QueryClobPairAllResponse".into()
2391 }
2392}
2393#[derive(Clone, PartialEq, ::prost::Message)]
2396pub struct MevNodeToNodeCalculationRequest {
2397 #[prost(message, optional, tag = "1")]
2402 pub block_proposer_matches: ::core::option::Option<ValidatorMevMatches>,
2403 #[prost(message, optional, tag = "2")]
2405 pub validator_mev_metrics: ::core::option::Option<MevNodeToNodeMetrics>,
2406}
2407impl ::prost::Name for MevNodeToNodeCalculationRequest {
2408 const NAME: &'static str = "MevNodeToNodeCalculationRequest";
2409 const PACKAGE: &'static str = "dydxprotocol.clob";
2410 fn full_name() -> ::prost::alloc::string::String {
2411 "dydxprotocol.clob.MevNodeToNodeCalculationRequest".into()
2412 }
2413 fn type_url() -> ::prost::alloc::string::String {
2414 "/dydxprotocol.clob.MevNodeToNodeCalculationRequest".into()
2415 }
2416}
2417#[derive(Clone, PartialEq, ::prost::Message)]
2420pub struct MevNodeToNodeCalculationResponse {
2421 #[prost(message, repeated, tag = "1")]
2422 pub results: ::prost::alloc::vec::Vec<
2423 mev_node_to_node_calculation_response::MevAndVolumePerClob,
2424 >,
2425}
2426pub mod mev_node_to_node_calculation_response {
2428 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
2430 pub struct MevAndVolumePerClob {
2431 #[prost(uint32, tag = "1")]
2432 pub clob_pair_id: u32,
2433 #[prost(float, tag = "2")]
2434 pub mev: f32,
2435 #[prost(uint64, tag = "3")]
2436 pub volume: u64,
2437 }
2438 impl ::prost::Name for MevAndVolumePerClob {
2439 const NAME: &'static str = "MevAndVolumePerClob";
2440 const PACKAGE: &'static str = "dydxprotocol.clob";
2441 fn full_name() -> ::prost::alloc::string::String {
2442 "dydxprotocol.clob.MevNodeToNodeCalculationResponse.MevAndVolumePerClob"
2443 .into()
2444 }
2445 fn type_url() -> ::prost::alloc::string::String {
2446 "/dydxprotocol.clob.MevNodeToNodeCalculationResponse.MevAndVolumePerClob"
2447 .into()
2448 }
2449 }
2450}
2451impl ::prost::Name for MevNodeToNodeCalculationResponse {
2452 const NAME: &'static str = "MevNodeToNodeCalculationResponse";
2453 const PACKAGE: &'static str = "dydxprotocol.clob";
2454 fn full_name() -> ::prost::alloc::string::String {
2455 "dydxprotocol.clob.MevNodeToNodeCalculationResponse".into()
2456 }
2457 fn type_url() -> ::prost::alloc::string::String {
2458 "/dydxprotocol.clob.MevNodeToNodeCalculationResponse".into()
2459 }
2460}
2461#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2464pub struct QueryEquityTierLimitConfigurationRequest {}
2465impl ::prost::Name for QueryEquityTierLimitConfigurationRequest {
2466 const NAME: &'static str = "QueryEquityTierLimitConfigurationRequest";
2467 const PACKAGE: &'static str = "dydxprotocol.clob";
2468 fn full_name() -> ::prost::alloc::string::String {
2469 "dydxprotocol.clob.QueryEquityTierLimitConfigurationRequest".into()
2470 }
2471 fn type_url() -> ::prost::alloc::string::String {
2472 "/dydxprotocol.clob.QueryEquityTierLimitConfigurationRequest".into()
2473 }
2474}
2475#[derive(Clone, PartialEq, ::prost::Message)]
2478pub struct QueryEquityTierLimitConfigurationResponse {
2479 #[prost(message, optional, tag = "1")]
2480 pub equity_tier_limit_config: ::core::option::Option<EquityTierLimitConfiguration>,
2481}
2482impl ::prost::Name for QueryEquityTierLimitConfigurationResponse {
2483 const NAME: &'static str = "QueryEquityTierLimitConfigurationResponse";
2484 const PACKAGE: &'static str = "dydxprotocol.clob";
2485 fn full_name() -> ::prost::alloc::string::String {
2486 "dydxprotocol.clob.QueryEquityTierLimitConfigurationResponse".into()
2487 }
2488 fn type_url() -> ::prost::alloc::string::String {
2489 "/dydxprotocol.clob.QueryEquityTierLimitConfigurationResponse".into()
2490 }
2491}
2492#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2495pub struct QueryBlockRateLimitConfigurationRequest {}
2496impl ::prost::Name for QueryBlockRateLimitConfigurationRequest {
2497 const NAME: &'static str = "QueryBlockRateLimitConfigurationRequest";
2498 const PACKAGE: &'static str = "dydxprotocol.clob";
2499 fn full_name() -> ::prost::alloc::string::String {
2500 "dydxprotocol.clob.QueryBlockRateLimitConfigurationRequest".into()
2501 }
2502 fn type_url() -> ::prost::alloc::string::String {
2503 "/dydxprotocol.clob.QueryBlockRateLimitConfigurationRequest".into()
2504 }
2505}
2506#[derive(Clone, PartialEq, ::prost::Message)]
2509pub struct QueryBlockRateLimitConfigurationResponse {
2510 #[prost(message, optional, tag = "1")]
2511 pub block_rate_limit_config: ::core::option::Option<BlockRateLimitConfiguration>,
2512}
2513impl ::prost::Name for QueryBlockRateLimitConfigurationResponse {
2514 const NAME: &'static str = "QueryBlockRateLimitConfigurationResponse";
2515 const PACKAGE: &'static str = "dydxprotocol.clob";
2516 fn full_name() -> ::prost::alloc::string::String {
2517 "dydxprotocol.clob.QueryBlockRateLimitConfigurationResponse".into()
2518 }
2519 fn type_url() -> ::prost::alloc::string::String {
2520 "/dydxprotocol.clob.QueryBlockRateLimitConfigurationResponse".into()
2521 }
2522}
2523#[derive(Clone, PartialEq, ::prost::Message)]
2525pub struct QueryStatefulOrderRequest {
2526 #[prost(message, optional, tag = "1")]
2528 pub order_id: ::core::option::Option<OrderId>,
2529}
2530impl ::prost::Name for QueryStatefulOrderRequest {
2531 const NAME: &'static str = "QueryStatefulOrderRequest";
2532 const PACKAGE: &'static str = "dydxprotocol.clob";
2533 fn full_name() -> ::prost::alloc::string::String {
2534 "dydxprotocol.clob.QueryStatefulOrderRequest".into()
2535 }
2536 fn type_url() -> ::prost::alloc::string::String {
2537 "/dydxprotocol.clob.QueryStatefulOrderRequest".into()
2538 }
2539}
2540#[derive(Clone, PartialEq, ::prost::Message)]
2543pub struct QueryStatefulOrderResponse {
2544 #[prost(message, optional, tag = "1")]
2546 pub order_placement: ::core::option::Option<LongTermOrderPlacement>,
2547 #[prost(uint64, tag = "2")]
2549 pub fill_amount: u64,
2550 #[prost(bool, tag = "3")]
2552 pub triggered: bool,
2553}
2554impl ::prost::Name for QueryStatefulOrderResponse {
2555 const NAME: &'static str = "QueryStatefulOrderResponse";
2556 const PACKAGE: &'static str = "dydxprotocol.clob";
2557 fn full_name() -> ::prost::alloc::string::String {
2558 "dydxprotocol.clob.QueryStatefulOrderResponse".into()
2559 }
2560 fn type_url() -> ::prost::alloc::string::String {
2561 "/dydxprotocol.clob.QueryStatefulOrderResponse".into()
2562 }
2563}
2564#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2567pub struct QueryLiquidationsConfigurationRequest {}
2568impl ::prost::Name for QueryLiquidationsConfigurationRequest {
2569 const NAME: &'static str = "QueryLiquidationsConfigurationRequest";
2570 const PACKAGE: &'static str = "dydxprotocol.clob";
2571 fn full_name() -> ::prost::alloc::string::String {
2572 "dydxprotocol.clob.QueryLiquidationsConfigurationRequest".into()
2573 }
2574 fn type_url() -> ::prost::alloc::string::String {
2575 "/dydxprotocol.clob.QueryLiquidationsConfigurationRequest".into()
2576 }
2577}
2578#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2581pub struct QueryLiquidationsConfigurationResponse {
2582 #[prost(message, optional, tag = "1")]
2583 pub liquidations_config: ::core::option::Option<LiquidationsConfig>,
2584}
2585impl ::prost::Name for QueryLiquidationsConfigurationResponse {
2586 const NAME: &'static str = "QueryLiquidationsConfigurationResponse";
2587 const PACKAGE: &'static str = "dydxprotocol.clob";
2588 fn full_name() -> ::prost::alloc::string::String {
2589 "dydxprotocol.clob.QueryLiquidationsConfigurationResponse".into()
2590 }
2591 fn type_url() -> ::prost::alloc::string::String {
2592 "/dydxprotocol.clob.QueryLiquidationsConfigurationResponse".into()
2593 }
2594}
2595#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2597pub struct QueryNextClobPairIdRequest {}
2598impl ::prost::Name for QueryNextClobPairIdRequest {
2599 const NAME: &'static str = "QueryNextClobPairIdRequest";
2600 const PACKAGE: &'static str = "dydxprotocol.clob";
2601 fn full_name() -> ::prost::alloc::string::String {
2602 "dydxprotocol.clob.QueryNextClobPairIdRequest".into()
2603 }
2604 fn type_url() -> ::prost::alloc::string::String {
2605 "/dydxprotocol.clob.QueryNextClobPairIdRequest".into()
2606 }
2607}
2608#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2610pub struct QueryNextClobPairIdResponse {
2611 #[prost(uint32, tag = "1")]
2612 pub next_clob_pair_id: u32,
2613}
2614impl ::prost::Name for QueryNextClobPairIdResponse {
2615 const NAME: &'static str = "QueryNextClobPairIdResponse";
2616 const PACKAGE: &'static str = "dydxprotocol.clob";
2617 fn full_name() -> ::prost::alloc::string::String {
2618 "dydxprotocol.clob.QueryNextClobPairIdResponse".into()
2619 }
2620 fn type_url() -> ::prost::alloc::string::String {
2621 "/dydxprotocol.clob.QueryNextClobPairIdResponse".into()
2622 }
2623}
2624#[derive(Clone, PartialEq, ::prost::Message)]
2627pub struct StreamOrderbookUpdatesRequest {
2628 #[prost(uint32, repeated, tag = "1")]
2630 pub clob_pair_id: ::prost::alloc::vec::Vec<u32>,
2631 #[prost(message, repeated, tag = "2")]
2633 pub subaccount_ids: ::prost::alloc::vec::Vec<super::subaccounts::SubaccountId>,
2634 #[prost(uint32, repeated, tag = "3")]
2636 pub market_ids: ::prost::alloc::vec::Vec<u32>,
2637 #[prost(bool, tag = "4")]
2641 pub filter_orders_by_subaccount_id: bool,
2642}
2643impl ::prost::Name for StreamOrderbookUpdatesRequest {
2644 const NAME: &'static str = "StreamOrderbookUpdatesRequest";
2645 const PACKAGE: &'static str = "dydxprotocol.clob";
2646 fn full_name() -> ::prost::alloc::string::String {
2647 "dydxprotocol.clob.StreamOrderbookUpdatesRequest".into()
2648 }
2649 fn type_url() -> ::prost::alloc::string::String {
2650 "/dydxprotocol.clob.StreamOrderbookUpdatesRequest".into()
2651 }
2652}
2653#[derive(Clone, PartialEq, ::prost::Message)]
2656pub struct StreamOrderbookUpdatesResponse {
2657 #[prost(message, repeated, tag = "1")]
2659 pub updates: ::prost::alloc::vec::Vec<StreamUpdate>,
2660}
2661impl ::prost::Name for StreamOrderbookUpdatesResponse {
2662 const NAME: &'static str = "StreamOrderbookUpdatesResponse";
2663 const PACKAGE: &'static str = "dydxprotocol.clob";
2664 fn full_name() -> ::prost::alloc::string::String {
2665 "dydxprotocol.clob.StreamOrderbookUpdatesResponse".into()
2666 }
2667 fn type_url() -> ::prost::alloc::string::String {
2668 "/dydxprotocol.clob.StreamOrderbookUpdatesResponse".into()
2669 }
2670}
2671#[derive(Clone, PartialEq, ::prost::Message)]
2674pub struct StreamUpdate {
2675 #[prost(uint32, tag = "1")]
2677 pub block_height: u32,
2678 #[prost(uint32, tag = "2")]
2680 pub exec_mode: u32,
2681 #[prost(oneof = "stream_update::UpdateMessage", tags = "3, 4, 5, 6, 7")]
2684 pub update_message: ::core::option::Option<stream_update::UpdateMessage>,
2685}
2686pub mod stream_update {
2688 #[derive(Clone, PartialEq, ::prost::Oneof)]
2691 pub enum UpdateMessage {
2692 #[prost(message, tag = "3")]
2693 OrderbookUpdate(super::StreamOrderbookUpdate),
2694 #[prost(message, tag = "4")]
2695 OrderFill(super::StreamOrderbookFill),
2696 #[prost(message, tag = "5")]
2697 TakerOrder(super::StreamTakerOrder),
2698 #[prost(message, tag = "6")]
2699 SubaccountUpdate(super::super::subaccounts::StreamSubaccountUpdate),
2700 #[prost(message, tag = "7")]
2701 PriceUpdate(super::super::prices::StreamPriceUpdate),
2702 }
2703}
2704impl ::prost::Name for StreamUpdate {
2705 const NAME: &'static str = "StreamUpdate";
2706 const PACKAGE: &'static str = "dydxprotocol.clob";
2707 fn full_name() -> ::prost::alloc::string::String {
2708 "dydxprotocol.clob.StreamUpdate".into()
2709 }
2710 fn type_url() -> ::prost::alloc::string::String {
2711 "/dydxprotocol.clob.StreamUpdate".into()
2712 }
2713}
2714#[derive(Clone, PartialEq, ::prost::Message)]
2717pub struct StreamOrderbookUpdate {
2718 #[prost(bool, tag = "1")]
2723 pub snapshot: bool,
2724 #[prost(message, repeated, tag = "2")]
2727 pub updates: ::prost::alloc::vec::Vec<
2728 super::indexer::off_chain_updates::OffChainUpdateV1,
2729 >,
2730}
2731impl ::prost::Name for StreamOrderbookUpdate {
2732 const NAME: &'static str = "StreamOrderbookUpdate";
2733 const PACKAGE: &'static str = "dydxprotocol.clob";
2734 fn full_name() -> ::prost::alloc::string::String {
2735 "dydxprotocol.clob.StreamOrderbookUpdate".into()
2736 }
2737 fn type_url() -> ::prost::alloc::string::String {
2738 "/dydxprotocol.clob.StreamOrderbookUpdate".into()
2739 }
2740}
2741#[derive(Clone, PartialEq, ::prost::Message)]
2744pub struct StreamOrderbookFill {
2745 #[prost(message, optional, tag = "1")]
2748 pub clob_match: ::core::option::Option<ClobMatch>,
2749 #[prost(message, repeated, tag = "2")]
2752 pub orders: ::prost::alloc::vec::Vec<Order>,
2753 #[prost(uint64, repeated, tag = "3")]
2755 pub fill_amounts: ::prost::alloc::vec::Vec<u64>,
2756}
2757impl ::prost::Name for StreamOrderbookFill {
2758 const NAME: &'static str = "StreamOrderbookFill";
2759 const PACKAGE: &'static str = "dydxprotocol.clob";
2760 fn full_name() -> ::prost::alloc::string::String {
2761 "dydxprotocol.clob.StreamOrderbookFill".into()
2762 }
2763 fn type_url() -> ::prost::alloc::string::String {
2764 "/dydxprotocol.clob.StreamOrderbookFill".into()
2765 }
2766}
2767#[derive(Clone, PartialEq, ::prost::Message)]
2771pub struct StreamTakerOrder {
2772 #[prost(message, optional, tag = "3")]
2775 pub taker_order_status: ::core::option::Option<StreamTakerOrderStatus>,
2776 #[prost(oneof = "stream_taker_order::TakerOrder", tags = "1, 2")]
2779 pub taker_order: ::core::option::Option<stream_taker_order::TakerOrder>,
2780}
2781pub mod stream_taker_order {
2783 #[derive(Clone, PartialEq, ::prost::Oneof)]
2786 pub enum TakerOrder {
2787 #[prost(message, tag = "1")]
2788 Order(super::Order),
2789 #[prost(message, tag = "2")]
2790 LiquidationOrder(super::StreamLiquidationOrder),
2791 }
2792}
2793impl ::prost::Name for StreamTakerOrder {
2794 const NAME: &'static str = "StreamTakerOrder";
2795 const PACKAGE: &'static str = "dydxprotocol.clob";
2796 fn full_name() -> ::prost::alloc::string::String {
2797 "dydxprotocol.clob.StreamTakerOrder".into()
2798 }
2799 fn type_url() -> ::prost::alloc::string::String {
2800 "/dydxprotocol.clob.StreamTakerOrder".into()
2801 }
2802}
2803#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2807pub struct StreamTakerOrderStatus {
2808 #[prost(uint32, tag = "1")]
2812 pub order_status: u32,
2813 #[prost(uint64, tag = "2")]
2815 pub remaining_quantums: u64,
2816 #[prost(uint64, tag = "3")]
2822 pub optimistically_filled_quantums: u64,
2823}
2824impl ::prost::Name for StreamTakerOrderStatus {
2825 const NAME: &'static str = "StreamTakerOrderStatus";
2826 const PACKAGE: &'static str = "dydxprotocol.clob";
2827 fn full_name() -> ::prost::alloc::string::String {
2828 "dydxprotocol.clob.StreamTakerOrderStatus".into()
2829 }
2830 fn type_url() -> ::prost::alloc::string::String {
2831 "/dydxprotocol.clob.StreamTakerOrderStatus".into()
2832 }
2833}
2834pub mod query_client {
2836 #![allow(
2837 unused_variables,
2838 dead_code,
2839 missing_docs,
2840 clippy::wildcard_imports,
2841 clippy::let_unit_value,
2842 )]
2843 use tonic::codegen::*;
2844 use tonic::codegen::http::Uri;
2845 #[derive(Debug, Clone)]
2847 pub struct QueryClient<T> {
2848 inner: tonic::client::Grpc<T>,
2849 }
2850 #[cfg(feature = "grpc-transport")]
2851 impl QueryClient<tonic::transport::Channel> {
2852 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2854 where
2855 D: TryInto<tonic::transport::Endpoint>,
2856 D::Error: Into<StdError>,
2857 {
2858 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2859 Ok(Self::new(conn))
2860 }
2861 }
2862 impl<T> QueryClient<T>
2863 where
2864 T: tonic::client::GrpcService<tonic::body::Body>,
2865 T::Error: Into<StdError>,
2866 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2867 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2868 {
2869 pub fn new(inner: T) -> Self {
2870 let inner = tonic::client::Grpc::new(inner);
2871 Self { inner }
2872 }
2873 pub fn with_origin(inner: T, origin: Uri) -> Self {
2874 let inner = tonic::client::Grpc::with_origin(inner, origin);
2875 Self { inner }
2876 }
2877 pub fn with_interceptor<F>(
2878 inner: T,
2879 interceptor: F,
2880 ) -> QueryClient<InterceptedService<T, F>>
2881 where
2882 F: tonic::service::Interceptor,
2883 T::ResponseBody: Default,
2884 T: tonic::codegen::Service<
2885 http::Request<tonic::body::Body>,
2886 Response = http::Response<
2887 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2888 >,
2889 >,
2890 <T as tonic::codegen::Service<
2891 http::Request<tonic::body::Body>,
2892 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2893 {
2894 QueryClient::new(InterceptedService::new(inner, interceptor))
2895 }
2896 #[must_use]
2901 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2902 self.inner = self.inner.send_compressed(encoding);
2903 self
2904 }
2905 #[must_use]
2907 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2908 self.inner = self.inner.accept_compressed(encoding);
2909 self
2910 }
2911 #[must_use]
2915 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2916 self.inner = self.inner.max_decoding_message_size(limit);
2917 self
2918 }
2919 #[must_use]
2923 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2924 self.inner = self.inner.max_encoding_message_size(limit);
2925 self
2926 }
2927 pub async fn clob_pair(
2929 &mut self,
2930 request: impl tonic::IntoRequest<super::QueryGetClobPairRequest>,
2931 ) -> std::result::Result<
2932 tonic::Response<super::QueryClobPairResponse>,
2933 tonic::Status,
2934 > {
2935 self.inner
2936 .ready()
2937 .await
2938 .map_err(|e| {
2939 tonic::Status::unknown(
2940 format!("Service was not ready: {}", e.into()),
2941 )
2942 })?;
2943 let codec = tonic::codec::ProstCodec::default();
2944 let path = http::uri::PathAndQuery::from_static(
2945 "/dydxprotocol.clob.Query/ClobPair",
2946 );
2947 let mut req = request.into_request();
2948 req.extensions_mut()
2949 .insert(GrpcMethod::new("dydxprotocol.clob.Query", "ClobPair"));
2950 self.inner.unary(req, path, codec).await
2951 }
2952 pub async fn clob_pair_all(
2954 &mut self,
2955 request: impl tonic::IntoRequest<super::QueryAllClobPairRequest>,
2956 ) -> std::result::Result<
2957 tonic::Response<super::QueryClobPairAllResponse>,
2958 tonic::Status,
2959 > {
2960 self.inner
2961 .ready()
2962 .await
2963 .map_err(|e| {
2964 tonic::Status::unknown(
2965 format!("Service was not ready: {}", e.into()),
2966 )
2967 })?;
2968 let codec = tonic::codec::ProstCodec::default();
2969 let path = http::uri::PathAndQuery::from_static(
2970 "/dydxprotocol.clob.Query/ClobPairAll",
2971 );
2972 let mut req = request.into_request();
2973 req.extensions_mut()
2974 .insert(GrpcMethod::new("dydxprotocol.clob.Query", "ClobPairAll"));
2975 self.inner.unary(req, path, codec).await
2976 }
2977 pub async fn mev_node_to_node_calculation(
2979 &mut self,
2980 request: impl tonic::IntoRequest<super::MevNodeToNodeCalculationRequest>,
2981 ) -> std::result::Result<
2982 tonic::Response<super::MevNodeToNodeCalculationResponse>,
2983 tonic::Status,
2984 > {
2985 self.inner
2986 .ready()
2987 .await
2988 .map_err(|e| {
2989 tonic::Status::unknown(
2990 format!("Service was not ready: {}", e.into()),
2991 )
2992 })?;
2993 let codec = tonic::codec::ProstCodec::default();
2994 let path = http::uri::PathAndQuery::from_static(
2995 "/dydxprotocol.clob.Query/MevNodeToNodeCalculation",
2996 );
2997 let mut req = request.into_request();
2998 req.extensions_mut()
2999 .insert(
3000 GrpcMethod::new(
3001 "dydxprotocol.clob.Query",
3002 "MevNodeToNodeCalculation",
3003 ),
3004 );
3005 self.inner.unary(req, path, codec).await
3006 }
3007 pub async fn equity_tier_limit_configuration(
3009 &mut self,
3010 request: impl tonic::IntoRequest<
3011 super::QueryEquityTierLimitConfigurationRequest,
3012 >,
3013 ) -> std::result::Result<
3014 tonic::Response<super::QueryEquityTierLimitConfigurationResponse>,
3015 tonic::Status,
3016 > {
3017 self.inner
3018 .ready()
3019 .await
3020 .map_err(|e| {
3021 tonic::Status::unknown(
3022 format!("Service was not ready: {}", e.into()),
3023 )
3024 })?;
3025 let codec = tonic::codec::ProstCodec::default();
3026 let path = http::uri::PathAndQuery::from_static(
3027 "/dydxprotocol.clob.Query/EquityTierLimitConfiguration",
3028 );
3029 let mut req = request.into_request();
3030 req.extensions_mut()
3031 .insert(
3032 GrpcMethod::new(
3033 "dydxprotocol.clob.Query",
3034 "EquityTierLimitConfiguration",
3035 ),
3036 );
3037 self.inner.unary(req, path, codec).await
3038 }
3039 pub async fn block_rate_limit_configuration(
3041 &mut self,
3042 request: impl tonic::IntoRequest<
3043 super::QueryBlockRateLimitConfigurationRequest,
3044 >,
3045 ) -> std::result::Result<
3046 tonic::Response<super::QueryBlockRateLimitConfigurationResponse>,
3047 tonic::Status,
3048 > {
3049 self.inner
3050 .ready()
3051 .await
3052 .map_err(|e| {
3053 tonic::Status::unknown(
3054 format!("Service was not ready: {}", e.into()),
3055 )
3056 })?;
3057 let codec = tonic::codec::ProstCodec::default();
3058 let path = http::uri::PathAndQuery::from_static(
3059 "/dydxprotocol.clob.Query/BlockRateLimitConfiguration",
3060 );
3061 let mut req = request.into_request();
3062 req.extensions_mut()
3063 .insert(
3064 GrpcMethod::new(
3065 "dydxprotocol.clob.Query",
3066 "BlockRateLimitConfiguration",
3067 ),
3068 );
3069 self.inner.unary(req, path, codec).await
3070 }
3071 pub async fn liquidations_configuration(
3073 &mut self,
3074 request: impl tonic::IntoRequest<
3075 super::QueryLiquidationsConfigurationRequest,
3076 >,
3077 ) -> std::result::Result<
3078 tonic::Response<super::QueryLiquidationsConfigurationResponse>,
3079 tonic::Status,
3080 > {
3081 self.inner
3082 .ready()
3083 .await
3084 .map_err(|e| {
3085 tonic::Status::unknown(
3086 format!("Service was not ready: {}", e.into()),
3087 )
3088 })?;
3089 let codec = tonic::codec::ProstCodec::default();
3090 let path = http::uri::PathAndQuery::from_static(
3091 "/dydxprotocol.clob.Query/LiquidationsConfiguration",
3092 );
3093 let mut req = request.into_request();
3094 req.extensions_mut()
3095 .insert(
3096 GrpcMethod::new(
3097 "dydxprotocol.clob.Query",
3098 "LiquidationsConfiguration",
3099 ),
3100 );
3101 self.inner.unary(req, path, codec).await
3102 }
3103 pub async fn stateful_order(
3105 &mut self,
3106 request: impl tonic::IntoRequest<super::QueryStatefulOrderRequest>,
3107 ) -> std::result::Result<
3108 tonic::Response<super::QueryStatefulOrderResponse>,
3109 tonic::Status,
3110 > {
3111 self.inner
3112 .ready()
3113 .await
3114 .map_err(|e| {
3115 tonic::Status::unknown(
3116 format!("Service was not ready: {}", e.into()),
3117 )
3118 })?;
3119 let codec = tonic::codec::ProstCodec::default();
3120 let path = http::uri::PathAndQuery::from_static(
3121 "/dydxprotocol.clob.Query/StatefulOrder",
3122 );
3123 let mut req = request.into_request();
3124 req.extensions_mut()
3125 .insert(GrpcMethod::new("dydxprotocol.clob.Query", "StatefulOrder"));
3126 self.inner.unary(req, path, codec).await
3127 }
3128 pub async fn next_clob_pair_id(
3130 &mut self,
3131 request: impl tonic::IntoRequest<super::QueryNextClobPairIdRequest>,
3132 ) -> std::result::Result<
3133 tonic::Response<super::QueryNextClobPairIdResponse>,
3134 tonic::Status,
3135 > {
3136 self.inner
3137 .ready()
3138 .await
3139 .map_err(|e| {
3140 tonic::Status::unknown(
3141 format!("Service was not ready: {}", e.into()),
3142 )
3143 })?;
3144 let codec = tonic::codec::ProstCodec::default();
3145 let path = http::uri::PathAndQuery::from_static(
3146 "/dydxprotocol.clob.Query/NextClobPairId",
3147 );
3148 let mut req = request.into_request();
3149 req.extensions_mut()
3150 .insert(GrpcMethod::new("dydxprotocol.clob.Query", "NextClobPairId"));
3151 self.inner.unary(req, path, codec).await
3152 }
3153 pub async fn stream_orderbook_updates(
3156 &mut self,
3157 request: impl tonic::IntoRequest<super::StreamOrderbookUpdatesRequest>,
3158 ) -> std::result::Result<
3159 tonic::Response<
3160 tonic::codec::Streaming<super::StreamOrderbookUpdatesResponse>,
3161 >,
3162 tonic::Status,
3163 > {
3164 self.inner
3165 .ready()
3166 .await
3167 .map_err(|e| {
3168 tonic::Status::unknown(
3169 format!("Service was not ready: {}", e.into()),
3170 )
3171 })?;
3172 let codec = tonic::codec::ProstCodec::default();
3173 let path = http::uri::PathAndQuery::from_static(
3174 "/dydxprotocol.clob.Query/StreamOrderbookUpdates",
3175 );
3176 let mut req = request.into_request();
3177 req.extensions_mut()
3178 .insert(
3179 GrpcMethod::new("dydxprotocol.clob.Query", "StreamOrderbookUpdates"),
3180 );
3181 self.inner.server_streaming(req, path, codec).await
3182 }
3183 }
3184}
3185#[derive(Clone, PartialEq, ::prost::Message)]
3187pub struct StagedFinalizeBlockEvent {
3188 #[prost(oneof = "staged_finalize_block_event::Event", tags = "1, 2, 3, 4")]
3190 pub event: ::core::option::Option<staged_finalize_block_event::Event>,
3191}
3192pub mod staged_finalize_block_event {
3194 #[derive(Clone, PartialEq, ::prost::Oneof)]
3196 pub enum Event {
3197 #[prost(message, tag = "1")]
3198 OrderFill(super::StreamOrderbookFill),
3199 #[prost(message, tag = "2")]
3200 SubaccountUpdate(super::super::subaccounts::StreamSubaccountUpdate),
3201 #[prost(message, tag = "3")]
3202 OrderbookUpdate(super::StreamOrderbookUpdate),
3203 #[prost(message, tag = "4")]
3204 PriceUpdate(super::super::prices::StreamPriceUpdate),
3205 }
3206}
3207impl ::prost::Name for StagedFinalizeBlockEvent {
3208 const NAME: &'static str = "StagedFinalizeBlockEvent";
3209 const PACKAGE: &'static str = "dydxprotocol.clob";
3210 fn full_name() -> ::prost::alloc::string::String {
3211 "dydxprotocol.clob.StagedFinalizeBlockEvent".into()
3212 }
3213 fn type_url() -> ::prost::alloc::string::String {
3214 "/dydxprotocol.clob.StagedFinalizeBlockEvent".into()
3215 }
3216}