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
// @generated
// This file is @generated by prost-build.
// ========== Core Entity ==========

/// 선물 LP 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesLp {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// Reference로 사용하는 기초 ETF 심볼
    #[prost(string, tag="3")]
    pub etf_symbol: ::prost::alloc::string::String,
    /// 선물 1계약 = ETF N units. 항상 양수 (Forward only).
    #[prost(double, tag="4")]
    pub multiplier: f64,
    /// LP 마진 — 이론가 위에 추가로 띄울 ask spread
    /// (cost of carry는 ask_basis/bid_basis에 흡수됨)
    #[prost(double, tag="6")]
    pub ask_basis: f64,
    /// LP 마진 — 이론가 아래에 추가로 띄울 bid spread
    #[prost(double, tag="7")]
    pub bid_basis: f64,
    /// 매수 주문 수량 (계약 수)
    #[prost(int64, tag="8")]
    pub bid_quantity: i64,
    /// 매도 주문 수량 (계약 수)
    #[prost(int64, tag="9")]
    pub ask_quantity: i64,
    /// 호가 깊이 (양방향 레벨 수)
    #[prost(uint32, tag="10")]
    pub depth: u32,
    /// 선물 tick 크기
    #[prost(double, tag="11")]
    pub tick_size: f64,
    /// 순포지션 기반 basis 청산/회피 조정 (산출 delta + 설정)
    #[prost(message, optional, tag="31")]
    pub basis_adjustment: ::core::option::Option<FutureLpBasisAdjustment>,
    /// LP 활성화 여부
    #[prost(bool, tag="13")]
    pub enabled: bool,
    /// 매수/매도 수량 한도
    #[prost(message, optional, tag="19")]
    pub quantity_limit: ::core::option::Option<FuturesLpQuantityLimit>,
    /// EtfPricing variant 이름 (예: "pdf_nav_hedge", "leverage_future")
    #[prost(string, tag="20")]
    pub etf_pricing: ::prost::alloc::string::String,
    /// 포트폴리오 ID (응답용 - portfolio_fund 에서 derive)
    #[prost(int32, tag="21")]
    pub portfolio_id: i32,
    /// EtfPricing 상세 정보 (EtfLp.pricing_method와 동일 패턴).
    /// leverage_future의 경우 prev_index/prev_future를 채워서 반환.
    #[prost(message, optional, tag="22")]
    pub pricing_method: ::core::option::Option<super::common::EtfPricing>,
    /// 매수 호가 활성화 여부 (enabled=true 일 때만 적용. false=매수 호가 중단)
    #[prost(bool, tag="23")]
    pub bid_enabled: bool,
    /// 매도 호가 활성화 여부 (enabled=true 일 때만 적용. false=매도 호가 중단)
    #[prost(bool, tag="24")]
    pub ask_enabled: bool,
    /// 선물 LP 1호가 잔량 imbalance 비율 임계값.
    /// 잔량 비율이 이 값 미만이면 imbalance 감지 측 호가를 취소.
    /// 0.0 = 기능 OFF.
    #[prost(double, tag="25")]
    pub imbalance_cancel_threshold_ratio: f64,
    /// false 면 imbalance 시 deficit 측 호가 취소 + 재호가 억제를 비활성. 기본 true.
    #[prost(bool, tag="26")]
    pub imbalance_cancel_enabled: bool,
    /// thin-book 보정 활성화 임계치 (ETF 1~5호가 잔량 합, 주 단위).
    /// 0 = 기능 OFF.
    #[prost(int64, tag="27")]
    pub thin_book_quantity_threshold: i64,
    /// thin-book 보정 윈도우 (best 호가 기준 틱 개수). 0/1 = 보정 윈도우 미적용.
    /// 기본 5. effective_reference_price 가 best 에서 (N-1) 틱 깊이까지를 윈도우로 본다.
    #[prost(int64, tag="28")]
    pub thin_book_window_ticks: i64,
    /// 이론가(NAV) 기준 1호가를 띄우는 offset (틱 수). bid=아래로, ask=위로.
    #[prost(double, tag="29")]
    pub bid_offset: f64,
    #[prost(double, tag="30")]
    pub ask_offset: f64,
    /// 헷지 주문이 나갈 펀드 코드. 빈 문자열이면 헷지 미발주.
    #[prost(string, tag="33")]
    pub hedge_fund_code: ::prost::alloc::string::String,
}
/// 매수/매도 수량 한도
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FuturesLpQuantityLimit {
    /// 매수 수량 상한 (gross 누적 매수 체결 기준)
    #[prost(int64, tag="1")]
    pub max_bid_quantity: i64,
    /// 매도 수량 상한 (gross 누적 매도 체결 기준)
    #[prost(int64, tag="2")]
    pub max_ask_quantity: i64,
    /// 순포지션 (+ = 순매수, - = 순매도): gross_bid - gross_ask
    /// 상태 조회 시 런타임 계산값으로 노출; 한도 검증에는 max_net_quantity 참조
    #[prost(int64, optional, tag="3")]
    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="4")]
    pub max_net_quantity: ::core::option::Option<i64>,
}
/// 선물 LP 호가 조정 설정. ETF LP의 EtfLpOffset 을 선물 전용으로 대체.
/// 시간기반 조정 / NAV밴드(min/max) / offset 포지션조정은 제거하고,
/// 순포지션(net) 기반 basis 청산(turnover)+회피(avoidance) 조정만 둔다.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FutureLpBasisAdjustment {
    /// 순포지션 기반 자동 산출 delta (basis 에 가산되는 값, 런타임).
    /// 설정이 아니라 net 으로부터 산출됨 — Update 인입 시 무시, Status 노출용.
    #[prost(double, tag="1")]
    pub bid_adjustment: f64,
    #[prost(double, tag="2")]
    pub ask_adjustment: f64,
    /// 순포지션 기반 basis 자동조정 on/off (청산+회피 동시, All 고정).
    /// net = 당일 LP 누적 체결(매수-매도). delta = floor(|net|/한도) × Basis (무한 계단).
    #[prost(bool, tag="3")]
    pub basis_pos_adj_enabled: bool,
    /// 청산 한도(계약) / 청산 Basis — 포지션 줄이는 쪽 호가 공격적
    #[prost(int64, tag="4")]
    pub turnover_limit: i64,
    #[prost(double, tag="5")]
    pub turnover_basis: f64,
    /// 회피 한도(계약) / 회피 Basis — 포지션 늘리는 쪽 호가 보수적
    #[prost(int64, tag="6")]
    pub avoidance_limit: i64,
    #[prost(double, tag="7")]
    pub avoidance_basis: f64,
}
/// 선물 LP Pricing 정보 (호가 + ETF reference)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FuturesLpPricing {
    /// 산출된 선물 매수 호가
    #[prost(double, tag="1")]
    pub future_bid_quote: f64,
    /// 산출된 선물 매도 호가
    #[prost(double, tag="2")]
    pub future_ask_quote: f64,
    /// ETF reference로 계산한 선물 공정가치 NAV (bid)
    #[prost(double, tag="3")]
    pub bid_nav: f64,
    /// ETF reference로 계산한 선물 공정가치 NAV (ask)
    #[prost(double, tag="4")]
    pub ask_nav: f64,
    /// 현재 사용 중인 ETF best bid (입력)
    #[prost(double, tag="5")]
    pub etf_best_bid: f64,
    /// 현재 사용 중인 ETF best ask (입력)
    #[prost(double, tag="6")]
    pub etf_best_ask: f64,
}
/// 선물 LP 상태
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesLpStatus {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// LP 상태
    #[prost(enumeration="FuturesLpState", tag="3")]
    pub state: i32,
    /// Order Limiter 상태
    #[prost(message, optional, tag="4")]
    pub order_limit: ::core::option::Option<FuturesLpOrderLimitStatus>,
    /// 가격 정보
    #[prost(message, optional, tag="5")]
    pub pricing: ::core::option::Option<FuturesLpPricing>,
    /// 체결 통계
    #[prost(message, optional, tag="6")]
    pub fill_statistics: ::core::option::Option<FuturesLpFillStatistics>,
    /// Reference ETF 심볼
    #[prost(string, tag="7")]
    pub etf_symbol: ::prost::alloc::string::String,
    /// 선물 1계약 = ETF N units
    #[prost(double, tag="8")]
    pub multiplier: f64,
    /// LP 마진 — ask spread
    /// (cost of carry는 ask_basis/bid_basis에 흡수됨)
    #[prost(double, tag="10")]
    pub ask_basis: f64,
    /// LP 마진 — bid spread
    #[prost(double, tag="11")]
    pub bid_basis: f64,
    /// 매수 주문 수량 (계약 수)
    #[prost(int64, tag="19")]
    pub bid_quantity: i64,
    /// 매도 주문 수량 (계약 수)
    #[prost(int64, tag="20")]
    pub ask_quantity: i64,
    /// 순포지션 기반 basis 청산/회피 조정 (delta + 설정, 런타임 포함)
    #[prost(message, optional, tag="30")]
    pub basis_adjustment: ::core::option::Option<FutureLpBasisAdjustment>,
    /// 매수/매도 수량 한도
    #[prost(message, optional, tag="22")]
    pub quantity_limit: ::core::option::Option<FuturesLpQuantityLimit>,
    /// 호가 깊이
    #[prost(uint32, tag="23")]
    pub depth: u32,
    /// EtfPricing variant 이름 (예: "pdf_nav_hedge", "leverage_future")
    #[prost(string, tag="24")]
    pub etf_pricing: ::prost::alloc::string::String,
    /// 매수 호가 활성화 여부 (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>,
    /// 이론가(NAV) 기준 1호가를 띄우는 offset (틱 수). bid=아래로, ask=위로.
    #[prost(double, tag="28")]
    pub bid_offset: f64,
    #[prost(double, tag="29")]
    pub ask_offset: f64,
}
/// 선물 LP 상태 업데이트 (변경된 필드만 포함)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesLpStatusUpdate {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// LP 상태 (변경 시에만 Some)
    #[prost(enumeration="FuturesLpState", optional, tag="3")]
    pub state: ::core::option::Option<i32>,
    /// 가격 정보 (변경 시에만 Some)
    #[prost(message, optional, tag="4")]
    pub pricing: ::core::option::Option<FuturesLpPricing>,
    /// 체결 통계 (변경 시에만 Some)
    #[prost(message, optional, tag="5")]
    pub fill_statistics: ::core::option::Option<FuturesLpFillStatistics>,
    /// LP 마진 — ask spread (변경 시에만 Some)
    #[prost(double, optional, tag="7")]
    pub ask_basis: ::core::option::Option<f64>,
    /// LP 마진 — bid spread (변경 시에만 Some)
    #[prost(double, optional, tag="8")]
    pub bid_basis: ::core::option::Option<f64>,
    /// 매수 주문 수량 (변경 시에만 Some)
    #[prost(int64, optional, tag="11")]
    pub bid_quantity: ::core::option::Option<i64>,
    /// 매도 주문 수량 (변경 시에만 Some)
    #[prost(int64, optional, tag="12")]
    pub ask_quantity: ::core::option::Option<i64>,
    /// 호가 조정 설정 (변경 시에만 Some)
    #[prost(message, optional, tag="26")]
    pub basis_adjustment: ::core::option::Option<FutureLpBasisAdjustment>,
    /// 매수/매도 수량 한도 (변경 시에만 Some)
    #[prost(message, optional, tag="19")]
    pub quantity_limit: ::core::option::Option<FuturesLpQuantityLimit>,
    /// 호가 깊이 (변경 시에만 Some)
    #[prost(uint32, optional, tag="20")]
    pub depth: ::core::option::Option<u32>,
    /// EtfPricing variant 이름 (변경 시에만 Some, 예: "pdf_nav_hedge", "leverage_future")
    #[prost(string, optional, tag="21")]
    pub etf_pricing: ::core::option::Option<::prost::alloc::string::String>,
    /// 매수 호가 활성화 여부 (변경 시에만 Some)
    #[prost(bool, optional, tag="22")]
    pub bid_enabled: ::core::option::Option<bool>,
    /// 매도 호가 활성화 여부 (변경 시에만 Some)
    #[prost(bool, optional, tag="23")]
    pub ask_enabled: ::core::option::Option<bool>,
    /// 이론가(NAV) 기준 1호가를 띄우는 offset (틱 수, 변경 시에만 Some). bid=아래로, ask=위로.
    #[prost(double, optional, tag="24")]
    pub bid_offset: ::core::option::Option<f64>,
    #[prost(double, optional, tag="25")]
    pub ask_offset: ::core::option::Option<f64>,
}
/// 선물 LP 체결 통계 (매수/매도 체결량 및 총금액)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesLpFillStatistics {
    /// 매수 체결량 (계약 수)
    #[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,
}
/// Order Limiter 상태
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesLpOrderLimitStatus {
    /// 시간 프레임별 주문 개수 현황
    #[prost(message, repeated, tag="1")]
    pub time_frame_status: ::prost::alloc::vec::Vec<FuturesLpTimeFrameStatus>,
}
/// 시간 프레임별 상태
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FuturesLpTimeFrameStatus {
    /// 시간 윈도우 (초)
    #[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 FuturesOrderBook {
    /// 매수 호가 목록 (depth 단계)
    #[prost(double, repeated, tag="1")]
    pub bid_prices: ::prost::alloc::vec::Vec<f64>,
    /// 매도 호가 목록 (depth 단계)
    #[prost(double, repeated, tag="2")]
    pub ask_prices: ::prost::alloc::vec::Vec<f64>,
    /// 매수 수량 목록 (depth 단계)
    #[prost(int64, repeated, tag="3")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매도 수량 목록 (depth 단계)
    #[prost(int64, repeated, tag="4")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
}
// ========== Request/Response Messages ==========

/// GetFuturesLp
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFuturesLpRequest {
    /// 선물 종목 심볼 (예: "101S6")
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// ETF 심볼 — PK의 세 번째 키. 빈 문자열이면 (future, fund) 단일 매치 시 자동 resolve.
    #[prost(string, tag="3")]
    pub etf_symbol: ::prost::alloc::string::String,
}
/// ListFuturesLps
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFuturesLpsRequest {
    /// 페이지 크기 (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 Fields and Operators
    /// * future_symbol
    ///    * `equal`, `contains`
    /// * fund_code
    ///    * `equal`, `contains`
    ///
    /// Examples
    /// * filter=future_symbol:"101S6"
    /// * filter=fund_code="0331"
    #[prost(string, tag="3")]
    pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFuturesLpsResponse {
    /// 선물 LP 목록
    #[prost(message, repeated, tag="1")]
    pub futures_lps: ::prost::alloc::vec::Vec<FuturesLp>,
    /// 다음 페이지 토큰
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// UpdateFuturesLp
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateFuturesLpRequest {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    // 각 필드가 optional — 여러 필드를 동시에 설정 가능

    /// 매수 주문 수량
    #[prost(int64, optional, tag="4")]
    pub bid_quantity: ::core::option::Option<i64>,
    /// 매도 주문 수량
    #[prost(int64, optional, tag="5")]
    pub ask_quantity: ::core::option::Option<i64>,
    /// LP 마진 — bid spread
    #[prost(double, optional, tag="8")]
    pub bid_basis: ::core::option::Option<f64>,
    /// LP 마진 — ask spread
    #[prost(double, optional, tag="9")]
    pub ask_basis: ::core::option::Option<f64>,
    /// 호가 깊이
    #[prost(uint32, optional, tag="10")]
    pub depth: ::core::option::Option<u32>,
    /// 순포지션 기반 basis 청산/회피 조정 설정
    #[prost(message, optional, tag="25")]
    pub basis_adjustment: ::core::option::Option<FutureLpBasisAdjustment>,
    /// 매수/매도 수량 한도
    #[prost(message, optional, tag="15")]
    pub quantity_limit: ::core::option::Option<FuturesLpQuantityLimit>,
    /// EtfPricing variant 이름 (변경 시에만 Some, 예: "pdf_nav_hedge", "leverage_future")
    #[prost(string, optional, tag="16")]
    pub etf_pricing: ::core::option::Option<::prost::alloc::string::String>,
    /// 매수 호가 활성화 여부 (PATCH 시에만 명시)
    #[prost(bool, optional, tag="17")]
    pub bid_enabled: ::core::option::Option<bool>,
    /// 매도 호가 활성화 여부 (PATCH 시에만 명시)
    #[prost(bool, optional, tag="18")]
    pub ask_enabled: ::core::option::Option<bool>,
    /// 선물 LP 1호가 잔량 imbalance 비율 임계값 (PATCH 시에만 명시)
    /// 0.0 = 기능 OFF.
    #[prost(double, optional, tag="19")]
    pub imbalance_cancel_threshold_ratio: ::core::option::Option<f64>,
    /// imbalance flee 마스터 토글 (PATCH 시에만 명시).
    /// false 면 imbalance 시 deficit 측 호가 취소 + 재호가 억제를 비활성. 기본 true.
    #[prost(bool, optional, tag="20")]
    pub imbalance_cancel_enabled: ::core::option::Option<bool>,
    /// thin-book 보정 활성화 임계치 (PATCH 시에만 명시).
    /// ETF 1~5호가 잔량 합 임계치(주 단위). 0 = 기능 OFF.
    #[prost(int64, optional, tag="21")]
    pub thin_book_quantity_threshold: ::core::option::Option<i64>,
    /// thin-book 보정 윈도우 틱 개수 (PATCH 시에만 명시). best 호가 기준 틱 개수. 기본 5.
    #[prost(int64, optional, tag="22")]
    pub thin_book_window_ticks: ::core::option::Option<i64>,
    /// 이론가(NAV) 기준 1호가를 띄우는 offset (틱 수, PATCH 시에만 명시). bid=아래로, ask=위로.
    #[prost(double, optional, tag="23")]
    pub bid_offset: ::core::option::Option<f64>,
    #[prost(double, optional, tag="24")]
    pub ask_offset: ::core::option::Option<f64>,
    /// ETF 심볼 — PK의 세 번째 키. 빈 문자열이면 (future, fund) 단일 매치 시 자동 resolve.
    #[prost(string, tag="27")]
    pub etf_symbol: ::prost::alloc::string::String,
}
/// GetFuturesLpStatus
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFuturesLpStatusRequest {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// ETF 심볼 — PK의 세 번째 키. 빈 문자열이면 (future, fund) 단일 매치 시 자동 resolve.
    #[prost(string, tag="3")]
    pub etf_symbol: ::prost::alloc::string::String,
}
/// ListFuturesLpStatuses
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListFuturesLpStatusesRequest {
    /// 페이지 크기 (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 Fields and Operators
    /// * future_symbol
    ///    * `equal`, `contains`
    /// * fund_code
    ///    * `equal`, `contains`
    /// * state
    ///    * `equal`
    /// * fill_statistics.buy_filled_quantity
    ///    * `greater_than`, `less_than`
    ///
    /// Examples
    /// * filter=future_symbol:"101S6"
    /// * filter=fund_code="0331"
    /// * filter=state=FUTURES_LP_STATE_RUNNING
    /// * filter=fill_statistics.buy_filled_quantity > 1000
    #[prost(string, tag="3")]
    pub filter: ::prost::alloc::string::String,
    /// 오더링 조건 (optional, AIP-132)
    ///
    /// Supported Fields
    /// * "fill_statistics.buy_filled_quantity", "fill_statistics.sell_filled_quantity"
    ///
    /// Examples
    /// * order_by=fill_statistics.buy_filled_quantity 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 ListFuturesLpStatusesResponse {
    /// 선물 LP 상태 목록
    #[prost(message, repeated, tag="1")]
    pub futures_lp_statuses: ::prost::alloc::vec::Vec<FuturesLpStatus>,
}
/// StreamFuturesLpStatusUpdate
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamFuturesLpStatusUpdateRequest {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// ETF 심볼 — PK의 세 번째 키. 빈 문자열이면 (future, fund) 단일 매치 시 자동 resolve.
    #[prost(string, tag="3")]
    pub etf_symbol: ::prost::alloc::string::String,
}
/// StartFuturesLp
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartFuturesLpRequest {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// ETF 심볼 — PK의 세 번째 키. 빈 문자열이면 (future, fund) 단일 매치 시 자동 resolve.
    #[prost(string, tag="3")]
    pub etf_symbol: ::prost::alloc::string::String,
}
/// 선물 LP 시작 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartFuturesLpResponse {
    /// LP 상태
    #[prost(message, optional, tag="1")]
    pub status: ::core::option::Option<FuturesLpStatus>,
    /// 메시지
    #[prost(string, tag="2")]
    pub message: ::prost::alloc::string::String,
}
/// StopFuturesLp
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopFuturesLpRequest {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// ETF 심볼 — PK의 세 번째 키. 빈 문자열이면 (future, fund) 단일 매치 시 자동 resolve.
    #[prost(string, tag="3")]
    pub etf_symbol: ::prost::alloc::string::String,
}
/// 선물 LP 중지 응답
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopFuturesLpResponse {
    /// LP 상태
    #[prost(message, optional, tag="1")]
    pub status: ::core::option::Option<FuturesLpStatus>,
    /// 메시지
    #[prost(string, tag="2")]
    pub message: ::prost::alloc::string::String,
}
/// GetFuturesOrderBook / StreamFuturesOrderBook
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetFuturesOrderBookRequest {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// ETF 심볼 — PK의 세 번째 키. 빈 문자열이면 (future, fund) 단일 매치 시 자동 resolve.
    #[prost(string, tag="3")]
    pub etf_symbol: ::prost::alloc::string::String,
}
/// StreamFuturesLpFills
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamFuturesLpFillsRequest {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// ETF 심볼 — (future, fund) 당 다중 ETF row 구분용 (필수)
    #[prost(string, tag="3")]
    pub etf_symbol: ::prost::alloc::string::String,
}
/// 선물 LP 체결 요약 (선물 leg + ETF 헷지 leg 당일 누적)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FuturesLpFillSummary {
    /// 선물 leg (당일 누적)
    #[prost(int64, tag="1")]
    pub future_buy_quantity: i64,
    #[prost(double, tag="2")]
    pub future_buy_avg_price: f64,
    #[prost(int64, tag="3")]
    pub future_sell_quantity: i64,
    #[prost(double, tag="4")]
    pub future_sell_avg_price: f64,
    /// ETF 헷지 leg (당일 누적)
    #[prost(int64, tag="5")]
    pub etf_buy_quantity: i64,
    #[prost(double, tag="6")]
    pub etf_buy_avg_price: f64,
    #[prost(int64, tag="7")]
    pub etf_sell_quantity: i64,
    #[prost(double, tag="8")]
    pub etf_sell_avg_price: f64,
}
/// StreamFuturesLpFillPairs
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamFuturesLpFillPairsRequest {
    /// 선물 종목 심볼
    #[prost(string, tag="1")]
    pub future_symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// ETF 심볼 — (future, fund) 당 다중 ETF row 구분용 (필수)
    #[prost(string, tag="3")]
    pub etf_symbol: ::prost::alloc::string::String,
}
/// 선물 체결 1건 + 그에 대응하는 ETF 헷지 주문 체결(합산)의 쌍.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FuturesLpFillPair {
    /// 선물 leg (1건 체결)
    #[prost(enumeration="super::common::OrderSide", tag="1")]
    pub future_side: i32,
    #[prost(int64, tag="2")]
    pub future_quantity: i64,
    #[prost(double, tag="3")]
    pub future_price: f64,
    /// ETF 헷지 leg (해당 주문 체결 합산)
    #[prost(enumeration="super::common::OrderSide", tag="4")]
    pub etf_side: i32,
    #[prost(int64, tag="5")]
    pub etf_quantity: i64,
    #[prost(double, tag="6")]
    pub etf_avg_price: f64,
    /// 쌍 완성 시각 (unix epoch milliseconds)
    #[prost(int64, tag="7")]
    pub filled_at_unix_ms: i64,
}
// ========== Status Messages ==========

/// 선물 LP 상태 enum
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FuturesLpState {
    Unspecified = 0,
    Idle = 1,
    Running = 2,
    Stopping = 3,
    Error = 4,
}
impl FuturesLpState {
    /// 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 {
            FuturesLpState::Unspecified => "FUTURES_LP_STATE_UNSPECIFIED",
            FuturesLpState::Idle => "FUTURES_LP_STATE_IDLE",
            FuturesLpState::Running => "FUTURES_LP_STATE_RUNNING",
            FuturesLpState::Stopping => "FUTURES_LP_STATE_STOPPING",
            FuturesLpState::Error => "FUTURES_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 {
            "FUTURES_LP_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "FUTURES_LP_STATE_IDLE" => Some(Self::Idle),
            "FUTURES_LP_STATE_RUNNING" => Some(Self::Running),
            "FUTURES_LP_STATE_STOPPING" => Some(Self::Stopping),
            "FUTURES_LP_STATE_ERROR" => Some(Self::Error),
            _ => None,
        }
    }
}
include!("kdo.v1.futures_lp.tonic.rs");
include!("kdo.v1.futures_lp.serde.rs");
// @@protoc_insertion_point(module)