ethereal_rust_sdk 0.1.5

Trading client for Ethereal exchange
Documentation
/*
 * Ethereal Exchange API
 *
 * Ethereal HTTP API for real-time trading, order management, and market data access.
 *
 * The version of the OpenAPI document: 0.1.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// PositionLiquidationCause : Cause of liquidation (either MarkChanged or Funding)
/// Cause of liquidation (either MarkChanged or Funding)
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PositionLiquidationCause {
    #[serde(rename = "MarkChanged")]
    MarkChanged,
    #[serde(rename = "Funding")]
    Funding,
}

impl std::fmt::Display for PositionLiquidationCause {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::MarkChanged => write!(f, "MarkChanged"),
            Self::Funding => write!(f, "Funding"),
        }
    }
}

impl Default for PositionLiquidationCause {
    fn default() -> PositionLiquidationCause {
        Self::MarkChanged
    }
}