Skip to main content

Module parse

Module parse 

Source
Expand description

Parsers from Lighter streaming payloads to Nautilus domain types.

Functionsยง

account_balance_from_lighter_asset
Builds the per-asset [AccountBalance] for one Lighter wallet entry.
build_unified_account_state
Assembles the unified [AccountState] from already-parsed components.
margin_balance_from_user_stats
Builds the cross-margin [MarginBalance] from a user_stats frame.
parse_ws_bar
Parses a Lighter WebSocket candle into a Nautilus [Bar] with ts_event set to the bar open.
parse_ws_fill_report
Parses a Lighter account-trade payload into a [FillReport] when the trade involves the supplied account.
parse_ws_funding_rate_update
Parses a Lighter perpetual market-stat update into a funding-rate update.
parse_ws_index_price_update
Parses a Lighter perpetual market-stat update into an index price update.
parse_ws_mark_price_update
Parses a Lighter perpetual market-stat update into a mark price update.
parse_ws_order_book_deltas
Parses a Lighter order book update into Nautilus deltas.
parse_ws_order_book_depth10
Parses a full Lighter order book payload into a Nautilus [OrderBookDepth10].
parse_ws_order_status_report
Parses a Lighter account-stream order payload into an [OrderStatusReport].
parse_ws_position_status_report
Parses a Lighter position payload into a [PositionStatusReport].
parse_ws_quote_tick
Parses a Lighter ticker stream payload into a Nautilus [QuoteTick].
parse_ws_spot_index_price_update
Parses a Lighter spot market-stat update into an index price update.
parse_ws_trade_tick
Parses a Lighter trade stream item into a Nautilus [TradeTick].