use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AccountDataStream {
#[serde(rename = "AccountOrderUpdate")]
AccountOrderUpdate,
#[serde(rename = "AccountTradeUpdate")]
AccountTradeUpdate,
#[serde(rename = "AccountAggregatedTradeUpdate")]
AccountAggregatedTradeUpdate,
#[serde(rename = "AccountPositionUpdate")]
AccountPositionUpdate,
#[serde(rename = "AccountUpdate")]
AccountUpdate,
#[serde(rename = "AccountTransactionUpdate")]
AccountTransactionUpdate,
#[serde(rename = "AccountCommandFailureUpdate")]
AccountCommandFailureUpdate,
}
impl std::fmt::Display for AccountDataStream {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::AccountOrderUpdate => write!(f, "AccountOrderUpdate"),
Self::AccountTradeUpdate => write!(f, "AccountTradeUpdate"),
Self::AccountAggregatedTradeUpdate => write!(f, "AccountAggregatedTradeUpdate"),
Self::AccountPositionUpdate => write!(f, "AccountPositionUpdate"),
Self::AccountUpdate => write!(f, "AccountUpdate"),
Self::AccountTransactionUpdate => write!(f, "AccountTransactionUpdate"),
Self::AccountCommandFailureUpdate => write!(f, "AccountCommandFailureUpdate"),
}
}
}
impl Default for AccountDataStream {
fn default() -> AccountDataStream {
Self::AccountOrderUpdate
}
}