1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* Bluefin API
*
* Bluefin API
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// CandlestickUpdate : Represents a candlestick for a specific market and interval.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CandlestickUpdate {
/// The symbol of the market for this candlestick.
#[serde(rename = "symbol")]
pub symbol: String,
/// The start time of the candlestick in milliseconds since epoch.
#[serde(rename = "startTime")]
pub start_time: i64,
/// The end time of the candlestick in milliseconds since epoch.
#[serde(rename = "endTime")]
pub end_time: i64,
/// The interval of the candlestick (e.g., 1m, 5m, 1h).
#[serde(rename = "interval")]
pub interval: String,
/// The opening price of the candlestick.
#[serde(rename = "openPriceE9")]
pub open_price_e9: String,
/// The closing price of the candlestick.
#[serde(rename = "closePriceE9")]
pub close_price_e9: String,
/// The highest price during the candlestick interval.
#[serde(rename = "highPriceE9")]
pub high_price_e9: String,
/// The lowest price during the candlestick interval.
#[serde(rename = "lowPriceE9")]
pub low_price_e9: String,
/// The total trading volume during the candlestick interval.
#[serde(rename = "volumeE9")]
pub volume_e9: String,
/// The total quote volume traded during the candlestick interval.
#[serde(rename = "quoteVolumeE9")]
pub quote_volume_e9: String,
/// The number of trades that occurred during the candlestick interval.
#[serde(rename = "numTrades")]
pub num_trades: i64,
}
impl CandlestickUpdate {
/// Represents a candlestick for a specific market and interval.
pub fn new(symbol: String, start_time: i64, end_time: i64, interval: String, open_price_e9: String, close_price_e9: String, high_price_e9: String, low_price_e9: String, volume_e9: String, quote_volume_e9: String, num_trades: i64) -> CandlestickUpdate {
CandlestickUpdate {
symbol,
start_time,
end_time,
interval,
open_price_e9,
close_price_e9,
high_price_e9,
low_price_e9,
volume_e9,
quote_volume_e9,
num_trades,
}
}
}