Utility methods for decomposing and comparing currency pairs
More...
|
static bool | TryDecomposeCurrencyPair (Symbol currencyPair, out string baseCurrency, out string quoteCurrency) |
| Tries to decomposes the specified currency pair into a base and quote currency provided as out parameters More...
|
|
static void | DecomposeCurrencyPair (Symbol currencyPair, out string baseCurrency, out string quoteCurrency, string defaultQuoteCurrency=Currencies.USD) |
| Decomposes the specified currency pair into a base and quote currency provided as out parameters More...
|
|
static bool | IsForexDecomposable (string currencyPair) |
| Checks whether a symbol is decomposable into a base and a quote currency More...
|
|
static bool | IsDecomposable (Symbol currencyPair) |
| Checks whether a symbol is decomposable into a base and a quote currency More...
|
|
static string | CurrencyPairDual (this Symbol currencyPair, string knownSymbol) |
| You have currencyPair AB and one known symbol (A or B). This function returns the other symbol (B or A). More...
|
|
static string | CurrencyPairDual (string baseCurrency, string quoteCurrency, string knownSymbol) |
| You have currencyPair AB and one known symbol (A or B). This function returns the other symbol (B or A). More...
|
|
static Match | ComparePair (this Symbol pairA, string baseCurrencyB, string quoteCurrencyB) |
| Returns how two currency pairs are related to each other More...
|
|
static bool | IsValidSecurityType (SecurityType? securityType, bool throwException) |
|
Utility methods for decomposing and comparing currency pairs
Definition at line 27 of file CurrencyPairUtil.cs.
◆ Match
Represents the relation between two currency pairs
Enumerator |
---|
NoMatch | The two currency pairs don't match each other normally nor when one is reversed
|
ExactMatch | The two currency pairs match each other exactly
|
InverseMatch | The two currency pairs are the inverse of each other
|
Definition at line 178 of file CurrencyPairUtil.cs.
◆ TryDecomposeCurrencyPair()
static bool QuantConnect.Util.CurrencyPairUtil.TryDecomposeCurrencyPair |
( |
Symbol |
currencyPair, |
|
|
out string |
baseCurrency, |
|
|
out string |
quoteCurrency |
|
) |
| |
|
static |
Tries to decomposes the specified currency pair into a base and quote currency provided as out parameters
- Parameters
-
currencyPair | The input currency pair to be decomposed |
baseCurrency | The output base currency |
quoteCurrency | The output quote currency |
- Returns
- True if was able to decompose the currency pair
Definition at line 39 of file CurrencyPairUtil.cs.
◆ DecomposeCurrencyPair()
static void QuantConnect.Util.CurrencyPairUtil.DecomposeCurrencyPair |
( |
Symbol |
currencyPair, |
|
|
out string |
baseCurrency, |
|
|
out string |
quoteCurrency, |
|
|
string |
defaultQuoteCurrency = Currencies.USD |
|
) |
| |
|
static |
Decomposes the specified currency pair into a base and quote currency provided as out parameters
- Parameters
-
currencyPair | The input currency pair to be decomposed |
baseCurrency | The output base currency |
quoteCurrency | The output quote currency |
defaultQuoteCurrency | Optionally can provide a default quote currency |
Definition at line 69 of file CurrencyPairUtil.cs.
◆ IsForexDecomposable()
static bool QuantConnect.Util.CurrencyPairUtil.IsForexDecomposable |
( |
string |
currencyPair | ) |
|
|
static |
Checks whether a symbol is decomposable into a base and a quote currency
- Parameters
-
currencyPair | The pair to check for |
- Returns
- True if the pair can be decomposed into base and quote currencies, false if not
Definition at line 101 of file CurrencyPairUtil.cs.
◆ IsDecomposable()
static bool QuantConnect.Util.CurrencyPairUtil.IsDecomposable |
( |
Symbol |
currencyPair | ) |
|
|
static |
Checks whether a symbol is decomposable into a base and a quote currency
- Parameters
-
currencyPair | The pair to check for |
- Returns
- True if the pair can be decomposed into base and quote currencies, false if not
Definition at line 111 of file CurrencyPairUtil.cs.
◆ CurrencyPairDual() [1/2]
static string QuantConnect.Util.CurrencyPairUtil.CurrencyPairDual |
( |
this Symbol |
currencyPair, |
|
|
string |
knownSymbol |
|
) |
| |
|
static |
You have currencyPair AB and one known symbol (A or B). This function returns the other symbol (B or A).
- Parameters
-
currencyPair | Currency pair AB |
knownSymbol | Known part of the currencyPair (either A or B) |
- Returns
- The other part of currencyPair (either B or A), or null if known symbol is not part of currencyPair
Definition at line 143 of file CurrencyPairUtil.cs.
◆ CurrencyPairDual() [2/2]
static string QuantConnect.Util.CurrencyPairUtil.CurrencyPairDual |
( |
string |
baseCurrency, |
|
|
string |
quoteCurrency, |
|
|
string |
knownSymbol |
|
) |
| |
|
static |
You have currencyPair AB and one known symbol (A or B). This function returns the other symbol (B or A).
- Parameters
-
baseCurrency | The base currency of the currency pair |
quoteCurrency | The quote currency of the currency pair |
knownSymbol | Known part of the currencyPair (either A or B) |
- Returns
- The other part of currencyPair (either B or A), or null if known symbol is not part of the currency pair
Definition at line 160 of file CurrencyPairUtil.cs.
◆ ComparePair()
static Match QuantConnect.Util.CurrencyPairUtil.ComparePair |
( |
this Symbol |
pairA, |
|
|
string |
baseCurrencyB, |
|
|
string |
quoteCurrencyB |
|
) |
| |
|
static |
Returns how two currency pairs are related to each other
- Parameters
-
pairA | The first pair |
baseCurrencyB | The base currency of the second pair |
quoteCurrencyB | The quote currency of the second pair |
- Returns
- The Match member that represents the relation between the two pairs
Definition at line 203 of file CurrencyPairUtil.cs.
The documentation for this class was generated from the following file: