pub struct BinanceTrade {
pub subscription_id: SubscriptionId,
pub time: DateTime<Utc>,
pub id: u64,
pub price: Decimal,
pub amount: Decimal,
pub side: Side,
}Expand description
Binance real-time trade message.
Note:
For BinanceFuturesUsd this real-time stream is
undocumented.
See discord: https://discord.com/channels/910237311332151317/923160222711812126/975712874582388757
§Raw Payload Examples
See docs: https://binance-docs.github.io/apidocs/spot/en/#trade-streams
§Spot Side::Buy Trade
{
"e":"trade",
"E":1649324825173,
"s":"ETHUSDT",
"t":1000000000,
"p":"10000.19",
"q":"0.239000",
"b":10108767791,
"a":10108764858,
"T":1749354825200,
"m":false,
"M":true
}§FuturePerpetual Side::Sell Trade
{
"e": "trade",
"E": 1649839266194,
"T": 1749354825200,
"s": "ETHUSDT",
"t": 1000000000,
"p":"10000.19",
"q":"0.239000",
"X": "MARKET",
"m": true
}Fields§
§subscription_id: SubscriptionId§time: DateTime<Utc>§id: u64§price: Decimal§amount: Decimal§side: SideTrait Implementations§
Source§impl Clone for BinanceTrade
impl Clone for BinanceTrade
Source§fn clone(&self) -> BinanceTrade
fn clone(&self) -> BinanceTrade
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 BinanceTrade
impl Debug for BinanceTrade
Source§impl<'de> Deserialize<'de> for BinanceTrade
impl<'de> Deserialize<'de> for BinanceTrade
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 BinanceTrade
impl Identifier<Option<SubscriptionId>> for BinanceTrade
fn id(&self) -> Option<SubscriptionId>
Source§impl PartialEq for BinanceTrade
impl PartialEq for BinanceTrade
Source§fn eq(&self, other: &BinanceTrade) -> bool
fn eq(&self, other: &BinanceTrade) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for BinanceTrade
impl PartialOrd for BinanceTrade
Source§impl Serialize for BinanceTrade
impl Serialize for BinanceTrade
impl StructuralPartialEq for BinanceTrade
Auto Trait Implementations§
impl Freeze for BinanceTrade
impl RefUnwindSafe for BinanceTrade
impl Send for BinanceTrade
impl Sync for BinanceTrade
impl Unpin for BinanceTrade
impl UnsafeUnpin for BinanceTrade
impl UnwindSafe for BinanceTrade
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> 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