ids-apis 1.0.193

IDS APIs in Rust
Documentation
// @generated
// This file is @generated by prost-build.
/// 통합 상품 메시지
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Instrument {
    /// 리소스 이름 (instruments/{symbol})
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    /// 심볼 (고유 식별자)
    #[prost(string, tag="2")]
    pub symbol: ::prost::alloc::string::String,
    /// 상품 코드
    #[prost(string, tag="3")]
    pub code: ::prost::alloc::string::String,
    /// 상품명
    #[prost(string, tag="4")]
    pub display_name: ::prost::alloc::string::String,
    /// 상품 타입
    #[prost(enumeration="ProductType", tag="5")]
    pub product_type: i32,
    /// 전일 종가
    #[prost(string, tag="6")]
    pub prev_close: ::prost::alloc::string::String,
    /// 현재가
    #[prost(string, tag="7")]
    pub last_price: ::prost::alloc::string::String,
    /// 거래 가능 여부
    #[prost(bool, tag="8")]
    pub tradable: bool,
    /// 상품별 상세 정보
    #[prost(oneof="instrument::Details", tags="20, 21, 22")]
    pub details: ::core::option::Option<instrument::Details>,
}
/// Nested message and enum types in `Instrument`.
pub mod instrument {
    /// 상품별 상세 정보
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Details {
        #[prost(message, tag="20")]
        Etf(super::EtfDetails),
        #[prost(message, tag="21")]
        Futures(super::FuturesDetails),
        #[prost(message, tag="22")]
        Stock(super::StockDetails),
    }
}
/// ETF 상세 정보 (ETF 전용 필드)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfDetails {
    /// 전일 NAV
    #[prost(string, tag="1")]
    pub prev_nav: ::prost::alloc::string::String,
    /// 실시간 iNAV
    #[prost(string, tag="2")]
    pub last_inav: ::prost::alloc::string::String,
    /// 설정 단위
    #[prost(int64, tag="3")]
    pub creation_unit: i64,
    /// Tick 크기 (원 단위)
    #[prost(int64, tag="4")]
    pub tick_size: i64,
    /// 레버리지 배율
    #[prost(float, tag="5")]
    pub leverage: f32,
    /// 공매도 가능 여부
    #[prost(bool, tag="6")]
    pub short_sellable: bool,
    /// 상장 주식 수
    #[prost(int64, tag="7")]
    pub listed_quantity: i64,
    /// 현금 설정 가능 여부
    #[prost(bool, tag="8")]
    pub cash_creditable: bool,
    /// 현금 설정 금액
    #[prost(int64, tag="9")]
    pub cash_creation_amount: i64,
}
/// 선물 상세 정보 (Futures 전용 필드)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesDetails {
    /// 기초자산 심볼
    #[prost(string, tag="1")]
    pub underlying_symbol: ::prost::alloc::string::String,
    /// 기초자산 이름
    #[prost(string, tag="2")]
    pub underlying_name: ::prost::alloc::string::String,
    /// 만기일 (YYYYMMDD)
    #[prost(string, tag="3")]
    pub expiry_date: ::prost::alloc::string::String,
    /// 승수 (계약 당 금액)
    #[prost(double, tag="4")]
    pub multiplier: f64,
    /// Tick 크기 (포인트 단위)
    #[prost(double, tag="5")]
    pub tick_size: f64,
    /// Tick 가치 (원 단위)
    #[prost(int64, tag="6")]
    pub tick_value: i64,
    /// 최종 거래일 (YYYYMMDD)
    #[prost(string, tag="7")]
    pub last_trading_date: ::prost::alloc::string::String,
}
/// 주식 상세 정보 (Stock 전용 필드)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StockDetails {
    /// 시장 구분
    #[prost(enumeration="super::stock::MarketType", tag="1")]
    pub market_type: i32,
    /// 상장 주식 수
    #[prost(int64, tag="2")]
    pub listed_shares: i64,
    /// Tick 크기 (원 단위)
    #[prost(int64, tag="3")]
    pub tick_size: i64,
    /// 공매도 가능 여부
    #[prost(bool, tag="4")]
    pub short_sellable: bool,
    /// 신용 거래 가능 여부
    #[prost(bool, tag="5")]
    pub margin_tradable: bool,
    /// 섹터 코드
    #[prost(string, tag="6")]
    pub sector_code: ::prost::alloc::string::String,
    /// 섹터 이름
    #[prost(string, tag="7")]
    pub sector_name: ::prost::alloc::string::String,
}
// ========== Request/Response Messages ==========

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetInstrumentRequest {
    /// instruments/{symbol}
    #[prost(string, tag="1")]
    pub instrument: ::prost::alloc::string::String,
}
/// BatchGet (AIP-231)
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetInstrumentsRequest {
    /// 조회할 symbol 목록 (최대 100개)
    /// Format: \["instruments/005930", "instruments/101S6", ...\]
    #[prost(string, repeated, tag="1")]
    pub instruments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetInstrumentsResponse {
    /// 조회된 상품 목록 (요청 순서 보장)
    #[prost(message, repeated, tag="1")]
    pub instruments: ::prost::alloc::vec::Vec<Instrument>,
    /// 조회 실패한 symbol 목록
    #[prost(string, repeated, tag="2")]
    pub not_found: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInstrumentsRequest {
    /// 페이지 크기 (optional)
    #[prost(uint32, optional, tag="1")]
    pub page_size: ::core::option::Option<u32>,
    /// 페이지 토큰 (optional, for pagination)
    #[prost(string, optional, tag="2")]
    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
    /// 필터링 조건 (optional, AIP-160)
    ///
    /// Available Fields:
    /// * product_type - 상품 타입 (PRODUCT_TYPE_ETF, PRODUCT_TYPE_FUTURES, PRODUCT_TYPE_STOCK)
    /// * symbol - 심볼 (contains 지원)
    /// * code - 상품 코드 (contains 지원)
    /// * display_name - 상품명 (contains 지원)
    /// * tradable - 거래 가능 여부
    ///
    /// Examples:
    /// * filter=product_type=PRODUCT_TYPE_ETF
    /// * filter=symbol:"005930"
    /// * filter=tradable=true
    /// * filter=product_type=PRODUCT_TYPE_STOCK AND tradable=true
    #[prost(string, tag="3")]
    pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInstrumentsResponse {
    /// 상품 목록
    #[prost(message, repeated, tag="1")]
    pub instruments: ::prost::alloc::vec::Vec<Instrument>,
    /// 다음 페이지 토큰
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// 상품 타입
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProductType {
    Unspecified = 0,
    Etf = 1,
    Futures = 2,
    Stock = 3,
}
impl ProductType {
    /// 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 {
            ProductType::Unspecified => "PRODUCT_TYPE_UNSPECIFIED",
            ProductType::Etf => "PRODUCT_TYPE_ETF",
            ProductType::Futures => "PRODUCT_TYPE_FUTURES",
            ProductType::Stock => "PRODUCT_TYPE_STOCK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PRODUCT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "PRODUCT_TYPE_ETF" => Some(Self::Etf),
            "PRODUCT_TYPE_FUTURES" => Some(Self::Futures),
            "PRODUCT_TYPE_STOCK" => Some(Self::Stock),
            _ => None,
        }
    }
}
include!("master_sync.v1.instrument.tonic.rs");
include!("master_sync.v1.instrument.serde.rs");
// @@protoc_insertion_point(module)