From 191a21bec9a390a9704e887ac3544a3527b148a2 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Fri, 22 Jan 2021 16:08:40 +0000 Subject: [PATCH] visible only in crate --- rustybot/src/models.rs | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/rustybot/src/models.rs b/rustybot/src/models.rs index c8b989a..a4b04f7 100644 --- a/rustybot/src/models.rs +++ b/rustybot/src/models.rs @@ -2,10 +2,10 @@ use std::fmt::Display; use std::hash::{Hash, Hasher}; use chrono::{DateTime, TimeZone}; +use float_cmp::ApproxEq; use crate::currency::SymbolPair; use crate::BoxError; -use float_cmp::ApproxEq; /*************** * Prices @@ -108,25 +108,19 @@ impl OrderBook { #[derive(Clone, Debug)] pub struct ActiveOrder { - pub id: i64, - pub group_id: Option, - pub client_id: i64, - pub symbol: String, - pub creation_timestamp: i64, - pub update_timestamp: i64, - pub amount: f64, - pub amount_original: f64, - pub order_type: String, - pub previous_order_type: Option, - pub flags: Option, - pub order_status: Option, - pub price: f64, - pub price_avg: f64, - pub price_trailing: Option, - pub price_aux_limit: Option, - pub notify: i32, - pub hidden: i32, - pub placed_id: Option, + pub(crate) id: u64, + pub(crate) group_id: Option, + pub(crate) client_id: u64, + pub(crate) symbol: SymbolPair, + pub(crate) creation_timestamp: u64, + pub(crate) update_timestamp: u64, + pub(crate) amount: f64, + pub(crate) amount_original: f64, + pub(crate) order_type: OrderKind, + pub(crate) previous_order_type: Option, + pub(crate) price: f64, + pub(crate) price_avg: f64, + pub(crate) hidden: bool, } impl Hash for ActiveOrder {