Expand description
Parsing utilities that convert Betfair stream messages into Nautilus domain models.
MCM (Market Change Messages) are parsed into order book deltas, trade ticks, and instrument status updates. OCM (Order Change Messages) are parsed into order status reports and fill reports.
Structs§
- Fill
Tracker - Tracks cumulative fill state per bet to compute incremental fills from the Betfair OCM stream.
Functions§
- has_
cancel_ quantity - Returns
trueif the unmatched order has cancel, lapse, or void quantities. - is_
lapsed - Returns
trueif the order is execution-complete and has lapsed. - make_
fill_ report - Creates a [
FillReport] for a Betfair order fill. - make_
trade_ id - Generates a deterministic [
TradeId] for a Betfair fill. - make_
trade_ tick - Creates a [
TradeTick] from stream data. - parse_
betfair_ starting_ prices - Extracts
BetfairStartingPricevalues from a market definition’s runners. - parse_
betfair_ ticker - Extracts a
BetfairTickerfrom a runner change if any ticker fields are present. - parse_
bsp_ book_ deltas - Extracts BSP order book deltas from a runner change’s
spb/splfields. - parse_
instrument_ closes - Produces [
InstrumentClose] events from a market definition’s runner statuses. - parse_
instrument_ statuses - Produces per-runner [
InstrumentStatus] events from a market definition. - parse_
order_ status_ report - Parses a streaming
UnmatchedOrderinto a Nautilus [OrderStatusReport]. - parse_
race_ progress - Parses a
RaceProgressChangeinto aBetfairRaceProgress. - parse_
race_ runner_ data - Parses a single
RaceRunnerChangeinto aBetfairRaceRunnerData. - parse_
runner_ book_ deltas - Parses a single runner’s book data into [
OrderBookDeltas].