From 50c961ec311f55a5b1e1bb1a77cb05314979f1e9 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Fri, 15 Jan 2021 10:51:02 +0000 Subject: [PATCH] added chrono --- rustybot/Cargo.lock | 1 + rustybot/Cargo.toml | 3 ++- rustybot/src/models.rs | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rustybot/Cargo.lock b/rustybot/Cargo.lock index 5025cfb..b3e1cbe 100644 --- a/rustybot/Cargo.lock +++ b/rustybot/Cargo.lock @@ -1128,6 +1128,7 @@ version = "0.1.0" dependencies = [ "async-trait", "bitfinex", + "chrono", "dyn-clone", "fern", "futures-util", diff --git a/rustybot/Cargo.toml b/rustybot/Cargo.toml index e328703..490fa04 100644 --- a/rustybot/Cargo.toml +++ b/rustybot/Cargo.toml @@ -15,4 +15,5 @@ async-trait = "0.1" regex = "1" dyn-clone = "1" log = "0.4" -fern = {version = "0.6", features = ["colored"]} \ No newline at end of file +fern = {version = "0.6", features = ["colored"]} +chrono = "0.4" \ No newline at end of file diff --git a/rustybot/src/models.rs b/rustybot/src/models.rs index c781f45..31aa050 100644 --- a/rustybot/src/models.rs +++ b/rustybot/src/models.rs @@ -1,5 +1,6 @@ use crate::currency::SymbolPair; use crate::BoxError; +use chrono::{DateTime, TimeZone}; use std::fmt::Display; /*************** @@ -64,7 +65,7 @@ pub enum OrderKind { ExchangeIoc, } -#[derive(Serialize, Clone)] +#[derive(Clone)] pub struct OrderForm { /// Order Type: LIMIT, EXCHANGE LIMIT, MARKET, EXCHANGE MARKET, /// STOP, EXCHANGE STOP, STOP LIMIT, EXCHANGE STOP LIMIT,