Skip to content

Commit

Permalink
updates req/res for ohlc.
Browse files Browse the repository at this point in the history
  • Loading branch information
b00kdev committed Mar 18, 2024
1 parent 93cce39 commit 9af2009
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/models/markets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -20,7 +20,7 @@ pub struct DexPairOHLC {
pub timestamp: DateTime<Utc>,
}

#[derive(Serialize)]
#[derive(Clone, Copy, Debug, Serialize)]
pub enum Resolution {
#[serde(rename = "1m")]
OneMinute,
Expand All @@ -42,17 +42,17 @@ pub enum Resolution {
OneMonth,
}

#[derive(Serialize)]
#[derive(Clone, Copy, Debug, Serialize)]
pub enum Sort {
#[serde(rename = "asc")]
Asc,
#[serde(rename = "desc")]
Desc,
}

#[derive(Default, Serialize)]
#[derive(Clone, Debug, Default, Serialize)]
pub struct DexPairOHLCParameters {
pub resolution: Option<String>,
pub resolution: Option<Resolution>,
pub from: Option<String>,
pub to: Option<String>,
pub limit: Option<i64>,
Expand Down

0 comments on commit 9af2009

Please sign in to comment.