Skip to main content

parse_ws_fill_report_fast

Function parse_ws_fill_report_fast 

Source
pub fn parse_ws_fill_report_fast(
    execution: &BybitWsAccountExecutionFast,
    account_id: AccountId,
    instrument: &InstrumentAny,
    venue_position_id: Option<PositionId>,
    ts_init: UnixNanos,
) -> Result<FillReport>
Expand description

Parses a fast-stream WebSocket execution payload into a [FillReport].

The execution.fast channel omits fee and exec-type fields, so the resulting report carries zero commission. Liquidity side is derived from the payload’s isMaker flag. Pair with the standard execution channel if exact fee data is required.

venue_position_id should be supplied for tracked hedge-mode orders so the emitted report carries the long/short position identity that the standard channel preserves via OrderFilled.

§Errors

Returns an error if price or quantity fields cannot be parsed or timestamps are invalid.