pub struct BybitFuturesFeeder { /* private fields */ }Expand description
Bybit Futures feeder implementation
Implementations§
Source§impl BybitFuturesFeeder
impl BybitFuturesFeeder
Sourcepub fn with_config(config: ConnectionConfig) -> Self
pub fn with_config(config: ConnectionConfig) -> Self
Create a new Bybit Futures feeder with custom configuration
Source§impl BybitFuturesFeeder
impl BybitFuturesFeeder
Sourcepub fn convert_trade_message(
trade_data: &TradeData,
_msg: &MarketTradeResponse,
instrument_id: &InstrumentId,
clock: &Clock,
) -> Result<MarketTrade>
pub fn convert_trade_message( trade_data: &TradeData, _msg: &MarketTradeResponse, instrument_id: &InstrumentId, clock: &Clock, ) -> Result<MarketTrade>
Static method to convert trade message to normalized MarketTrade
Sourcepub fn convert_depth_message(
msg: &OrderbookResponse,
instrument_id: &InstrumentId,
max_depth: usize,
clock: &Clock,
) -> Result<OrderBookSnapshot>
pub fn convert_depth_message( msg: &OrderbookResponse, instrument_id: &InstrumentId, max_depth: usize, clock: &Clock, ) -> Result<OrderBookSnapshot>
Static method to convert depth message to normalized OrderBookSnapshot
Trait Implementations§
Source§impl Debug for BybitFuturesFeeder
impl Debug for BybitFuturesFeeder
Source§impl Default for BybitFuturesFeeder
impl Default for BybitFuturesFeeder
Source§impl Feeder for BybitFuturesFeeder
impl Feeder for BybitFuturesFeeder
Source§type DepthMessage = OrderbookResponse
type DepthMessage = OrderbookResponse
Raw message type from the exchange for depth/orderbook
Source§type TradeMessage = TradeResponse
type TradeMessage = TradeResponse
Raw message type from the exchange for trades
Source§fn start_feed_depth<'life0, 'async_trait>(
&'life0 self,
instrument_id: InstrumentId,
depth_rx: Receiver<Self::DepthMessage>,
options: Option<FeederOptions>,
) -> Pin<Box<dyn Future<Output = Result<Receiver<OrderBookSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_feed_depth<'life0, 'async_trait>(
&'life0 self,
instrument_id: InstrumentId,
depth_rx: Receiver<Self::DepthMessage>,
options: Option<FeederOptions>,
) -> Pin<Box<dyn Future<Output = Result<Receiver<OrderBookSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start processing and normalizing orderbook depth data
Processes raw depth messages into standardized order book depth format
Source§fn stop_feed_depth<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument_id: &'life1 InstrumentId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stop_feed_depth<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument_id: &'life1 InstrumentId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stop processing orderbook depth data for a specific instrument
Source§fn start_feed_trades<'life0, 'async_trait>(
&'life0 self,
instrument_id: InstrumentId,
trade_rx: Receiver<Self::TradeMessage>,
options: Option<FeederOptions>,
) -> Pin<Box<dyn Future<Output = Result<Receiver<MarketTrade>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_feed_trades<'life0, 'async_trait>(
&'life0 self,
instrument_id: InstrumentId,
trade_rx: Receiver<Self::TradeMessage>,
options: Option<FeederOptions>,
) -> Pin<Box<dyn Future<Output = Result<Receiver<MarketTrade>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start processing and normalizing trade data
Processes raw trade messages into standardized trade format
Source§fn stop_feed_trades<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument_id: &'life1 InstrumentId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stop_feed_trades<'life0, 'life1, 'async_trait>(
&'life0 self,
instrument_id: &'life1 InstrumentId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stop processing trade data for a specific instrument
Source§fn start_feed_bars<'life0, 'async_trait>(
&'life0 self,
_instrument_id: InstrumentId,
_bar_type: BarType,
_trade_rx: Receiver<MarketTrade>,
_options: Option<FeederOptions>,
) -> Pin<Box<dyn Future<Output = Result<Receiver<Bar>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_feed_bars<'life0, 'async_trait>(
&'life0 self,
_instrument_id: InstrumentId,
_bar_type: BarType,
_trade_rx: Receiver<MarketTrade>,
_options: Option<FeederOptions>,
) -> Pin<Box<dyn Future<Output = Result<Receiver<Bar>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start generating bars from trade data
Aggregates trade data into OHLCV bars of the specified type
Source§fn stop_feed_bars<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_instrument_id: &'life1 InstrumentId,
_bar_type: &'life2 BarType,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn stop_feed_bars<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_instrument_id: &'life1 InstrumentId,
_bar_type: &'life2 BarType,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Stop generating bars for a specific instrument and bar type
Get a real-time shared orderbook for a specific instrument
Returns a thread-safe shared orderbook that’s kept up-to-date
Source§fn get_bar_cache<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_instrument_id: &'life1 InstrumentId,
_bar_type: &'life2 BarType,
_max_bars: usize,
) -> Pin<Box<dyn Future<Output = Result<Arc<RwLock<BarCache>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_bar_cache<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_instrument_id: &'life1 InstrumentId,
_bar_type: &'life2 BarType,
_max_bars: usize,
) -> Pin<Box<dyn Future<Output = Result<Arc<RwLock<BarCache>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get a bar cache for a specific instrument and bar type
Returns a bar cache with recent bar data
Auto Trait Implementations§
impl Freeze for BybitFuturesFeeder
impl !RefUnwindSafe for BybitFuturesFeeder
impl Send for BybitFuturesFeeder
impl Sync for BybitFuturesFeeder
impl Unpin for BybitFuturesFeeder
impl !UnwindSafe for BybitFuturesFeeder
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