oanda-v20-openapi 0.2.1

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: 0.2.1
 * Contact: jmicoud02@gmail.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// PriceBucket : A Price Bucket represents a price available for an amount of liquidity
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PriceBucket {
    /// The Price offered by the PriceBucket
    #[serde(rename = "price", skip_serializing_if = "Option::is_none")]
    pub price: Option<f64>,
    /// The amount of liquidity offered by the PriceBucket
    #[serde(rename = "liquidity", skip_serializing_if = "Option::is_none")]
    pub liquidity: Option<i32>,
}

impl PriceBucket {
    /// A Price Bucket represents a price available for an amount of liquidity
    pub fn new() -> PriceBucket {
        PriceBucket {
            price: None,
            liquidity: None,
        }
    }
}