Skip to main content

Module trade_security

Module trade_security 

Source
Expand description

Stable API — trade-side security code shape and sec-market derivation. Used by futu-trd and trade-write domain without introducing reverse runtime/domain dependencies. Trade-side security code shape and market derivation helpers.

These pure rules sit below both SDK/runtime crates and trade-domain crates: futu-trd needs them for public SDK projection, while trade-write domain keeps compatibility re-exports for write-path policy.

Structs§

TrdSecMarketInput
Input facts used to derive FTAPI TrdSecMarket.

Functions§

derive_trd_sec_market_like_cpp
C++-aligned TrdSecMarket derivation for trade requests.
extract_futures_ticker_prefix_like_cpp
Extract the ticker prefix from a futures code.
futures_ticker_to_sec_market_like_cpp
Derive TrdSecMarket from known futures ticker prefixes.
is_futures_code
Return whether the code looks like a futures symbol.
is_hk_index_option_code
HK index option ticker fallback used when static mkt_id is unavailable.
is_option_code
C++-aligned option symbol shape fallback.
sec_market_from_code_prefix_like_cpp
Derive FTAPI TrdSecMarket from an explicit code prefix.
strip_market_prefix
Strip a known FTAPI market prefix from a user/security code.