pub struct OrderbookService { /* private fields */ }Implementations§
Source§impl OrderbookService
impl OrderbookService
pub fn new(ctx: ServiceContext) -> Self
Sourcepub async fn get(
&self,
symbol: &str,
depth: Option<u32>,
) -> Result<OrderbookData>
pub async fn get( &self, symbol: &str, depth: Option<u32>, ) -> Result<OrderbookData>
Snapshot orderbook for symbol. depth maps like Go (None / 0 → depth 5 bucket).
Sourcepub async fn subscribe_deltas(
&self,
symbol_id: u32,
depth: Option<u32>,
) -> Result<TypedSubscription<OrderBookDeltaUpdate>>
pub async fn subscribe_deltas( &self, symbol_id: u32, depth: Option<u32>, ) -> Result<TypedSubscription<OrderBookDeltaUpdate>>
Subscribe to public orderbook delta updates (requires realtime feature).
Sourcepub async fn create_subscription(
&self,
opts: CreateSubscriptionOptions,
) -> Result<Subscription>
pub async fn create_subscription( &self, opts: CreateSubscriptionOptions, ) -> Result<Subscription>
Snapshot-then-stream orderbook merging (requires realtime feature).
Trait Implementations§
Source§impl Clone for OrderbookService
impl Clone for OrderbookService
Source§fn clone(&self) -> OrderbookService
fn clone(&self) -> OrderbookService
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 moreAuto Trait Implementations§
impl !Freeze for OrderbookService
impl !RefUnwindSafe for OrderbookService
impl !UnwindSafe for OrderbookService
impl Send for OrderbookService
impl Sync for OrderbookService
impl Unpin for OrderbookService
impl UnsafeUnpin for OrderbookService
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