pub struct Ticker {
pub symbol: String,
pub bid: f64,
pub bid_size: f64,
pub ask: f64,
pub ask_size: f64,
pub daily_change: f64,
pub daily_change_relative: f64,
pub last_price: f64,
pub volume: f64,
pub high: f64,
pub low: f64,
}Expand description
Represents spot ticker data from the Bitfinex API.
Ticker struct contains fields matching those returned by the Bitfinex API
for spot ticker events. It serves as an interface for JSON deserialization
of spot trading market data, supporting both array and object-based responses.
Fields§
§symbol: StringThe symbol of the requested ticker data (e.g., “tBTCUSD”).
bid: f64Price of last highest bid.
bid_size: f64Sum of the 25 highest bid sizes.
ask: f64Price of last lowest ask.
ask_size: f64Sum of the 25 lowest ask sizes.
daily_change: f64The amount that the last price has changed since yesterday.
daily_change_relative: f64Relative price change since yesterday (*100 for percentage change).
last_price: f64Price of the last trade.
volume: f64Daily volume.
high: f64Daily high.
low: f64Daily low.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Ticker
impl<'de> Deserialize<'de> for Ticker
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
impl StructuralPartialEq for Ticker
Auto Trait Implementations§
impl Freeze for Ticker
impl RefUnwindSafe for Ticker
impl Send for Ticker
impl Sync for Ticker
impl Unpin for Ticker
impl UnsafeUnpin for Ticker
impl UnwindSafe for Ticker
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request