Skip to main content

ids_apis/
master_sync.v1.stock.rs

1// @generated
2// This file is @generated by prost-build.
3#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(Clone, PartialEq, ::prost::Message)]
5pub struct Stock {
6    /// Stock ID
7    #[prost(uint64, tag="1")]
8    pub id: u64,
9    /// 주식 심볼 (ISIN 코드)
10    #[prost(string, tag="2")]
11    pub symbol: ::prost::alloc::string::String,
12    /// 주식 코드
13    #[prost(string, tag="3")]
14    pub code: ::prost::alloc::string::String,
15    /// 주식 이름
16    #[prost(string, tag="4")]
17    pub name: ::prost::alloc::string::String,
18    /// 전일 종가
19    #[prost(string, tag="5")]
20    pub prev_close: ::prost::alloc::string::String,
21    /// 현재가
22    #[prost(string, tag="6")]
23    pub last_price: ::prost::alloc::string::String,
24    /// 시장 구분
25    #[prost(enumeration="MarketType", tag="7")]
26    pub market_type: i32,
27    /// 상장 주식 수
28    #[prost(int64, tag="8")]
29    pub listed_shares: i64,
30    /// Tick 크기 (원 단위)
31    #[prost(int64, tag="9")]
32    pub tick_size: i64,
33    /// 거래 가능 여부
34    #[prost(bool, tag="10")]
35    pub tradable: bool,
36    /// 공매도 가능 여부
37    #[prost(bool, tag="11")]
38    pub short_sellable: bool,
39    /// 신용 거래 가능 여부
40    #[prost(bool, tag="12")]
41    pub margin_tradable: bool,
42    /// 섹터 코드
43    #[prost(string, tag="13")]
44    pub sector_code: ::prost::alloc::string::String,
45    /// 섹터 이름
46    #[prost(string, tag="14")]
47    pub sector_name: ::prost::alloc::string::String,
48}
49// ========== Request/Response Messages ==========
50
51/// GetStock
52#[allow(clippy::derive_partial_eq_without_eq)]
53#[derive(Clone, PartialEq, ::prost::Message)]
54pub struct GetStockRequest {
55    #[prost(string, tag="1")]
56    pub stock: ::prost::alloc::string::String,
57}
58/// ListStocks
59#[allow(clippy::derive_partial_eq_without_eq)]
60#[derive(Clone, PartialEq, ::prost::Message)]
61pub struct ListStocksRequest {
62    /// 페이지 크기 (optional)
63    #[prost(uint32, optional, tag="1")]
64    pub page_size: ::core::option::Option<u32>,
65    /// 페이지 토큰 (optional, for pagination)
66    #[prost(string, optional, tag="2")]
67    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
68    /// 필터링 조건 (optional, AIP-160)
69    #[prost(string, tag="3")]
70    pub filter: ::prost::alloc::string::String,
71}
72#[allow(clippy::derive_partial_eq_without_eq)]
73#[derive(Clone, PartialEq, ::prost::Message)]
74pub struct ListStocksResponse {
75    /// 주식 목록
76    #[prost(message, repeated, tag="1")]
77    pub stocks: ::prost::alloc::vec::Vec<Stock>,
78    /// 다음 페이지 토큰
79    #[prost(string, tag="2")]
80    pub next_page_token: ::prost::alloc::string::String,
81}
82/// 시장 구분
83#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
84#[repr(i32)]
85pub enum MarketType {
86    Unspecified = 0,
87    Kospi = 1,
88    Kosdaq = 2,
89    Konex = 3,
90}
91impl MarketType {
92    /// String value of the enum field names used in the ProtoBuf definition.
93    ///
94    /// The values are not transformed in any way and thus are considered stable
95    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
96    pub fn as_str_name(&self) -> &'static str {
97        match self {
98            MarketType::Unspecified => "MARKET_TYPE_UNSPECIFIED",
99            MarketType::Kospi => "MARKET_TYPE_KOSPI",
100            MarketType::Kosdaq => "MARKET_TYPE_KOSDAQ",
101            MarketType::Konex => "MARKET_TYPE_KONEX",
102        }
103    }
104    /// Creates an enum from field names used in the ProtoBuf definition.
105    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
106        match value {
107            "MARKET_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
108            "MARKET_TYPE_KOSPI" => Some(Self::Kospi),
109            "MARKET_TYPE_KOSDAQ" => Some(Self::Kosdaq),
110            "MARKET_TYPE_KONEX" => Some(Self::Konex),
111            _ => None,
112        }
113    }
114}
115include!("master_sync.v1.stock.tonic.rs");
116include!("master_sync.v1.stock.serde.rs");
117// @@protoc_insertion_point(module)