pub struct ActivityTrade {
pub market_id: String,
pub asset_id: String,
pub trade_id: Option<String>,
pub price: f64,
pub size: f64,
pub side: Option<String>,
pub aggressor_side: Option<String>,
pub outcome: Option<String>,
pub fee_rate_bps: Option<u32>,
pub exchange_ts_ms: Option<u64>,
pub source_channel: Cow<'static, str>,
}Expand description
Activity events still carried inside WsUpdate::Trade / WsUpdate::Fill.
Retained as a typed payload alongside the stream rather than as a separate
per-token surface.
exchange_ts_ms is exchange-authoritative millis since epoch — uniform
with WsUpdate::{Snapshot, Delta}::exchange_ts, so every timestamp on
the WS surface is the same type (u64 millis). chrono::DateTime was
more expressive but cost a representation mismatch at every FFI boundary.
Fields§
§market_id: String§asset_id: String§trade_id: Option<String>§price: f64§size: f64§side: Option<String>§aggressor_side: Option<String>§outcome: Option<String>§fee_rate_bps: Option<u32>Fee rate in basis points (e.g. 0 = no fee, 200 = 2%). Polymarket
last_trade_price events populate this.
exchange_ts_ms: Option<u64>Exchange-authoritative timestamp (millis since epoch).
source_channel: Cow<'static, str>Trait Implementations§
Source§impl Clone for ActivityTrade
impl Clone for ActivityTrade
Source§fn clone(&self) -> ActivityTrade
fn clone(&self) -> ActivityTrade
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ActivityTrade
impl Debug for ActivityTrade
Source§impl<'de> Deserialize<'de> for ActivityTrade
impl<'de> Deserialize<'de> for ActivityTrade
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 ActivityTrade
impl RefUnwindSafe for ActivityTrade
impl Send for ActivityTrade
impl Sync for ActivityTrade
impl Unpin for ActivityTrade
impl UnsafeUnpin for ActivityTrade
impl UnwindSafe for ActivityTrade
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