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
#![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 serde;

pub mod account_tracker;
mod accounting;
mod config;
mod contract_specification;
mod exchange;
mod market_state;
mod market_update;
mod mock_exchange;
mod order_filters;
mod order_margin;
mod position;
mod position_inner;
mod risk_engine;
mod sample_returns_trigger;
#[cfg(test)]
mod tests;
mod types;
mod utils;

pub use mock_exchange::*;
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_tracker::AccountTracker,
        accounting::*,
        base, bba,
        config::Config,
        contract_specification::*,
        exchange::{Account, ActiveLimitOrders, Exchange},
        fee, leverage,
        market_state::MarketState,
        market_update::*,
        order_filters::{PriceFilter, QuantityFilter},
        position::Position,
        position_inner::PositionInner,
        quote,
        risk_engine::RiskError,
        types::*,
    };
}