Skip to content

Commit

Permalink
Update common.rs
Browse files Browse the repository at this point in the history
Updated for numeric only tickers
  • Loading branch information
ivazin authored Apr 3, 2022
1 parent e2879c4 commit 7ef367f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/broker_statement/ib/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ use crate::time;
use crate::types::{Date, DateTime, Decimal};
use crate::util::{self, DecimalRestrictions};

pub const STOCK_SYMBOL_REGEX: &str = "[A-Z][A-Z0-9]*(?:[ .][A-Z]+)??";
// pub const STOCK_SYMBOL_REGEX: &str = "[A-Z][A-Z0-9]*(?:[ .][A-Z]+)??";
pub const STOCK_SYMBOL_REGEX: &str = "[a-zA-Z0-9]+(?:[ .][A-Z]+)??";
pub const OLD_SYMBOL_SUFFIX: &str = ".OLD";

// IB uses the following identifier types as security ID:
Expand Down Expand Up @@ -286,4 +287,4 @@ mod tests {
fn symbol_parsing(value: &str, expected: &str) {
assert_eq!(parse_symbol(value).unwrap(), expected);
}
}
}

0 comments on commit 7ef367f

Please sign in to comment.