ids-apis 1.0.313

IDS APIs in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
// @generated
// This file is @generated by prost-build.
// ============================================================================
// Pair Entity
// ============================================================================

/// Pair 전략 — 두 심볼의 가격 조건에 따른 동시 주문 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Pair {
    /// 리소스 이름 (pairs/{id})
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// Pair ID
    #[prost(int32, tag="2")]
    pub id: i32,
    /// 전략 이름 (고유)
    #[prost(string, tag="3")]
    pub display_name: ::prost::alloc::string::String,
    /// Portfolio ID
    #[prost(int32, tag="4")]
    pub portfolio_id: i32,
    /// Base 엔트리
    #[prost(message, optional, tag="5")]
    pub base: ::core::option::Option<PairEntry>,
    /// Counter 엔트리
    #[prost(message, optional, tag="6")]
    pub counter: ::core::option::Option<PairEntry>,
    /// 상태
    #[prost(enumeration="PairStatus", tag="9")]
    pub status: i32,
    /// 실행 모드 (oneof)
    #[prost(message, optional, tag="10")]
    pub mode: ::core::option::Option<PairMode>,
    /// 생성 시간
    #[prost(message, optional, tag="11")]
    pub create_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 수정 시간
    #[prost(message, optional, tag="12")]
    pub update_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
// ============================================================================
// Pair Entry
// ============================================================================

/// 페어의 한쪽 엔트리 (단일 심볼 주문 스펙)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairEntry {
    /// 종목 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 주문에 사용할 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// 주문 방향
    #[prost(enumeration="PairSide", tag="3")]
    pub side: i32,
    /// 주문 수량 (1 이상)
    #[prost(int64, tag="4")]
    pub quantity: i64,
    /// 참조 가격 소스
    #[prost(enumeration="PriceSource", tag="5")]
    pub price_source: i32,
    /// 지정가 산출 시 참조 호가에서 이동할 틱 수
    /// Bid: 양수 = 더 높은 가격. Ask: 양수 = 더 낮은 가격.
    #[prost(int32, tag="6")]
    pub price_offset_ticks: i32,
}
// ============================================================================
// Pair Condition (oneof wrapper)
// ============================================================================

/// 페어 가격 비교 조건 (세 가지 variant 중 하나)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PairCondition {
    #[prost(oneof="pair_condition::Kind", tags="1, 2, 3")]
    pub kind: ::core::option::Option<pair_condition::Kind>,
}
/// Nested message and enum types in `PairCondition`.
pub mod pair_condition {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Kind {
        /// 절대 스프레드 금액 기준
        #[prost(message, tag="1")]
        SpreadAmount(super::SpreadAmountCondition),
        /// 상대 스프레드 (bps) 기준
        #[prost(message, tag="2")]
        SpreadBps(super::SpreadBpsCondition),
        /// 가격 비율 기준
        #[prost(message, tag="3")]
        PriceRatio(super::PriceRatioCondition),
    }
}
/// 절대 스프레드 금액 조건 (|base - counter| >= threshold)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SpreadAmountCondition {
    /// 스프레드 임계값 (원, 1 이상)
    #[prost(int64, tag="1")]
    pub threshold: i64,
    /// 트리거 방향
    #[prost(enumeration="SpreadDirection", tag="2")]
    pub direction: i32,
}
/// 상대 스프레드 (bps) 조건 (|spread| / mid * 10000 >= threshold_bps, base 기준)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SpreadBpsCondition {
    /// 스프레드 임계값 (bps, 1bp = 0.01%)
    #[prost(double, tag="1")]
    pub threshold_bps: f64,
    /// 트리거 방향
    #[prost(enumeration="SpreadDirection", tag="2")]
    pub direction: i32,
}
/// 가격 비율 조건 (base / counter)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PriceRatioCondition {
    /// 최소 비율 (이 값 미만이면 CounterHigh 트리거)
    #[prost(double, tag="1")]
    pub min_ratio: f64,
    /// 최대 비율 (이 값 초과 시 BaseHigh 트리거)
    #[prost(double, tag="2")]
    pub max_ratio: f64,
}
// ============================================================================
// Pair Mode (oneof wrapper)
// ============================================================================

/// Pair 실행 모드
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PairMode {
    #[prost(oneof="pair_mode::Kind", tags="1, 2, 3")]
    pub kind: ::core::option::Option<pair_mode::Kind>,
}
/// Nested message and enum types in `PairMode`.
pub mod pair_mode {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Kind {
        /// 기존 동작: 두 시세 비교 후 조건 충족 시 양측 동시 발주
        #[prost(message, tag="1")]
        SimultaneousCompare(super::SimultaneousCompare),
        /// 신규: pricer 시세 기반 maker 호가 유지 + 체결 시 taker 헷지
        #[prost(message, tag="2")]
        PricingMakerTaker(super::PricingMakerTaker),
        /// 신규: base maker 호가 유지, counter IOC 헷지 + 잔량 추적 처리
        #[prost(message, tag="3")]
        BaseMakeCounterIocAndBalance(super::BaseMakeCounterIocAndBalance),
    }
}
/// BaseMakeCounterIocAndBalance 모드 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BaseMakeCounterIocAndBalance {
    /// counter leg 역방향 여부 (true: counter 측 방향을 base와 반대로 설정)
    #[prost(bool, tag="3")]
    pub counter_inverse: bool,
    /// IOC 발주 시 불균형 감지 임계 비율 (잔량 / 목표수량, 이 값 초과 시 재발주)
    #[prost(double, tag="4")]
    pub imbalance_threshold_ratio: f64,
    /// 불균형 회복 목표 비율 (재발주 시 목표 충족 비율)
    #[prost(double, tag="5")]
    pub imbalance_recovery_ratio: f64,
    /// 결제(settle) 타임아웃 (ms, 이 시간 내 미결제 시 경보)
    #[prost(uint64, tag="6")]
    pub settle_timeout_ms: u64,
    /// 잔량 조정 경보 임계값 (원, 이 금액 초과 시 경보 로그)
    #[prost(int64, tag="7")]
    pub reconcile_alert_amount: i64,
    /// 트리거 후 재트리거까지 대기시간 (ms)
    #[prost(uint64, tag="8")]
    pub cooldown_ms: u64,
    /// NAV 계산 공식 종류 (서버 런타임에 PricingContext 엔티티 조회, proto엔 종류만 지정)
    #[prost(enumeration="EtfNavKind", tag="9")]
    pub nav_kind: i32,
    /// Bid quote 산출용 basis 오프셋 (원, raw int64)
    #[prost(int64, tag="10")]
    pub bid_basis: i64,
    /// Ask quote 산출용 basis 오프셋 (원, raw int64)
    #[prost(int64, tag="11")]
    pub ask_basis: i64,
}
/// SimultaneousCompare 모드 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SimultaneousCompare {
    /// 가격 비교 조건
    #[prost(message, optional, tag="1")]
    pub condition: ::core::option::Option<PairCondition>,
    /// 주문 유형
    #[prost(enumeration="PairOrderType", tag="2")]
    pub order_type: i32,
    /// 트리거 후 재트리거까지 대기시간 (ms)
    #[prost(uint64, tag="3")]
    pub cooldown_ms: u64,
    /// hit 직후 지정가 조정 여부
    #[prost(bool, tag="4")]
    pub apply_tick_offset: bool,
}
/// PricingMakerTaker 모드 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PricingMakerTaker {
    /// maker 역할 leg (BASE or COUNTER; 반대 leg가 pricer 겸 taker)
    #[prost(enumeration="PairLeg", tag="1")]
    pub maker_leg: i32,
    /// pricer → maker 가격 환산 방식
    #[prost(message, optional, tag="2")]
    pub pricing: ::core::option::Option<PairPricingMethod>,
    /// 정정(retick) 정책
    #[prost(message, optional, tag="3")]
    pub retick: ::core::option::Option<RetickPolicy>,
    /// taker(헷지) 측 주문 유형
    #[prost(enumeration="PairOrderType", tag="4")]
    pub taker_order_type: i32,
}
// ============================================================================
// Pair Pricing Method (oneof wrapper)
// ============================================================================

/// pricer 가격으로부터 maker fair price를 산출하는 방식
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PairPricingMethod {
    #[prost(oneof="pair_pricing_method::Method", tags="1, 2")]
    pub method: ::core::option::Option<pair_pricing_method::Method>,
}
/// Nested message and enum types in `PairPricingMethod`.
pub mod pair_pricing_method {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Method {
        /// 선형 환산: maker_price = pricer_price * multiple + basis(side)
        #[prost(message, tag="1")]
        LinearBasis(super::LinearBasis),
        /// ETF NAV 기반 환산 (ETF↔선물 비선형 케이스)
        #[prost(message, tag="2")]
        EtfNav(super::EtfNav),
    }
}
/// 선형 환산 방식
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LinearBasis {
    /// 배율 (예: 1.0, non-zero finite)
    #[prost(double, tag="1")]
    pub multiple: f64,
    /// Bid quote 산출용 basis 오프셋 (원)
    #[prost(int64, tag="2")]
    pub basis_bid: i64,
    /// Ask quote 산출용 basis 오프셋 (원)
    #[prost(int64, tag="3")]
    pub basis_ask: i64,
}
/// ETF NAV 기반 환산 방식
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EtfNav {
    /// NAV 계산 공식 종류
    #[prost(enumeration="EtfNavKind", tag="1")]
    pub pricing_kind: i32,
    /// 환산 방향 (Inverse: pricer=ETF→maker=선물, Forward: pricer=선물→maker=ETF)
    #[prost(enumeration="NavDirection", tag="2")]
    pub direction: i32,
    /// 정적 pricing 파라미터 snapshot
    #[prost(message, optional, tag="3")]
    pub ctx: ::core::option::Option<PricingContextSnapshot>,
    /// Bid quote 산출용 basis (원, raw int64)
    #[prost(int64, tag="4")]
    pub bid_basis: i64,
    /// Ask quote 산출용 basis (원, raw int64)
    #[prost(int64, tag="5")]
    pub ask_basis: i64,
    /// PDF/Pdf fallback용 선형 배율 (inverse 모드, 기본 1.0)
    #[prost(double, tag="6")]
    pub linear_fallback_multiplier: f64,
    /// FutureBasis/LeverageFuture variant의 전일 기초지수 가격 (원, raw int64)
    /// EtfNavKind가 FUTURE_BASIS 또는 LEVERAGE_FUTURE일 때 필수
    #[prost(int64, tag="7")]
    pub prev_index: i64,
    /// LeverageFuture variant의 전일 선물 가격 (원, raw int64)
    /// EtfNavKind가 LEVERAGE_FUTURE일 때 필수
    #[prost(int64, tag="8")]
    pub prev_future: i64,
}
/// PricingContext 정적 파라미터 snapshot
/// (Price 타입은 i64 raw value 기반 — int64로 직렬화)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PricingContextSnapshot {
    /// 전일 NAV (LeverageFuture의 nav0)
    #[prost(int64, tag="1")]
    pub nav0: i64,
    /// 바스켓 내 현물(Stock/ETF) 비중 (0.0 ~ 1.0)
    #[prost(double, tag="2")]
    pub stock_ratio: f64,
    /// 실질 레버리지 (= unit_delta / Nav0, 인버스면 부호 반전)
    #[prost(double, tag="3")]
    pub actual_leverage: f64,
    /// 단위 델타 (unit_delta)
    #[prost(int64, tag="4")]
    pub unit_delta: i64,
    /// 주당 현금 (cash_per_share)
    #[prost(int64, tag="5")]
    pub cash_per_share: i64,
    /// 지수 추종 배율 (IndexTrackingHedge 시 필수, 그 외 미사용)
    #[prost(int64, optional, tag="6")]
    pub tracking_multiple: ::core::option::Option<i64>,
}
// ============================================================================
// Retick Policy
// ============================================================================

/// maker 정정(amend) 정책
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RetickPolicy {
    /// fair 가격이 이 tick 수 이상 이동해야 정정 (1 이상)
    #[prost(int32, tag="1")]
    pub tick_threshold: i32,
    /// 직전 정정으로부터 이만큼 경과해야 다음 정정 허용 (ms)
    #[prost(uint64, tag="2")]
    pub amend_cooldown_ms: u64,
    /// stop 시 미체결 maker 주문 자동 취소 여부
    #[prost(bool, tag="3")]
    pub cancel_on_stop: bool,
}
// ============================================================================
// Request / Response Messages — CRUD
// ============================================================================

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPairRequest {
    /// 리소스 이름 (pairs/{id})
    #[prost(string, tag="1")]
    pub pair: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPairsRequest {
    /// 페이지 크기 (optional)
    #[prost(int32, optional, tag="1")]
    pub page_size: ::core::option::Option<i32>,
    /// 페이지 토큰 (optional, for pagination)
    #[prost(string, optional, tag="2")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    /// 필터링 조건 (optional, AIP-160)
    ///
    /// Available Fields:
    /// * status - 상태 (ACTIVE / PAUSED / ARCHIVED)
    /// * portfolio_id - Portfolio ID
    ///
    /// Examples:
    /// * status=ACTIVE
    /// * portfolio_id=1
    #[prost(string, tag="3")]
    pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPairsResponse {
    /// Pair 목록
    #[prost(message, repeated, tag="1")]
    pub pairs: ::prost::alloc::vec::Vec<Pair>,
    /// 다음 페이지 토큰
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePairRequest {
    /// 생성할 Pair
    #[prost(message, optional, tag="1")]
    pub pair: ::core::option::Option<Pair>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePairRequest {
    /// 수정할 Pair
    #[prost(message, optional, tag="1")]
    pub pair: ::core::option::Option<Pair>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePairRequest {
    /// 리소스 이름 (pairs/{id})
    #[prost(string, tag="1")]
    pub pair: ::prost::alloc::string::String,
}
// ============================================================================
// Request / Response Messages — Lifecycle
// ============================================================================

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivatePairRequest {
    /// 리소스 이름 (pairs/{id})
    #[prost(string, tag="1")]
    pub pair: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PausePairRequest {
    /// 리소스 이름 (pairs/{id})
    #[prost(string, tag="1")]
    pub pair: ::prost::alloc::string::String,
}
// ============================================================================
// Pair Execution Log (SimultaneousCompare 모드 사이클별 기록)
// ============================================================================

/// 페어 실행 로그 레코드
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairExecutionLog {
    /// Pair ID
    #[prost(int32, tag="1")]
    pub pair_id: i32,
    /// 시그널 시나리오 (예: "BASE_HIGH", "COUNTER_HIGH")
    #[prost(string, tag="2")]
    pub scenario: ::prost::alloc::string::String,
    /// 실행 결과
    #[prost(enumeration="PairExecutionOutcome", tag="3")]
    pub outcome: i32,
    /// Base 측 주문 ID (발주 성공 시)
    #[prost(uint64, optional, tag="4")]
    pub base_order_id: ::core::option::Option<u64>,
    /// Counter 측 주문 ID (발주 성공 시)
    #[prost(uint64, optional, tag="5")]
    pub counter_order_id: ::core::option::Option<u64>,
    /// Base 참조 가격 (원, raw int64)
    #[prost(int64, tag="6")]
    pub base_price: i64,
    /// Counter 참조 가격 (원, raw int64)
    #[prost(int64, tag="7")]
    pub counter_price: i64,
    /// 스프레드 (base - counter, 원, raw int64)
    #[prost(int64, tag="8")]
    pub spread: i64,
    /// 발주 시각
    #[prost(message, optional, tag="9")]
    pub dispatched_at: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 상세 내용 (오류 메시지 등, optional)
    #[prost(string, optional, tag="10")]
    pub detail: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPairExecutionLogsRequest {
    /// 리소스 이름 (pairs/{id})
    #[prost(string, tag="1")]
    pub pair: ::prost::alloc::string::String,
    /// 페이지 크기 (기본: 50, 최대: 200)
    #[prost(int32, optional, tag="2")]
    pub page_size: ::core::option::Option<i32>,
    /// 페이지 토큰 (다음 페이지 조회용)
    #[prost(string, optional, tag="3")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    /// 정렬 기준 (기본: dispatched_at DESC)
    #[prost(string, tag="4")]
    pub order_by: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPairExecutionLogsResponse {
    /// 실행 로그 목록
    #[prost(message, repeated, tag="1")]
    pub execution_logs: ::prost::alloc::vec::Vec<PairExecutionLog>,
    /// 다음 페이지 토큰
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// 전체 건수
    #[prost(int32, tag="3")]
    pub total_count: i32,
}
// ============================================================================
// Maker-Taker Event Log (PricingMakerTaker 모드 전용)
// ============================================================================

/// Maker-Taker 이벤트 로그 레코드
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MakerTakerEventLog {
    /// Pair ID
    #[prost(int32, tag="1")]
    pub pair_id: i32,
    /// 이벤트 유형
    #[prost(enumeration="MakerTakerEventType", tag="2")]
    pub event_type: i32,
    /// 사이클 식별자 (동일 사이클의 이벤트를 묶음)
    #[prost(int64, tag="3")]
    pub cycle_id: i64,
    /// maker 주문 ID (해당 이벤트에서 참조 가능한 경우)
    #[prost(uint64, optional, tag="4")]
    pub maker_order_id: ::core::option::Option<u64>,
    /// taker 주문 ID (TakerSubmitted / TakerFilled 시점)
    #[prost(uint64, optional, tag="5")]
    pub taker_order_id: ::core::option::Option<u64>,
    /// 해당 이벤트 시점의 maker fair price (원, raw int64)
    #[prost(int64, optional, tag="6")]
    pub fair_price: ::core::option::Option<i64>,
    /// 정정 시 새 호가 (MakerAmended 전용, 원, raw int64)
    #[prost(int64, optional, tag="7")]
    pub new_price: ::core::option::Option<i64>,
    /// 체결 가격 (MakerFilled / TakerFilled, 원, raw int64)
    #[prost(int64, optional, tag="8")]
    pub fill_price: ::core::option::Option<i64>,
    /// 체결 수량 (MakerFilled / TakerFilled)
    #[prost(int64, optional, tag="9")]
    pub fill_quantity: ::core::option::Option<i64>,
    /// 이벤트 발생 시각
    #[prost(message, optional, tag="10")]
    pub at: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 상세 내용 (optional)
    #[prost(string, optional, tag="11")]
    pub detail: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMakerTakerEventsRequest {
    /// 리소스 이름 (pairs/{id})
    #[prost(string, tag="1")]
    pub pair: ::prost::alloc::string::String,
    /// 페이지 크기 (기본: 50, 최대: 200)
    #[prost(int32, optional, tag="2")]
    pub page_size: ::core::option::Option<i32>,
    /// 페이지 토큰 (다음 페이지 조회용)
    #[prost(string, optional, tag="3")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    /// 필터링 조건 (optional)
    ///
    /// Available Fields:
    /// * cycle_id - 사이클 ID
    /// * event_type - 이벤트 유형
    #[prost(string, tag="4")]
    pub filter: ::prost::alloc::string::String,
    /// 정렬 기준 (기본: at DESC)
    #[prost(string, tag="5")]
    pub order_by: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMakerTakerEventsResponse {
    /// 이벤트 로그 목록
    #[prost(message, repeated, tag="1")]
    pub events: ::prost::alloc::vec::Vec<MakerTakerEventLog>,
    /// 다음 페이지 토큰
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// 전체 건수
    #[prost(int32, tag="3")]
    pub total_count: i32,
}
// ============================================================================
// Real-time Status Streaming
// ============================================================================

/// StreamPairStatus 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamPairStatusRequest {
    /// 리소스 이름 (pairs/{id})
    #[prost(string, tag="1")]
    pub pair: ::prost::alloc::string::String,
}
/// 페어 단일 leg 실시간 상태 스냅샷
/// (태그 번호는 클라이언트 UI 계약으로 보존됨)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LegStatus {
    /// 미체결 수량 (submitted - filled)
    #[prost(int64, tag="1")]
    pub unfilled_quantity: i64,
    /// 누적 체결 수량 (현재 세션 메모리 카운터, 재시작 시 0)
    #[prost(int64, tag="2")]
    pub filled_quantity: i64,
    /// 체결 VWAP (milli-won 단위)
    #[prost(int64, tag="3")]
    pub avg_fill_price: i64,
    /// 누적 발주 수량 (현재 세션 메모리 카운터)
    #[prost(int64, tag="4")]
    pub submitted_quantity: i64,
}
/// StreamPairStatus 스트리밍 응답 — 페어 상태 스냅샷
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairStatusUpdate {
    /// 리소스 이름 (pairs/{id})
    #[prost(string, tag="1")]
    pub pair: ::prost::alloc::string::String,
    /// Base leg 상태
    #[prost(message, optional, tag="2")]
    pub base: ::core::option::Option<LegStatus>,
    /// Counter leg 상태
    #[prost(message, optional, tag="3")]
    pub counter: ::core::option::Option<LegStatus>,
    /// 스냅샷 시각
    #[prost(message, optional, tag="4")]
    pub updated_at: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
// ============================================================================
// Pair Statistics
// ============================================================================

/// GetPairStatistics 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPairStatisticsRequest {
    /// 리소스 이름 (pairs/{id})
    #[prost(string, tag="1")]
    pub pair: ::prost::alloc::string::String,
}
/// 페어 누적 통계 스냅샷 (인메모리 카운터 기반)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairStatistics {
    /// 리소스 이름 (pairs/{id})
    #[prost(string, tag="1")]
    pub pair: ::prost::alloc::string::String,
    /// base + counter 누적 발주 수량
    #[prost(int64, tag="2")]
    pub total_submitted: i64,
    /// base + counter 누적 체결 수량
    #[prost(int64, tag="3")]
    pub total_filled: i64,
    /// Spread 모드: 발주 성공 횟수 / PricingMakerTaker 모드: 사이클 수
    #[prost(int64, tag="4")]
    pub execution_count: i64,
    /// 실현 손익 (milli-won). 현재 메모리 카운터 기반, Spread 모드는 0.
    #[prost(int64, tag="5")]
    pub realized_pnl: i64,
}
/// 주문 방향
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PairSide {
    Unspecified = 0,
    /// 매수
    Bid = 1,
    /// 매도
    Ask = 2,
}
impl PairSide {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            PairSide::Unspecified => "PAIR_SIDE_UNSPECIFIED",
            PairSide::Bid => "PAIR_SIDE_BID",
            PairSide::Ask => "PAIR_SIDE_ASK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PAIR_SIDE_UNSPECIFIED" => Some(Self::Unspecified),
            "PAIR_SIDE_BID" => Some(Self::Bid),
            "PAIR_SIDE_ASK" => Some(Self::Ask),
            _ => None,
        }
    }
}
/// 참조 가격 소스
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PriceSource {
    Unspecified = 0,
    /// 중간가 (Bid1 + Ask1) / 2
    MidPrice = 1,
    /// 직전 체결가
    LastPrice = 2,
    /// 최우선 매수호가
    BestBid = 3,
    /// 최우선 매도호가
    BestAsk = 4,
}
impl PriceSource {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            PriceSource::Unspecified => "PRICE_SOURCE_UNSPECIFIED",
            PriceSource::MidPrice => "PRICE_SOURCE_MID_PRICE",
            PriceSource::LastPrice => "PRICE_SOURCE_LAST_PRICE",
            PriceSource::BestBid => "PRICE_SOURCE_BEST_BID",
            PriceSource::BestAsk => "PRICE_SOURCE_BEST_ASK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PRICE_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
            "PRICE_SOURCE_MID_PRICE" => Some(Self::MidPrice),
            "PRICE_SOURCE_LAST_PRICE" => Some(Self::LastPrice),
            "PRICE_SOURCE_BEST_BID" => Some(Self::BestBid),
            "PRICE_SOURCE_BEST_ASK" => Some(Self::BestAsk),
            _ => None,
        }
    }
}
/// 스프레드 방향 (어느 쪽이 비쌀 때 트리거할지)
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SpreadDirection {
    Unspecified = 0,
    /// Base가 비쌀 때만 트리거
    BaseHigh = 1,
    /// Counter가 비쌀 때만 트리거
    CounterHigh = 2,
    /// 양방향
    Both = 3,
}
impl SpreadDirection {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            SpreadDirection::Unspecified => "SPREAD_DIRECTION_UNSPECIFIED",
            SpreadDirection::BaseHigh => "SPREAD_DIRECTION_BASE_HIGH",
            SpreadDirection::CounterHigh => "SPREAD_DIRECTION_COUNTER_HIGH",
            SpreadDirection::Both => "SPREAD_DIRECTION_BOTH",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SPREAD_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
            "SPREAD_DIRECTION_BASE_HIGH" => Some(Self::BaseHigh),
            "SPREAD_DIRECTION_COUNTER_HIGH" => Some(Self::CounterHigh),
            "SPREAD_DIRECTION_BOTH" => Some(Self::Both),
            _ => None,
        }
    }
}
/// 페어 주문 유형
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PairOrderType {
    Unspecified = 0,
    /// 지정가
    Limit = 1,
    /// 시장가
    Market = 2,
    /// 공격적 지정가 (상대 최우선 호가 기반)
    Aggressive = 3,
}
impl PairOrderType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            PairOrderType::Unspecified => "PAIR_ORDER_TYPE_UNSPECIFIED",
            PairOrderType::Limit => "PAIR_ORDER_TYPE_LIMIT",
            PairOrderType::Market => "PAIR_ORDER_TYPE_MARKET",
            PairOrderType::Aggressive => "PAIR_ORDER_TYPE_AGGRESSIVE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PAIR_ORDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "PAIR_ORDER_TYPE_LIMIT" => Some(Self::Limit),
            "PAIR_ORDER_TYPE_MARKET" => Some(Self::Market),
            "PAIR_ORDER_TYPE_AGGRESSIVE" => Some(Self::Aggressive),
            _ => None,
        }
    }
}
// ============================================================================
// Pair Status
// ============================================================================

/// Pair 상태
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PairStatus {
    Unspecified = 0,
    /// 운영 중 (hot loop 동작)
    Active = 1,
    /// 일시 중지
    Paused = 2,
    /// 보관 (더 이상 사용 안 함)
    Archived = 3,
}
impl PairStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            PairStatus::Unspecified => "PAIR_STATUS_UNSPECIFIED",
            PairStatus::Active => "PAIR_STATUS_ACTIVE",
            PairStatus::Paused => "PAIR_STATUS_PAUSED",
            PairStatus::Archived => "PAIR_STATUS_ARCHIVED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PAIR_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "PAIR_STATUS_ACTIVE" => Some(Self::Active),
            "PAIR_STATUS_PAUSED" => Some(Self::Paused),
            "PAIR_STATUS_ARCHIVED" => Some(Self::Archived),
            _ => None,
        }
    }
}
/// Pair leg 식별자
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PairLeg {
    Unspecified = 0,
    Base = 1,
    Counter = 2,
}
impl PairLeg {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            PairLeg::Unspecified => "PAIR_LEG_UNSPECIFIED",
            PairLeg::Base => "PAIR_LEG_BASE",
            PairLeg::Counter => "PAIR_LEG_COUNTER",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PAIR_LEG_UNSPECIFIED" => Some(Self::Unspecified),
            "PAIR_LEG_BASE" => Some(Self::Base),
            "PAIR_LEG_COUNTER" => Some(Self::Counter),
            _ => None,
        }
    }
}
/// ETF NAV 계산 공식 종류
/// (PdfNavHedge/PdfDecomposeHedge는 Pair 미지원 — 서버에서 거부됨)
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EtfNavKind {
    Unspecified = 0,
    /// 지수 추종 헷지 프라이싱: (future + basis) * multiple + cash
    IndexTrackingHedge = 1,
    /// 선물 베이시스 기반: unit_delta * future / (prev_index + basis) + cash
    FutureBasis = 2,
    /// 레버리지/인버스 ETF용 선물 기반
    LeverageFuture = 3,
}
impl EtfNavKind {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            EtfNavKind::Unspecified => "ETF_NAV_KIND_UNSPECIFIED",
            EtfNavKind::IndexTrackingHedge => "ETF_NAV_KIND_INDEX_TRACKING_HEDGE",
            EtfNavKind::FutureBasis => "ETF_NAV_KIND_FUTURE_BASIS",
            EtfNavKind::LeverageFuture => "ETF_NAV_KIND_LEVERAGE_FUTURE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ETF_NAV_KIND_UNSPECIFIED" => Some(Self::Unspecified),
            "ETF_NAV_KIND_INDEX_TRACKING_HEDGE" => Some(Self::IndexTrackingHedge),
            "ETF_NAV_KIND_FUTURE_BASIS" => Some(Self::FutureBasis),
            "ETF_NAV_KIND_LEVERAGE_FUTURE" => Some(Self::LeverageFuture),
            _ => None,
        }
    }
}
/// NAV 환산 방향
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NavDirection {
    Unspecified = 0,
    /// pricer=ETF → maker=선물 가격 역산
    Inverse = 1,
    /// pricer=선물 → maker=ETF NAV forward 산출
    Forward = 2,
}
impl NavDirection {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            NavDirection::Unspecified => "NAV_DIRECTION_UNSPECIFIED",
            NavDirection::Inverse => "NAV_DIRECTION_INVERSE",
            NavDirection::Forward => "NAV_DIRECTION_FORWARD",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NAV_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified),
            "NAV_DIRECTION_INVERSE" => Some(Self::Inverse),
            "NAV_DIRECTION_FORWARD" => Some(Self::Forward),
            _ => None,
        }
    }
}
/// 페어 실행 결과
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PairExecutionOutcome {
    Unspecified = 0,
    /// 발주 성공
    Submitted = 1,
    /// 사전 검증 실패로 스킵
    SkippedPreValidation = 2,
    /// 쿨다운 중 스킵
    SkippedCooldown = 3,
    /// 사전 계산 없음으로 스킵
    SkippedNoPrecomputed = 4,
    /// 한쪽만 발주 성공 (부분 실패)
    PartialFailure = 5,
    /// 전체 실패
    Failed = 6,
}
impl PairExecutionOutcome {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            PairExecutionOutcome::Unspecified => "PAIR_EXECUTION_OUTCOME_UNSPECIFIED",
            PairExecutionOutcome::Submitted => "PAIR_EXECUTION_OUTCOME_SUBMITTED",
            PairExecutionOutcome::SkippedPreValidation => "PAIR_EXECUTION_OUTCOME_SKIPPED_PRE_VALIDATION",
            PairExecutionOutcome::SkippedCooldown => "PAIR_EXECUTION_OUTCOME_SKIPPED_COOLDOWN",
            PairExecutionOutcome::SkippedNoPrecomputed => "PAIR_EXECUTION_OUTCOME_SKIPPED_NO_PRECOMPUTED",
            PairExecutionOutcome::PartialFailure => "PAIR_EXECUTION_OUTCOME_PARTIAL_FAILURE",
            PairExecutionOutcome::Failed => "PAIR_EXECUTION_OUTCOME_FAILED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PAIR_EXECUTION_OUTCOME_UNSPECIFIED" => Some(Self::Unspecified),
            "PAIR_EXECUTION_OUTCOME_SUBMITTED" => Some(Self::Submitted),
            "PAIR_EXECUTION_OUTCOME_SKIPPED_PRE_VALIDATION" => Some(Self::SkippedPreValidation),
            "PAIR_EXECUTION_OUTCOME_SKIPPED_COOLDOWN" => Some(Self::SkippedCooldown),
            "PAIR_EXECUTION_OUTCOME_SKIPPED_NO_PRECOMPUTED" => Some(Self::SkippedNoPrecomputed),
            "PAIR_EXECUTION_OUTCOME_PARTIAL_FAILURE" => Some(Self::PartialFailure),
            "PAIR_EXECUTION_OUTCOME_FAILED" => Some(Self::Failed),
            _ => None,
        }
    }
}
/// Maker-Taker 이벤트 유형
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MakerTakerEventType {
    Unspecified = 0,
    /// maker 신규 발주 (FEP submit 직후)
    MakerSubmitted = 1,
    /// maker 정정 (가격/수량 변경)
    MakerAmended = 2,
    /// maker 부분/완전 체결
    MakerFilled = 3,
    /// maker 주문 reject
    MakerRejected = 4,
    /// maker 주문 거래소 auto-cancel
    MakerCancelled = 5,
    /// taker 헷지 주문 발주
    TakerSubmitted = 6,
    /// taker 헷지 체결
    TakerFilled = 7,
    /// taker 헷지 reject (수동 개입 필요)
    TakerRejected = 8,
}
impl MakerTakerEventType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            MakerTakerEventType::Unspecified => "MAKER_TAKER_EVENT_TYPE_UNSPECIFIED",
            MakerTakerEventType::MakerSubmitted => "MAKER_TAKER_EVENT_TYPE_MAKER_SUBMITTED",
            MakerTakerEventType::MakerAmended => "MAKER_TAKER_EVENT_TYPE_MAKER_AMENDED",
            MakerTakerEventType::MakerFilled => "MAKER_TAKER_EVENT_TYPE_MAKER_FILLED",
            MakerTakerEventType::MakerRejected => "MAKER_TAKER_EVENT_TYPE_MAKER_REJECTED",
            MakerTakerEventType::MakerCancelled => "MAKER_TAKER_EVENT_TYPE_MAKER_CANCELLED",
            MakerTakerEventType::TakerSubmitted => "MAKER_TAKER_EVENT_TYPE_TAKER_SUBMITTED",
            MakerTakerEventType::TakerFilled => "MAKER_TAKER_EVENT_TYPE_TAKER_FILLED",
            MakerTakerEventType::TakerRejected => "MAKER_TAKER_EVENT_TYPE_TAKER_REJECTED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "MAKER_TAKER_EVENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "MAKER_TAKER_EVENT_TYPE_MAKER_SUBMITTED" => Some(Self::MakerSubmitted),
            "MAKER_TAKER_EVENT_TYPE_MAKER_AMENDED" => Some(Self::MakerAmended),
            "MAKER_TAKER_EVENT_TYPE_MAKER_FILLED" => Some(Self::MakerFilled),
            "MAKER_TAKER_EVENT_TYPE_MAKER_REJECTED" => Some(Self::MakerRejected),
            "MAKER_TAKER_EVENT_TYPE_MAKER_CANCELLED" => Some(Self::MakerCancelled),
            "MAKER_TAKER_EVENT_TYPE_TAKER_SUBMITTED" => Some(Self::TakerSubmitted),
            "MAKER_TAKER_EVENT_TYPE_TAKER_FILLED" => Some(Self::TakerFilled),
            "MAKER_TAKER_EVENT_TYPE_TAKER_REJECTED" => Some(Self::TakerRejected),
            _ => None,
        }
    }
}
include!("kdo.v1.pair.tonic.rs");
include!("kdo.v1.pair.serde.rs");
// @@protoc_insertion_point(module)