ids-apis 1.0.367

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
// @generated
// This file is @generated by prost-build.
/// ETF LP 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfLp {
    /// ETF 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// Fund
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    #[prost(double, tag="3")]
    pub ask_basis: f64,
    ///
    #[prost(double, tag="4")]
    pub bid_basis: f64,
    /// 호가 깊이 (양방향 레벨 수)
    #[prost(uint32, tag="8")]
    pub depth: u32,
    /// ETF tick 크기 (원 단위, i64)
    #[prost(int64, tag="9")]
    pub tick_size: i64,
    /// 동적 offset 조정 설정
    #[prost(message, optional, tag="10")]
    pub offset: ::core::option::Option<EtfLpOffset>,
    /// 활성화 여부
    #[prost(bool, tag="11")]
    pub enabled: bool,
    /// ETF 가격 산출 방식
    #[prost(message, optional, tag="12")]
    pub pricing_method: ::core::option::Option<super::common::EtfPricing>,
    /// 매수 호가 조정값
    #[prost(double, optional, tag="13")]
    pub bid_adjustment: ::core::option::Option<f64>,
    /// 매도 호가 조정값
    #[prost(double, optional, tag="14")]
    pub ask_adjustment: ::core::option::Option<f64>,
    /// 매수 주문 수량 (i64)
    #[prost(int64, tag="15")]
    pub bid_quantity: i64,
    /// 매도 주문 수량 (i64)
    #[prost(int64, tag="16")]
    pub ask_quantity: i64,
    /// 모멘텀 활성화 여부
    #[prost(bool, optional, tag="17")]
    pub momentum_enabled: ::core::option::Option<bool>,
    /// 모멘텀 윈도우 크기
    #[prost(uint32, optional, tag="18")]
    pub momentum_window: ::core::option::Option<u32>,
    /// 모멘텀 민감도
    #[prost(double, optional, tag="19")]
    pub momentum_sensitivity: ::core::option::Option<f64>,
    /// 매수/매도 수량 한도
    #[prost(message, optional, tag="20")]
    pub quantity_limit: ::core::option::Option<EtfLpQuantityLimit>,
    /// precomputed quote retreat 처리 정책
    #[prost(enumeration="PrecomputePolicy", optional, tag="21")]
    pub precompute_policy: ::core::option::Option<i32>,
    /// pricing source 선물 1호가 잔량 imbalance guard 활성화 여부
    /// 선물 1호가 잔량이 반대편의 30% 이하로 imbalance 발생 시 영향받는 ETF side 주문 자동 cancel
    #[prost(bool, tag="22")]
    pub pricing_source_liquidity_imbalance_guard_enabled: bool,
    /// 포트폴리오 ID (응답용 - portfolio_fund 에서 derive)
    #[prost(int32, tag="23")]
    pub portfolio_id: i32,
    /// 매수 호가 활성화 여부 (enabled=true 일 때만 적용. false=매수 호가 중단)
    #[prost(bool, tag="24")]
    pub bid_enabled: bool,
    /// 매도 호가 활성화 여부 (enabled=true 일 때만 적용. false=매도 호가 중단)
    #[prost(bool, tag="25")]
    pub ask_enabled: bool,
}
/// 매수/매도 수량 한도
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EtfLpQuantityLimit {
    /// 매수 수량 상한 (gross 누적 매수 체결 기준)
    #[prost(int64, tag="2")]
    pub max_bid_quantity: i64,
    /// 매도 수량 상한 (gross 누적 매도 체결 기준)
    #[prost(int64, tag="4")]
    pub max_ask_quantity: i64,
    /// 순포지션 (+ = 순매수, - = 순매도): gross_bid - gross_ask
    /// 상태 조회 시 런타임 계산값으로 노출; 한도 검증에는 max_net_quantity 참조
    #[prost(int64, optional, tag="5")]
    pub net_quantity: ::core::option::Option<i64>,
    /// 순포지션 한도 설정값 (한도 검증에 사용)
    /// net_quantity > 0 && net_quantity >= max_net_quantity → 매수 차단
    /// net_quantity < 0 && |net_quantity| >= max_net_quantity → 매도 차단
    /// 미설정(None) 시 순포지션 기반 차단 비활성
    #[prost(int64, optional, tag="6")]
    pub max_net_quantity: ::core::option::Option<i64>,
}
// ========== ETF LP Status Messages ==========

/// ETF LP 상태
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfLpStatus {
    /// ETF 심볼
    #[prost(string, tag="1")]
    pub etf_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// Basis 스프레드 (원 단위, i64)
    #[prost(double, optional, tag="3")]
    pub ask_basis: ::core::option::Option<f64>,
    #[prost(double, optional, tag="4")]
    pub bid_basis: ::core::option::Option<f64>,
    /// LP 상태
    #[prost(enumeration="EtfLpState", tag="8")]
    pub state: i32,
    /// 가격 정보
    #[prost(message, optional, tag="9")]
    pub pricing: ::core::option::Option<LpPricing>,
    /// 체결 통계
    #[prost(message, optional, tag="10")]
    pub fill_statistics: ::core::option::Option<FillStatistics>,
    /// 동적 offset 조정 설정 (optional)
    #[prost(message, optional, tag="11")]
    pub offset: ::core::option::Option<EtfLpOffset>,
    /// 매수 호가 조정값
    #[prost(double, optional, tag="13")]
    pub bid_adjustment: ::core::option::Option<f64>,
    /// 매도 호가 조정값
    #[prost(double, optional, tag="14")]
    pub ask_adjustment: ::core::option::Option<f64>,
    /// 매수 주문 수량 (i64)
    #[prost(int64, tag="15")]
    pub bid_quantity: i64,
    /// 매도 주문 수량 (i64)
    #[prost(int64, tag="16")]
    pub ask_quantity: i64,
    /// 모멘텀 활성화 여부
    #[prost(bool, optional, tag="17")]
    pub momentum_enabled: ::core::option::Option<bool>,
    /// 모멘텀 윈도우 크기
    #[prost(uint32, optional, tag="18")]
    pub momentum_window: ::core::option::Option<u32>,
    /// 모멘텀 민감도
    #[prost(double, optional, tag="19")]
    pub momentum_sensitivity: ::core::option::Option<f64>,
    /// 런타임 계산된 모멘텀 매수 호가 조정값
    #[prost(double, optional, tag="20")]
    pub momentum_bid_adjustment: ::core::option::Option<f64>,
    /// 런타임 계산된 모멘텀 매도 호가 조정값
    #[prost(double, optional, tag="21")]
    pub momentum_ask_adjustment: ::core::option::Option<f64>,
    /// 매수/매도 수량 한도
    #[prost(message, optional, tag="22")]
    pub quantity_limit: ::core::option::Option<EtfLpQuantityLimit>,
    /// precomputed quote retreat 처리 정책
    #[prost(enumeration="PrecomputePolicy", optional, tag="23")]
    pub precompute_policy: ::core::option::Option<i32>,
    /// 호가 깊이 (양방향 레벨 수)
    #[prost(uint32, tag="24")]
    pub depth: u32,
    /// pricing source 선물 1호가 잔량 imbalance guard 활성화 여부
    #[prost(bool, tag="25")]
    pub pricing_source_liquidity_imbalance_guard_enabled: bool,
    /// 매수 호가 활성화 여부 (enabled=true 일 때만 적용. false=매수 호가 중단)
    #[prost(bool, optional, tag="26")]
    pub bid_enabled: ::core::option::Option<bool>,
    /// 매도 호가 활성화 여부 (enabled=true 일 때만 적용. false=매도 호가 중단)
    #[prost(bool, optional, tag="27")]
    pub ask_enabled: ::core::option::Option<bool>,
}
/// ETF LP 상태 업데이트 메시지 (변화된 필드만 포함)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfLpStatusUpdate {
    /// ETF 심볼
    #[prost(string, tag="1")]
    pub etf_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// Basis 스프레드
    #[prost(double, optional, tag="3")]
    pub ask_basis: ::core::option::Option<f64>,
    #[prost(double, optional, tag="4")]
    pub bid_basis: ::core::option::Option<f64>,
    /// LP 상태
    #[prost(enumeration="EtfLpState", optional, tag="8")]
    pub state: ::core::option::Option<i32>,
    /// 가격 정보
    #[prost(message, optional, tag="9")]
    pub pricing: ::core::option::Option<LpPricing>,
    /// 체결 통계
    #[prost(message, optional, tag="10")]
    pub fill_statistics: ::core::option::Option<FillStatistics>,
    /// 동적 offset 조정 설정 (optional)
    #[prost(message, optional, tag="11")]
    pub offset: ::core::option::Option<EtfLpOffset>,
    /// 매수 호가 조정값
    #[prost(double, optional, tag="12")]
    pub bid_adjustment: ::core::option::Option<f64>,
    /// 매도 호가 조정값
    #[prost(double, optional, tag="13")]
    pub ask_adjustment: ::core::option::Option<f64>,
    /// 매수 주문 수량 (i64)
    #[prost(int64, optional, tag="14")]
    pub bid_quantity: ::core::option::Option<i64>,
    /// 매도 주문 수량 (i64)
    #[prost(int64, optional, tag="15")]
    pub ask_quantity: ::core::option::Option<i64>,
    /// 모멘텀 활성화 여부
    #[prost(bool, optional, tag="16")]
    pub momentum_enabled: ::core::option::Option<bool>,
    /// 모멘텀 윈도우 크기
    #[prost(uint32, optional, tag="17")]
    pub momentum_window: ::core::option::Option<u32>,
    /// 모멘텀 민감도
    #[prost(double, optional, tag="18")]
    pub momentum_sensitivity: ::core::option::Option<f64>,
    /// 런타임 계산된 모멘텀 매수 호가 조정값
    #[prost(double, optional, tag="19")]
    pub momentum_bid_adjustment: ::core::option::Option<f64>,
    /// 런타임 계산된 모멘텀 매도 호가 조정값
    #[prost(double, optional, tag="20")]
    pub momentum_ask_adjustment: ::core::option::Option<f64>,
    /// 매수/매도 수량 한도
    #[prost(message, optional, tag="21")]
    pub quantity_limit: ::core::option::Option<EtfLpQuantityLimit>,
    /// precomputed quote retreat 처리 정책
    #[prost(enumeration="PrecomputePolicy", optional, tag="22")]
    pub precompute_policy: ::core::option::Option<i32>,
    /// 호가 깊이 (양방향 레벨 수, 변경 시에만 Some)
    #[prost(uint32, optional, tag="23")]
    pub depth: ::core::option::Option<u32>,
    /// pricing source 선물 1호가 잔량 imbalance guard 상태 (변경 시에만 Some)
    #[prost(enumeration="PricingSourceLiquidityImbalanceGuardState", optional, tag="24")]
    pub pricing_source_liquidity_imbalance_guard_state: ::core::option::Option<i32>,
    /// 매수 호가 활성화 여부 (변경 시에만 Some)
    #[prost(bool, optional, tag="25")]
    pub bid_enabled: ::core::option::Option<bool>,
    /// 매도 호가 활성화 여부 (변경 시에만 Some)
    #[prost(bool, optional, tag="26")]
    pub ask_enabled: ::core::option::Option<bool>,
}
/// 자동 offset 조정 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct EtfLpOffset {
    /// optional: 미설정(None) 시 해당 필드를 덮어쓰지 않음.
    /// proto3 optional scalar → prost::Message 에서 Option<T>로 생성됨.
    #[prost(double, optional, tag="1")]
    pub bid_offset: ::core::option::Option<f64>,
    #[prost(double, optional, tag="2")]
    pub ask_offset: ::core::option::Option<f64>,
    /// NAV 밴드 설정
    #[prost(double, optional, tag="3")]
    pub min_offset: ::core::option::Option<f64>,
    #[prost(double, optional, tag="4")]
    pub max_offset: ::core::option::Option<f64>,
    /// 시간 기반 조정
    #[prost(bool, optional, tag="7")]
    pub time_adjustment_enabled: ::core::option::Option<bool>,
    #[prost(uint64, optional, tag="8")]
    pub adjustment_interval_secs: ::core::option::Option<u64>,
    #[prost(double, optional, tag="9")]
    pub adjustment_step: ::core::option::Option<f64>,
    #[prost(bool, optional, tag="10")]
    pub reset_on_fill: ::core::option::Option<bool>,
    /// 순매매량 기반 조정
    #[prost(bool, optional, tag="17")]
    pub position_adjustment_enabled: ::core::option::Option<bool>,
    #[prost(enumeration="PositionAdjustmentStrategy", optional, tag="18")]
    pub position_strategy: ::core::option::Option<i32>,
    #[prost(int64, optional, tag="19")]
    pub position_threshold: ::core::option::Option<i64>,
    #[prost(double, optional, tag="20")]
    pub position_adjustment_step: ::core::option::Option<f64>,
    /// 누적 순포지션 (+=순매수, -=순매도): 포지션 기반 자동 조정이 추적하는 런타임 값.
    /// 트리거 발동(offset 변경) 시 0으로 리셋됩니다.
    /// runtime 추적값이므로 optional 아님 — mapper에서 drop 처리.
    #[prost(int64, tag="21")]
    pub net_position: i64,
}
/// ETF 체결 통계 (매수/매도 체결량 및 평균 단가)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FillStatistics {
    /// 매수 체결량
    #[prost(int64, tag="1")]
    pub buy_filled_quantity: i64,
    /// 매도 체결량
    #[prost(int64, tag="2")]
    pub sell_filled_quantity: i64,
    /// 매수 총금액 (평균 단가 계산용)
    #[prost(string, tag="3")]
    pub buy_total_amount: ::prost::alloc::string::String,
    /// 매도 총금액 (평균 단가 계산용)
    #[prost(string, tag="4")]
    pub sell_total_amount: ::prost::alloc::string::String,
}
/// 주문 통계
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct OrderStats {
    /// 총 전송 주문 수
    #[prost(uint64, tag="1")]
    pub total_orders_sent: u64,
    /// 접수된 주문 수
    #[prost(uint64, tag="2")]
    pub orders_accepted: u64,
    /// 거부된 주문 수
    #[prost(uint64, tag="3")]
    pub orders_rejected: u64,
    /// 체결된 주문 수
    #[prost(uint64, tag="4")]
    pub orders_filled: u64,
    /// 총 체결 수량
    #[prost(int64, tag="5")]
    pub total_filled_quantity: i64,
    /// 일일 체결 수량
    #[prost(int64, tag="6")]
    pub daily_filled_quantity: i64,
}
// Order Limiter 상태
// message OrderLimitStatus {
//   // 일일 누적 체결 수량 (i64)
//   int64 daily_filled_quantity = 1;
//
//   // 일일 누적 체결 수량 한도 (i64)
//   int64 daily_cumulative_limit = 2;
//
//   // 시간 프레임별 주문 개수 현황
//   repeated TimeFrameStatus time_frame_status = 3;
//
//   // 일일 사용률 (%)
//   double daily_usage_percent = 4;
// }

/// 시간 프레임별 상태
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeFrameStatus {
    /// 시간 윈도우 (초)
    #[prost(uint64, tag="1")]
    pub window_seconds: u64,
    /// 현재 윈도우 내 주문 개수
    #[prost(uint32, tag="2")]
    pub current_count: u32,
    /// 최대 주문 개수
    #[prost(uint32, tag="3")]
    pub max_orders: u32,
    /// 사용률 (%)
    #[prost(double, tag="4")]
    pub usage_percent: f64,
}
/// LP 가격 정보
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LpPricing {
    #[prost(string, tag="1")]
    pub etf_ask_quote: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub etf_bid_quote: ::prost::alloc::string::String,
    /// ETF NAV (원 단위)
    #[prost(string, tag="3")]
    pub etf_ask_nav: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub etf_bid_nav: ::prost::alloc::string::String,
}
// ========== Request/Response Messages ==========

/// CreateEtfLp
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateEtfLpRequest {
    /// 생성할 ETF LP 설정
    #[prost(message, optional, tag="1")]
    pub etf_lp: ::core::option::Option<EtfLp>,
}
/// GetEtfLp
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEtfLpRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
/// ListEtfLps
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEtfLpsRequest {
    /// 페이지 크기 (optional)
    #[prost(uint32, optional, tag="1")]
    pub page_size: ::core::option::Option<u32>,
    /// 페이지 토큰 (optional, for pagination)
    #[prost(string, optional, tag="2")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    /// Available Sequence and Operator
    /// * etf_symbol
    ///    * `equal`, `contains`
    /// * fund_code
    ///    * `equal`, `contains`
    ///
    /// Examples
    /// * filter=etf_symbol:"005930"
    /// * filter=fund_code="0159"
    #[prost(string, tag="3")]
    pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEtfLpsResponse {
    /// ETF 목록
    #[prost(message, repeated, tag="1")]
    pub etf_lps: ::prost::alloc::vec::Vec<EtfLp>,
    /// 다음 페이지 토큰
    #[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 ListEtfLpStatusesRequest {
    /// 페이지 크기 (optional)
    #[prost(uint32, optional, tag="1")]
    pub page_size: ::core::option::Option<u32>,
    /// 페이지 토큰 (optional, for pagination)
    #[prost(string, optional, tag="2")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    // Available Sequence and Operator
    // * etf_symbol
    //    * `equal`, `contains`
    // * fund_code
    //    * `equal`, `contains`
    // * state
    //    * `equal`
    // * fill_satistics.buy_filled_quantity
    //    * `greater_than`, `less_than`
    //
    // Examples
    // * filter=etf_symbol:"005930"
    // * filter=fund_code="0159"
    // * filter=state=ETF_LP_STATE_RUNNING
    // * filter=fill_statistics.buy_filled_quantity > 1000

    #[prost(string, tag="3")]
    pub filter: ::prost::alloc::string::String,
    /// 오더링 조건. (optional, AIP-132)
    ///
    /// Support,ed Fields
    /// * "fill_statistics.buy_filled_quantity", "fill_statistics.sell_filled_quantity"
    ///
    /// Examples
    /// * order_by=fill_statistics.buy_filled_quantity 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 ListEtfLpStatusesResponse {
    /// ETF 목록
    #[prost(message, repeated, tag="1")]
    pub etf_lp_statuses: ::prost::alloc::vec::Vec<EtfLpStatus>,
    /// 다음 페이지 토큰
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// UpdateEtfLp
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateEtfLpRequest {
    /// ETF 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    // 각 필드가 optional — 여러 필드를 동시에 설정 가능
    // (tag 3은 예약, oneof wrapper와 충돌 방지)

    /// 호가 깊이
    #[prost(uint32, optional, tag="4")]
    pub depth: ::core::option::Option<u32>,
    /// 동적 offset 조정 설정
    #[prost(message, optional, tag="5")]
    pub offset: ::core::option::Option<EtfLpOffset>,
    #[prost(double, optional, tag="6")]
    pub ask_basis: ::core::option::Option<f64>,
    #[prost(double, optional, tag="7")]
    pub bid_basis: ::core::option::Option<f64>,
    /// 매수 주문 수량
    #[prost(int64, optional, tag="8")]
    pub bid_quantity: ::core::option::Option<i64>,
    /// 매도 주문 수량
    #[prost(int64, optional, tag="9")]
    pub ask_quantity: ::core::option::Option<i64>,
    /// 매수 호가 조정값
    #[prost(double, optional, tag="10")]
    pub bid_adjustment: ::core::option::Option<f64>,
    /// 매도 호가 조정값
    #[prost(double, optional, tag="11")]
    pub ask_adjustment: ::core::option::Option<f64>,
    /// 모멘텀 활성화 여부
    #[prost(bool, optional, tag="12")]
    pub momentum_enabled: ::core::option::Option<bool>,
    /// 모멘텀 윈도우 크기
    #[prost(uint32, optional, tag="13")]
    pub momentum_window: ::core::option::Option<u32>,
    /// 모멘텀 민감도
    #[prost(double, optional, tag="14")]
    pub momentum_sensitivity: ::core::option::Option<f64>,
    /// 매수/매도 수량 한도
    #[prost(message, optional, tag="15")]
    pub quantity_limit: ::core::option::Option<EtfLpQuantityLimit>,
    /// precomputed quote retreat 처리 정책
    #[prost(enumeration="PrecomputePolicy", optional, tag="16")]
    pub precompute_policy: ::core::option::Option<i32>,
    /// pricing source 선물 1호가 잔량 imbalance guard 활성화 여부
    #[prost(bool, optional, tag="17")]
    pub pricing_source_liquidity_imbalance_guard_enabled: ::core::option::Option<bool>,
    /// ETF pricing 방식. LP가 Idle/Error 상태일 때만 변경 가능.
    /// EtfPricing은 common.proto의 oneof method 메시지 (Pdf*, IndexTracking*, FutureBasis, LeverageFuture).
    #[prost(message, optional, tag="18")]
    pub pricing: ::core::option::Option<super::common::EtfPricing>,
    /// 매수 호가 활성화 여부 (PATCH 시에만 명시)
    #[prost(bool, optional, tag="19")]
    pub bid_enabled: ::core::option::Option<bool>,
    /// 매도 호가 활성화 여부 (PATCH 시에만 명시)
    #[prost(bool, optional, tag="20")]
    pub ask_enabled: ::core::option::Option<bool>,
}
/// GetEtfLpStatus
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEtfLpStatusRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
/// StreamEtfLpStatus
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamEtfLpStatusUpdateRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
/// ETF LP 시작 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartEtfLpRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
/// ETF LP 시작 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartEtfLpResponse {
    /// LP 상태
    #[prost(message, optional, tag="1")]
    pub status: ::core::option::Option<EtfLpStatus>,
    /// 메시지
    #[prost(string, tag="2")]
    pub message: ::prost::alloc::string::String,
}
/// ETF LP 중지 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopEtfLpRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
/// ETF LP 중지 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopEtfLpResponse {
    /// LP 상태
    #[prost(message, optional, tag="1")]
    pub status: ::core::option::Option<EtfLpStatus>,
    /// 메시지
    #[prost(string, tag="2")]
    pub message: ::prost::alloc::string::String,
}
/// StreamEtfErrors 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamLpEventsRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
/// 주문 업데이트 스트리밍 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserOrderBookRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
/// 주문 업데이트 정보
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserOrderbookData {
    /// 매수 호가 (10단계, AIP-144)
    #[prost(string, repeated, tag="1")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 호가 (10단계)
    #[prost(string, repeated, tag="2")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 수량 (10단계)
    #[prost(int64, repeated, tag="3")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매도 수량 (10단계)
    #[prost(int64, repeated, tag="4")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
}
/// 사용자 주문 오더북 강제 비우기 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClearUserOrderBookRequest {
    /// ETF resource: "etfs/{symbol}"
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    /// Fund resource: "funds/{fund_code}"
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
/// 사용자 주문 오더북 강제 비우기 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClearUserOrderBookResponse {
    /// LP 상태
    #[prost(message, optional, tag="1")]
    pub status: ::core::option::Option<EtfLpStatus>,
    /// 메시지
    #[prost(string, tag="2")]
    pub message: ::prost::alloc::string::String,
    /// 비워진 주문 갯수 (bids + asks)
    #[prost(int32, tag="3")]
    pub cleared_count: i32,
}
/// pricing source 선물 1호가 잔량 imbalance guard 상태
/// NORMAL: 매수/매도 1호가 잔량 균형 상태
/// BID_THIN: source 선물 매수 1호가 잔량이 매도 1호가 잔량의 30% 이하 (매수 side 얇음)
/// ASK_THIN: source 선물 매도 1호가 잔량이 매수 1호가 잔량의 30% 이하 (매도 side 얇음)
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PricingSourceLiquidityImbalanceGuardState {
    Unspecified = 0,
    Normal = 1,
    BidThin = 2,
    AskThin = 3,
}
impl PricingSourceLiquidityImbalanceGuardState {
    /// 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 {
            PricingSourceLiquidityImbalanceGuardState::Unspecified => "PRICING_SOURCE_LIQUIDITY_IMBALANCE_GUARD_STATE_UNSPECIFIED",
            PricingSourceLiquidityImbalanceGuardState::Normal => "PRICING_SOURCE_LIQUIDITY_IMBALANCE_GUARD_STATE_NORMAL",
            PricingSourceLiquidityImbalanceGuardState::BidThin => "PRICING_SOURCE_LIQUIDITY_IMBALANCE_GUARD_STATE_BID_THIN",
            PricingSourceLiquidityImbalanceGuardState::AskThin => "PRICING_SOURCE_LIQUIDITY_IMBALANCE_GUARD_STATE_ASK_THIN",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PRICING_SOURCE_LIQUIDITY_IMBALANCE_GUARD_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "PRICING_SOURCE_LIQUIDITY_IMBALANCE_GUARD_STATE_NORMAL" => Some(Self::Normal),
            "PRICING_SOURCE_LIQUIDITY_IMBALANCE_GUARD_STATE_BID_THIN" => Some(Self::BidThin),
            "PRICING_SOURCE_LIQUIDITY_IMBALANCE_GUARD_STATE_ASK_THIN" => Some(Self::AskThin),
            _ => None,
        }
    }
}
/// precomputed quote retreat 처리 정책
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PrecomputePolicy {
    Unspecified = 0,
    /// 선물 1틱 ↔ ETF 1틱 (1:1 대응). 빠른 추격 LP.
    /// precompute 시나리오 경우의 수 축소를 위한 최적화 적용:
    ///    - depth 초과 / 역방향 시 cancel-all + slowpath refill
    ///    - 체결로 슬롯 빈 상태에서 tick=0이면 refill 안 함
    OneToOne = 1,
    /// 선물 N틱 ↔ ETF 1틱 (N:1 대응, N≥3). 정석 LP. 항상 정확한 호가 유지:
    ///    - 같은 방향 후퇴 / 역방향은 amend로 정정 (cancel 없음)
    ///    - depth 초과(드문 케이스)는 cancel-all만
    ///    - 체결로 슬롯 빈 상태에서 tick=0이면 즉시 fill-gap refill
    ManyToOne = 2,
    /// 선물 1틱 ↔ ETF N틱 (1:N 대응). 고가 레버리지 ETF용.
    ///    - 단일측 ±2/±3틱 8개 시나리오를 하드코딩 precompute
    ///    - 그 외 케이스는 slow refill
    OneToMany = 3,
}
impl PrecomputePolicy {
    /// 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 {
            PrecomputePolicy::Unspecified => "PRECOMPUTE_POLICY_UNSPECIFIED",
            PrecomputePolicy::OneToOne => "PRECOMPUTE_POLICY_ONE_TO_ONE",
            PrecomputePolicy::ManyToOne => "PRECOMPUTE_POLICY_MANY_TO_ONE",
            PrecomputePolicy::OneToMany => "PRECOMPUTE_POLICY_ONE_TO_MANY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PRECOMPUTE_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
            "PRECOMPUTE_POLICY_ONE_TO_ONE" => Some(Self::OneToOne),
            "PRECOMPUTE_POLICY_MANY_TO_ONE" => Some(Self::ManyToOne),
            "PRECOMPUTE_POLICY_ONE_TO_MANY" => Some(Self::OneToMany),
            _ => None,
        }
    }
}
/// 순매매량 기반 조정 전략
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PositionAdjustmentStrategy {
    Unspecified = 0,
    /// 회피: 순매수 과다 시 매수offset 증가 (덜 공격적으로 매수)
    Avoidance = 1,
    /// 매매회전: 순매수 과다 시 매도offset 감소 (더 공격적으로 매도)
    Turnover = 2,
    /// 모두 적용: 순매수 과다 시 매수offset 증가 및 매도offset 감소
    All = 10,
}
impl PositionAdjustmentStrategy {
    /// 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 {
            PositionAdjustmentStrategy::Unspecified => "POSITION_ADJUSTMENT_STRATEGY_UNSPECIFIED",
            PositionAdjustmentStrategy::Avoidance => "POSITION_ADJUSTMENT_STRATEGY_AVOIDANCE",
            PositionAdjustmentStrategy::Turnover => "POSITION_ADJUSTMENT_STRATEGY_TURNOVER",
            PositionAdjustmentStrategy::All => "POSITION_ADJUSTMENT_STRATEGY_ALL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "POSITION_ADJUSTMENT_STRATEGY_UNSPECIFIED" => Some(Self::Unspecified),
            "POSITION_ADJUSTMENT_STRATEGY_AVOIDANCE" => Some(Self::Avoidance),
            "POSITION_ADJUSTMENT_STRATEGY_TURNOVER" => Some(Self::Turnover),
            "POSITION_ADJUSTMENT_STRATEGY_ALL" => Some(Self::All),
            _ => None,
        }
    }
}
/// ETF LP 상태 enum
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EtfLpState {
    Unspecified = 0,
    Idle = 1,
    Running = 2,
    Stopping = 3,
    Error = 4,
}
impl EtfLpState {
    /// 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 {
            EtfLpState::Unspecified => "ETF_LP_STATE_UNSPECIFIED",
            EtfLpState::Idle => "ETF_LP_STATE_IDLE",
            EtfLpState::Running => "ETF_LP_STATE_RUNNING",
            EtfLpState::Stopping => "ETF_LP_STATE_STOPPING",
            EtfLpState::Error => "ETF_LP_STATE_ERROR",
        }
    }
    /// 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_LP_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "ETF_LP_STATE_IDLE" => Some(Self::Idle),
            "ETF_LP_STATE_RUNNING" => Some(Self::Running),
            "ETF_LP_STATE_STOPPING" => Some(Self::Stopping),
            "ETF_LP_STATE_ERROR" => Some(Self::Error),
            _ => None,
        }
    }
}
include!("kdo.v1.lp.tonic.rs");
include!("kdo.v1.lp.serde.rs");
// @@protoc_insertion_point(module)