Skip to main content

Module types

Module types 

Source
Expand description

§Module: types

§Responsibility

Provides the core validated newtype wrappers used throughout fin-primitives: Symbol, Price, Quantity, Side, and NanoTimestamp.

§Guarantees

  • Symbol: non-empty, no whitespace; backed by Arc<str> for O(1) clone
  • Price: strictly positive (> 0)
  • Quantity: non-negative (>= 0)
  • NanoTimestamp: nanosecond-resolution UTC epoch timestamp; inner field is private
  • All types implement Clone, Copy (where applicable), serde::{Serialize, Deserialize}

§NOT Responsible For

  • Currency conversion
  • Tick size enforcement (exchange-specific)

Structs§

NanoTimestamp
Exchange-epoch timestamp with nanosecond resolution.
Price
A strictly positive price value backed by Decimal.
Quantity
A non-negative quantity backed by Decimal.
Symbol
A validated ticker symbol: non-empty, contains no whitespace.

Enums§

Side
The side of a market order or book level.