pub struct MarketDataClient { /* private fields */ }Implementations§
Source§impl MarketDataClient
impl MarketDataClient
pub fn new(base_url: &str) -> Self
pub fn with_transport(base_url: &str, transport: TransportConfig) -> Self
Sourcepub fn endpoint_url(&self) -> &str
pub fn endpoint_url(&self) -> &str
WebSocket URL used for market data.
pub fn is_connected(&self) -> bool
Sourcepub fn auto_reconnect_enabled(&self) -> bool
pub fn auto_reconnect_enabled(&self) -> bool
When true, the client will reconnect after the socket drops (unless disconnect was called).
pub fn take_event_receiver(&mut self) -> Option<Receiver<(String, Value)>>
pub fn take_reconnect_receiver(&mut self) -> Option<Receiver<ReconnectEvent>>
pub async fn connect(&mut self) -> Result<(), GodarkError>
pub async fn disconnect(&mut self)
pub async fn subscribe_orderbook( &mut self, symbol: &str, ) -> Result<(), GodarkError>
pub async fn subscribe_trades( &mut self, symbol: &str, ) -> Result<(), GodarkError>
Sourcepub async fn subscribe_public_channel(
&mut self,
channel: &str,
) -> Result<(), GodarkError>
pub async fn subscribe_public_channel( &mut self, channel: &str, ) -> Result<(), GodarkError>
Public edge channel on /ws/v1 (no auth): volume, open_interest, funding_rate.
pub async fn unsubscribe( &mut self, channel: &str, symbol: &str, ) -> Result<(), GodarkError>
Auto Trait Implementations§
impl !RefUnwindSafe for MarketDataClient
impl !UnwindSafe for MarketDataClient
impl Forget for MarketDataClient
impl Freeze for MarketDataClient
impl Move for MarketDataClient
impl Send for MarketDataClient
impl Sync for MarketDataClient
impl Unpin for MarketDataClient
impl UnsafeUnpin for MarketDataClient
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