pub struct PaperState {
pub balances: HashMap<String, f64>,
pub orders: Vec<PaperOrder>,
pub next_order_id: u64,
pub trade_count: u64,
pub total_fees_paid: f64,
pub initial_balances: Option<HashMap<String, f64>>,
}Fields§
§balances: HashMap<String, f64>§orders: Vec<PaperOrder>§next_order_id: u64§trade_count: u64§total_fees_paid: f64§initial_balances: Option<HashMap<String, f64>>Implementations§
Source§impl PaperState
impl PaperState
pub fn initial_balance(&self, currency: &str) -> f64
Source§impl PaperState
impl PaperState
pub fn load(config: &IndodaxConfig) -> Self
pub fn save(&self, config: &mut IndodaxConfig) -> Result<(), IndodaxError>
Trait Implementations§
Source§impl Clone for PaperState
impl Clone for PaperState
Source§fn clone(&self) -> PaperState
fn clone(&self) -> PaperState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PaperState
impl Debug for PaperState
Source§impl Default for PaperState
impl Default for PaperState
Source§impl<'de> Deserialize<'de> for PaperState
impl<'de> Deserialize<'de> for PaperState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PaperState
impl RefUnwindSafe for PaperState
impl Send for PaperState
impl Sync for PaperState
impl Unpin for PaperState
impl UnsafeUnpin for PaperState
impl UnwindSafe for PaperState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more