Struct BithumbProvider

Source
pub struct BithumbProvider { /* private fields */ }
Expand description

Bithumb market data provider

Implementations§

Source§

impl BithumbProvider

Source

pub fn new() -> Self

Create a new Bithumb provider with default configuration

Source

pub fn with_config(config: ConnectionConfig) -> Self

Create a new Bithumb provider with custom configuration

Trait Implementations§

Source§

impl Debug for BithumbProvider

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for BithumbProvider

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Provider for BithumbProvider

Source§

type TradeMessage = TradeMessage

Exchange-specific raw message type for trades from WebSocket
Source§

type DepthMessage = OrderbookMessage

Exchange-specific raw message type for orderbook updates from WebSocket
Source§

type InstrumentMessage = BithumbInstrument

Exchange-specific raw message type for instrument info
Source§

fn name(&self) -> &'static str

Returns the exchange name as a static String
Source§

fn venue(&self) -> Venue

Returns the venue enum value for this provider
Source§

fn config(&self) -> &ConnectionConfig

Returns reference to the connection configuration
Source§

fn init<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Initialize the provider with any necessary setup steps This method should be called before using other methods
Source§

fn shutdown<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Close all connections and clean up resources
Source§

fn get_realtime_orderbook<'life0, 'life1, 'async_trait>( &'life0 self, symbol: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<SharedSimdOrderBook>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get realtime shared orderbook for a symbol Returns a thread-safe shared orderbook that’s kept up-to-date
Source§

fn subscribe_trades<'life0, 'async_trait>( &'life0 self, symbols: SmallVec<[String; 8]>, ) -> Pin<Box<dyn Future<Output = Result<Receiver<Self::TradeMessage>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to trade data stream for multiple symbols Returns a channel receiver for trade messages Uses SmallVec to avoid heap allocations for small numbers of symbols
Source§

fn unsubscribe_trades<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unsubscribe from trade data
Source§

fn subscribe_orderbook<'life0, 'async_trait>( &'life0 self, symbols: SmallVec<[String; 8]>, ) -> Pin<Box<dyn Future<Output = Result<Receiver<Self::DepthMessage>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to orderbook depth data for multiple symbols Returns a channel receiver for depth messages Uses SmallVec to avoid heap allocations for small numbers of symbols
Source§

fn unsubscribe_orderbook<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unsubscribe from orderbook depth data
Source§

fn get_instruments<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<Box<dyn Instrument>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all available trading instruments from the exchange
Source§

fn get_historical_trades<'life0, 'life1, 'async_trait>( &'life0 self, symbol: &'life1 str, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<MarketTrade>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get historical trades for a symbol Optionally limit the number of trades returned
Source§

fn get_orderbook_snapshot<'life0, 'life1, 'async_trait>( &'life0 self, symbol: &'life1 str, depth: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<OrderBookSnapshot>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get current orderbook snapshot for a symbol Optionally specify the depth of the orderbook
Source§

fn is_connected<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Check if provider is connected to exchange Default implementation returns false - exchanges should override
Source§

fn connection_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ConnectionState> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get detailed connection status Default implementation returns Disconnected - exchanges should override
Source§

fn get_stats<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ConnectionStats> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get connection statistics for monitoring Default implementation returns empty stats - exchanges should override
Source§

fn ping<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Ping the exchange to keep the connection alive Returns round-trip time in nanoseconds Default implementation returns 0 - exchanges should override
Source§

fn reset_connection<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reset connection (force reconnect) Default implementation does nothing - exchanges should override
Source§

fn get_rate_limits(&self) -> Vec<RateLimit>

Get the exchange-specific rate limits Default implementation returns empty vector - exchanges should override
Source§

fn start_provide_depth<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Receiver<Self::DepthMessage>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Start providing depth data Returns a receiver for depth messages Default implementation returns error - exchanges should override
Source§

fn stop_provide_depth<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stop providing depth data Default implementation does nothing
Source§

fn start_provide_trade<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Receiver<Self::TradeMessage>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Start providing trade data Returns a receiver for trade messages Default implementation returns error - exchanges should override
Source§

fn stop_provide_trade<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Stop providing trade data Default implementation does nothing
Source§

fn health_check<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Check if provider is operational Returns true if the provider is functioning correctly
Source§

fn convert_exchange_timestamp(&self, exchange_timestamp: u64) -> u64

High-performance timestamp conversion method Uses cached timestamp conversions when possible and provides optimized conversion when timestamps are a known format. Read more
Source§

fn convert_iso8601_timestamp(&self, iso_timestamp: &str) -> Option<u64>

Convert ISO8601 timestamp String to nanoseconds with caching for frequent values This method should be used for exchanges that provide timestamps as ISO8601 strings such as Coinbase.
Source§

fn current_time_nanos(&self) -> u64

Get current time in nanoseconds from the provider’s clock This method uses the shared clock to ensure consistent timekeeping across all parts of the exchange provider.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,