Skip to content

Rust

The native crate. Fold a ScanSpec over a universe with scan_batch, or drive a Screener handle with the JSON command protocol every other binding uses.

bash
cargo add wickra-screener
rust
use screener_core::{scan_batch, Candle, ScanSpec};
use std::collections::BTreeMap;

let spec = ScanSpec::from_json(SPEC).expect("valid spec");

let mut data: BTreeMap<String, Vec<Candle>> = BTreeMap::new();
// ... fill `data` with each symbol's candle history ...

let report = scan_batch(&data, &spec).expect("scan");
for m in &report.matches {
    println!("matched: {}", m.symbol);
}

More