Results
What queries and listings return, and how to turn them into frames.
- class mirexa.CandleResult(stream: StreamID, points: list[CandlePoint] | None = None, *, columns: Any = None, stale: bool = False, level_at: int = 0)
A candle query’s answer: every interval slot in the range, candles and gap markers both, in the order asked for.
Decoded into columns when NumPy is installed:
to_pandas,to_polarsandto_numpybuild straight from them, and the Python objects behindpointsandcandlesare made only when read.- stale
True if any page was answered by a copy rather than the primary.
- level_at
For a stale answer: when the copy was last level with its primary (Unix ns).
- to_pandas(*, prices: Literal['float', 'decimal'] = 'float') pd.DataFrame
Candles as a DataFrame: a UTC
DatetimeIndexnamedtimeandopen high low close volume. Gap slots are left out, not filled with NaN;gaps_frame()has them.
- gaps_frame() pd.DataFrame
The gaps in this answer, one row per range.
- to_polars(*, prices: Literal['float', 'decimal'] = 'float') pl.DataFrame
Candles as a polars DataFrame: a
timecolumn (Datetime("ns", "UTC")) andopen high low close volume. Gap slots are left out;gaps_polars()has them.prices="decimal"gives exactDecimal(38, 4)columns.
- gaps_polars() pl.DataFrame
The gaps in this answer as a polars DataFrame, one row per range.
- to_numpy() np.ndarray
Candles as a structured array (
timeisdatetime64[ns]).
- class mirexa.ColumnResult(stream: StreamID, columns: int, ts: Any, values: dict[str, Any], marks: Any = None)
A column query’s answer: the stamps and only the value columns asked for, one array per column (NumPy
float64; lists without NumPy), in the order asked for. No candle objects are made, which is the point: a node decodes and sends, and this holds, only what was named.tsis Unix nanoseconds.incompleteis a per-row flag for derived bars whose source had a hole (CandlePoint.incomplete), or None when no row has one. Gap markers are not part of a column answer.- columns
The
COL_*bits that were asked for.
- ts
Unix nanoseconds, one per row.
- values
The value columns, by name (
open high low close volume).
- property incomplete: Any
Which rows are marked INCOMPLETE, or None when none is.
- to_pandas(*, prices: Literal['float', 'decimal'] = 'float') pd.DataFrame
A DataFrame with a UTC
DatetimeIndexnamedtimeand one column for each asked for.
- to_polars(*, prices: Literal['float', 'decimal'] = 'float') pl.DataFrame
A polars DataFrame: a
timecolumn (Datetime("ns", "UTC")) and one column for each asked for.
- class mirexa.TickResult(stream: StreamID, ticks: list[Tick] | None = None, *, columns: Any = None)
A tick query’s answer, decoded into columns when NumPy is installed.
- to_pandas(*, prices: Literal['float', 'decimal'] = 'float') pd.DataFrame
Ticks as a DataFrame: UTC
DatetimeIndexnamedtime,price volume. Two trades may share a timestamp, so the index is not unique.
- to_polars(*, prices: Literal['float', 'decimal'] = 'float') pl.DataFrame
Ticks as a polars DataFrame:
time(Datetime("ns", "UTC")),price volume.
- class mirexa.GapList(stream: StreamID, gaps: list[GapRange], summary: GapSummary)
A stream’s gaps as ranges (
LIST_GAPS), with totals over the window.
- class mirexa.GapSummary(missing_duration: int = 0, off_time_duration: int = 0, count: int = 0, open_count: int = 0, off_time_count: int = 0, fillable_count: int = 0)
Totals over the requested window (not the page), durations clipped to it.
- class mirexa.StreamInfo(stream: 'StreamID', stats: 'w.StreamStats | None' = None)
- class mirexa.StreamStats(record_count: 'int', byte_size: 'int', first_timestamp: 'int', last_timestamp: 'int', missing_duration: 'int', chunk_count: 'int', patch_count: 'int', gap_count: 'int', open_gap_count: 'int', off_time_count: 'int')
- class mirexa.NodeInfo(node_id: int, serving: bool, draining: bool, primaries: int, copies: int, addr: str)
One cluster node, as the answering node’s applied control-plane state holds it.