Skip to main content

derive_top_level_currency

Function derive_top_level_currency 

Source
pub fn derive_top_level_currency(
    account_kind: AccountKind,
    effective_currency: Option<i32>,
    acc_security_firm: Option<i32>,
    acc_trd_market: Option<i32>,
    cached_currency: Option<i32>,
    header_trd_market: i32,
    trd_env: i32,
) -> Option<i32>
Expand description

Funds top-level currency projection.

Futures/Universal use the request/effective currency when available, while SingleCurrency accounts prefer backend/cache native currency and ignore the user request. Sim-futures and fund sub-markets keep their fixed native currency even when the request carries another currency.