bluefin_api 1.7.0

Bluefin API
Documentation
/*
 * 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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OraclePriceUpdate {
    /// The symbol of the market.
    #[serde(rename = "symbol")]
    pub symbol: String,
    /// The price in scientific notation with 9 decimal places of precision.
    #[serde(rename = "priceE9")]
    pub price_e9: String,
    #[serde(rename = "source")]
    pub source: Source,
    /// The timestamp of the price update.
    #[serde(rename = "updatedAtMillis")]
    pub updated_at_millis: i64,
}

impl OraclePriceUpdate {
    pub fn new(symbol: String, price_e9: String, source: Source, updated_at_millis: i64) -> OraclePriceUpdate {
        OraclePriceUpdate {
            symbol,
            price_e9,
            source,
            updated_at_millis,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Source {
    #[serde(rename = "Oracle")]
    Oracle,
}

impl Default for Source {
    fn default() -> Source {
        Self::Oracle
    }
}