openlimits_binance/model/
price_stats.rs1use serde::Deserialize;
2use serde::Serialize;
3use rust_decimal::prelude::Decimal;
4use super::shared::string_to_decimal;
5
6#[derive(Debug, Serialize, Deserialize, Clone)]
8#[serde(rename_all = "camelCase")]
9pub struct PriceStats {
10 pub symbol: String,
11 #[serde(with = "string_to_decimal")]
12 pub price_change: Decimal,
13 #[serde(with = "string_to_decimal")]
14 pub price_change_percent: Decimal,
15 #[serde(with = "string_to_decimal")]
16 pub weighted_avg_price: Decimal,
17 #[serde(with = "string_to_decimal")]
18 pub prev_close_price: Decimal,
19 #[serde(with = "string_to_decimal")]
20 pub last_price: Decimal,
21 #[serde(with = "string_to_decimal")]
22 pub bid_price: Decimal,
23 #[serde(with = "string_to_decimal")]
24 pub ask_price: Decimal,
25 #[serde(with = "string_to_decimal")]
26 pub open_price: Decimal,
27 #[serde(with = "string_to_decimal")]
28 pub high_price: Decimal,
29 #[serde(with = "string_to_decimal")]
30 pub low_price: Decimal,
31 #[serde(with = "string_to_decimal")]
32 pub volume: Decimal,
33 pub open_time: u64,
34 pub close_time: u64,
35 pub first_id: i64, pub last_id: i64, pub count: u64,
38}