pub struct Binance { /* private fields */ }
Expand description
Binance Gateway
The binance gateway requires to fetch order book snapshots via Rest and maintain the book updates in memory with messages coming from the websocket api. For more information check binance documentation
Implementations
Trait Implementations
sourceimpl Gateway for Binance
impl Gateway for Binance
sourcefn ws_consumer(&self) -> WsConsumer
fn ws_consumer(&self) -> WsConsumer
return the websocket consumer for this gateway
fn setup(&self)
sourcefn unsubscribe(&mut self, symbols: &[String])
fn unsubscribe(&mut self, symbols: &[String])
unsubscribe from a set of assets
sourcefn request_snapshot(&mut self)
fn request_snapshot(&mut self)
Request book snapshots
sourcefn on_websocket_message(&mut self, value: Value) -> Option<WsUpdate>
fn on_websocket_message(&mut self, value: Value) -> Option<WsUpdate>
handle a websocket message from exchange
sourcefn on_book_snapshot(&mut self, snapshot: BookSnapshot) -> Option<Book>
fn on_book_snapshot(&mut self, snapshot: BookSnapshot) -> Option<Book>
handle a book snapshot
Auto Trait Implementations
impl !RefUnwindSafe for Binance
impl Send for Binance
impl Sync for Binance
impl Unpin for Binance
impl !UnwindSafe for Binance
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more