ids-apis 1.0.454

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

/// PairV2 전략 — base·counter 지정 호가로 재는 스프레드가 target_spread 를 초과하면
/// 그 가격 그대로 양다리를 동시 발주한다.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairV2 {
    /// 리소스 이름 (pair_v2s/{id})
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// PairV2 ID
    #[prost(int32, tag="2")]
    pub id: i32,
    /// 전략 이름 (고유)
    #[prost(string, tag="3")]
    pub display_name: ::prost::alloc::string::String,
    /// Portfolio ID
    #[prost(int32, tag="4")]
    pub portfolio_id: i32,
    /// Base 다리. side 가 매수차(BID)/매도차(ASK) 를 결정하고, quantity 가 1회 발주량.
    #[prost(message, optional, tag="5")]
    pub base: ::core::option::Option<PairV2Entry>,
    /// Counter 다리. quantity 는 무시(런타임 = base.quantity × hedge_ratio).
    #[prost(message, optional, tag="6")]
    pub counter: ::core::option::Option<PairV2Entry>,
    /// counter 가격을 base 가격축으로 옮기는 방법.
    #[prost(message, optional, tag="7")]
    pub spread: ::core::option::Option<PairV2SpreadType>,
    /// 진입 최소 스프레드. 현재 스프레드가 이 값을 "초과"할 때 발사. 단위 = base 가격 단위.
    /// 캘린더 스프레드처럼 즉시 차익이 아닌 운용은 음수가 정상이다.
    #[prost(double, tag="8")]
    pub target_spread: f64,
    /// 발사 후 재발사까지 대기 (ms)
    #[prost(uint64, tag="9")]
    pub cooldown_ms: u64,
    /// 미체결 잔량 추적 정정 임계 — auto_amend SelfQuote 의 opposite_qty_ratio_threshold.
    /// base/counter 공유. 0 이면 절대 정정하지 않아 미체결이 영구히 남으므로 양수 필수.
    #[prost(double, tag="10")]
    pub amend_threshold: f64,
    /// spread 가 NAV 일 때 필수인 NAV 환산 설정.
    #[prost(message, optional, tag="11")]
    pub nav: ::core::option::Option<PairV2Nav>,
    /// base 다리 누적 상한 — 체결 + 미체결(inflight) 합산. 도달 시 신규 발사를 막는다.
    #[prost(int64, tag="12")]
    pub max_base_quantity: i64,
    /// 상태
    #[prost(enumeration="PairV2Status", tag="13")]
    pub status: i32,
    /// 생성 시간
    #[prost(message, optional, tag="14")]
    pub create_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 수정 시간
    #[prost(message, optional, tag="15")]
    pub update_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 중지회차 - 이번 실행 세션의 발사 횟수가 이 값에 도달하면 자동 발사를 중지 (미설정 = 제한 없음).
    /// 수동 발사(LaunchPairV2Once)는 이 게이트를 무시한다. 발사 횟수는 활성화(activate) 시 0부터 시작.
    #[prost(uint32, optional, tag="16")]
    pub pause_launch_no: ::core::option::Option<u32>,
}
// ============================================================================
// Pair Entry
// ============================================================================

/// 페어의 한쪽 엔트리 (단일 심볼 주문 스펙).
///
/// v1 과 달리 base·counter 두 다리 모두 price_source 가 유효하다 — 스프레드를 그 가격으로
/// 재고 그 가격으로 발주한다(측정가 = 발주가 불변식).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairV2Entry {
    /// 종목 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 주문에 사용할 펀드 코드
    #[prost(string, tag="2")]
    pub fund_code: ::prost::alloc::string::String,
    /// 주문 방향 (base.side 가 스프레드 부호 규약의 기준)
    #[prost(enumeration="super::common::OrderSide", tag="3")]
    pub side: i32,
    /// 주문 수량. base 는 1회 발주량(필수), counter 는 무시(런타임 = base.quantity × hedge_ratio).
    #[prost(int64, tag="4")]
    pub quantity: i64,
    /// 호가 위치 — 스프레드 측정 기준이자 발주 가격. 미지정(UNSPECIFIED) 시 도메인 기본값
    /// BEST_TAKE(상대호가, 즉시 체결 지향)로 처리된다.
    #[prost(enumeration="super::common::RelativePriceSource", tag="5")]
    pub price_source: i32,
    /// 주문 tp_code (NONE=일반, LP=유동성공급자). 정정/취소는 거래소가 원주문 tp_code 를 따른다.
    #[prost(enumeration="super::hedge::OrderTpCode", tag="6")]
    pub tp_code: i32,
}
// ============================================================================
// Spread
// ============================================================================

/// counter 가격을 base 가격축으로 옮기는 방법. 결과 스프레드의 단위는 항상 base 가격 단위.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PairV2SpreadType {
    #[prost(oneof="pair_v2_spread_type::Kind", tags="1, 2")]
    pub kind: ::core::option::Option<pair_v2_spread_type::Kind>,
}
/// Nested message and enum types in `PairV2SpreadType`.
pub mod pair_v2_spread_type {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Kind {
        /// counter 가격 × k 로 선형 환산. k=1 → 단순 가격차(원월−근월, KODEX200−TIGER200),
        /// k≠1 → 이종 가격축(KODEX200 − K200선물×ETF배수). 선형이라 역방향(인버스)은 표현 불가.
        #[prost(message, tag="1")]
        Scaled(super::PairV2ScaledSpread),
        /// PairV2.nav (NavKind) 로 counter → base 이론가 환산. 인버스·PDF 분해 등 비선형은 이쪽.
        #[prost(message, tag="2")]
        Nav(super::PairV2NavSpread),
    }
}
/// counter 가격 × k 선형 환산 스프레드
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PairV2ScaledSpread {
    /// k 는 양수 필수. counter.side != base.side 여야 한다(역방향은 Nav 사용).
    #[prost(double, tag="1")]
    pub k: f64,
}
/// NAV 환산 스프레드 (PairV2.nav 설정 사용, 파라미터 없음)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PairV2NavSpread {
}
// ============================================================================
// NAV
// ============================================================================

/// ETF↔Future 페어의 NAV 환산 설정 — Pair 레벨 단일 공유. spread 가 NavSpread 일 때 base
/// 목표가 산출에 사용한다. nav_kind 는 실제 EtfPricing/PricingContext 조립에 쓰는 파라미터
/// 없는 태그다 (실 조립은 런w타임에 선물 + ETF 엔티티에서 수행).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PairV2Nav {
    #[prost(enumeration="super::common::EtfNavKind", tag="1")]
    pub nav_kind: i32,
    /// NAV 베이시스 (선물 가격축 단일값, 원)
    #[prost(int64, tag="2")]
    pub basis: i64,
    /// basis 를 정적값으로 고정할지(false) vs 시장 동기화 소스로부터 동적 추종할지(true).
    #[prost(bool, tag="3")]
    pub dynamic_basis: bool,
}
// ============================================================================
// Request / Response Messages — CRUD
// ============================================================================

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPairV2Request {
    /// 리소스 이름 (pair_v2s/{id})
    #[prost(string, tag="1")]
    pub pair_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPairV2sRequest {
    /// 페이지 크기 (optional)
    #[prost(int32, optional, tag="1")]
    pub page_size: ::core::option::Option<i32>,
    /// 페이지 토큰 (optional, for pagination)
    #[prost(string, optional, tag="2")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    /// 필터링 조건 (optional, AIP-160)
    ///
    /// Available Fields:
    /// * status - 상태 (ACTIVE / PAUSED / ARCHIVED)
    /// * portfolio_id - Portfolio ID
    ///
    /// Examples:
    /// * status=ACTIVE
    /// * portfolio_id=1
    #[prost(string, tag="3")]
    pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPairV2sResponse {
    /// PairV2 목록
    #[prost(message, repeated, tag="1")]
    pub pair_v2s: ::prost::alloc::vec::Vec<PairV2>,
    /// 다음 페이지 토큰
    #[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 CreatePairV2Request {
    /// 생성할 PairV2
    #[prost(message, optional, tag="1")]
    pub pair_v2: ::core::option::Option<PairV2>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePairV2Request {
    /// 수정할 PairV2
    #[prost(message, optional, tag="1")]
    pub pair_v2: ::core::option::Option<PairV2>,
    /// 수정할 필드 마스크. 비어 있으면(unset) 전체 교체 — 기존 동작과 동일(하위호환).
    #[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 DeletePairV2Request {
    /// 리소스 이름 (pair_v2s/{id})
    #[prost(string, tag="1")]
    pub pair_v2: ::prost::alloc::string::String,
}
// ============================================================================
// Request / Response Messages — Lifecycle
// ============================================================================

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivatePairV2Request {
    /// 리소스 이름 (pair_v2s/{id})
    #[prost(string, tag="1")]
    pub pair_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PausePairV2Request {
    /// 리소스 이름 (pair_v2s/{id})
    #[prost(string, tag="1")]
    pub pair_v2: ::prost::alloc::string::String,
}
// ============================================================================
// PairV2 Execution Log (발주 시점 스냅샷 전용)
// ============================================================================

/// 페어 실행 로그 레코드 — 발주(또는 스킵) 시점 스냅샷.
///
/// 체결·슬리피지 필드는 없다. v2 는 미체결을 취소하지 않고 auto_amend 가 추적하므로
/// 한 번의 발사가 여러 시점에 나눠 체결되고, 발사↔체결 1:1 매칭 자체가 성립하지 않는다.
/// 체결 내역은 전 서비스 공통 SoT 인 order_log 에서 order_id lineage 로 조인한다.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairV2ExecutionLog {
    /// Pair ID
    #[prost(int32, tag="1")]
    pub pair_id: i32,
    /// 실행 결과
    #[prost(enumeration="PairV2ExecutionOutcome", tag="2")]
    pub outcome: i32,
    /// 발사 판정에 쓴 측정 스프레드 (base 가격 단위)
    #[prost(double, tag="3")]
    pub spread: f64,
    /// 그 시점의 목표 스프레드 (설정 변경 이력 추적용)
    #[prost(double, tag="4")]
    pub target_spread: f64,
    /// Base 측 주문 ID (발주 성공 시)
    #[prost(uint64, optional, tag="5")]
    pub base_order_id: ::core::option::Option<u64>,
    /// Counter 측 주문 ID (발주 성공 시)
    #[prost(uint64, optional, tag="6")]
    pub counter_order_id: ::core::option::Option<u64>,
    /// base 발주가 = 스프레드 측정에 쓴 그 가격 (원, raw int64)
    #[prost(int64, tag="7")]
    pub base_price: i64,
    /// counter 발주가 = 스프레드 측정에 쓴 그 가격 (원, raw int64)
    #[prost(int64, tag="8")]
    pub counter_price: i64,
    /// base 발주 수량
    #[prost(int64, tag="9")]
    pub base_qty: i64,
    /// counter 발주 수량
    #[prost(int64, tag="10")]
    pub counter_qty: i64,
    /// 트리거 시세 수신 시점부터 base 제출 직후까지 경과 (us). 미발주 0.
    #[prost(int64, tag="11")]
    pub trigger_to_base_submit_us: i64,
    /// 트리거 시세 수신 시점부터 counter 제출 직후까지 경과 (us). 미발주 0.
    #[prost(int64, tag="12")]
    pub trigger_to_counter_submit_us: i64,
    /// 발주 시각
    #[prost(message, optional, tag="13")]
    pub dispatched_at: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 상세 내용 (오류 메시지 등, optional)
    #[prost(string, optional, tag="14")]
    pub detail: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPairV2ExecutionLogsRequest {
    /// 리소스 이름 (pair_v2s/{id})
    #[prost(string, tag="1")]
    pub pair_v2: ::prost::alloc::string::String,
    /// 페이지 크기 (기본: 50, 최대: 200)
    #[prost(int32, optional, tag="2")]
    pub page_size: ::core::option::Option<i32>,
    /// 페이지 토큰 — 최신순(id DESC) 키셋 커서. 이전 응답의 next_page_token 을 그대로 전달.
    /// 최초 조회는 미지정.
    #[prost(string, optional, tag="3")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    /// outcome 필터 (UNSPECIFIED = 전체)
    #[prost(enumeration="PairV2ExecutionOutcome", tag="4")]
    pub outcome: i32,
    /// 발주 시각 범위 시작 (inclusive). 미지정 시 하한 없음.
    #[prost(message, optional, tag="5")]
    pub dispatched_from: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 발주 시각 범위 끝 (exclusive). 미지정 시 상한 없음.
    #[prost(message, optional, tag="6")]
    pub dispatched_to: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPairV2ExecutionLogsResponse {
    /// 실행 로그 목록
    #[prost(message, repeated, tag="1")]
    pub execution_logs: ::prost::alloc::vec::Vec<PairV2ExecutionLog>,
    /// 다음 페이지 토큰 (더 없으면 빈 문자열)
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
    /// 필터 조건(outcome/dispatched_from/dispatched_to) 기준 전체 건수 (cursor 무관)
    #[prost(int32, tag="3")]
    pub total_count: i32,
}
// ============================================================================
// Real-time Status Streaming
// ============================================================================

/// StreamPairV2Status 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamPairV2StatusRequest {
    /// 리소스 이름 (pair_v2s/{id})
    #[prost(string, tag="1")]
    pub pair_v2: ::prost::alloc::string::String,
}
// ============================================================================
// Request / Response Messages — Manual Operations
// ============================================================================

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LaunchPairV2OnceRequest {
    /// 리소스 이름 (pair_v2s/{id})
    #[prost(string, tag="1")]
    pub pair_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LaunchPairV2OnceResponse {
    /// 발사 큐잉 성공 여부 (실제 발주는 핫루프 다음 tick 에서 실행)
    #[prost(bool, tag="1")]
    pub accepted: bool,
    /// 거부 사유 (accepted=false 일 때)
    #[prost(string, tag="2")]
    pub reason: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelPairV2ResidualRequest {
    /// 리소스 이름 (pair_v2s/{id})
    #[prost(string, tag="1")]
    pub pair_v2: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelPairV2ResidualResponse {
    /// 취소 요청된 원주문 ID 목록
    #[prost(uint64, repeated, tag="1")]
    pub cancelled_order_ids: ::prost::alloc::vec::Vec<u64>,
    /// 취소 실패 항목 (주문ID: 사유)
    #[prost(message, repeated, tag="2")]
    pub errors: ::prost::alloc::vec::Vec<PairV2ResidualError>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AmendPairV2ResidualPctRequest {
    /// 리소스 이름 (pair_v2s/{id})
    #[prost(string, tag="1")]
    pub pair_v2: ::prost::alloc::string::String,
    /// 정정 폭 % (예: 1.0 = 현재가 대비 1%). 0 < amend_pct <= 30.
    /// 매도 주문은 현재가×(1-pct/100), 매수 주문은 ×(1+pct/100) 방향. 기존 주문가보다 공격적일 때만 정정.
    #[prost(double, tag="2")]
    pub amend_pct: f64,
}
/// 정정된 주문
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairV2AmendedOrder {
    /// 원주문 ID
    #[prost(uint64, tag="1")]
    pub original_order_id: u64,
    /// 정정 주문 ID
    #[prost(uint64, tag="2")]
    pub amend_order_id: u64,
    /// 정정 후 가격
    #[prost(string, tag="3")]
    pub price: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AmendPairV2ResidualPctResponse {
    /// 정정된 주문 목록
    #[prost(message, repeated, tag="1")]
    pub amended_orders: ::prost::alloc::vec::Vec<PairV2AmendedOrder>,
    /// 정정 실패/스킵 항목
    #[prost(message, repeated, tag="2")]
    pub errors: ::prost::alloc::vec::Vec<PairV2ResidualError>,
}
/// 잔량 개입(취소/정정) 실패 항목
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairV2ResidualError {
    /// 대상 주문 ID
    #[prost(uint64, tag="1")]
    pub order_id: u64,
    /// 사유
    #[prost(string, tag="2")]
    pub reason: ::prost::alloc::string::String,
}
/// StreamPairV2Status 스트리밍 응답 — 운영 단계 변경 시마다 emit
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairV2StatusUpdate {
    /// 리소스 이름 (pair_v2s/{id})
    #[prost(string, tag="1")]
    pub pair_v2: ::prost::alloc::string::String,
    /// 현재 운영 단계
    #[prost(enumeration="PairV2RuntimePhase", tag="2")]
    pub phase: i32,
    /// 스냅샷 시각
    #[prost(message, optional, tag="3")]
    pub updated_at: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 이번 실행 세션의 누적 발사 횟수 (완료회차 대응, activate 시 0부터)
    #[prost(uint32, tag="4")]
    pub launch_count: u32,
}
// ============================================================================
// Pair Status
// ============================================================================

/// PairV2 상태
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PairV2Status {
    Unspecified = 0,
    /// 운영 중 (hot loop 동작)
    Active = 1,
    /// 일시 중지
    Paused = 2,
    /// 보관 (더 이상 사용 안 함)
    Archived = 3,
}
impl PairV2Status {
    /// 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 {
            PairV2Status::Unspecified => "PAIR_V2_STATUS_UNSPECIFIED",
            PairV2Status::Active => "PAIR_V2_STATUS_ACTIVE",
            PairV2Status::Paused => "PAIR_V2_STATUS_PAUSED",
            PairV2Status::Archived => "PAIR_V2_STATUS_ARCHIVED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PAIR_V2_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "PAIR_V2_STATUS_ACTIVE" => Some(Self::Active),
            "PAIR_V2_STATUS_PAUSED" => Some(Self::Paused),
            "PAIR_V2_STATUS_ARCHIVED" => Some(Self::Archived),
            _ => None,
        }
    }
}
/// PairV2 운영 단계 — 외부(운영자/UI)에 노출되는 실시간 lifecycle.
///
/// v2 는 사이클 상태머신이 없다. 미체결 잔량은 취소하지 않고 auto_amend SelfQuote 가
/// 추적하므로, 단계는 "발사 대기 / 추적 중 / 정지" 세 가지뿐이다.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PairV2RuntimePhase {
    Unspecified = 0,
    /// 시세 수신 + 스프레드 평가 중, 미체결 주문 없음.
    Idle = 1,
    /// 미체결 잔량이 남아 auto_amend 가 추적 정정 중.
    Tracking = 2,
    /// 일시 중지.
    Paused = 3,
}
impl PairV2RuntimePhase {
    /// 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 {
            PairV2RuntimePhase::Unspecified => "PAIR_V2_RUNTIME_PHASE_UNSPECIFIED",
            PairV2RuntimePhase::Idle => "PAIR_V2_RUNTIME_PHASE_IDLE",
            PairV2RuntimePhase::Tracking => "PAIR_V2_RUNTIME_PHASE_TRACKING",
            PairV2RuntimePhase::Paused => "PAIR_V2_RUNTIME_PHASE_PAUSED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PAIR_V2_RUNTIME_PHASE_UNSPECIFIED" => Some(Self::Unspecified),
            "PAIR_V2_RUNTIME_PHASE_IDLE" => Some(Self::Idle),
            "PAIR_V2_RUNTIME_PHASE_TRACKING" => Some(Self::Tracking),
            "PAIR_V2_RUNTIME_PHASE_PAUSED" => Some(Self::Paused),
            _ => None,
        }
    }
}
/// 페어 실행 결과
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PairV2ExecutionOutcome {
    Unspecified = 0,
    /// 양 다리 모두 제출 성공
    Submitted = 1,
    /// 쿨다운 미충족
    SkippedCooldown = 2,
    /// base 누적(체결+미체결)이 max_base_quantity 도달
    SkippedMaxQuantity = 3,
    /// 한쪽 호가 미형성 등으로 스프레드 산출 불가
    SkippedPriceUnavailable = 4,
    /// 한 다리만 제출 성공 — 반대 다리 없이 노출이 남는다
    PartialFailure = 5,
    /// 양 다리 모두 제출 실패
    Failed = 6,
}
impl PairV2ExecutionOutcome {
    /// 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 {
            PairV2ExecutionOutcome::Unspecified => "PAIR_V2_EXECUTION_OUTCOME_UNSPECIFIED",
            PairV2ExecutionOutcome::Submitted => "PAIR_V2_EXECUTION_OUTCOME_SUBMITTED",
            PairV2ExecutionOutcome::SkippedCooldown => "PAIR_V2_EXECUTION_OUTCOME_SKIPPED_COOLDOWN",
            PairV2ExecutionOutcome::SkippedMaxQuantity => "PAIR_V2_EXECUTION_OUTCOME_SKIPPED_MAX_QUANTITY",
            PairV2ExecutionOutcome::SkippedPriceUnavailable => "PAIR_V2_EXECUTION_OUTCOME_SKIPPED_PRICE_UNAVAILABLE",
            PairV2ExecutionOutcome::PartialFailure => "PAIR_V2_EXECUTION_OUTCOME_PARTIAL_FAILURE",
            PairV2ExecutionOutcome::Failed => "PAIR_V2_EXECUTION_OUTCOME_FAILED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PAIR_V2_EXECUTION_OUTCOME_UNSPECIFIED" => Some(Self::Unspecified),
            "PAIR_V2_EXECUTION_OUTCOME_SUBMITTED" => Some(Self::Submitted),
            "PAIR_V2_EXECUTION_OUTCOME_SKIPPED_COOLDOWN" => Some(Self::SkippedCooldown),
            "PAIR_V2_EXECUTION_OUTCOME_SKIPPED_MAX_QUANTITY" => Some(Self::SkippedMaxQuantity),
            "PAIR_V2_EXECUTION_OUTCOME_SKIPPED_PRICE_UNAVAILABLE" => Some(Self::SkippedPriceUnavailable),
            "PAIR_V2_EXECUTION_OUTCOME_PARTIAL_FAILURE" => Some(Self::PartialFailure),
            "PAIR_V2_EXECUTION_OUTCOME_FAILED" => Some(Self::Failed),
            _ => None,
        }
    }
}
include!("kdo.v1.pair_v2.tonic.rs");
include!("kdo.v1.pair_v2.serde.rs");
// @@protoc_insertion_point(module)