12 releases (6 breaking)
Uses new Rust 2024
| 0.7.1 | Oct 31, 2025 |
|---|---|
| 0.7.0 | Oct 28, 2025 |
| 0.6.0 | Oct 21, 2025 |
| 0.5.2 | Oct 19, 2025 |
| 0.1.0 | Sep 15, 2025 |
#2530 in Data structures
527 downloads per month
Used in 9 crates
(2 directly)
205KB
3.5K
SLoC
paft-market
Market data models and request builders for the paft ecosystem.
- Unified market models:
Quote,Candle,HistoryResponse,OptionChain,NewsArticle - Validated builders:
HistoryRequest,SearchRequest - Canonical, serde-stable string forms; optional DataFrame export
- Integrates with
paft-domainandpaft-money
Install
Prefer the facade crate for most applications:
[dependencies]
paft = "0.7.1"
Advanced (direct dependency, minimal):
[dependencies]
paft-market = { version = "0.7.1", default-features = false }
Alternate decimal backend:
[dependencies]
paft-market = { version = "0.7.1", default-features = false, features = ["bigdecimal"] }
With DataFrame integration:
[dependencies]
paft-market = { version = "0.7.1", default-features = false, features = ["dataframe"] }
Features
bigdecimal: change money backend fromrust_decimaltobigdecimalviapaft-moneydataframe: Polars integration (ToDataFrame/ToDataFrameVec)
Quickstart
use paft_market::{HistoryRequest, Interval, Range, SearchRequest};
// 1 month of daily candles
let req = HistoryRequest::try_from_range(Range::M1, Interval::D1).unwrap();
assert_eq!(req.interval(), Interval::D1);
// Validated instrument search
let search = SearchRequest::new("AAPL").unwrap();
assert_eq!(search.query(), "AAPL");
Links
- API docs: https://docs.rs/paft-market
- Workspace overview: https://github.com/paft-rs/paft/blob/main/README.md
- License: https://github.com/paft-rs/paft/blob/main/LICENSE
Dependencies
~11–34MB
~437K SLoC