Skip to main content

Module market

Module market 

Source
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 TrdSecMarket from explicit value, account market, and code.
extract_futures_ticker_prefix
Extract the ticker prefix from a futures code.
futures_ticker_to_sec_market
Derive TrdSecMarket from known futures ticker prefixes.
is_futures_code
Return whether the code looks like a futures symbol.
sec_market_from_code_prefix
Derive TrdSecMarket from an explicit code prefix such as HK. / US..
strip_market_prefix
Strip a known FTAPI market prefix from a user/security code.
trd_market_label
Canonical Trd_Common.TrdMarket label 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.