Expand description
§use-market-price
Primitive market price vocabulary for RustUse quantitative crates.
use-market-price stores finite non-negative f64 market price values and descriptive price kinds without fetching prices, modeling money, or connecting to market data APIs.
§Example
use use_market_price::{MarketPrice, PriceKind, PriceQuote};
let price = MarketPrice::new(101.25)?;
let kind: PriceKind = "adjusted-close".parse()?;
let quote = PriceQuote::new(kind, price);
assert!(quote.price().is_positive());
assert_eq!(quote.kind().to_string(), "adjusted-close");§Scope
Use this crate for small market price values, price-kind vocabulary, and simple quotes. It does not model money, currencies, decimal arithmetic, market data clients, or broker connections.
§License
Licensed under either MIT or Apache-2.0.
Modules§
- prelude
- Common market price primitives.
Structs§
- Market
Price - A finite non-negative market price value.
- Price
Quote - A market price paired with descriptive price-kind vocabulary.
Enums§
- Market
Price Error - Errors returned while constructing market price values.
- Price
Kind - Descriptive market price kind vocabulary.
- Price
Kind Parse Error - Errors returned while parsing price kinds.