use-bar 0.1.0

Primitive OHLC and OHLCV bar vocabulary for RustUse quantitative crates
Documentation
  • Coverage
  • 100%
    38 out of 38 items documented1 out of 22 items with examples
  • Size
  • Source code size: 15.89 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 813.59 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-quant
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-bar

Primitive OHLC and OHLCV bar vocabulary for RustUse quantitative crates.

use-bar describes bars with simple labels, intervals, prices, and optional volume. It validates obvious OHLC relationships without fetching, resampling, charting, or storing market data externally.

Example

use use_bar::{BarInterval, BarTime, OhlcvBar};

let bar = OhlcvBar::from_values(
    BarTime::new("2026-05-17")?,
    BarInterval::Day,
    100.0,
    102.0,
    99.5,
    101.25,
    42_000.0,
)?;

assert_eq!(bar.bar().close().value(), 101.25);
assert_eq!(bar.volume(), 42_000.0);
# Ok::<(), Box<dyn std::error::Error>>(())

Scope

Use this crate for descriptive OHLC/OHLCV values. It does not fetch data, resample bars, build candlestick charts, or implement vendor formats.

License

Licensed under either MIT or Apache-2.0.