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
/*
* OANDA v20 API
*
* The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
*
* The version of the OpenAPI document: 0.2.1
* Contact: jmicoud02@gmail.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// CandlestickData : The price data (open, high, low, close) for the Candlestick representation.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CandlestickData {
/// The first (open) price in the time-range represented by the candlestick.
#[serde(rename = "o", skip_serializing_if = "Option::is_none")]
pub o: Option<String>,
/// The highest price in the time-range represented by the candlestick.
#[serde(rename = "h", skip_serializing_if = "Option::is_none")]
pub h: Option<String>,
/// The lowest price in the time-range represented by the candlestick.
#[serde(rename = "l", skip_serializing_if = "Option::is_none")]
pub l: Option<String>,
/// The last (closing) price in the time-range represented by the candlestick.
#[serde(rename = "c", skip_serializing_if = "Option::is_none")]
pub c: Option<String>,
}
impl CandlestickData {
/// The price data (open, high, low, close) for the Candlestick representation.
pub fn new() -> CandlestickData {
CandlestickData {
o: None,
h: None,
l: None,
c: None,
}
}
}