Gaps

Gap ranges, their classification, whether they can be filled, and asking the node to fill one.

class mirexa.GapRange(start: int, end: int, status: GapStatus, reason: GapReason)

A hole in a stream, [start, end) in Unix nanoseconds.

fill_refusal() → str

Why this gap cannot be filled, or "" if it can.

The server’s rule, copied: fillability is not sent on the wire, and both ends compute it from status and reason. A market closure is never fillable, whatever its status: anything written into it is fabricated.

property fillable: bool

Whether writing data into this range would be a recovery.

property accept_action: str

What an operator may do about this record’s acceptance: "accept" an OPEN incomplete mark, "unaccept" an ACCEPTED one, or "". A gap of missing data is filled or left open, never accepted. The server’s rule, copied (types.GapRange.AcceptAction).

class mirexa.GapStatus(*values)

Whether a gap can still be recovered.

ACCEPTED = 4

An INCOMPLETE mark kept as it is (“known incomplete, keep it”). Only an INCOMPLETE record is ever ACCEPTED; see GapRange.accept_action().

class mirexa.GapReason(*values)

Why a gap exists. OFF_TIME means the market was closed: no data exists for that period, so the gap is not a loss.

INCOMPLETE = 9

Not a hole: a DERIVED bar whose source had a hole under its window. The bar is stored and served, and carries this mark (CandlePoint.incomplete).

class mirexa.FillMethod(*values)

How FILL_GAP makes up the candles of a gap from the real ones either side.

LINEAR = 1

A straight line from the close before the gap to the open after it.

FORWARD = 2

Flat at the close before the gap (last observation carried forward).

BACKWARD = 3

Flat at the open after the gap.

class mirexa.FillGapResponse(filled: 'int', has_more: 'bool', gap: 'GapRange')
gap: GapRange

The gap as the node found it, before the fill.