private IReadOnlyCollection <OrderTransaction> GetTransactions( ILimitOrder order, IEnumerable <JObject> transactions) { var(cryptoCurrency, _) = GetSymbols(order.Instrument); var result = new List <OrderTransaction>(); foreach (var transaction in transactions) { try { var dict = new Dictionary <string, JToken>(StringComparer.InvariantCultureIgnoreCase); foreach (var keyValue in transaction) { dict[keyValue.Key] = keyValue.Value; } if (!dict.ContainsKey(cryptoCurrency)) { throw new InvalidOperationException($"Result currency not found in response: {cryptoCurrency}"); } var tran = new OrderTransaction { Amount = decimal.Parse(dict[cryptoCurrency].Value <string>(), System.Globalization.NumberStyles.Any), Price = decimal.Parse(dict["price"].Value <string>(), System.Globalization.NumberStyles.Any) }; result.Add(tran); } catch (Exception ex) { _log.Error(ex, context: $"tran: {transaction}, order: {order.ToJson()}"); throw; } } return(result); }