quant-primitives
Pure trading primitives — candles, intervals, symbols, currencies, asset taxonomy.
Zero I/O, zero async, WASM-compatible. Decimal arithmetic via rust_decimal (no float lies).
Install
[]
= "0.4"
Types
| Type | Purpose |
|---|---|
Candle |
OHLC + volume + timestamp, decimal-backed |
Interval |
Timeframe enum (Minute / Hour / Day / Week with multipliers); periods_per_year, hierarchy queries |
Symbol |
Trading symbol with base/quote split |
Currency |
ISO + crypto, with is_crypto_base() taxonomy |
Ticker |
Symbol + venue identifier |
PositionConfig |
Validated position sizing config (percentage bounds [0,1]) |
Example
use ;
use dec;
use Utc;
let c = new;
assert_eq!;
License
MIT — see LICENSE-MIT.