ErrorCurrencyConverter
QuantConnect.Securities.ErrorCurrencyConverter
Bases: Object, ICurrencyConverter
Provides an implementation of ICurrencyConverter for use in tests that don't depend on this behavior.
account_currency
account_currency: str
Gets account currency
instance
instance: ICurrencyConverter = ...
Provides access to the single instance of ErrorCurrencyConverter. This is done this way to ensure usage is explicit.
convert_to_account_currency
convert_to_account_currency(
cash_amount: CashAmount,
) -> CashAmount
Converts a cash amount to the account currency
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cash_amount
|
CashAmount
|
The CashAmount instance to convert |
required |
Returns:
| Type | Description |
|---|---|
CashAmount
|
A new CashAmount instance denominated in the account currency. |