oanda-v20-openapi 3.0.25

The full OANDA v20 API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
Documentation
/*
 * 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: 3.0.25
 * Contact: api@oanda.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<f64>,
    /// The highest price in the time-range represented by the candlestick.
    #[serde(rename = "h", skip_serializing_if = "Option::is_none")]
    pub h: Option<f64>,
    /// The lowest price in the time-range represented by the candlestick.
    #[serde(rename = "l", skip_serializing_if = "Option::is_none")]
    pub l: Option<f64>,
    /// The last (closing) price in the time-range represented by the candlestick.
    #[serde(rename = "c", skip_serializing_if = "Option::is_none")]
    pub c: Option<f64>,
}

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,
        }
    }
}