pub struct OrderbookResponse {
pub topic: String,
pub message_type: String,
pub ts: u64,
pub data: OrderbookData,
}Expand description
Bybit Futures orderbook message response from WebSocket
Fields§
§topic: StringTopic being subscribed to (e.g., “orderbook.50.BTCUSDT”)
message_type: StringType of message (e.g., “snapshot” or “delta”)
ts: u64Timestamp in milliseconds (from Bybit server)
data: OrderbookDataLast update ID for orderbook synchronization
Implementations§
Source§impl OrderbookResponse
Implementation of OrderbookResponse
impl OrderbookResponse
Implementation of OrderbookResponse
Sourcepub const fn timestamp_ns(&self) -> u64
pub const fn timestamp_ns(&self) -> u64
Get the timestamp in nanoseconds
Sourcepub fn parse(&self) -> ParsedOrderbookData
pub fn parse(&self) -> ParsedOrderbookData
Parse into more efficient internal representation
Trait Implementations§
Source§impl Clone for OrderbookResponse
impl Clone for OrderbookResponse
Source§fn clone(&self) -> OrderbookResponse
fn clone(&self) -> OrderbookResponse
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 moreSource§impl Debug for OrderbookResponse
impl Debug for OrderbookResponse
Source§impl<'de> Deserialize<'de> for OrderbookResponse
impl<'de> Deserialize<'de> for OrderbookResponse
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 From<OrderbookResponse> for ParsedOrderbookData
impl From<OrderbookResponse> for ParsedOrderbookData
Source§fn from(response: OrderbookResponse) -> Self
fn from(response: OrderbookResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OrderbookResponse
impl RefUnwindSafe for OrderbookResponse
impl Send for OrderbookResponse
impl Sync for OrderbookResponse
impl Unpin for OrderbookResponse
impl UnwindSafe for OrderbookResponse
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