pub struct BinanceFuturesExecWsFeedHandler { /* private fields */ }Expand description
Binance Futures execution WebSocket handler.
Processes user data stream messages and maintains pending order state to correlate WebSocket updates with the original order context.
Implementations§
Source§impl BinanceFuturesExecWsFeedHandler
impl BinanceFuturesExecWsFeedHandler
Sourcepub fn new(
clock: &'static AtomicTime,
trader_id: TraderId,
account_id: AccountId,
account_type: AccountType,
product_type: BinanceProductType,
signal: Arc<AtomicBool>,
triggered_algo_order_ids: Arc<RwLock<AHashSet<ClientOrderId>>>,
cmd_rx: UnboundedReceiver<ExecHandlerCommand>,
msg_rx: UnboundedReceiver<NautilusWsMessage>,
) -> Self
pub fn new( clock: &'static AtomicTime, trader_id: TraderId, account_id: AccountId, account_type: AccountType, product_type: BinanceProductType, signal: Arc<AtomicBool>, triggered_algo_order_ids: Arc<RwLock<AHashSet<ClientOrderId>>>, cmd_rx: UnboundedReceiver<ExecHandlerCommand>, msg_rx: UnboundedReceiver<NautilusWsMessage>, ) -> Self
Creates a new BinanceFuturesExecWsFeedHandler instance.
Sourcepub async fn next(&mut self) -> Option<NautilusExecWsMessage>
pub async fn next(&mut self) -> Option<NautilusExecWsMessage>
Processes commands and messages, returning the next output event.
Sourcepub fn is_triggered_algo_order(&self, client_order_id: &ClientOrderId) -> bool
pub fn is_triggered_algo_order(&self, client_order_id: &ClientOrderId) -> bool
Returns whether a client order ID is a triggered algo order.
This is used to determine which cancel endpoint to use:
- Non-triggered algo orders use
DELETE /fapi/v1/algoOrder - Triggered algo orders use regular
DELETE /fapi/v1/order
§Panics
Panics if triggered_algo_order_ids lock is poisoned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BinanceFuturesExecWsFeedHandler
impl RefUnwindSafe for BinanceFuturesExecWsFeedHandler
impl Send for BinanceFuturesExecWsFeedHandler
impl Sync for BinanceFuturesExecWsFeedHandler
impl Unpin for BinanceFuturesExecWsFeedHandler
impl UnsafeUnpin for BinanceFuturesExecWsFeedHandler
impl UnwindSafe for BinanceFuturesExecWsFeedHandler
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more