Expand description
Unified public API for the paft workspace.
This facade crate aggregates the paft ecosystem into a single dependency
with coherent feature flags and a convenient prelude for common imports.
Features
domain,market,fundamentals,aggregates: opt into the areas you needprediction: prediction market identity, metadata, quotes, books, and tradesbigdecimal: change the money backend fromrust_decimaltobigdecimaldataframe: enableDataFrameexport via Polars helperspanicking-money-ops: opt‑in operator overloading forMoneythat panics on invalid inputmoney-formatting: locale‑aware money formatting and parsingtracing: lightweight instrumentation; zero‑cost when disabled
§Quickstart
use paft::prelude::*;
// Construct an instrument with identifiers
let aapl = Instrument::from_symbol_and_exchange("AAPL", Exchange::NASDAQ, AssetKind::Equity)
.unwrap();
// Build a validated history request
let req = HistoryRequest::try_from_range(Range::M1, Interval::D1).unwrap();
assert_eq!(req.interval(), Interval::D1);See the crate README for installation instructions and feature details.
§Wire compatibility policy
Serde boundaries are strict for requests, configuration, and semantic
metadata shapes where silently dropping fields could change meaning. A
kind discriminator alone does not make a data payload strict.
Provider/data payload models are forward-compatible by default: unmodeled
JSON fields are ignored unless validation requires rejection. Generic
provider metadata is serde-flattened into the owning JSON object, so
colliding JSON field names are unsupported. DataFrame export is separately
namespaced under provider.* columns.
Re-exports§
Modules§
- aggregates
- Namespaced access to
paft-aggregates(feature-gated). - core
- Namespaced access to
paft-core. - dataframe
- Top-level re-export of the dataframe runtime traits used by paft-owned
types. For deriving dataframe support on your own structs, depend on
df-derivedirectly.DataFrameconversion traits for paft utilities. - domain
- Namespaced access to
paft-domain(feature-gated). - error
- Unified error types for the
paftfacade crate. - fundamentals
- Namespaced access to
paft-fundamentals(feature-gated). - market
- Namespaced access to
paft-market(feature-gated). - money
- Namespaced access to
paft-moneytypes. - prediction
- Namespaced access to
paft-prediction(feature-gated). - prelude
- Frequently used types for convenient imports. Commonly used types for convenient glob import.
Structs§
- Decimal
- Direct access to decimal types. A big decimal type.
- Decimal
Constraint Error - Direct access to decimal types. Error returned when a decimal does not satisfy a constrained decimal type.
- NonNegative
Decimal - Direct access to decimal types.
Decimal constrained to
x >= 0. - Positive
Decimal - Direct access to decimal types.
Decimal constrained to
x > 0. - Ratio
- Direct access to decimal types.
Decimal constrained to
0 <= x <= 1.
Enums§
- Rounding
Strategy - Direct access to decimal types. Rounding strategy supported by decimal operations.
Constants§
- MAX_
CANONICAL_ TOKEN_ LEN - Maximum byte length of a canonical
Otherenum token.