From 9af20094d0c4d72985374a91e889798ba09e7c34 Mon Sep 17 00:00:00 2001 From: RJ Regenold Date: Mon, 18 Mar 2024 10:19:40 -0500 Subject: [PATCH] updates req/res for ohlc. --- src/models/markets.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/models/markets.rs b/src/models/markets.rs index 0c9f588..8f9981a 100644 --- a/src/models/markets.rs +++ b/src/models/markets.rs @@ -2,7 +2,7 @@ use chrono::{DateTime, Utc}; use rust_decimal::Decimal; use serde::{Deserialize, Serialize}; -#[derive(Deserialize)] +#[derive(Clone, Debug, Deserialize)] pub struct DexPairOHLC { pub coin_a_change_pct: Decimal, pub coin_a_close: Decimal, @@ -20,7 +20,7 @@ pub struct DexPairOHLC { pub timestamp: DateTime, } -#[derive(Serialize)] +#[derive(Clone, Copy, Debug, Serialize)] pub enum Resolution { #[serde(rename = "1m")] OneMinute, @@ -42,7 +42,7 @@ pub enum Resolution { OneMonth, } -#[derive(Serialize)] +#[derive(Clone, Copy, Debug, Serialize)] pub enum Sort { #[serde(rename = "asc")] Asc, @@ -50,9 +50,9 @@ pub enum Sort { Desc, } -#[derive(Default, Serialize)] +#[derive(Clone, Debug, Default, Serialize)] pub struct DexPairOHLCParameters { - pub resolution: Option, + pub resolution: Option, pub from: Option, pub to: Option, pub limit: Option,