Struct barter_data::exchange::bitfinex::message::BitfinexMessage
source · pub struct BitfinexMessage {
pub channel_id: u32,
pub payload: BitfinexPayload,
}Expand description
Bitfinex message received over
WebSocket relating to an active
Subscription.
The message is associated with the original Subscription using the
channel_id field as the SubscriptionId.
Raw Payload Examples
Heartbeat
See docs: https://docs.bitfinex.com/docs/ws-general#heartbeating
[420191,"hb"]
Side::Buy Trade
See docs: https://docs.bitfinex.com/reference/ws-public-trades
[420191,"te",[1225484398,1665452200022,0.08980641,19027.02807752]]
Side::Sell Trade
See docs: https://docs.bitfinex.com/reference/ws-public-trades
[420191,"te",[1225484398,1665452200022,-0.08980641,19027.02807752]]
Fields§
§channel_id: u32§payload: BitfinexPayloadTrait Implementations§
source§impl Clone for BitfinexMessage
impl Clone for BitfinexMessage
source§fn clone(&self) -> BitfinexMessage
fn clone(&self) -> BitfinexMessage
Returns a copy 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 BitfinexMessage
impl Debug for BitfinexMessage
source§impl<'de> Deserialize<'de> for BitfinexMessage
impl<'de> Deserialize<'de> for BitfinexMessage
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 Identifier<Option<SubscriptionId>> for BitfinexMessage
impl Identifier<Option<SubscriptionId>> for BitfinexMessage
fn id(&self) -> Option<SubscriptionId>
source§impl PartialEq<BitfinexMessage> for BitfinexMessage
impl PartialEq<BitfinexMessage> for BitfinexMessage
source§fn eq(&self, other: &BitfinexMessage) -> bool
fn eq(&self, other: &BitfinexMessage) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<BitfinexMessage> for BitfinexMessage
impl PartialOrd<BitfinexMessage> for BitfinexMessage
source§fn partial_cmp(&self, other: &BitfinexMessage) -> Option<Ordering>
fn partial_cmp(&self, other: &BitfinexMessage) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more