pub enum LighterWsFrame {
Show 18 variants
OrderBookSnapshot {
channel: Ustr,
last_updated_at: u64,
offset: i64,
order_book: LighterWsOrderBook,
timestamp: u64,
},
OrderBook {
channel: Ustr,
last_updated_at: u64,
offset: i64,
order_book: LighterWsOrderBook,
timestamp: u64,
},
TickerSnapshot {
channel: Ustr,
last_updated_at: u64,
nonce: i64,
ticker: LighterTicker,
timestamp: u64,
},
Ticker {
channel: Ustr,
last_updated_at: u64,
nonce: i64,
ticker: LighterTicker,
timestamp: u64,
},
MarketStats {
channel: Ustr,
market_stats: LighterMarketStatsPayload,
timestamp: u64,
},
SpotMarketStats {
channel: Ustr,
spot_market_stats: LighterSpotMarketStatsPayload,
timestamp: u64,
},
TradeSnapshot {
channel: Ustr,
liquidation_trades: Vec<LighterTrade>,
nonce: i64,
trades: Vec<LighterTrade>,
},
Trade {
channel: Ustr,
liquidation_trades: Vec<LighterTrade>,
nonce: i64,
trades: Vec<LighterTrade>,
},
AccountOrders {
account: i64,
channel: Ustr,
nonce: i64,
orders: AHashMap<Ustr, Vec<LighterOrder>>,
},
AccountAllOrders {
channel: Ustr,
orders: AHashMap<Ustr, Vec<LighterOrder>>,
},
AccountAllTradesSnapshot {
channel: Ustr,
trades: Vec<LighterTrade>,
total_volume: Decimal,
monthly_volume: Decimal,
weekly_volume: Decimal,
daily_volume: Decimal,
},
AccountAllTrades {
channel: Ustr,
trades: AHashMap<Ustr, Vec<LighterTrade>>,
},
AccountAllPositions {
channel: Ustr,
positions: AHashMap<Ustr, LighterPosition>,
shares: Vec<LighterPoolShares>,
last_funding_round: Option<AHashMap<Ustr, Decimal>>,
last_funding_discount: Option<AHashMap<Ustr, Decimal>>,
},
AccountAllAssets {
assets: AHashMap<Ustr, LighterAsset>,
channel: Ustr,
timestamp: u64,
},
UserStats {
channel: Ustr,
stats: LighterUserStats,
timestamp: u64,
},
Height {
channel: Ustr,
height: i64,
timestamp: u64,
},
CandleSnapshot {
channel: Ustr,
candles: Vec<LighterWsCandle>,
timestamp: u64,
},
Candle {
channel: Ustr,
candles: Vec<LighterWsCandle>,
timestamp: u64,
},
}Variants§
OrderBookSnapshot
OrderBook
TickerSnapshot
Ticker
MarketStats
SpotMarketStats
TradeSnapshot
Trade
AccountOrders
AccountAllOrders
AccountAllTradesSnapshot
Fields
§
channel: Ustr§
trades: Vec<LighterTrade>§
total_volume: Decimal§
monthly_volume: Decimal§
weekly_volume: Decimal§
daily_volume: DecimalAccountAllTrades
AccountAllPositions
AccountAllAssets
UserStats
Height
CandleSnapshot
Candle
Trait Implementations§
Source§impl Clone for LighterWsFrame
impl Clone for LighterWsFrame
Source§fn clone(&self) -> LighterWsFrame
fn clone(&self) -> LighterWsFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LighterWsFrame
impl Debug for LighterWsFrame
Source§impl<'de> Deserialize<'de> for LighterWsFrame
impl<'de> Deserialize<'de> for LighterWsFrame
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 LighterWsFrame
impl PartialEq for LighterWsFrame
Source§fn eq(&self, other: &LighterWsFrame) -> bool
fn eq(&self, other: &LighterWsFrame) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for LighterWsFrame
impl Serialize for LighterWsFrame
impl StructuralPartialEq for LighterWsFrame
Auto Trait Implementations§
impl Freeze for LighterWsFrame
impl RefUnwindSafe for LighterWsFrame
impl Send for LighterWsFrame
impl Sync for LighterWsFrame
impl Unpin for LighterWsFrame
impl UnsafeUnpin for LighterWsFrame
impl UnwindSafe for LighterWsFrame
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more