rusty_model/
lib.rs

1#![allow(clippy::needless_range_loop)]
2
3//! Rusty-Model: Core data structures for the HFT system
4//!
5//! This crate defines shared data structures used throughout the entire HFT system,
6//! including market data models, order representations, and common types.
7
8pub mod common;
9/// The data module contains all the data structures used in the system.
10pub mod data;
11pub mod enums;
12/// The instruments module contains all the instrument-related data structures used in the system.
13pub mod instruments;
14pub mod matching_engine;
15pub mod memory;
16#[cfg(test)]
17pub mod model_smartstring_tests;
18/// The order_update module contains all the order update-related data structures used in the system.
19pub mod order_update;
20pub mod position;
21/// The simd module contains all the SIMD-related data structures used in the system.
22pub mod simd;
23#[cfg(test)]
24pub mod simd_aligned_tests;
25pub mod trading_order;
26pub mod types;
27/// The venues module contains all the venue-related data structures used in the system.
28pub mod venues;
29
30// Re-export primary types for convenience
31pub use data::bar::{Bar, BarAggregation, BarSpecification, BarType};
32pub use data::best_bid_ask::BestBidAsk;
33pub use data::book_snapshot::OrderBookSnapshot;
34pub use data::market_trade::{MarketTrade, TradeBatch};
35pub use data::orderbook::{OrderBook, PriceLevel, SharedOrderBook};
36pub use data::simd_orderbook::{SharedSimdOrderBook, SimdOrderBook, SimdPriceLevels};
37pub use enums::{
38    AssetType, InstrumentType, OrderSide, OrderStatus, OrderType, PriceType, TimeInForce,
39};
40pub use instruments::{Instrument, InstrumentId, SpotInstrument};
41pub use matching_engine::{ExecutedTrade, MatchingEngine, OrderResult};
42pub use order_update::OrderUpdate;
43pub use position::{FuturesPosition, MarginType, PositionSide, PositionUpdate};
44pub use trading_order::Order;
45pub use types::{ClientId, OrderId, PositionId, StrategyId, TradeId};
46
47// Re-export SmartString for test convenience
48pub use rusty_common::SmartString;