ids-apis 1.0.296

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

/// 차익거래 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Arbitrage {
    /// 리소스 이름 (arbitrages/{id})
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// 차익거래 ID
    #[prost(int32, tag="2")]
    pub id: i32,
    /// 소속 포트폴리오 ID
    #[prost(int32, tag="3")]
    pub portfolio_id: i32,
    /// 바스켓 A ID (Basket 도메인 참조)
    #[prost(int32, tag="5")]
    pub basket_a_id: i32,
    /// 바스켓 B ID (Basket 도메인 참조)
    #[prost(int32, tag="6")]
    pub basket_b_id: i32,
    /// 트리거 설정
    #[prost(message, optional, tag="7")]
    pub trigger_config: ::core::option::Option<TriggerConfig>,
    /// 활성화 여부
    #[prost(bool, tag="9")]
    pub is_active: bool,
    /// 생성 시간
    #[prost(message, optional, tag="10")]
    pub create_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 수정 시간
    #[prost(message, optional, tag="11")]
    pub update_time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
    /// 바스켓 A 상세 (OUTPUT_ONLY, 조회 시 포함)
    #[prost(message, optional, tag="12")]
    pub basket_a: ::core::option::Option<super::basket::Basket>,
    /// 바스켓 B 상세 (OUTPUT_ONLY, 조회 시 포함)
    #[prost(message, optional, tag="13")]
    pub basket_b: ::core::option::Option<super::basket::Basket>,
}
// ============================================================================
// Trigger Configuration
// ============================================================================

/// 트리거 설정
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TriggerConfig {
    /// 트리거 조건
    #[prost(message, optional, tag="1")]
    pub condition: ::core::option::Option<TriggerCondition>,
    /// 트리거 후 재트리거까지 대기시간 (ms)
    #[prost(uint64, tag="2")]
    pub cooldown_ms: u64,
}
/// 트리거 조건
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TriggerCondition {
    #[prost(oneof="trigger_condition::Condition", tags="1, 2")]
    pub condition: ::core::option::Option<trigger_condition::Condition>,
}
/// Nested message and enum types in `TriggerCondition`.
pub mod trigger_condition {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Condition {
        /// 절대 스프레드 (금액)
        #[prost(message, tag="1")]
        SpreadAmount(super::SpreadAmountCondition),
        /// 상대 스프레드 (bps)
        #[prost(message, tag="2")]
        SpreadBps(super::SpreadBpsCondition),
    }
}
/// 절대 스프레드 조건
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SpreadAmountCondition {
    /// 스프레드 임계값 (원)
    #[prost(int64, tag="1")]
    pub threshold: i64,
}
/// 상대 스프레드 조건
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SpreadBpsCondition {
    /// 스프레드 임계값 (bps, 1bp = 0.01%)
    #[prost(double, tag="1")]
    pub threshold_bps: f64,
}
// ============================================================================
// Status & Events
// ============================================================================

/// 차익거래 상태
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArbitrageStatus {
    /// 리소스 이름 (arbitrages/{id})
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// 차익거래 ID
    #[prost(int32, tag="2")]
    pub id: i32,
    /// 현재 상태
    #[prost(enumeration="ArbitrageState", tag="3")]
    pub state: i32,
    /// 바스켓 A 현재 가치
    #[prost(int64, tag="4")]
    pub basket_a_value: i64,
    /// 바스켓 B 현재 가치
    #[prost(int64, tag="5")]
    pub basket_b_value: i64,
    /// 현재 스프레드
    #[prost(int64, tag="6")]
    pub current_spread: i64,
    /// 현재 스프레드 (bps)
    #[prost(double, tag="7")]
    pub current_spread_bps: f64,
    /// 실행 상태 (실행 중일 때만)
    #[prost(message, optional, tag="8")]
    pub execution_state: ::core::option::Option<ExecutionState>,
    /// 통계
    #[prost(message, optional, tag="9")]
    pub stats: ::core::option::Option<ArbitrageStats>,
    /// 예상 실행 결과 (현재 호가 기준)
    #[prost(message, optional, tag="10")]
    pub estimate: ::core::option::Option<ExecutionEstimate>,
}
/// 예상 실행 결과
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionEstimate {
    /// A매수-B매도 시 예상 손익
    #[prost(int64, tag="1")]
    pub buy_a_sell_b_pnl: i64,
    /// B매수-A매도 시 예상 손익
    #[prost(int64, tag="2")]
    pub buy_b_sell_a_pnl: i64,
    /// 예상 슬리피지 (bps)
    #[prost(double, tag="3")]
    pub slippage_bps: f64,
    /// 실행 가능 여부 (호가 수량 충분한지)
    #[prost(bool, tag="4")]
    pub executable: bool,
    /// 실행 불가 사유 (executable=false인 경우)
    #[prost(string, tag="5")]
    pub reason: ::prost::alloc::string::String,
}
/// 실행 상태
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionState {
    /// 실행 방향
    #[prost(enumeration="ArbitrageSide", tag="1")]
    pub side: i32,
    /// 현재 라운드 (1-based)
    #[prost(uint32, tag="2")]
    pub current_round: u32,
    /// 총 라운드 수
    #[prost(uint32, tag="3")]
    pub total_rounds: u32,
    /// 라운드별 체결 상태
    #[prost(message, repeated, tag="4")]
    pub round_fills: ::prost::alloc::vec::Vec<RoundFillState>,
    /// 전체 체결률
    #[prost(double, tag="5")]
    pub total_fill_rate: f64,
    /// 트리거 시점 스프레드
    #[prost(int64, tag="6")]
    pub trigger_spread: i64,
}
/// 라운드별 체결 상태
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RoundFillState {
    /// 라운드 번호
    #[prost(uint32, tag="1")]
    pub round: u32,
    /// 심볼별 주문 수량
    #[prost(map="string, int64", tag="2")]
    pub ordered_quantities: ::std::collections::HashMap<::prost::alloc::string::String, i64>,
    /// 심볼별 체결 수량
    #[prost(map="string, int64", tag="3")]
    pub filled_quantities: ::std::collections::HashMap<::prost::alloc::string::String, i64>,
    /// 체결률
    #[prost(double, tag="4")]
    pub fill_rate: f64,
}
/// 차익거래 통계
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ArbitrageStats {
    /// 트리거 발동 횟수
    #[prost(uint64, tag="1")]
    pub trigger_count: u64,
    /// 실행 완료 횟수
    #[prost(uint64, tag="2")]
    pub execution_count: u64,
    /// 실행 실패 횟수
    #[prost(uint64, tag="3")]
    pub execution_failures: u64,
    /// 총 수익
    #[prost(int64, tag="4")]
    pub total_profit: i64,
}
/// 상태 업데이트 (스트리밍용)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArbitrageStatusUpdate {
    /// 리소스 이름 (arbitrages/{id})
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// 차익거래 ID
    #[prost(int32, tag="2")]
    pub id: i32,
    /// 업데이트된 필드들
    #[prost(message, optional, tag="3")]
    pub update_mask: ::core::option::Option<super::super::super::google::protobuf::FieldMask>,
    /// 상태 (필드마스크에 따라 부분 업데이트)
    #[prost(message, optional, tag="4")]
    pub status: ::core::option::Option<ArbitrageStatus>,
    /// 바스켓 A 구성종목 가격 (include_basket_prices=true인 경우, 변경분만)
    #[prost(message, repeated, tag="5")]
    pub basket_a_prices: ::prost::alloc::vec::Vec<BasketItemPrice>,
    /// 바스켓 B 구성종목 가격 (include_basket_prices=true인 경우, 변경분만)
    #[prost(message, repeated, tag="6")]
    pub basket_b_prices: ::prost::alloc::vec::Vec<BasketItemPrice>,
}
/// 차익거래 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArbitrageEvent {
    /// 리소스 이름 (arbitrages/{id})
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// 차익거래 ID
    #[prost(int32, tag="2")]
    pub id: i32,
    /// 이벤트 타입
    #[prost(oneof="arbitrage_event::Event", tags="3, 4, 5, 6, 7, 8, 9, 10, 11, 12")]
    pub event: ::core::option::Option<arbitrage_event::Event>,
}
/// Nested message and enum types in `ArbitrageEvent`.
pub mod arbitrage_event {
    /// 이벤트 타입
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Event {
        #[prost(message, tag="3")]
        StateChanged(super::StateChangedEvent),
        #[prost(message, tag="4")]
        PriceUpdate(super::PriceUpdateEvent),
        #[prost(message, tag="5")]
        Triggered(super::TriggeredEvent),
        #[prost(message, tag="6")]
        RoundStarted(super::RoundStartedEvent),
        #[prost(message, tag="7")]
        OrderSubmitted(super::OrderSubmittedEvent),
        #[prost(message, tag="8")]
        OrderFilled(super::OrderFilledEvent),
        #[prost(message, tag="9")]
        RoundCompleted(super::RoundCompletedEvent),
        #[prost(message, tag="10")]
        ExecutionCompleted(super::ExecutionCompletedEvent),
        #[prost(message, tag="11")]
        Error(super::ErrorEvent),
        #[prost(message, tag="12")]
        BasketPrice(super::BasketPriceUpdateEvent),
    }
}
/// 상태 변경 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StateChangedEvent {
    #[prost(enumeration="ArbitrageState", tag="1")]
    pub old_state: i32,
    #[prost(enumeration="ArbitrageState", tag="2")]
    pub new_state: i32,
}
/// 가격 업데이트 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PriceUpdateEvent {
    #[prost(int64, tag="1")]
    pub basket_a_value: i64,
    #[prost(int64, tag="2")]
    pub basket_b_value: i64,
    #[prost(int64, tag="3")]
    pub spread: i64,
    #[prost(double, tag="4")]
    pub spread_bps: f64,
}
/// 트리거 발동 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TriggeredEvent {
    #[prost(enumeration="ArbitrageSide", tag="1")]
    pub side: i32,
    #[prost(int64, tag="2")]
    pub spread: i64,
}
/// 라운드 시작 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RoundStartedEvent {
    #[prost(uint32, tag="1")]
    pub round: u32,
    #[prost(uint32, tag="2")]
    pub total_rounds: u32,
}
/// 주문 제출 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderSubmittedEvent {
    #[prost(uint32, tag="1")]
    pub round: u32,
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(int64, tag="3")]
    pub quantity: i64,
    #[prost(string, tag="4")]
    pub price: ::prost::alloc::string::String,
}
/// 체결 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderFilledEvent {
    #[prost(uint32, tag="1")]
    pub round: u32,
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    #[prost(int64, tag="3")]
    pub filled_quantity: i64,
    #[prost(int64, tag="4")]
    pub filled_price: i64,
}
/// 라운드 완료 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RoundCompletedEvent {
    #[prost(uint32, tag="1")]
    pub round: u32,
    #[prost(double, tag="2")]
    pub fill_rate: f64,
}
/// 실행 완료 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ExecutionCompletedEvent {
    #[prost(double, tag="1")]
    pub total_fill_rate: f64,
}
/// 에러 이벤트
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ErrorEvent {
    #[prost(string, tag="1")]
    pub message: ::prost::alloc::string::String,
}
/// 바스켓 구성종목 가격 (개별 종목)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketItemPrice {
    /// 종목 심볼
    #[prost(string, tag="1")]
    pub symbol: ::prost::alloc::string::String,
    /// 최우선 매수호가
    #[prost(string, tag="2")]
    pub bid1: ::prost::alloc::string::String,
    /// 최우선 매도호가
    #[prost(string, tag="3")]
    pub ask1: ::prost::alloc::string::String,
    /// 최우선 매수호가 수량
    #[prost(int64, tag="4")]
    pub bid1_qty: i64,
    /// 최우선 매도호가 수량
    #[prost(int64, tag="5")]
    pub ask1_qty: i64,
}
/// 바스켓 가격 업데이트 이벤트 (변경된 종목만 전송)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BasketPriceUpdateEvent {
    /// 어느 바스켓인지
    #[prost(enumeration="BasketSide", tag="1")]
    pub side: i32,
    /// 변경된 종목만 포함 (전체 아님)
    #[prost(message, repeated, tag="2")]
    pub updated_items: ::prost::alloc::vec::Vec<BasketItemPrice>,
}
// ============================================================================
// Request/Response Messages
// ============================================================================

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetArbitrageRequest {
    /// 리소스 이름 (arbitrages/{id})
    #[prost(string, tag="1")]
    pub arbitrage: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListArbitragesRequest {
    /// 페이지 크기 (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:
    /// * portfolio_id - 포트폴리오 ID
    /// * is_active - 활성화 여부
    /// * basket_a_id - 바스켓 A ID
    /// * basket_b_id - 바스켓 B ID
    /// * basket_a.basket_type - 바스켓 A 타입
    /// * basket_b.basket_type - 바스켓 B 타입
    /// * basket_a.etf_constituent.etf_symbol - 바스켓 A의 ETF 심볼
    /// * basket_b.etf_constituent.etf_symbol - 바스켓 B의 ETF 심볼
    ///
    /// Operators:
    /// * = : 일치
    /// * != : 불일치
    ///
    /// Examples:
    /// * portfolio_id=1
    /// * is_active=true
    /// * is_active=false
    /// * basket_a_id=10
    /// * portfolio_id=1 AND is_active=true
    /// * basket_a.basket_type=BASKET_TYPE_ETF_CONSTITUENT
    /// * basket_a.etf_constituent.etf_symbol="069500"
    /// * basket_a.basket_type=BASKET_TYPE_ETF_CONSTITUENT AND basket_b.basket_type=BASKET_TYPE_REBALANCING
    #[prost(string, tag="3")]
    pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListArbitragesResponse {
    /// 차익거래 목록
    #[prost(message, repeated, tag="1")]
    pub arbitrages: ::prost::alloc::vec::Vec<Arbitrage>,
    /// 다음 페이지 토큰
    #[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 CreateArbitrageRequest {
    /// 생성할 차익거래
    #[prost(message, optional, tag="1")]
    pub arbitrage: ::core::option::Option<Arbitrage>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateArbitrageRequest {
    /// 수정할 차익거래
    #[prost(message, optional, tag="1")]
    pub arbitrage: ::core::option::Option<Arbitrage>,
    /// 수정할 필드 마스크
    #[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 DeleteArbitrageRequest {
    /// 리소스 이름 (arbitrages/{id})
    #[prost(string, tag="1")]
    pub arbitrage: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartArbitrageRequest {
    /// 리소스 이름 (arbitrages/{id})
    #[prost(string, tag="1")]
    pub arbitrage: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopArbitrageRequest {
    /// 리소스 이름 (arbitrages/{id})
    #[prost(string, tag="1")]
    pub arbitrage: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetArbitrageStatusRequest {
    /// 리소스 이름 (arbitrages/{id})
    #[prost(string, tag="1")]
    pub arbitrage: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListArbitrageStatusesRequest {
    /// 페이지 크기 (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:
    /// * state - 상태 (ARBITRAGE_STATE_*)
    ///
    /// Examples:
    /// * filter=state=ARBITRAGE_STATE_MONITORING
    #[prost(string, tag="3")]
    pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListArbitrageStatusesResponse {
    /// 차익거래 상태 목록
    #[prost(message, repeated, tag="1")]
    pub arbitrage_statuses: ::prost::alloc::vec::Vec<ArbitrageStatus>,
    /// 다음 페이지 토큰
    #[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 StreamArbitrageStatusRequest {
    /// 리소스 이름 (arbitrages/{id})
    #[prost(string, tag="1")]
    pub arbitrage: ::prost::alloc::string::String,
    /// 구성종목 개별 가격 포함 여부 (기본: false)
    /// true인 경우 ArbitrageStatusUpdate에 바스켓 구성종목 가격이 포함됨
    #[prost(bool, tag="2")]
    pub include_basket_prices: bool,
    /// 예상 손익/슬리피지 포함 여부 (기본: true)
    /// ArbitrageStatus.estimate 필드 포함 여부
    #[prost(bool, tag="3")]
    pub include_estimate: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamArbitrageEventsRequest {
    /// 리소스 이름 (arbitrages/{id})
    #[prost(string, tag="1")]
    pub arbitrage: ::prost::alloc::string::String,
    /// 바스켓 구성종목 가격 이벤트 포함 여부 (기본: false)
    /// true인 경우 BasketPriceUpdateEvent가 스트림에 포함됨
    #[prost(bool, tag="2")]
    pub include_basket_prices: bool,
}
/// 차익거래 런타임 상태
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ArbitrageState {
    Unspecified = 0,
    /// 대기 중 (등록됨, 미시작)
    Idle = 1,
    /// 모니터링 중 (시세 수신 및 트리거 평가)
    Monitoring = 2,
    /// 트리거 발동됨 (조건 충족, 실행 준비)
    Triggered = 3,
    /// 실행 중 (주문 진행 중)
    Executing = 4,
    /// 중지됨
    Stopped = 5,
    /// 에러 상태
    Error = 6,
}
impl ArbitrageState {
    /// 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 {
            ArbitrageState::Unspecified => "ARBITRAGE_STATE_UNSPECIFIED",
            ArbitrageState::Idle => "ARBITRAGE_STATE_IDLE",
            ArbitrageState::Monitoring => "ARBITRAGE_STATE_MONITORING",
            ArbitrageState::Triggered => "ARBITRAGE_STATE_TRIGGERED",
            ArbitrageState::Executing => "ARBITRAGE_STATE_EXECUTING",
            ArbitrageState::Stopped => "ARBITRAGE_STATE_STOPPED",
            ArbitrageState::Error => "ARBITRAGE_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 {
            "ARBITRAGE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "ARBITRAGE_STATE_IDLE" => Some(Self::Idle),
            "ARBITRAGE_STATE_MONITORING" => Some(Self::Monitoring),
            "ARBITRAGE_STATE_TRIGGERED" => Some(Self::Triggered),
            "ARBITRAGE_STATE_EXECUTING" => Some(Self::Executing),
            "ARBITRAGE_STATE_STOPPED" => Some(Self::Stopped),
            "ARBITRAGE_STATE_ERROR" => Some(Self::Error),
            _ => None,
        }
    }
}
/// 차익거래 방향
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ArbitrageSide {
    Unspecified = 0,
    /// A 매수, B 매도
    BuyASellB = 1,
    /// B 매수, A 매도
    BuyBSellA = 2,
}
impl ArbitrageSide {
    /// 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 {
            ArbitrageSide::Unspecified => "ARBITRAGE_SIDE_UNSPECIFIED",
            ArbitrageSide::BuyASellB => "ARBITRAGE_SIDE_BUY_A_SELL_B",
            ArbitrageSide::BuyBSellA => "ARBITRAGE_SIDE_BUY_B_SELL_A",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ARBITRAGE_SIDE_UNSPECIFIED" => Some(Self::Unspecified),
            "ARBITRAGE_SIDE_BUY_A_SELL_B" => Some(Self::BuyASellB),
            "ARBITRAGE_SIDE_BUY_B_SELL_A" => Some(Self::BuyBSellA),
            _ => None,
        }
    }
}
/// 바스켓 구분
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BasketSide {
    Unspecified = 0,
    A = 1,
    B = 2,
}
impl BasketSide {
    /// 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 {
            BasketSide::Unspecified => "BASKET_SIDE_UNSPECIFIED",
            BasketSide::A => "BASKET_SIDE_A",
            BasketSide::B => "BASKET_SIDE_B",
        }
    }
    /// 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_SIDE_UNSPECIFIED" => Some(Self::Unspecified),
            "BASKET_SIDE_A" => Some(Self::A),
            "BASKET_SIDE_B" => Some(Self::B),
            _ => None,
        }
    }
}
include!("kdo.v1.arbitrage.tonic.rs");
include!("kdo.v1.arbitrage.serde.rs");
// @@protoc_insertion_point(module)