pub enum PolygonEvent {
Status {
status: String,
message: String,
},
Trade {
symbol: String,
timestamp: i64,
price: f64,
size: u64,
conditions: Vec<i32>,
exchange: u8,
},
Quote {
symbol: String,
timestamp: i64,
bid_price: f64,
ask_price: f64,
bid_size: u64,
ask_size: u64,
bid_exchange: u8,
ask_exchange: u8,
},
AggregateBar {
symbol: String,
start_timestamp: i64,
end_timestamp: i64,
open: f64,
high: f64,
low: f64,
close: f64,
volume: u64,
vwap: f64,
},
Level2 {
symbol: String,
timestamp: i64,
bids: Vec<PriceLevel>,
asks: Vec<PriceLevel>,
},
}Expand description
Market event types from Polygon WebSocket Uses custom deserialization because Polygon sends flat JSON with “ev” field
Variants§
Status
Status message
Trade
Trade tick (T.* channel)
Quote
Quote tick (Q.* channel)
Fields
AggregateBar
Aggregate bar (AM.* channel)
Fields
Level2
Level 2 book data (L2.* channel)
Trait Implementations§
Source§impl Clone for PolygonEvent
impl Clone for PolygonEvent
Source§fn clone(&self) -> PolygonEvent
fn clone(&self) -> PolygonEvent
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 PolygonEvent
impl Debug for PolygonEvent
Source§impl<'de> Deserialize<'de> for PolygonEvent
impl<'de> Deserialize<'de> for PolygonEvent
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 PolygonEvent
impl RefUnwindSafe for PolygonEvent
impl Send for PolygonEvent
impl Sync for PolygonEvent
impl Unpin for PolygonEvent
impl UnwindSafe for PolygonEvent
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