Skip to main content

parse_ws_position_status_report

Function parse_ws_position_status_report 

Source
pub fn parse_ws_position_status_report(
    position: &LighterPosition,
    instrument: &InstrumentAny,
    account_id: AccountId,
    ts_event: UnixNanos,
    ts_init: UnixNanos,
) -> Result<PositionStatusReport>
Expand description

Parses a Lighter position payload into a [PositionStatusReport].

The account_all_positions frame carries no top-level event timestamp; callers should pass the wall-clock arrival time captured by the handler.

ยงErrors

Returns an error if the size or entry price cannot be converted.