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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct OrderbookPartialDepthUpdate {
    /// The timestamp of the partial depth update.
    #[serde(rename = "updatedAtMillis")]
    pub updated_at_millis: i64,
    /// The symbol of the market for the partial depth update.
    #[serde(rename = "symbol")]
    pub symbol: String,
    #[serde(rename = "bidsE9")]
    pub bids_e9: Vec<Vec<String>>,
    #[serde(rename = "asksE9")]
    pub asks_e9: Vec<Vec<String>>,
    /// The unique identifier for the orderbook update.
    #[serde(rename = "orderbookUpdateId")]
    pub orderbook_update_id: i64,
    /// The depth level of the orderbook snapshot.
    #[serde(rename = "depthLevel")]
    pub depth_level: DepthLevel,
}

impl OrderbookPartialDepthUpdate {
    pub fn new(updated_at_millis: i64, symbol: String, bids_e9: Vec<Vec<String>>, asks_e9: Vec<Vec<String>>, orderbook_update_id: i64, depth_level: DepthLevel) -> OrderbookPartialDepthUpdate {
        OrderbookPartialDepthUpdate {
            updated_at_millis,
            symbol,
            bids_e9,
            asks_e9,
            orderbook_update_id,
            depth_level,
        }
    }
}
/// 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
    }
}