#![allow(clippy::too_many_arguments, unused_imports, non_camel_case_types)]
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum TradeDirection {
#[serde(rename = "open_long")]
OPEN_LONG,
#[serde(rename = "open_short")]
OPEN_SHORT,
#[serde(rename = "close_long")]
CLOSE_LONG,
#[serde(rename = "close_short")]
CLOSE_SHORT,
}
impl TradeDirection {
pub fn as_str(&self) -> &'static str {
match self {
TradeDirection::OPEN_LONG => "open_long",
TradeDirection::OPEN_SHORT => "open_short",
TradeDirection::CLOSE_LONG => "close_long",
TradeDirection::CLOSE_SHORT => "close_short",
}
}
}