cxmr_exchanges/
status.rs

1//! Crypto-bank market status primitives.
2
3#[derive(Debug, Serialize)]
4pub enum MarketStatus {
5    PreTrading,
6    Trading,
7    PostTrading,
8    EndOfDay,
9    Halt,
10    AuctionMatch,
11    Break,
12}
13
14impl MarketStatus {
15    pub fn is_trading(&self) -> bool {
16        match self {
17            MarketStatus::Trading => true,
18            MarketStatus::EndOfDay => true,
19            MarketStatus::AuctionMatch => true,
20            _ => false,
21        }
22    }
23}