bluefin_api 1.8.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};

/// MarketStreamMessagePayload : The payload of the message, which varies based on the event type.
/// The payload of the message, which varies based on the event type.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum MarketStreamMessagePayload {
    RecentTradesUpdates(models::RecentTradesUpdates),
    TickerUpdate(models::TickerUpdate),
    TickerAllUpdate(models::TickerAllUpdate),
    OraclePriceUpdate(models::OraclePriceUpdate),
    MarkPriceUpdate(models::MarkPriceUpdate),
    MarketPriceUpdate(models::MarketPriceUpdate),
    CandlestickUpdate(models::CandlestickUpdate),
    OrderbookDiffDepthUpdate(models::OrderbookDiffDepthUpdate),
    OrderbookPartialDepthUpdate(models::OrderbookPartialDepthUpdate),
}

impl Default for MarketStreamMessagePayload {
    fn default() -> Self {
        Self::RecentTradesUpdates(Default::default())
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Source {
    #[serde(rename = "Market")]
    Market,
}

impl Default for Source {
    fn default() -> Source {
        Self::Market
    }
}
/// The depth level of the orderbook snapshot.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum DepthLevel {
    #[serde(rename = "5")]
    Variant5,
    #[serde(rename = "10")]
    Variant10,
    #[serde(rename = "20")]
    Variant20,
}

impl Default for DepthLevel {
    fn default() -> DepthLevel {
        Self::Variant5
    }
}