pub struct MarketData {
pub symbol: String,
pub last_price: Money,
pub bid: Option<Money>,
pub ask: Option<Money>,
pub volume_24h: Option<Decimal>,
pub high_24h: Option<Money>,
pub low_24h: Option<Money>,
pub change_24h: Option<Money>,
pub change_percent_24h: Option<Decimal>,
pub market_status: MarketStatus,
pub timestamp: DateTime<Utc>,
}Expand description
Real-time market data for an instrument.
Fields§
§symbol: StringTrading symbol.
last_price: MoneyLast traded price.
bid: Option<Money>Best bid price.
ask: Option<Money>Best ask price.
volume_24h: Option<Decimal>24-hour volume.
high_24h: Option<Money>24-hour high.
low_24h: Option<Money>24-hour low.
change_24h: Option<Money>Price change in the last 24 hours.
change_percent_24h: Option<Decimal>Percentage change in the last 24 hours.
market_status: MarketStatusCurrent market status.
timestamp: DateTime<Utc>Timestamp of the data.
Implementations§
Trait Implementations§
Source§impl Clone for MarketData
impl Clone for MarketData
Source§impl Debug for MarketData
impl Debug for MarketData
Source§impl<'de> Deserialize<'de> for MarketData
impl<'de> Deserialize<'de> for MarketData
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
Source§impl PartialEq for MarketData
impl PartialEq for MarketData
Source§impl Serialize for MarketData
impl Serialize for MarketData
impl StructuralPartialEq for MarketData
Auto Trait Implementations§
impl Forget for MarketData
impl Freeze for MarketData
impl Move for MarketData
impl RefUnwindSafe for MarketData
impl Send for MarketData
impl Sync for MarketData
impl Unpin for MarketData
impl UnsafeUnpin for MarketData
impl UnwindSafe for MarketData
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