[package]
edition = "2021"
rust-version = "1.81"
name = "fin-primitives"
version = "2.14.2"
authors = ["Matt Busel <matt@busel.dev>"]
build = false
include = [
"src/**/*",
"benches/**/*",
"tests/**/*",
"examples/**/*",
"Cargo.toml",
"README.md",
"LICENSE",
"CHANGELOG.md",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Checked building blocks for Rust trading code: exact decimal price and quantity types, a level-2 order book, ticks to OHLCV candles, 700+ streaming indicators, Black-Scholes Greeks, a position ledger and risk limits."
homepage = "https://fin-primitives.vercel.app/"
documentation = "https://docs.rs/fin-primitives"
readme = "README.md"
keywords = [
"finance",
"trading",
"orderbook",
"technical-analysis",
"quant",
]
categories = [
"finance",
"mathematics",
"data-structures",
]
license = "MIT"
repository = "https://gitlab.com/mattbusel/fin-primitives"
[package.metadata.docs.rs]
cargo-args = [
"-Zunstable-options",
"-Zrustdoc-scrape-examples",
]
[features]
python = ["dep:pyo3"]
[lib]
name = "fin_primitives"
crate-type = [
"rlib",
"cdylib",
]
path = "src/lib.rs"
[[example]]
name = "candles"
path = "examples/candles.rs"
[[example]]
name = "option_chain"
path = "examples/option_chain.rs"
[[example]]
name = "order_book"
path = "examples/order_book.rs"
[[example]]
name = "position_risk"
path = "examples/position_risk.rs"
[[test]]
name = "api_coverage"
path = "tests/api_coverage.rs"
[[test]]
name = "book_reconstruction"
path = "tests/book_reconstruction.rs"
[[test]]
name = "edge_cases"
path = "tests/edge_cases.rs"
[[test]]
name = "indicator_accuracy"
path = "tests/indicator_accuracy.rs"
[[test]]
name = "ohlcv_scenarios"
path = "tests/ohlcv_scenarios.rs"
[[test]]
name = "orderbook_advanced"
path = "tests/orderbook_advanced.rs"
[[test]]
name = "orderbook_stress"
path = "tests/orderbook_stress.rs"
[[test]]
name = "position_lifecycle"
path = "tests/position_lifecycle.rs"
[[test]]
name = "position_risk_integration"
path = "tests/position_risk_integration.rs"
[[test]]
name = "property_tests"
path = "tests/property_tests.rs"
[[test]]
name = "risk_monitor"
path = "tests/risk_monitor.rs"
[[test]]
name = "serde_roundtrip"
path = "tests/serde_roundtrip.rs"
[[test]]
name = "signal_pipeline"
path = "tests/signal_pipeline.rs"
[[test]]
name = "tick_to_ohlcv"
path = "tests/tick_to_ohlcv.rs"
[[bench]]
name = "tick_bench"
path = "benches/tick_bench.rs"
harness = false
[dependencies.chrono]
version = "0.4"
features = ["serde"]
[dependencies.pyo3]
version = "0.23"
features = ["extension-module"]
optional = true
[dependencies.rust_decimal]
version = "1"
features = ["serde-with-str"]
[dependencies.rust_decimal_macros]
version = "1"
[dependencies.serde]
version = "1"
features = [
"derive",
"rc",
]
[dependencies.thiserror]
version = "1"
[dependencies.tokio]
version = "1.40"
features = [
"rt",
"sync",
"macros",
]
[dev-dependencies.criterion]
version = "0.5"
features = ["async_tokio"]
[dev-dependencies.proptest]
version = "1"
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.tokio]
version = "1.40"
features = [
"full",
"test-util",
]
[lints.clippy]
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_sign_loss = "allow"
doc_markdown = "allow"
expect_used = "warn"
explicit_iter_loop = "allow"
if_not_else = "allow"
items_after_statements = "allow"
manual_let_else = "allow"
match_wildcard_for_single_variants = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
needless_pass_by_value = "allow"
option_if_let_else = "allow"
panic = "warn"
redundant_closure_for_method_calls = "allow"
semicolon_if_nothing_returned = "allow"
similar_names = "allow"
single_match_else = "allow"
struct_excessive_bools = "allow"
todo = "warn"
too_many_lines = "allow"
unwrap_used = "warn"
wildcard_imports = "allow"
[lints.clippy.pedantic]
level = "warn"
priority = -1
[profile.bench]
opt-level = 3
lto = "thin"
codegen-units = 1
[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
panic = "abort"
strip = "debuginfo"