Historical.timeseries.get_range¶
Records of one schema for some securities over a time range, from your recordings in the cloud: merged across recordings that overlap (each record once) and in time order. OHLCV bars exist only here, built from your own uploads, and only for the securities and times they cover.
Parameters¶
dataset str requiredXTKS.BRISK (your own live recordings) or XTKS.BRISKDEMO (the public demo, open to every identity).
start str | int | date requiredThe inclusive start. An ISO 8601 time (JST unless it names a zone), a date (that trading day, from JST midnight) or UTC nanoseconds.
end str | int | date | None optionalThe exclusive end, in the same forms. Default: the end of the start's trading day. At most 31 days after start; both between 2000 and 2100.
symbols Iterable[str] | str optional = "ALL_SYMBOLS"Up to 2,000 JPX codes ("7203", "167A"), as a list or comma-separated. Default "ALL_SYMBOLS".
schema str optional = "trades"trades (default), mbp-10, book-deltas, definition, imbalance, brisk-quotes or ohlcv-1s, ohlcv-1m, ohlcv-1h, ohlcv-1d. See Data format.
stype_in str optional = "raw_symbol"Only raw_symbol (JPX codes).
stype_out str optional = "instrument_id"Only instrument_id; every record also has its code in symbol.
limit int | None optionalThe most records to return, after time-ordering.
path str | Path | None optionalAlso write the records (Parquet) to this file.
ts_filter str optional = "ts_event"The clock start, end and the order use: ts_event (default; BRiSK's stamp, the same rows whichever capture holds them) or ts_recv (when your computer received the record, for tests that must not look ahead). The cloud API cuts only on ts_event, so a ts_recv request asks for skew seconds either side and cuts the rest in the client, with limit applied after. Not for bars.
skew float optional = 10.0Seconds of padding either side of the window for ts_filter="ts_recv" (default 10). A warning says when BRiSK's stamps ran ahead of the receipt clock by more than half of it.
snapshot bool optional = FalseFor book-deltas (by ts_event): begin with each security's whole books as of start, a clear (R) and its levels flagged 32, rebuilt by the cloud API from the security's last checkpoint. Default False.
Returns¶
A DataStore of the records.
Historical.timeseries.get_range(
dataset: str,
start: str | int | date,
end: str | int | date | None = None,
symbols: Iterable[str] | str = "ALL_SYMBOLS",
schema: str = "trades",
stype_in: str = "raw_symbol",
stype_out: str = "instrument_id",
limit: int | None = None,
path: str | Path | None = None,
ts_filter: str = "ts_event", # or "ts_recv"
skew: float = 10.0,
snapshot: bool = False,
) -> DataStore