brokerage-db 0.1.4

Database management for trader brokerage data with a MongoDB backend.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug, PartialEq)]
pub enum SecurityType {
    Stock,
}
#[derive(Serialize, Deserialize, Debug, PartialEq)]
pub struct Security {
    pub _id: bson::oid::ObjectId,
    pub listing_exchange: String,
    pub security_type: SecurityType,
    pub ticker: String,
    pub ibkr_conid: Option<u32>,
}

impl Security {
    pub const COLLECTION_NAME: &'static str = "securities";
}