pub struct BinanceKline {
pub subscription_id: SubscriptionId,
pub kline: BinanceKlineData,
}Expand description
BinanceSpot real-time kline (candle) message.
§Raw Payload Example
See docs: https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-streams
{
"e": "kline",
"E": 1638747660000,
"s": "BTCUSDT",
"k": {
"t": 1638747660000, "T": 1638747719999, "s": "BTCUSDT", "i": "1m",
"f": 100, "L": 200, "o": "0.0010", "c": "0.0020", "h": "0.0025",
"l": "0.0015", "v": "1000", "n": 100, "x": false, "q": "1.0000",
"V": "500", "Q": "0.500", "B": "123456"
}
}Fields§
§subscription_id: SubscriptionIdInstrument-map routing key {channel}|{MARKET} (e.g. @kline_1m|BTCUSDT), baked at
deserialize from the top-level symbol (s) and the inner interval (k.i) by reusing
ExchangeSub::id — the single source of truth shared with
subscribe-time key construction. Baking here (rather than re-deriving per frame in id())
means the subscribe-time and frame-time keys cannot drift and silently misroute.
kline: BinanceKlineDataTrait Implementations§
Source§impl Clone for BinanceKline
impl Clone for BinanceKline
Source§fn clone(&self) -> BinanceKline
fn clone(&self) -> BinanceKline
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 BinanceKline
impl Debug for BinanceKline
Source§impl<'de> Deserialize<'de> for BinanceKline
impl<'de> Deserialize<'de> for BinanceKline
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 BinanceKline
impl Identifier<Option<SubscriptionId>> for BinanceKline
fn id(&self) -> Option<SubscriptionId>
Source§impl PartialEq for BinanceKline
impl PartialEq for BinanceKline
Source§fn eq(&self, other: &BinanceKline) -> bool
fn eq(&self, other: &BinanceKline) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for BinanceKline
impl PartialOrd for BinanceKline
impl StructuralPartialEq for BinanceKline
Auto Trait Implementations§
impl Freeze for BinanceKline
impl RefUnwindSafe for BinanceKline
impl Send for BinanceKline
impl Sync for BinanceKline
impl Unpin for BinanceKline
impl UnsafeUnpin for BinanceKline
impl UnwindSafe for BinanceKline
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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