#[repr(align(64))]pub struct TradeMessage {Show 18 fields
pub message_type: String,
pub code: String,
pub trade_price: Decimal,
pub trade_volume: Decimal,
pub ask_bid: String,
pub prev_closing_price: Decimal,
pub change: String,
pub change_price: Decimal,
pub trade_date: String,
pub trade_time: String,
pub trade_timestamp: u64,
pub timestamp: u64,
pub sequential_id: u64,
pub best_ask_price: Option<Decimal>,
pub best_ask_size: Option<Decimal>,
pub best_bid_price: Option<Decimal>,
pub best_bid_size: Option<Decimal>,
pub stream_type: String,
}Expand description
Raw trade message from Upbit WebSocket
Fields§
§message_type: StringMessage type
code: StringMarket code (e.g., “KRW-BTC”)
trade_price: DecimalTrade price
trade_volume: DecimalTrade volume
ask_bid: StringAsk/Bid indicator
prev_closing_price: DecimalPrevious day’s closing price
change: StringChange direction (RISE, EVEN, FALL)
change_price: DecimalChange amount (absolute value)
trade_date: StringTrade date (UTC) in yyyy-MM-dd format
trade_time: StringTrade time (UTC) in HH:mm:ss format
trade_timestamp: u64Trade timestamp in milliseconds
timestamp: u64Message timestamp in milliseconds
sequential_id: u64Sequential ID (unique for each trade)
best_ask_price: Option<Decimal>Best ask price at the time of trade
best_ask_size: Option<Decimal>Best ask size at the time of trade
best_bid_price: Option<Decimal>Best bid price at the time of trade
best_bid_size: Option<Decimal>Best bid size at the time of trade
stream_type: StringStream type (SNAPSHOT or REALTIME)
Trait Implementations§
Source§impl Clone for TradeMessage
impl Clone for TradeMessage
Source§fn clone(&self) -> TradeMessage
fn clone(&self) -> TradeMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TradeMessage
impl Debug for TradeMessage
Source§impl<'de> Deserialize<'de> for TradeMessage
impl<'de> Deserialize<'de> for TradeMessage
Source§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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TradeMessage
impl RefUnwindSafe for TradeMessage
impl Send for TradeMessage
impl Sync for TradeMessage
impl Unpin for TradeMessage
impl UnwindSafe for TradeMessage
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
Mutably borrows from an owned value. Read more