17 using System.Collections.Generic;
32 private readonly List<string> _fiatsAvailableMargin =
new() {
"USD",
"EUR"};
33 private readonly List<string> _onlyFiatsAvailableMargin =
new() {
"BTC",
"USDT",
"USDC"};
34 private readonly List<string> _ethAvailableMargin =
new() {
"REP",
"XTZ",
"ADA",
"EOS",
"TRX",
"LINK" };
36 private readonly HashSet<OrderType> _supportedOrderTypes =
new()
48 public override IReadOnlyDictionary<SecurityType, string>
DefaultMarkets {
get; } = GetDefaultMarkets();
53 public IReadOnlyDictionary<string, decimal>
CoinLeverage {
get; } =
new Dictionary<string, decimal>
108 if (!_supportedOrderTypes.Contains(order.
Type))
116 return base.CanSubmitOrder(security, order, out message);
156 foreach (var coin
in _onlyFiatsAvailableMargin.Where(coin => security.Symbol.ID.Symbol.StartsWith(coin)).Where(coin => _fiatsAvailableMargin.Any(rightFiat => security.Symbol.Value.EndsWith(rightFiat))))
161 List<string> extendedCoinArray =
new() {
"BTC",
"ETH"};
162 extendedCoinArray.AddRange(_fiatsAvailableMargin);
164 foreach (var coin
in _ethAvailableMargin.Where(coin => security.Symbol.ID.Symbol.StartsWith(coin)).Where(coin => extendedCoinArray.Any(rightFiat => security.Symbol.Value.EndsWith(rightFiat))))
169 extendedCoinArray.Remove(
"ETH");
171 foreach (var coin
in CoinLeverage.Keys.Where(coin => security.Symbol.ID.Symbol.StartsWith(coin)).Where(coin => extendedCoinArray.Any(rightFiat => security.Symbol.Value.EndsWith(rightFiat))))
194 private static IReadOnlyDictionary<SecurityType, string> GetDefaultMarkets()
198 return map.ToReadOnlyDictionary();