Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions Common/Securities/Cash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,9 @@ public List<SubscriptionDataConfig> EnsureCurrencyDataFeed(SecurityManager secur
return null;
}

// Special case for crypto markets without direct pairs (They wont be found by the above)
// This allows us to add cash for "StableCoins" that are 1-1 with our account currency without needing a conversion security.
// Check out the StableCoinsWithoutPairs static var for those that are missing their 1-1 conversion pairs
if (marketMap.TryGetValue(SecurityType.Crypto, out var market)
&&
(Currencies.IsStableCoinWithoutPair(Symbol + accountCurrency, market)
|| Currencies.IsStableCoinWithoutPair(accountCurrency + Symbol, market)))
if (markets.ContainsKey(SecurityType.CryptoFuture))
{
CurrencyConversion = ConstantCurrencyConversion.Identity(accountCurrency, Symbol);
return null;
cryptoEntries = cryptoEntries.Concat(GetAvailableSymbolPropertiesDatabaseEntries(SecurityType.CryptoFuture, marketMap, markets));
}

var requiredSecurities = new List<SubscriptionDataConfig>();
Expand Down Expand Up @@ -339,7 +332,7 @@ public List<SubscriptionDataConfig> EnsureCurrencyDataFeed(SecurityManager secur
CurrencyConversion = SecurityCurrencyConversion.LinearSearch(Symbol,
accountCurrency,
securitiesToSearch.ToList(),
potentials,
potentials.Where(x => markets.ContainsKey(x.SecurityType)),
makeNewSecurity);

return requiredSecurities;
Expand Down