Skip to main content

ids_apis/
kdo.v1.future.rs

1// @generated
2// This file is @generated by prost-build.
3/// 선물/옵션 종목 정보
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct Future {
7    /// 리소스 이름 (futures/{code})
8    #[prost(string, tag="1")]
9    pub name: ::prost::alloc::string::String,
10    /// 종목 코드
11    #[prost(string, tag="2")]
12    pub code: ::prost::alloc::string::String,
13    /// 심볼
14    #[prost(string, tag="3")]
15    pub symbol: ::prost::alloc::string::String,
16    /// 종목명
17    #[prost(string, tag="4")]
18    pub market_name: ::prost::alloc::string::String,
19    /// 시장 유형
20    #[prost(enumeration="super::common::MarketType", tag="5")]
21    pub market_type: i32,
22    /// 1회 최대 주문 수량
23    #[prost(int64, tag="6")]
24    pub max_quantity_per_order: i64,
25    /// 틱 크기
26    #[prost(double, tag="7")]
27    pub tick_size: f64,
28    /// 전일 종가
29    #[prost(double, tag="8")]
30    pub prev_price: f64,
31    /// 기준가
32    #[prost(double, tag="9")]
33    pub base_price: f64,
34    /// 상한가
35    #[prost(double, tag="10")]
36    pub max_price: f64,
37    /// 하한가
38    #[prost(double, tag="11")]
39    pub min_price: f64,
40    /// 거래 단위
41    #[prost(double, tag="12")]
42    pub unit: f64,
43    /// 거래 승수
44    #[prost(double, tag="13")]
45    pub multiple: f64,
46    /// 거래 가능 여부
47    #[prost(bool, tag="14")]
48    pub tradable: bool,
49    /// 선물/옵션 유형
50    #[prost(enumeration="FutureOptionType", tag="15")]
51    pub future_option_type: i32,
52    /// 최종 거래일 (YYYY-MM-DD)
53    #[prost(string, tag="16")]
54    pub last_tradable_date: ::prost::alloc::string::String,
55    /// 만기일 (YYYY-MM-DD)
56    #[prost(string, tag="17")]
57    pub maturity_date: ::prost::alloc::string::String,
58    /// 기초자산 코드
59    #[prost(string, tag="18")]
60    pub underlying_code: ::prost::alloc::string::String,
61    /// 기초자산 전일 종가
62    #[prost(double, tag="19")]
63    pub underlying_prev_price: f64,
64    /// 잔존일수
65    #[prost(double, tag="20")]
66    pub remaining_days: f64,
67    /// 최종 거래일 여부
68    #[prost(bool, tag="21")]
69    pub last_tradable_day: bool,
70    /// CD 금리
71    #[prost(double, tag="22")]
72    pub cd_rate: f64,
73    /// 최종 결제일 (YYYY-MM-DD)
74    #[prost(string, tag="23")]
75    pub final_settlement_date: ::prost::alloc::string::String,
76}
77// ========== Request/Response Messages ==========
78
79#[allow(clippy::derive_partial_eq_without_eq)]
80#[derive(Clone, PartialEq, ::prost::Message)]
81pub struct GetFutureRequest {
82    /// 리소스 이름 (futures/{code})
83    #[prost(string, tag="1")]
84    pub future: ::prost::alloc::string::String,
85}
86#[allow(clippy::derive_partial_eq_without_eq)]
87#[derive(Clone, PartialEq, ::prost::Message)]
88pub struct ListFuturesRequest {
89    /// 페이지 크기 (optional)
90    #[prost(int32, optional, tag="1")]
91    pub page_size: ::core::option::Option<i32>,
92    /// 페이지 토큰 (optional)
93    #[prost(string, optional, tag="2")]
94    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
95    /// 필터링 조건 (optional, AIP-160)
96    ///
97    /// Available Fields:
98    /// * code - 종목 코드
99    /// * symbol - 심볼
100    /// * market_type - 시장 유형 (MARKET_TYPE_KOSPI, MARKET_TYPE_KOSDAQ, MARKET_TYPE_DERIVATIVE)
101    /// * future_option_type - 선물/옵션 유형 (FUTURE_OPTION_TYPE_FUTURE, FUTURE_OPTION_TYPE_CALL, FUTURE_OPTION_TYPE_PUT)
102    /// * tradable - 거래 가능 여부
103    /// * underlying_code - 기초자산 코드
104    ///
105    /// Examples:
106    /// * future_option_type=FUTURE_OPTION_TYPE_FUTURE
107    /// * tradable=true
108    /// * underlying_code="101S6"
109    /// * future_option_type=FUTURE_OPTION_TYPE_FUTURE AND tradable=true
110    #[prost(string, tag="3")]
111    pub filter: ::prost::alloc::string::String,
112}
113#[allow(clippy::derive_partial_eq_without_eq)]
114#[derive(Clone, PartialEq, ::prost::Message)]
115pub struct ListFuturesResponse {
116    /// 선물 목록
117    #[prost(message, repeated, tag="1")]
118    pub futures: ::prost::alloc::vec::Vec<Future>,
119    /// 다음 페이지 토큰
120    #[prost(string, tag="2")]
121    pub next_page_token: ::prost::alloc::string::String,
122}
123/// 선물/옵션 유형
124#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
125#[repr(i32)]
126pub enum FutureOptionType {
127    Unspecified = 0,
128    /// 선물
129    Future = 1,
130    /// 콜옵션
131    Call = 2,
132    /// 풋옵션
133    Put = 3,
134}
135impl FutureOptionType {
136    /// String value of the enum field names used in the ProtoBuf definition.
137    ///
138    /// The values are not transformed in any way and thus are considered stable
139    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
140    pub fn as_str_name(&self) -> &'static str {
141        match self {
142            FutureOptionType::Unspecified => "FUTURE_OPTION_TYPE_UNSPECIFIED",
143            FutureOptionType::Future => "FUTURE_OPTION_TYPE_FUTURE",
144            FutureOptionType::Call => "FUTURE_OPTION_TYPE_CALL",
145            FutureOptionType::Put => "FUTURE_OPTION_TYPE_PUT",
146        }
147    }
148    /// Creates an enum from field names used in the ProtoBuf definition.
149    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
150        match value {
151            "FUTURE_OPTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
152            "FUTURE_OPTION_TYPE_FUTURE" => Some(Self::Future),
153            "FUTURE_OPTION_TYPE_CALL" => Some(Self::Call),
154            "FUTURE_OPTION_TYPE_PUT" => Some(Self::Put),
155            _ => None,
156        }
157    }
158}
159include!("kdo.v1.future.tonic.rs");
160include!("kdo.v1.future.serde.rs");
161// @@protoc_insertion_point(module)