1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#![doc = include_str!("../README.md")]
#![feature(vec_push_within_capacity)]
//! lfest - leveraged futures exchange for simulated trading
mod account;
mod config;
mod contract_specification;
mod exchange;
mod expect_messages;
mod load_trades_from_csv;
mod market_state;
mod market_update;
mod mock_exchange;
mod order_filters;
pub mod order_rate_limiter;
mod risk_engine;
#[cfg(test)]
mod tests;
#[cfg(feature = "trade_aggregation")]
mod trade_aggregation;
mod types;
mod utils;
pub use expect_messages::*;
pub use load_trades_from_csv::load_trades_from_csv;
pub use mock_exchange::*;
/// Exports common types
pub mod prelude {
pub use const_decimal;
// Re-export every `num_traits` trait that appears in a public supertrait
// bound (`Mon`, `Currency`) or is implemented on a public currency type.
// Trait methods are only callable when the trait is in scope, so omitting
// one (e.g. `Signed` for `abs()`, `is_positive()`, `signum()`) causes
// "method not found" (E0599) for downstream users despite the impl
// existing.
pub use num_traits::{
Num,
One,
Signed,
Zero,
};
pub use crate::{
account::*,
config::Config,
contract_specification::*,
exchange::{
Exchange,
ForcedCancels,
MarketOrderSettlement,
},
leverage,
market_state::MarketState,
market_update::*,
order_filters::{
PriceFilter,
QuantityFilter,
},
types::*,
utils::{
NoUserOrderId,
decimal_from_f64,
scale,
},
};
}