pub struct OrderLog {Show 18 fields
pub id: i64,
pub order_id: u64,
pub original_order_id: Option<u64>,
pub fund_code: String,
pub symbol: String,
pub log_type: i32,
pub side: i32,
pub order_type: i32,
pub price: String,
pub quantity: String,
pub filled_price: Option<String>,
pub filled_quantity: Option<String>,
pub filled_amount: Option<String>,
pub rejection_code: Option<String>,
pub error_message: Option<String>,
pub event_time: u64,
pub receive_time: u64,
pub created_at: Option<Timestamp>,
}Expand description
주문 로그
Fields§
§id: i64로그 고유 ID (DB에서 자동 생성)
order_id: u64주문 ID (거래소에서 받은 ID)
original_order_id: Option<u64>원본 주문 ID (수정/취소의 경우)
Option
fund_code: String펀드 코드
symbol: String심볼
log_type: i32로그 타입
side: i32주문 방향 (매수/매도)
order_type: i32주문 타입 (신규/정정/취소)
price: String주문 가격 (Price) 정확도 유지를 위해 string 또는 고정 소수점(fixed64 등)을 사용할 수 있으나, 여기서는 간단하게 string으로 가정
quantity: String주문 수량 (Quantity) 정확도 유지를 위해 string 또는 고정 소수점(fixed64 등)을 사용할 수 있으나, 여기서는 간단하게 string으로 가정
filled_price: Option<String>체결 가격 (Filled 로그의 경우) (FilledPrice)
filled_quantity: Option<String>체결 수량 (Filled 로그의 경우) (FilledQuantity)
filled_amount: Option<String>체결 금액 (계산값) (FilledAmount)
rejection_code: Option<String>거부/취소 코드
error_message: Option<String>에러 메시지 (MeritzRejected의 경우)
event_time: u64이벤트 발생 시각 (거래소 시각, 마이크로초) Rust Timestamp 타입을 u64로 가정
receive_time: u64이벤트 수신 시각 (시스템 시각, 마이크로초) Rust Timestamp 타입을 u64로 가정
created_at: Option<Timestamp>DB 삽입 시각
Rust의 DateTime
Implementations§
Source§impl OrderLog
impl OrderLog
Sourcepub fn original_order_id(&self) -> u64
pub fn original_order_id(&self) -> u64
Returns the value of original_order_id, or the default value if original_order_id is unset.
Sourcepub fn log_type(&self) -> OrderLogType
pub fn log_type(&self) -> OrderLogType
Returns the enum value of log_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_log_type(&mut self, value: OrderLogType)
pub fn set_log_type(&mut self, value: OrderLogType)
Sets log_type to the provided enum value.
Sourcepub fn side(&self) -> OrderSide
pub fn side(&self) -> OrderSide
Returns the enum value of side, or the default if the field is set to an invalid enum value.
Sourcepub fn order_type(&self) -> OrderType
pub fn order_type(&self) -> OrderType
Returns the enum value of order_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_order_type(&mut self, value: OrderType)
pub fn set_order_type(&mut self, value: OrderType)
Sets order_type to the provided enum value.
Sourcepub fn filled_price(&self) -> &str
pub fn filled_price(&self) -> &str
Returns the value of filled_price, or the default value if filled_price is unset.
Sourcepub fn filled_quantity(&self) -> &str
pub fn filled_quantity(&self) -> &str
Returns the value of filled_quantity, or the default value if filled_quantity is unset.
Sourcepub fn filled_amount(&self) -> &str
pub fn filled_amount(&self) -> &str
Returns the value of filled_amount, or the default value if filled_amount is unset.
Sourcepub fn rejection_code(&self) -> &str
pub fn rejection_code(&self) -> &str
Returns the value of rejection_code, or the default value if rejection_code is unset.
Sourcepub fn error_message(&self) -> &str
pub fn error_message(&self) -> &str
Returns the value of error_message, or the default value if error_message is unset.
Trait Implementations§
§impl<'de> Deserialize<'de> for OrderLog
impl<'de> Deserialize<'de> for OrderLog
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for OrderLog
impl Message for OrderLog
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for OrderLog
Auto Trait Implementations§
impl Freeze for OrderLog
impl RefUnwindSafe for OrderLog
impl Send for OrderLog
impl Sync for OrderLog
impl Unpin for OrderLog
impl UnwindSafe for OrderLog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request