Expand description
Exports common types
Re-exports
pub use crate::account_tracker::AccountTracker;
Macros
- Allows the quick construction of
BaseCurrency
- Creates the MarketUpdate::Bba variant
- Allows the quick construction of
Fee
- Allows the quick construction of
Leverage
- Allows the quick construction of
QuoteCurrency
Structs
- The users account Generic over: A: AccountTracker, S: The
Currency
representing the order quantity B: Balance type - The markets BASE currency, e.g.: BTCUSD -> BTC is the BASE currency
- Define the Exchange configuration
- Represents a decimal number as a coefficient (
i128
) combined with a value (u8
) specifying the number of fractional decimal digits. - The main leveraged futures exchange for simulated trading
- Fee as a fraction
- Leverage TODO: Change this to u8 type, as no fractional leverage should be possible
- Describes the margin information of the account
- Defines an order
- Describes the position information of the account
- The
PriceFilter
defines the price rules for a symbol - The
SizeFilter
defines the quantity rules that each order needs to follow The generic currencyS
is always thePairedCurrency
of the margin currency - The markets QUOTE currency, e.g.: BTCUSD -> USD is the quote currency
Enums
- Describes possible Errors that may occur when calling methods in this crate
- Decribes the possible updates to the market state
- Defines the possible order errors that can occur when submitting a new order
- Defines the available order types
- Side of the order
Traits
- Every unit of account must implement this trait
- Each Currency that is used as margin has to implement this trait. The margin currency of an account defines which type of futures contract is traded. Here is how the margin
Currency
maps to the futures type:QuoteCurrency
: linear futures.BaseCurrency
: inverse futures.
Type Definitions
- This is defined as a convenience.