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
#![deny(missing_docs, rustdoc::missing_crate_level_docs, unused_imports)]
#![warn(clippy::all)]
#![doc = include_str!("../README.md")]

//! lfest - leveraged futures exchange for simulated trading

#[macro_use]
extern crate log;
#[macro_use]
extern crate serde;

mod account;
pub mod account_tracker;
mod clearing_house;
mod config;
mod contract_specification;
mod cornish_fisher;
mod exchange;
mod market_state;
mod mock_exchange;
mod order_filters;
mod order_margin;
mod position;
mod risk_engine;
#[cfg(test)]
mod test_helpers;
#[cfg(test)]
mod tests;
mod types;
mod utils;

pub use mock_exchange::{mock_exchange_base, mock_exchange_quote};
pub use types::Result;

/// Exports common types
pub mod prelude {
    // To make the macros work
    pub use fpdec::{self, Dec, Decimal};

    pub use crate::{
        account::Account,
        account_tracker::AccountTracker,
        base, bba,
        config::Config,
        contract_specification::*,
        exchange::Exchange,
        fee, leverage,
        market_state::MarketState,
        order_filters::{PriceFilter, QuantityFilter},
        position::Position,
        quote,
        risk_engine::RiskError,
        types::*,
    };
}