pub struct CoinbaseTrade {
pub subscription_id: SubscriptionId,
pub id: u64,
pub time: DateTime<Utc>,
pub amount: f64,
pub price: f64,
pub side: Side,
}
Expand description
Coinbase real-time trade WebSocket message.
§Raw Payload Examples
See docs: https://docs.cloud.coinbase.com/exchange/docs/websocket-channels#match
{
"type": "match",
"trade_id": 10,
"sequence": 50,
"maker_order_id": "ac928c66-ca53-498f-9c13-a110027a60e8",
"taker_order_id": "132fb6ae-456b-4654-b4e0-d681ac05cea1",
"time": "2014-11-07T08:19:27.028459Z",
"product_id": "BTC-USD",
"size": "5.23512",
"price":
"400.23",
"side": "sell"
}
Fields§
§subscription_id: SubscriptionId
§id: u64
§time: DateTime<Utc>
§amount: f64
§price: f64
§side: Side
Trait Implementations§
Source§impl Clone for CoinbaseTrade
impl Clone for CoinbaseTrade
Source§fn clone(&self) -> CoinbaseTrade
fn clone(&self) -> CoinbaseTrade
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 CoinbaseTrade
impl Debug for CoinbaseTrade
Source§impl<'de> Deserialize<'de> for CoinbaseTrade
impl<'de> Deserialize<'de> for CoinbaseTrade
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 CoinbaseTrade
impl Identifier<Option<SubscriptionId>> for CoinbaseTrade
fn id(&self) -> Option<SubscriptionId>
Source§impl PartialEq for CoinbaseTrade
impl PartialEq for CoinbaseTrade
Source§impl PartialOrd for CoinbaseTrade
impl PartialOrd for CoinbaseTrade
Source§impl Serialize for CoinbaseTrade
impl Serialize for CoinbaseTrade
impl StructuralPartialEq for CoinbaseTrade
Auto Trait Implementations§
impl Freeze for CoinbaseTrade
impl RefUnwindSafe for CoinbaseTrade
impl Send for CoinbaseTrade
impl Sync for CoinbaseTrade
impl Unpin for CoinbaseTrade
impl UnwindSafe for CoinbaseTrade
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