Struct lfest::Exchange [−][src]
pub struct Exchange { /* fields omitted */ }
Expand description
The main leveraged futures exchange for simulated trading
Implementations
Create a new Exchange with the desired config and whether to use candles as infomation source
Update the exchange state with new information
Parameters
bid: bid price ask: ask price timestamp: timestamp usually in milliseconds high: highest price over last period, use when feeding in candle info, otherwise set high == ask low: lowest price over last period, use when feeding in candle info, otherwise set low == bid
Returns
executed orders true if position has been liquidated
Submit a new order to the exchange. Returns the order with timestamp and id filled in or OrderError
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Exchange
impl UnwindSafe for Exchange
Blanket Implementations
Mutably borrows from an owned value. Read more