34template <
typename KeyType, std::
size_t Size>
44 constexpr explicit FrozenMap(std::array<value_type, Size> entries) noexcept
45 : m_entries {entries} {
46 std::ranges::sort(m_entries, {}, &value_type::first);
53 [[nodiscard]]
constexpr auto find(
const KeyType& key
54 )
const noexcept -> std::optional<std::string_view> {
55 const auto iter = std::ranges::lower_bound(m_entries, key, {}, &value_type::first);
56 if (iter != m_entries.end() && iter->first == key) {
67 [[nodiscard]]
constexpr auto at_or(
const KeyType& key, std::string_view fallback)
const noexcept
69 return find(key).value_or(fallback);
73 std::array<value_type, Size> m_entries;
82template <
typename KeyType, std::
size_t Size>
86 {
'O',
"Start of Messages"},
87 {
'S',
"Start of System hours"},
88 {
'Q',
"Start of Market hours"},
89 {
'M',
"End of Market hours"},
90 {
'E',
"End of System hours"},
91 {
'C',
"End of Messages"},
98 {
'Q',
"NASDAQ Global Select"},
99 {
'G',
"NASDAQ Global Market"},
100 {
'S',
"NASDAQ Capital Market"},
102 {
'V',
"Investors Exchange"},
103 {
' ',
"Not available"},
107 std::to_array<std::pair<char, std::string_view>>({
112 {
'G',
"Deficient and Bankrupt"},
113 {
'H',
"Deficient and Delinquent"},
114 {
'J',
"Delinquent and Bankrupt"},
115 {
'K',
"Deficient, Delinquent and Bankrupt"},
116 {
'C',
"Creations and/or Redemptions Suspended for Exchange Traded Product"},
117 {
'N',
"Normal (Default): Issuer is NOT Deficient, Delinquent, or Bankrupt"},
118 {
' ',
"Not available. Firms should refer to SIAC feeds for code if needed"},
123 std::to_array<std::pair<char, std::string_view>>({
124 {
'A',
"American Depositary Share"},
126 {
'C',
"Common Stock"},
127 {
'F',
"Depository Receipt"},
129 {
'L',
"Limited Partnership"},
131 {
'O',
"Ordinary Share"},
132 {
'P',
"Preferred Stock"},
133 {
'Q',
"Other Securities"},
135 {
'S',
"Shares of Beneficial Interest"},
136 {
'T',
"Convertible Debenture"},
138 {
'V',
"Units/Beneficial Interest"},
144 std::to_array<std::pair<std::string_view, std::string_view>>({
145 {
"A",
"Preferred Trust Securities"},
146 {
"AI",
"Alpha Index ETNs"},
147 {
"B",
"Index Based Derivative"},
148 {
"C",
"Common Shares"},
149 {
"CB",
"Commodity Based Trust Shares"},
150 {
"CF",
"Commodity Futures Trust Shares"},
151 {
"CL",
"Commodity-Linked Securities"},
152 {
"CM",
"Commodity Index Trust Shares"},
153 {
"CO",
"Collateralized Mortgage Obligation"},
154 {
"CT",
"Currency Trust Shares"},
155 {
"CU",
"Commodity-Currency-Linked Securities"},
156 {
"CW",
"Currency Warrants"},
157 {
"D",
"Global Depositary Shares"},
158 {
"E",
"ETF-Portfolio Depositary Receipt"},
159 {
"EG",
"Equity Gold Shares"},
160 {
"EI",
"ETN-Equity Index-Linked Securities"},
161 {
"EM",
"NextShares Exchange Traded Managed Fund*"},
162 {
"EN",
"Exchange Traded Notes"},
163 {
"EU",
"Equity Units"},
165 {
"FI",
"ETN-Fixed Income-Linked Securities"},
166 {
"FL",
"ETN-Futures-Linked Securities"},
167 {
"G",
"Global Shares"},
168 {
"I",
"ETF-Index Fund Shares"},
169 {
"IR",
"Interest Rate"},
170 {
"IW",
"Index Warrant"},
171 {
"IX",
"Index-Linked Exchangeable Notes"},
172 {
"J",
"Corporate Backed Trust Security"},
173 {
"L",
"Contingent Litigation Right"},
174 {
"LL",
"Limited Liability Company (LLC)"},
175 {
"M",
"Equity-Based Derivative"},
176 {
"MF",
"Managed Fund Shares"},
177 {
"ML",
"ETN-Multi-Factor Index-Linked Securities"},
178 {
"MT",
"Managed Trust Securities"},
179 {
"N",
"NY Registry Shares"},
180 {
"O",
"Open Ended Mutual Fund"},
181 {
"P",
"Privately Held Security"},
182 {
"PP",
"Poison Pill"},
183 {
"PU",
"Partnership Units"},
184 {
"Q",
"Closed-End Funds"},
186 {
"RC",
"Commodity-Redeemable Commodity-Linked Securities"},
187 {
"RF",
"ETN-Redeemable Futures-Linked Securities"},
189 {
"RU",
"Commodity-Redeemable Currency-Linked Securities"},
191 {
"SC",
"Spot Rate Closing"},
192 {
"SI",
"Spot Rate Intraday"},
193 {
"T",
"Tracking Stock"},
194 {
"TC",
"Trust Certificates"},
195 {
"TU",
"Trust Units"},
197 {
"V",
"Contingent Value Right"},
198 {
"W",
"Trust Issued Receipts"},
199 {
"WC",
"World Currency Option"},
202 {
"Z",
"Not Applicable"},
207 std::to_array<std::pair<std::string_view, std::string_view>>({
208 {
"T1",
"Halt News Pending"},
209 {
"T2",
"Halt News Disseminated"},
210 {
"T3",
"News and Resumption Times"},
211 {
"T5",
"Single Security Trading Pause In Effect"},
212 {
"T6",
"Regulatory Halt - Extraordinary Market Activity"},
213 {
"T7",
"Single Security Trading Pause / Quotation Only Period"},
215 {
"T12",
"Trading Halted; For Information Requested by Listing Market"},
216 {
"H4",
"Halt Non-Compliance"},
217 {
"H9",
"Halt Filings Not Current"},
218 {
"H10",
"Halt SEC Trading Suspension"},
219 {
"H11",
"Halt Regulatory Concern"},
220 {
"O1",
"Operations Halt; Contact Market Operations"},
221 {
"LUDP",
"Volatility Trading Pause"},
222 {
"LUDS",
"Volatility Trading Pause - Straddle Condition"},
223 {
"MWC0",
"Market Wide Circuit Breaker Halt - Carry over from previous day"},
224 {
"MWC1",
"Market Wide Circuit Breaker Halt - Level 1"},
225 {
"MWC2",
"Market Wide Circuit Breaker Halt - Level 2"},
226 {
"MWC3",
"Market Wide Circuit Breaker Halt - Level 3"},
227 {
"MWCQ",
"Market Wide Circuit Breaker Resumption"},
228 {
"IPO1",
"IPO Issue Not Yet Trading"},
229 {
"IPOQ",
"IPO Security Released for Quotation (Nasdaq Securities Only)"},
230 {
"IPOE",
"IPO Security - Positioning Window Extension (Nasdaq Securities Only)"},
231 {
"M1",
"Corporate Action"},
232 {
"M2",
"Quotation Not Available"},
233 {
"R1",
"New Issue Available"},
234 {
"R2",
"Issue Available"},
235 {
"R4",
"Qualifications Issues Reviewed/Resolved; Quotations/Trading to Resume"},
236 {
"R9",
"Filing Requirements Satisfied/Resolved; Quotations/Trading To Resume"},
237 {
"C3",
"Issuer News Not Forthcoming; Quotations/Trading To Resume"},
238 {
"C4",
"Qualifications Halt Ended; Maintenance Requirements Met; Resume"},
239 {
"C9",
"Qualifications Halt Concluded; Filings Met; Quotes/Trades To Resume"},
240 {
"C11",
"Trade Halt Concluded By Other Regulatory Authority; Quotes/Trades Resume"},
241 {
" ",
"Reason Not Available"},
246 {
'H',
"Halted across all U.S. equity markets / SROs"},
247 {
'P',
"Paused across all U.S. equity markets / SROs"},
248 {
'Q',
"Quotation only period for cross-SRO halt or pause"},
249 {
'T',
"Trading on NASDAQ"},
256 {
'R',
"Pre-syndicate"},
261 std::to_array<std::pair<char, std::string_view>>({
271 std::to_array<std::pair<char, std::string_view>>({
272 {
'L',
"Less than 1%"},
282 {
'A',
"10 to 19.99%"},
283 {
'B',
"20 to 29.99%"},
284 {
'C',
"30% or greater"},
285 {
' ',
"Cannot be calculated"},
An immutable, compile-time lookup table from a key to a description.
constexpr auto find(const KeyType &key) const noexcept -> std::optional< std::string_view >
Returns the description for a key, or std::nullopt if absent.
constexpr auto at_or(const KeyType &key, std::string_view fallback) const noexcept -> std::string_view
Returns the description for a key, or a fallback if absent.
std::pair< KeyType, std::string_view > value_type
constexpr FrozenMap(std::array< value_type, Size > entries) noexcept
Constructs the map from an unsorted list of key/description entries, sorting them by key once so that...
constexpr FrozenMap TRADING_ACTION_REASON_CODES
constexpr FrozenMap MARKET_PARTICIPANT_STATE
constexpr FrozenMap MARKET_CATEGORY
constexpr FrozenMap PRICE_VARIATION_INDICATOR
constexpr FrozenMap SYSTEM_EVENT_CODES
constexpr FrozenMap TRADING_STATES
constexpr FrozenMap MARKET_MAKER_MODE
constexpr FrozenMap ISSUE_CLASSIFICATION_VALUES
constexpr FrozenMap ISSUE_SUB_TYPE_VALUES
constexpr FrozenMap FINANCIAL_STATUS_INDICATOR