cxmr-exchanges 0.0.1

Exchanges identifiers.
Documentation
//! Crypto-bank market status primitives.

#[derive(Debug, Serialize)]
pub enum MarketStatus {
    PreTrading,
    Trading,
    PostTrading,
    EndOfDay,
    Halt,
    AuctionMatch,
    Break,
}

impl MarketStatus {
    pub fn is_trading(&self) -> bool {
        match self {
            MarketStatus::Trading => true,
            MarketStatus::EndOfDay => true,
            MarketStatus::AuctionMatch => true,
            _ => false,
        }
    }
}