Expand description
Shared trade market projection helpers.
These are pure helpers used by gateway response projection and CLI/domain adapters. Keep them here instead of in one surface handler so market prefix and futures-ticker fallback rules have a single callable source.
Functionsยง
- derive_
sec_ market - Derive FTAPI
TrdSecMarketfrom explicit value, account market, and code. - extract_
futures_ ticker_ prefix - Extract the ticker prefix from a futures code.
- futures_
ticker_ to_ sec_ market - Derive
TrdSecMarketfrom known futures ticker prefixes. - is_
futures_ code - Return whether the code looks like a futures symbol.
- sec_
market_ from_ code_ prefix - Derive
TrdSecMarketfrom an explicit code prefix such asHK./US.. - strip_
market_ prefix - Strip a known FTAPI market prefix from a user/security code.
- trd_
market_ label - Canonical
Trd_Common.TrdMarketlabel used by user-facing filters and surface adapters. - view_
only_ fund_ market_ label - Label for fund markets that are view-only on active write/calculation paths.