ids-apis 1.0.275

IDS APIs in Rust
Documentation
// @generated
// This file is @generated by prost-build.
/// ETF 주문장 데이터
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfOrderbookData {
    /// 매수 호가 (10단계, AIP-144)
    #[prost(string, repeated, tag="1")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 호가 (10단계)
    #[prost(string, repeated, tag="2")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 수량 (10단계)
    #[prost(int64, repeated, tag="3")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매도 수량 (10단계)
    #[prost(int64, repeated, tag="4")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// LP 매수 수량 (10단계)
    #[prost(int64, repeated, tag="5")]
    pub lp_bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// LP 매도 수량 (10단계)
    #[prost(int64, repeated, tag="6")]
    pub lp_ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 중간 호가
    #[prost(string, tag="7")]
    pub mid_price: ::prost::alloc::string::String,
    /// 중간 매도 수량
    #[prost(int64, tag="8")]
    pub mid_ask_quantity: i64,
    /// 중간 매수 수량
    #[prost(int64, tag="9")]
    pub mid_bid_quantity: i64,
    /// 총 매도 호가 수량
    #[prost(int64, tag="10")]
    pub ask_quote_total_quantity: i64,
    /// 총 매수 호가 수량
    #[prost(int64, tag="11")]
    pub bid_quote_total_quantity: i64,
    /// 예상 가격
    #[prost(string, tag="12")]
    pub est_price: ::prost::alloc::string::String,
    /// 예상 거래량
    #[prost(int64, tag="13")]
    pub est_volume: i64,
    /// 세션 ID
    #[prost(enumeration="SessionId", tag="14")]
    pub session_id: i32,
}
/// 선물 주문장 데이터
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FuturesOrderbookData {
    /// 매수 호가 (5단계, AIP-144)
    #[prost(string, repeated, tag="1")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 호가 (5단계)
    #[prost(string, repeated, tag="2")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 수량 (5단계)
    #[prost(int64, repeated, tag="3")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매도 수량 (5단계)
    #[prost(int64, repeated, tag="4")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매수 주문 수 (5단계)
    #[prost(int64, repeated, tag="5")]
    pub bid_counts: ::prost::alloc::vec::Vec<i64>,
    /// 매도 주문 수 (5단계)
    #[prost(int64, repeated, tag="6")]
    pub ask_counts: ::prost::alloc::vec::Vec<i64>,
    /// 총 매도 호가 수량
    #[prost(int64, tag="7")]
    pub ask_quote_total_quantity: i64,
    /// 총 매수 호가 수량
    #[prost(int64, tag="8")]
    pub bid_quote_total_quantity: i64,
    /// 중간 가격
    #[prost(string, tag="9")]
    pub mid_price: ::prost::alloc::string::String,
    /// 예상 가격
    #[prost(string, tag="10")]
    pub est_price: ::prost::alloc::string::String,
    /// 예상 거래량
    #[prost(int64, tag="11")]
    pub est_volume: i64,
    /// 세션 ID
    #[prost(enumeration="SessionId", tag="12")]
    pub session_id: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EtfNav {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub etf_symbol: ::prost::alloc::string::String,
    /// 순자산가치 (원 단위, string)
    #[prost(string, tag="10")]
    pub theory_nav: ::prost::alloc::string::String,
    /// 전일 대비 (string)
    #[prost(string, tag="11")]
    pub krx_nav: ::prost::alloc::string::String,
}
// ========== Request/Response Messages ==========

/// ETF 주문장 스트리밍 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamEtfOrderbookRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
}
/// 선물 주문장 스트리밍 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamFuturesOrderbookRequest {
    /// 리소스 이름 (예: futures/K101W9000)
    #[prost(string, tag="1")]
    pub future: ::prost::alloc::string::String,
}
/// 선물 주문장 스트리밍 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamStockOrderbookRequest {
    #[prost(string, tag="1")]
    pub stock: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamEtfNavRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
}
/// 주문 업데이트 스트리밍 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserEtfOrderBookRequest {
    #[prost(string, tag="1")]
    pub etf: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
/// 주문 업데이트 스트리밍 요청
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserFutureOrderBookRequest {
    #[prost(string, tag="1")]
    pub future: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserStockOrderBookRequest {
    #[prost(string, tag="1")]
    pub stock: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub fund: ::prost::alloc::string::String,
}
/// 주문 업데이트 정보
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserOrderbookData {
    /// 매수 호가 (10단계, AIP-144)
    #[prost(string, repeated, tag="1")]
    pub bid_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매도 호가 (10단계)
    #[prost(string, repeated, tag="2")]
    pub ask_prices: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 매수 수량 (10단계)
    #[prost(int64, repeated, tag="3")]
    pub bid_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 매도 수량 (10단계)
    #[prost(int64, repeated, tag="4")]
    pub ask_quantities: ::prost::alloc::vec::Vec<i64>,
    /// 주문 ID (10단계)
    #[prost(int64, repeated, tag="5")]
    pub order_ids: ::prost::alloc::vec::Vec<i64>,
}
/// Request to add a new raw UDP socket
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddRawMessagesSocketRequest {
    /// Multicast address to listen on (e.g., "239.1.1.1")
    #[prost(string, tag="1")]
    pub multicast_address: ::prost::alloc::string::String,
    /// Interface address to bind (e.g., "192.168.1.100")
    #[prost(string, tag="2")]
    pub multicast_interface: ::prost::alloc::string::String,
    /// UDP port to listen on
    #[prost(uint32, tag="3")]
    pub port: u32,
    /// Buffer size for receiving UDP packets (default: 2048)
    #[prost(uint32, tag="4")]
    pub buffer_size: u32,
}
/// Response from adding a raw socket
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddRawMessagesSocketResponse {
    /// Whether the socket was added successfully
    #[prost(bool, tag="1")]
    pub success: bool,
    /// Error message if success is false
    #[prost(string, tag="2")]
    pub error_message: ::prost::alloc::string::String,
}
/// Request to stream raw market messages
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamRawMessagesRequest {
    /// Optional filter by socket IDs (empty = all sockets)
    #[prost(string, repeated, tag="1")]
    pub socket_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional buffer size for the stream (default: 100)
    #[prost(uint32, tag="2")]
    pub buffer_size: u32,
}
/// Raw market message received from UDP socket
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RawMarketMessage {
    /// Raw binary data received from the socket
    #[prost(bytes="vec", tag="1")]
    pub data: ::prost::alloc::vec::Vec<u8>,
    /// Timestamp when the message was received (nanoseconds since epoch)
    #[prost(int64, tag="2")]
    pub receive_timestamp_ns: i64,
    /// Message sequence number (per socket)
    #[prost(uint64, tag="3")]
    pub sequence_number: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMarketSessionResponse {
    /// 고수준 거래 세션 (시간 기반)
    #[prost(enumeration="super::common::TradingSession", tag="1")]
    pub session: i32,
    /// KRX 세부 세션 ID (예: "connected", "opening_one_price")
    /// market feed에서 수신한 실제 세션 코드
    #[prost(string, tag="2")]
    pub session_id: ::prost::alloc::string::String,
    /// 세션 한글 이름 (예: "이상무", "시가단일가")
    #[prost(string, tag="3")]
    pub session_name: ::prost::alloc::string::String,
}
/// 세션 ID 열거형 (AIP-126)
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SessionId {
    /// 기본값
    Unspecified = 0,
    /// 장개시전
    Previous = 1,
    /// 연결됨
    Connected = 2,
    /// 시가단일가
    OpeningOnePrice = 3,
    /// 단일가
    OnePrice = 4,
    /// 종가단일가
    ClosingOnePrice = 5,
    /// VI장중단일가
    ViOnePrice = 6,
    /// VI시가단일가
    ViOpeningOnePrice = 7,
    /// VI종가단일가
    ViClosingOnePrice = 8,
    /// 단위매매
    UnitTrade = 9,
    /// 장종료후호가접수
    PostMarket = 10,
    /// 경매매수호가 접수 세션
    AuctionBid = 11,
    /// 경매매도호가 접수 세션
    AuctionAsk = 12,
    /// 거래정지
    Suspended = 13,
    /// 셧다운
    Shutdown = 14,
    /// 장마감
    Closed = 15,
    /// 기타
    Etc = 16,
}
impl SessionId {
    /// 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 {
            SessionId::Unspecified => "SESSION_ID_UNSPECIFIED",
            SessionId::Previous => "PREVIOUS",
            SessionId::Connected => "CONNECTED",
            SessionId::OpeningOnePrice => "OPENING_ONE_PRICE",
            SessionId::OnePrice => "ONE_PRICE",
            SessionId::ClosingOnePrice => "CLOSING_ONE_PRICE",
            SessionId::ViOnePrice => "VI_ONE_PRICE",
            SessionId::ViOpeningOnePrice => "VI_OPENING_ONE_PRICE",
            SessionId::ViClosingOnePrice => "VI_CLOSING_ONE_PRICE",
            SessionId::UnitTrade => "UNIT_TRADE",
            SessionId::PostMarket => "POST_MARKET",
            SessionId::AuctionBid => "AUCTION_BID",
            SessionId::AuctionAsk => "AUCTION_ASK",
            SessionId::Suspended => "SUSPENDED",
            SessionId::Shutdown => "SHUTDOWN",
            SessionId::Closed => "CLOSED",
            SessionId::Etc => "ETC",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SESSION_ID_UNSPECIFIED" => Some(Self::Unspecified),
            "PREVIOUS" => Some(Self::Previous),
            "CONNECTED" => Some(Self::Connected),
            "OPENING_ONE_PRICE" => Some(Self::OpeningOnePrice),
            "ONE_PRICE" => Some(Self::OnePrice),
            "CLOSING_ONE_PRICE" => Some(Self::ClosingOnePrice),
            "VI_ONE_PRICE" => Some(Self::ViOnePrice),
            "VI_OPENING_ONE_PRICE" => Some(Self::ViOpeningOnePrice),
            "VI_CLOSING_ONE_PRICE" => Some(Self::ViClosingOnePrice),
            "UNIT_TRADE" => Some(Self::UnitTrade),
            "POST_MARKET" => Some(Self::PostMarket),
            "AUCTION_BID" => Some(Self::AuctionBid),
            "AUCTION_ASK" => Some(Self::AuctionAsk),
            "SUSPENDED" => Some(Self::Suspended),
            "SHUTDOWN" => Some(Self::Shutdown),
            "CLOSED" => Some(Self::Closed),
            "ETC" => Some(Self::Etc),
            _ => None,
        }
    }
}
include!("kdo.v1.market.tonic.rs");
include!("kdo.v1.market.serde.rs");
// @@protoc_insertion_point(module)