#[repr(align(64))]pub struct Transaction {
pub code: String,
pub sequential_id: u64,
pub price: Decimal,
pub volume: Decimal,
pub side: OrderSide,
pub trade_timestamp_ns: u64,
pub timestamp_ns: u64,
pub local_time_ns: 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>,
}Expand description
Processed trade transaction with additional information
Fields§
§code: StringMarket code (e.g., “KRW-BTC”)
sequential_id: u64Sequential ID (unique ID for the trade)
price: DecimalTrade price
volume: DecimalTrade volume
side: OrderSideTrade side (Buy/Sell)
trade_timestamp_ns: u64Trade timestamp in nanoseconds
timestamp_ns: u64Message timestamp in nanoseconds
local_time_ns: u64Local timestamp when processed (nanoseconds)
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
Implementations§
Source§impl Transaction
impl Transaction
Sourcepub fn from_trade_message(msg: &TradeMessage, local_time_ns: u64) -> Self
pub fn from_trade_message(msg: &TradeMessage, local_time_ns: u64) -> Self
Create a new transaction from a trade message
Trait Implementations§
Source§impl Clone for Transaction
impl Clone for Transaction
Source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
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 moreAuto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
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