ids-apis 1.0.452

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

/// 바스켓 - 여러 상품을 묶은 덩어리
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Basket {
    /// 리소스 이름 (baskets/{id})
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// 바스켓 ID
    #[prost(int32, tag="2")]
    pub id: i32,
    /// 바스켓 이름
    #[prost(string, tag="3")]
    pub display_name: ::prost::alloc::string::String,
    /// 바스켓 타입
    #[prost(enumeration="BasketType", tag="4")]
    pub basket_type: i32,
    /// 구성 종목 목록
    #[prost(message, repeated, tag="5")]
    pub items: ::prost::alloc::vec::Vec<BasketItem>,
    /// 실행 설정 (분할 주문, 체결률 임계값, 주문 유형 등)
    #[prost(message, optional, tag="6")]
    pub execution_config: ::core::option::Option<ExecutionConfig>,
    /// 생성 시간
    #[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>,
    /// 타입별 설정
    #[prost(oneof="basket::TypeConfig", tags="7, 8")]
    pub type_config: ::core::option::Option<basket::TypeConfig>,
}
/// Nested message and enum types in `Basket`.
pub mod basket {
    /// 타입별 설정
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum TypeConfig {
        /// ETF 구성종목 설정 (basket_type이 ETF_CONSTITUENT인 경우)
        #[prost(message, tag="7")]
        EtfConstituent(super::EtfConstituentConfig),
        /// 청산 설정 (basket_type이 LIQUIDATION인 경우)
        #[prost(message, tag="8")]
        Liquidation(super::LiquidationConfig),
    }
}
/// ETF 구성종목 바스켓 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfConstituentConfig {
    /// ETF 심볼
    #[prost(string, tag="1")]
    pub etf_symbol: ::prost::alloc::string::String,
    #[prost(int64, tag="2")]
    pub quantity: i64,
}
/// 청산 바스켓 설정
/// 청산은 방향이 없음 - 롱 포지션은 매도, 숏 포지션은 매수로 자동 결정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LiquidationConfig {
    /// 청산 목표 시점 (optional)
    #[prost(message, optional, tag="1")]
    pub target_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
/// 바스켓 구성 항목
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketItem {
    /// 종목 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 수량 (음수 가능: 매도 포지션)
    #[prost(int64, tag="2")]
    pub quantity: i64,
    /// 가격 소스 (바스켓 가치 계산용)
    #[prost(enumeration="PriceSource", tag="3")]
    pub price_source: i32,
    /// 계약 승수 (선물용, 주식은 1.0)
    #[prost(double, tag="4")]
    pub multiple: f64,
    /// 주문에 사용할 펀드 코드
    #[prost(string, tag="5")]
    pub fund_code: ::prost::alloc::string::String,
}
// ============================================================================
// Execution Configuration
// ============================================================================

/// 실행 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionConfig {
    /// 분할 주문 횟수 (1 = 한 번에 전량 주문)
    #[prost(uint32, tag="1")]
    pub rounds: u32,
    /// 라운드 간 딜레이 (ms)
    #[prost(uint64, tag="2")]
    pub round_delay_ms: u64,
    /// 다음 라운드 진행을 위한 체결률 임계값 (0.0~1.0)
    #[prost(double, tag="3")]
    pub fill_threshold_pct: f64,
    /// 주문 유형
    #[prost(enumeration="OrderType", tag="4")]
    pub order_type: i32,
    /// 심볼별 호가 설정 (optional)
    #[prost(map="string, message", tag="5")]
    pub pricing_configs: ::std::collections::HashMap<::prost::alloc::string::String, SymbolPricingConfig>,
}
/// 심볼별 호가 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SymbolPricingConfig {
    /// 매수 시 사용할 가격
    #[prost(enumeration="PriceSource", tag="1")]
    pub buy_price_source: i32,
    /// 매도 시 사용할 가격
    #[prost(enumeration="PriceSource", tag="2")]
    pub sell_price_source: i32,
    /// 가격 조정 (틱 단위, +: 공격적, -: 보수적)
    #[prost(int32, tag="3")]
    pub price_offset_ticks: i32,
}
// ============================================================================
// Basket Value
// ============================================================================

/// 바스켓 가치 (현재 시세 기준)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketValue {
    /// 리소스 이름 (baskets/{id})
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// 바스켓 ID
    #[prost(int32, tag="2")]
    pub id: i32,
    /// 총 가치 (원)
    #[prost(int64, tag="3")]
    pub total_value: i64,
    /// 구성종목별 가치
    #[prost(message, repeated, tag="4")]
    pub item_values: ::prost::alloc::vec::Vec<BasketItemValue>,
    /// 계산 시간
    #[prost(message, optional, tag="5")]
    pub calculated_at: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
/// 구성종목 가치
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketItemValue {
    /// 종목 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 수량
    #[prost(int64, tag="2")]
    pub quantity: i64,
    /// 사용된 가격
    #[prost(string, tag="3")]
    pub price: ::prost::alloc::string::String,
    /// 가격 소스
    #[prost(enumeration="PriceSource", tag="4")]
    pub price_source: i32,
    /// 계약 승수
    #[prost(double, tag="5")]
    pub multiple: f64,
    /// 종목 가치 (price * quantity * multiple)
    #[prost(int64, tag="6")]
    pub value: i64,
}
// ============================================================================
// Request/Response Messages
// ============================================================================

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBasketRequest {
    /// 리소스 이름 (baskets/{id})
    #[prost(string, tag="1")]
    pub basket: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasketsRequest {
    /// 페이지 크기 (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:
    /// * basket_type - 바스켓 타입 (BASKET_TYPE_ETF_CONSTITUENT, BASKET_TYPE_LIQUIDATION, BASKET_TYPE_CUSTOM)
    /// * display_name - 바스켓 이름 (문자열, 부분 일치)
    /// * etf_constituent.etf_symbol - ETF 심볼 (ETF_CONSTITUENT 타입인 경우)
    ///
    /// Operators:
    /// * = : 일치
    /// * != : 불일치
    /// * : : 포함 (문자열 부분 일치)
    ///
    /// Examples:
    /// * basket_type=BASKET_TYPE_ETF_CONSTITUENT
    /// * basket_type!=BASKET_TYPE_CUSTOM
    /// * display_name:"KODEX"
    /// * etf_constituent.etf_symbol="069500"
    /// * basket_type=BASKET_TYPE_ETF_CONSTITUENT AND etf_constituent.etf_symbol="069500"
    /// * basket_type=BASKET_TYPE_LIQUIDATION AND display_name:"청산"
    #[prost(string, tag="3")]
    pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasketsResponse {
    /// 바스켓 목록
    #[prost(message, repeated, tag="1")]
    pub baskets: ::prost::alloc::vec::Vec<Basket>,
    /// 다음 페이지 토큰
    #[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 CreateBasketRequest {
    /// 생성할 바스켓
    #[prost(message, optional, tag="1")]
    pub basket: ::core::option::Option<Basket>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateBasketRequest {
    /// 수정할 바스켓
    #[prost(message, optional, tag="1")]
    pub basket: ::core::option::Option<Basket>,
    /// 수정할 필드 마스크
    #[prost(message, optional, tag="2")]
    pub update_mask: ::core::option::Option<super::super::super::google::protobuf::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteBasketRequest {
    /// 리소스 이름 (baskets/{id})
    #[prost(string, tag="1")]
    pub basket: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBasketValueRequest {
    /// 리소스 이름 (baskets/{id})
    #[prost(string, tag="1")]
    pub basket: ::prost::alloc::string::String,
}
// ============================================================================
// Basket Execution
// ============================================================================

/// 바스켓 실행 - 바스켓의 1회 발주 실행 인스턴스 (생성 시점 바스켓 스냅샷 기반)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketExecution {
    /// 리소스 이름 (baskets/{basket_id}/executions/{execution_id})
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// 실행 ID
    #[prost(int64, tag="2")]
    pub id: i64,
    /// 바스켓 ID
    #[prost(int32, tag="3")]
    pub basket_id: i32,
    /// 실행 생성 시점의 바스켓 이름 스냅샷
    #[prost(string, tag="4")]
    pub basket_display_name: ::prost::alloc::string::String,
    /// 실행 상태
    #[prost(enumeration="BasketExecutionStatus", tag="5")]
    pub status: i32,
    /// 현재 회차 (0 = 미시작)
    #[prost(uint32, tag="6")]
    pub current_round_no: u32,
    /// 계획 분할 회차 수
    #[prost(uint32, tag="7")]
    pub planned_round_count: u32,
    /// 집계 요약 (수량/금액 합계)
    #[prost(message, optional, tag="8")]
    pub summary: ::core::option::Option<BasketExecutionSummary>,
    /// 최초 발주 시간
    #[prost(message, optional, tag="9")]
    pub start_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 완료 시간
    #[prost(message, optional, tag="10")]
    pub end_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 생성 시간
    #[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>,
    /// 구성 항목 (GetBasketExecution/StreamBasketExecution 응답에서만 채워짐)
    #[prost(message, repeated, tag="13")]
    pub items: ::prost::alloc::vec::Vec<BasketExecutionItem>,
    /// 주문 연결 이력 (GetBasketExecution 응답에서만 채워짐)
    #[prost(message, repeated, tag="14")]
    pub order_relations: ::prost::alloc::vec::Vec<BasketExecutionOrderRelation>,
    /// 중지회차 - 설정 시 이 회차를 초과하는 발주 요청(회차발주/목표회차까지발주)을 차단 (미설정 = 제한 없음)
    #[prost(uint32, optional, tag="15")]
    pub pause_round_no: ::core::option::Option<u32>,
}
/// 바스켓 실행 집계 요약
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BasketExecutionSummary {
    /// 항목 수
    #[prost(uint32, tag="1")]
    pub item_count: u32,
    /// 목표 수량 합계 (절대값 합)
    #[prost(int64, tag="2")]
    pub target_quantity_total: i64,
    /// 발주 수량 합계
    #[prost(int64, tag="3")]
    pub ordered_quantity_total: i64,
    /// 체결 수량 합계
    #[prost(int64, tag="4")]
    pub filled_quantity_total: i64,
    /// 잔여 수량 합계
    #[prost(int64, tag="5")]
    pub remaining_quantity_total: i64,
    /// 체결 금액 합계 (원)
    #[prost(int64, tag="6")]
    pub filled_amount_total: i64,
    /// 전량 체결된 항목 수
    #[prost(uint32, tag="7")]
    pub filled_item_count: u32,
    /// 실패한 항목 수
    #[prost(uint32, tag="8")]
    pub failed_item_count: u32,
}
/// 바스켓 실행 구성 항목
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketExecutionItem {
    /// 실행 항목 ID
    #[prost(int64, tag="1")]
    pub id: i64,
    /// 종목 심볼
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    /// 펀드 코드
    #[prost(string, tag="3")]
    pub fund_code: ::prost::alloc::string::String,
    /// 목표 수량 (음수 = 매도)
    #[prost(int64, tag="4")]
    pub target_quantity: i64,
    /// 발주 수량
    #[prost(int64, tag="5")]
    pub ordered_quantity: i64,
    /// 체결 수량
    #[prost(int64, tag="6")]
    pub filled_quantity: i64,
    /// 잔여 수량
    #[prost(int64, tag="7")]
    pub remaining_quantity: i64,
    /// 평균 체결가 (체결 없으면 빈 문자열)
    #[prost(string, tag="8")]
    pub average_fill_price: ::prost::alloc::string::String,
    /// 체결 금액 (원)
    #[prost(int64, tag="9")]
    pub filled_amount: i64,
    /// 항목 상태
    #[prost(enumeration="BasketExecutionItemStatus", tag="10")]
    pub status: i32,
    /// 수정 시간
    #[prost(message, optional, tag="11")]
    pub update_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
/// 바스켓 실행 주문 연결 이력 (실행 항목 ↔ 주문 감사 추적)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BasketExecutionOrderRelation {
    /// 연결 ID
    #[prost(int64, tag="1")]
    pub id: i64,
    /// 실행 항목 ID
    #[prost(int64, tag="2")]
    pub execution_item_id: i64,
    /// 주문 ID
    #[prost(uint64, tag="3")]
    pub order_id: u64,
    /// 원주문 ID (취소/정정인 경우)
    #[prost(uint64, optional, tag="4")]
    pub original_order_id: ::core::option::Option<u64>,
    /// 발주 회차
    #[prost(uint32, tag="5")]
    pub round_no: u32,
    /// 액션 타입
    #[prost(enumeration="BasketExecutionActionType", tag="6")]
    pub action_type: i32,
    /// 생성 시간
    #[prost(message, optional, tag="7")]
    pub create_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
// ============================================================================
// Basket Execution Request/Response Messages
// ============================================================================

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBasketExecutionRequest {
    /// 부모 바스켓 (baskets/{id})
    #[prost(string, tag="1")]
    pub parent: ::prost::alloc::string::String,
    /// 계획 분할 회차 수 (미지정 시 바스켓 execution_config.rounds, 그것도 없으면 1)
    #[prost(uint32, optional, tag="2")]
    pub planned_round_count: ::core::option::Option<u32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBasketExecutionRequest {
    /// 리소스 이름 (baskets/{basket_id}/executions/{execution_id})
    #[prost(string, tag="1")]
    pub execution: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasketExecutionsRequest {
    /// 부모 바스켓 (baskets/{id}). 전체 조회는 "baskets/-"
    #[prost(string, tag="1")]
    pub parent: ::prost::alloc::string::String,
    /// 페이지 크기 (optional)
    #[prost(int32, optional, tag="2")]
    pub page_size: ::core::option::Option<i32>,
    /// 페이지 토큰 (optional)
    #[prost(string, optional, tag="3")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasketExecutionsResponse {
    /// 실행 목록 (items/order_relations 미포함)
    #[prost(message, repeated, tag="1")]
    pub executions: ::prost::alloc::vec::Vec<BasketExecution>,
    /// 다음 페이지 토큰
    #[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 SubmitBasketExecutionRoundRequest {
    /// 리소스 이름 (baskets/{basket_id}/executions/{execution_id})
    #[prost(string, tag="1")]
    pub execution: ::prost::alloc::string::String,
    /// 발주할 회차 (미지정 시 current_round_no + 1)
    #[prost(uint32, optional, tag="2")]
    pub round_no: ::core::option::Option<u32>,
}
/// 회차 발주로 제출된 주문
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketExecutionSubmittedOrder {
    /// 실행 항목 ID
    #[prost(int64, tag="1")]
    pub execution_item_id: i64,
    /// 종목 심볼
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    /// 주문 ID
    #[prost(uint64, tag="3")]
    pub order_id: u64,
    /// 주문 방향
    #[prost(enumeration="super::common::OrderSide", tag="4")]
    pub side: i32,
    /// 주문 수량
    #[prost(int64, tag="5")]
    pub quantity: i64,
    /// 주문 가격
    #[prost(string, tag="6")]
    pub price: ::prost::alloc::string::String,
    /// 발주 회차
    #[prost(uint32, tag="7")]
    pub round_no: u32,
}
/// 발주/취소에서 건너뛴 항목
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketExecutionSkippedItem {
    /// 실행 항목 ID
    #[prost(int64, tag="1")]
    pub execution_item_id: i64,
    /// 건너뛴 사유
    #[prost(string, tag="2")]
    pub reason: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitBasketExecutionRoundResponse {
    /// 발주된 회차
    #[prost(uint32, tag="1")]
    pub round_no: u32,
    /// 제출된 주문 목록
    #[prost(message, repeated, tag="2")]
    pub submitted_orders: ::prost::alloc::vec::Vec<BasketExecutionSubmittedOrder>,
    /// 건너뛴 항목 목록
    #[prost(message, repeated, tag="3")]
    pub skipped_items: ::prost::alloc::vec::Vec<BasketExecutionSkippedItem>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelBasketExecutionResidualRequest {
    /// 리소스 이름 (baskets/{basket_id}/executions/{execution_id})
    #[prost(string, tag="1")]
    pub execution: ::prost::alloc::string::String,
}
/// 취소 요청된 주문
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketExecutionCancelledOrder {
    /// 실행 항목 ID
    #[prost(int64, tag="1")]
    pub execution_item_id: i64,
    /// 종목 심볼
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    /// 취소 주문 ID
    #[prost(uint64, tag="3")]
    pub cancel_order_id: u64,
    /// 취소 대상 원주문 ID
    #[prost(uint64, tag="4")]
    pub original_order_id: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelBasketExecutionResidualResponse {
    /// 취소 요청된 주문 목록
    #[prost(message, repeated, tag="1")]
    pub cancelled_orders: ::prost::alloc::vec::Vec<BasketExecutionCancelledOrder>,
    /// 건너뛴 항목 목록
    #[prost(message, repeated, tag="2")]
    pub skipped_items: ::prost::alloc::vec::Vec<BasketExecutionSkippedItem>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamBasketExecutionRequest {
    /// 리소스 이름 (baskets/{basket_id}/executions/{execution_id})
    #[prost(string, tag="1")]
    pub execution: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateBasketExecutionRequest {
    /// 수정할 실행 (name 필수)
    #[prost(message, optional, tag="1")]
    pub execution: ::core::option::Option<BasketExecution>,
    /// 수정할 필드 마스크 (지원 경로: "pause_round_no")
    #[prost(message, optional, tag="2")]
    pub update_mask: ::core::option::Option<super::super::super::google::protobuf::FieldMask>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AmendBasketExecutionResidualRequest {
    /// 리소스 이름 (baskets/{basket_id}/executions/{execution_id})
    #[prost(string, tag="1")]
    pub execution: ::prost::alloc::string::String,
    /// 정정 폭 % (예: 1.0 = 현재가 대비 1%). 0 < amend_pct <= 30
    #[prost(double, tag="2")]
    pub amend_pct: f64,
}
/// 정정된 주문
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketExecutionAmendedOrder {
    /// 실행 항목 ID
    #[prost(int64, tag="1")]
    pub execution_item_id: i64,
    /// 종목 심볼
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    /// 정정 주문 ID
    #[prost(uint64, tag="3")]
    pub amend_order_id: u64,
    /// 정정 대상 원주문 ID
    #[prost(uint64, tag="4")]
    pub original_order_id: u64,
    /// 정정 후 가격
    #[prost(string, tag="5")]
    pub price: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AmendBasketExecutionResidualResponse {
    /// 정정된 주문 목록
    #[prost(message, repeated, tag="1")]
    pub amended_orders: ::prost::alloc::vec::Vec<BasketExecutionAmendedOrder>,
    /// 건너뛴 항목 목록
    #[prost(message, repeated, tag="2")]
    pub skipped_items: ::prost::alloc::vec::Vec<BasketExecutionSkippedItem>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitBasketExecutionUntilRoundRequest {
    /// 리소스 이름 (baskets/{basket_id}/executions/{execution_id})
    #[prost(string, tag="1")]
    pub execution: ::prost::alloc::string::String,
    /// 목표 회차 (1..=planned_round_count)
    #[prost(uint32, tag="2")]
    pub target_round_no: u32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitBasketExecutionUntilRoundResponse {
    /// 목표 회차
    #[prost(uint32, tag="1")]
    pub target_round_no: u32,
    /// 제출된 주문 목록
    #[prost(message, repeated, tag="2")]
    pub submitted_orders: ::prost::alloc::vec::Vec<BasketExecutionSubmittedOrder>,
    /// 건너뛴 항목 목록
    #[prost(message, repeated, tag="3")]
    pub skipped_items: ::prost::alloc::vec::Vec<BasketExecutionSkippedItem>,
}
/// 바스켓 타입
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BasketType {
    Unspecified = 0,
    /// ETF 구성종목 바스켓 (PDF 기반 자동 계산)
    EtfConstituent = 1,
    /// 청산 바스켓 (잔고 전량 청산: 롱→매도, 숏→매수)
    Liquidation = 2,
    /// 커스텀 바스켓 (수동 구성)
    Custom = 3,
}
impl BasketType {
    /// 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 {
            BasketType::Unspecified => "BASKET_TYPE_UNSPECIFIED",
            BasketType::EtfConstituent => "BASKET_TYPE_ETF_CONSTITUENT",
            BasketType::Liquidation => "BASKET_TYPE_LIQUIDATION",
            BasketType::Custom => "BASKET_TYPE_CUSTOM",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "BASKET_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "BASKET_TYPE_ETF_CONSTITUENT" => Some(Self::EtfConstituent),
            "BASKET_TYPE_LIQUIDATION" => Some(Self::Liquidation),
            "BASKET_TYPE_CUSTOM" => Some(Self::Custom),
            _ => None,
        }
    }
}
/// 가격 소스
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PriceSource {
    Unspecified = 0,
    /// (bid1 + ask1) / 2
    MidPrice = 1,
    /// 최우선 매수호가
    Bid1 = 2,
    /// 최우선 매도호가
    Ask1 = 3,
    /// 2차 매수호가
    Bid2 = 4,
    /// 2차 매도호가
    Ask2 = 5,
    /// 최근 체결가
    LastPrice = 6,
    /// 3차 매수호가
    Bid3 = 7,
    /// 3차 매도호가
    Ask3 = 8,
}
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::Bid1 => "PRICE_SOURCE_BID1",
            PriceSource::Ask1 => "PRICE_SOURCE_ASK1",
            PriceSource::Bid2 => "PRICE_SOURCE_BID2",
            PriceSource::Ask2 => "PRICE_SOURCE_ASK2",
            PriceSource::LastPrice => "PRICE_SOURCE_LAST_PRICE",
            PriceSource::Bid3 => "PRICE_SOURCE_BID3",
            PriceSource::Ask3 => "PRICE_SOURCE_ASK3",
        }
    }
    /// 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_BID1" => Some(Self::Bid1),
            "PRICE_SOURCE_ASK1" => Some(Self::Ask1),
            "PRICE_SOURCE_BID2" => Some(Self::Bid2),
            "PRICE_SOURCE_ASK2" => Some(Self::Ask2),
            "PRICE_SOURCE_LAST_PRICE" => Some(Self::LastPrice),
            "PRICE_SOURCE_BID3" => Some(Self::Bid3),
            "PRICE_SOURCE_ASK3" => Some(Self::Ask3),
            _ => None,
        }
    }
}
/// 주문 유형
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OrderType {
    Unspecified = 0,
    /// 시장가
    Market = 1,
    /// 지정가 (pricing_config 기반)
    Limit = 2,
    /// 공격적 지정가 (상대호가)
    Aggressive = 3,
}
impl OrderType {
    /// 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 {
            OrderType::Unspecified => "ORDER_TYPE_UNSPECIFIED",
            OrderType::Market => "ORDER_TYPE_MARKET",
            OrderType::Limit => "ORDER_TYPE_LIMIT",
            OrderType::Aggressive => "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 {
            "ORDER_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "ORDER_TYPE_MARKET" => Some(Self::Market),
            "ORDER_TYPE_LIMIT" => Some(Self::Limit),
            "ORDER_TYPE_AGGRESSIVE" => Some(Self::Aggressive),
            _ => None,
        }
    }
}
/// 바스켓 실행 상태
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BasketExecutionStatus {
    Unspecified = 0,
    /// 생성됨 (미발주)
    Draft = 1,
    /// 예약됨
    Scheduled = 2,
    /// 발주 진행 중
    Running = 3,
    /// 일시정지
    Paused = 4,
    /// 전량 체결 완료
    Completed = 5,
    /// 취소됨
    Cancelled = 6,
    /// 실패 항목 존재
    Failed = 7,
}
impl BasketExecutionStatus {
    /// 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 {
            BasketExecutionStatus::Unspecified => "BASKET_EXECUTION_STATUS_UNSPECIFIED",
            BasketExecutionStatus::Draft => "BASKET_EXECUTION_STATUS_DRAFT",
            BasketExecutionStatus::Scheduled => "BASKET_EXECUTION_STATUS_SCHEDULED",
            BasketExecutionStatus::Running => "BASKET_EXECUTION_STATUS_RUNNING",
            BasketExecutionStatus::Paused => "BASKET_EXECUTION_STATUS_PAUSED",
            BasketExecutionStatus::Completed => "BASKET_EXECUTION_STATUS_COMPLETED",
            BasketExecutionStatus::Cancelled => "BASKET_EXECUTION_STATUS_CANCELLED",
            BasketExecutionStatus::Failed => "BASKET_EXECUTION_STATUS_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 {
            "BASKET_EXECUTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "BASKET_EXECUTION_STATUS_DRAFT" => Some(Self::Draft),
            "BASKET_EXECUTION_STATUS_SCHEDULED" => Some(Self::Scheduled),
            "BASKET_EXECUTION_STATUS_RUNNING" => Some(Self::Running),
            "BASKET_EXECUTION_STATUS_PAUSED" => Some(Self::Paused),
            "BASKET_EXECUTION_STATUS_COMPLETED" => Some(Self::Completed),
            "BASKET_EXECUTION_STATUS_CANCELLED" => Some(Self::Cancelled),
            "BASKET_EXECUTION_STATUS_FAILED" => Some(Self::Failed),
            _ => None,
        }
    }
}
/// 바스켓 실행 항목 상태
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BasketExecutionItemStatus {
    Unspecified = 0,
    /// 대기
    Pending = 1,
    /// 재발주 가능
    Ready = 2,
    /// 발주됨
    Submitted = 3,
    /// 일부 체결
    PartiallyFilled = 4,
    /// 전량 체결
    Filled = 5,
    /// 취소됨
    Cancelled = 6,
    /// 실패 (주문 거부 등)
    Failed = 7,
}
impl BasketExecutionItemStatus {
    /// 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 {
            BasketExecutionItemStatus::Unspecified => "BASKET_EXECUTION_ITEM_STATUS_UNSPECIFIED",
            BasketExecutionItemStatus::Pending => "BASKET_EXECUTION_ITEM_STATUS_PENDING",
            BasketExecutionItemStatus::Ready => "BASKET_EXECUTION_ITEM_STATUS_READY",
            BasketExecutionItemStatus::Submitted => "BASKET_EXECUTION_ITEM_STATUS_SUBMITTED",
            BasketExecutionItemStatus::PartiallyFilled => "BASKET_EXECUTION_ITEM_STATUS_PARTIALLY_FILLED",
            BasketExecutionItemStatus::Filled => "BASKET_EXECUTION_ITEM_STATUS_FILLED",
            BasketExecutionItemStatus::Cancelled => "BASKET_EXECUTION_ITEM_STATUS_CANCELLED",
            BasketExecutionItemStatus::Failed => "BASKET_EXECUTION_ITEM_STATUS_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 {
            "BASKET_EXECUTION_ITEM_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "BASKET_EXECUTION_ITEM_STATUS_PENDING" => Some(Self::Pending),
            "BASKET_EXECUTION_ITEM_STATUS_READY" => Some(Self::Ready),
            "BASKET_EXECUTION_ITEM_STATUS_SUBMITTED" => Some(Self::Submitted),
            "BASKET_EXECUTION_ITEM_STATUS_PARTIALLY_FILLED" => Some(Self::PartiallyFilled),
            "BASKET_EXECUTION_ITEM_STATUS_FILLED" => Some(Self::Filled),
            "BASKET_EXECUTION_ITEM_STATUS_CANCELLED" => Some(Self::Cancelled),
            "BASKET_EXECUTION_ITEM_STATUS_FAILED" => Some(Self::Failed),
            _ => None,
        }
    }
}
/// 바스켓 실행 주문 액션 타입
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BasketExecutionActionType {
    Unspecified = 0,
    /// 신규 주문
    New = 1,
    /// 정정 주문
    Amend = 2,
    /// 취소 주문
    Cancel = 3,
}
impl BasketExecutionActionType {
    /// 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 {
            BasketExecutionActionType::Unspecified => "BASKET_EXECUTION_ACTION_TYPE_UNSPECIFIED",
            BasketExecutionActionType::New => "BASKET_EXECUTION_ACTION_TYPE_NEW",
            BasketExecutionActionType::Amend => "BASKET_EXECUTION_ACTION_TYPE_AMEND",
            BasketExecutionActionType::Cancel => "BASKET_EXECUTION_ACTION_TYPE_CANCEL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "BASKET_EXECUTION_ACTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "BASKET_EXECUTION_ACTION_TYPE_NEW" => Some(Self::New),
            "BASKET_EXECUTION_ACTION_TYPE_AMEND" => Some(Self::Amend),
            "BASKET_EXECUTION_ACTION_TYPE_CANCEL" => Some(Self::Cancel),
            _ => None,
        }
    }
}
include!("kdo.v1.basket.tonic.rs");
include!("kdo.v1.basket.serde.rs");
// @@protoc_insertion_point(module)