Appearance
Historical builder
Preview (
historical-modeCargo feature). The historical namespace is the same per-analytic builder shape as the live namespace;.on_eventfires the callback once per row over the bounded[start, end]result set and stops after every(contract, date)unit's terminal watermark. The bridge to the C ABI is a documented follow-up —.on_eventon the historical namespace surfacesLinkError::HistoricalUnwireduntil the wiring lands. The accessor is opt-in so production FFI builds cannot reach a known fail-closed path.
Shape
rust
// Cargo.toml:
// kairos = { version = "0.1", features = ["historical-mode"] }
use kairos::{Client, GreeksRow};
let sub = client
.historical(20251103, 20251107) // YYYYMMDD inclusive
.greeks(["QQQ"])
.on_event(|row: &GreeksRow| { // fires per row over the bounded set
println!("delta={} gamma={}", row.delta, row.gamma);
})?;start and end are YYYYMMDD-encoded i32s per the engine's integer-time convention. Bare ticker symbols expand to the chain plus the underlying.
Bounded consumption
The chain is identical to the live namespace — the accessor, the universe argument, and the .on_event callback are the same. The only difference is that the callback fires over a finite result set rather than an open-ended live feed: on the historical namespace the stream ends after the last row, and the subscription becomes inactive on its own. The same typed <Camel>Row is delivered per emission in every mode.
See also
- Subscription builder — the same fluent shape on the live namespace.
- Consuming events — the callback delivery model.
Client— thehistorical(start, end)namespace accessor.