IdentityCurrencyConverter
QuantConnect.Securities.IdentityCurrencyConverter
IdentityCurrencyConverter(account_currency: str)
Bases: Object, ICurrencyConverter
Provides an implementation of ICurrencyConverter that does NOT perform conversions. This implementation will throw if the specified cashAmount is not in units of account currency.
Initializes a new instance of the ICurrencyConverter class
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account_currency
|
str
|
The algorithm's account currency |
required |
account_currency
account_currency: str
Gets account currency
convert_to_account_currency
convert_to_account_currency(
cash_amount: CashAmount,
) -> CashAmount
Converts a cash amount to the account currency. This implementation can only handle cash amounts in units of 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. |