futu_core/
qot_plate_market.rs1pub const QOT_PLATE_MARKET_VALID_VALUES: &str =
9 "HK=1, HK_FUTURE=2, US=11, CN/SH=21, SZ=22, SG=31, JP=41, MY=61, CC=91";
10
11#[must_use]
12pub fn is_plate_market(value: i32) -> bool {
13 matches!(value, 1 | 2 | 11 | 21 | 22 | 31 | 41 | 61 | 91)
14}
15
16#[must_use]
17pub fn plate_market_from_str_alias(raw: &str) -> Option<i32> {
18 let trimmed = raw.trim();
19 let value = if let Ok(value) = trimmed.parse::<i32>() {
20 value
21 } else {
22 crate::qot_symbol::qot_market_from_str_alias(trimmed)?
23 };
24 is_plate_market(value).then_some(value)
25}