diff --git a/src/ExchangeSharp/API/Exchanges/Aquanow/ExchangeAquanowAPI.cs b/src/ExchangeSharp/API/Exchanges/Aquanow/ExchangeAquanowAPI.cs index 4c1a5124a..68ac64302 100644 --- a/src/ExchangeSharp/API/Exchanges/Aquanow/ExchangeAquanowAPI.cs +++ b/src/ExchangeSharp/API/Exchanges/Aquanow/ExchangeAquanowAPI.cs @@ -37,13 +37,13 @@ private ExchangeAquanowAPI() protected override async Task> OnGetMarketSymbolsAsync() { - List symbols = new List(); + List marketSymbols = new List(); JToken token = await MakeJsonRequestAsync("/availablesymbols", MarketUrl); - foreach (string symbol in token) + foreach (string marketSymbol in token) { - symbols.Add(symbol); + marketSymbols.Add(marketSymbol); } - return symbols; + return marketSymbols; } // NOT SUPPORTED diff --git a/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPI.cs b/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPI.cs index ba3b3f3ae..0dbfadf01 100644 --- a/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPI.cs +++ b/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPI.cs @@ -288,7 +288,7 @@ protected async Task ExchangeMarketSymbolToGlobalMarketSymbolWithSeparat { if (string.IsNullOrEmpty(marketSymbol)) { - throw new ArgumentException("Symbol must be non null and non empty"); + throw new ArgumentException("Market symbol must be non null and non empty"); } string[] pieces = marketSymbol.Split(separator); if (MarketSymbolIsReversed == false) //if reversed then put quote currency first @@ -582,7 +582,7 @@ public string GlobalCurrencyToExchangeCurrency(string currency) /// Normalize an exchange specific symbol. The symbol should already be in the correct order, /// this method just deals with casing and putting in the right separator. /// - /// Symbol + /// Market symbol /// Normalized symbol public virtual string NormalizeMarketSymbol(string? marketSymbol) { @@ -649,8 +649,8 @@ public virtual async Task ExchangeMarketSymbolToGlobalMarketSymbolAsync( /// Exchange market symbol public virtual Task CurrenciesToExchangeMarketSymbol(string baseCurrency, string quoteCurrency) { - string symbol = (MarketSymbolIsReversed ? $"{quoteCurrency}{MarketSymbolSeparator}{baseCurrency}" : $"{baseCurrency}{MarketSymbolSeparator}{quoteCurrency}"); - return Task.FromResult(MarketSymbolIsUppercase ? symbol.ToUpperInvariant() : symbol); + string marketSymbol = (MarketSymbolIsReversed ? $"{quoteCurrency}{MarketSymbolSeparator}{baseCurrency}" : $"{baseCurrency}{MarketSymbolSeparator}{quoteCurrency}"); + return Task.FromResult(MarketSymbolIsUppercase ? marketSymbol.ToUpperInvariant() : marketSymbol); } /// @@ -1070,7 +1070,7 @@ public virtual async Task> GetWithdrawHistoryAs /// /// Get open margin position /// - /// Symbol + /// Market symbol /// Open margin position result public virtual async Task GetOpenPositionAsync(string marketSymbol) { @@ -1081,7 +1081,7 @@ public virtual async Task GetOpenPositionAsync(str /// /// Close a margin position /// - /// Symbol + /// Market symbol /// Close margin position result public virtual async Task CloseMarginPositionAsync(string marketSymbol) { diff --git a/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPIExtensions.cs b/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPIExtensions.cs index 908c4d832..764e3c326 100644 --- a/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPIExtensions.cs +++ b/src/ExchangeSharp/API/Exchanges/_Base/ExchangeAPIExtensions.cs @@ -244,7 +244,7 @@ public static async Task> GetExchangeMarketDi /// The order book is scanned until an amount of bids or asks that will fulfill the order is found and then the order is placed at the lowest bid or highest ask price multiplied /// by priceThreshold. /// - /// Symbol to sell + /// Symbol to sell /// Amount to sell /// True for buy, false for sell /// Amount of bids/asks to request in the order book @@ -254,7 +254,7 @@ public static async Task> GetExchangeMarketDi /// This ensures that your order does not buy or sell at an extreme margin. /// Whether to abort if the order book does not have enough bids or ask amounts to fulfill the order. /// Order result - public static async Task PlaceSafeMarketOrderAsync(this ExchangeAPI api, string symbol, decimal amount, bool isBuy, int orderBookCount = 100, decimal priceThreshold = 0.9m, + public static async Task PlaceSafeMarketOrderAsync(this ExchangeAPI api, string marketSymbol, decimal amount, bool isBuy, int orderBookCount = 100, decimal priceThreshold = 0.9m, decimal thresholdToAbort = 0.75m, bool abortIfOrderBookTooSmall = false) { if (priceThreshold > 0.9m) @@ -270,10 +270,10 @@ public static async Task PlaceSafeMarketOrderAsync(this Exc { priceThreshold = 1.0m / priceThreshold; } - ExchangeOrderBook book = await api.GetOrderBookAsync(symbol, orderBookCount); + ExchangeOrderBook book = await api.GetOrderBookAsync(marketSymbol, orderBookCount); if (book == null || (isBuy && book.Asks.Count == 0) || (!isBuy && book.Bids.Count == 0)) { - throw new APIException($"Error getting order book for {symbol}"); + throw new APIException($"Error getting order book for {marketSymbol}"); } decimal counter = 0m; decimal highPrice = decimal.MinValue; @@ -306,11 +306,11 @@ public static async Task PlaceSafeMarketOrderAsync(this Exc } if (abortIfOrderBookTooSmall && counter < amount) { - throw new APIException($"{(isBuy ? "Buy" : "Sell") } order for {symbol} and amount {amount} cannot be fulfilled because the order book is too thin."); + throw new APIException($"{(isBuy ? "Buy" : "Sell") } order for {marketSymbol} and amount {amount} cannot be fulfilled because the order book is too thin."); } else if (lowPrice / highPrice < thresholdToAbort) { - throw new APIException($"{(isBuy ? "Buy" : "Sell")} order for {symbol} and amount {amount} would place for a price below threshold of {thresholdToAbort}, aborting."); + throw new APIException($"{(isBuy ? "Buy" : "Sell")} order for {marketSymbol} and amount {amount} would place for a price below threshold of {thresholdToAbort}, aborting."); } ExchangeOrderRequest request = new ExchangeOrderRequest { @@ -319,7 +319,7 @@ public static async Task PlaceSafeMarketOrderAsync(this Exc OrderType = OrderType.Limit, Price = CryptoUtility.RoundAmount((isBuy ? highPrice : lowPrice) * priceThreshold), ShouldRoundAmount = true, - MarketSymbol = symbol + MarketSymbol = marketSymbol }; ExchangeOrderResult result = await api.PlaceOrderAsync(request); @@ -329,7 +329,7 @@ public static async Task PlaceSafeMarketOrderAsync(this Exc for (; i < maxTries; i++) { await System.Threading.Tasks.Task.Delay(500); - result = await api.GetOrderDetailsAsync(result.OrderId, marketSymbol: symbol); + result = await api.GetOrderDetailsAsync(result.OrderId, marketSymbol: marketSymbol); switch (result.Result) { case ExchangeAPIOrderResult.Filled: @@ -343,7 +343,7 @@ public static async Task PlaceSafeMarketOrderAsync(this Exc if (i == maxTries) { - throw new APIException($"{(isBuy ? "Buy" : "Sell")} order for {symbol} and amount {amount} timed out and may not have been fulfilled"); + throw new APIException($"{(isBuy ? "Buy" : "Sell")} order for {marketSymbol} and amount {amount} timed out and may not have been fulfilled"); } return result; diff --git a/src/ExchangeSharp/API/Exchanges/_Base/ExchangeLogger.cs b/src/ExchangeSharp/API/Exchanges/_Base/ExchangeLogger.cs index f60f32b78..5c5683067 100644 --- a/src/ExchangeSharp/API/Exchanges/_Base/ExchangeLogger.cs +++ b/src/ExchangeSharp/API/Exchanges/_Base/ExchangeLogger.cs @@ -316,7 +316,7 @@ public static IEnumerable> ReadMultiTickers(s public IExchangeAPI API { get; private set; } /// - /// The symbol being logged + /// The market symbol being logged /// public string MarketSymbol { get; private set; } diff --git a/src/ExchangeSharp/API/Exchanges/_Base/IExchangeAPI.cs b/src/ExchangeSharp/API/Exchanges/_Base/IExchangeAPI.cs index 302dc72e0..65f490402 100644 --- a/src/ExchangeSharp/API/Exchanges/_Base/IExchangeAPI.cs +++ b/src/ExchangeSharp/API/Exchanges/_Base/IExchangeAPI.cs @@ -25,7 +25,7 @@ public interface IExchangeAPI : IDisposable, IBaseAPI, IOrderBookProvider #region Utility Methods /// - /// Normalize a symbol for use on this exchange. + /// Normalize a market symbol for use on this exchange. /// /// Symbol /// Normalized symbol diff --git a/src/ExchangeSharp/API/Exchanges/_Base/Interfaces/IOrderBookProvider.cs b/src/ExchangeSharp/API/Exchanges/_Base/Interfaces/IOrderBookProvider.cs index 437e80df3..84f39b3e9 100644 --- a/src/ExchangeSharp/API/Exchanges/_Base/Interfaces/IOrderBookProvider.cs +++ b/src/ExchangeSharp/API/Exchanges/_Base/Interfaces/IOrderBookProvider.cs @@ -1,4 +1,4 @@ -/* +/* MIT LICENSE Copyright 2017 Digital Ruby, LLC - http://www.digitalruby.com @@ -25,7 +25,7 @@ public interface IOrderBookProvider /// /// Get pending orders. Depending on the exchange, the number of bids and asks will have different counts, typically 50-100. /// - /// Symbol + /// Market symbol /// Max count of bids and asks - not all exchanges will honor this parameter /// Orders Task GetOrderBookAsync(string marketSymbol, int maxCount = 100); diff --git a/src/ExchangeSharp/Model/ExchangeTradeInfo.cs b/src/ExchangeSharp/Model/ExchangeTradeInfo.cs index 278bcd7b7..3b554f5a2 100644 --- a/src/ExchangeSharp/Model/ExchangeTradeInfo.cs +++ b/src/ExchangeSharp/Model/ExchangeTradeInfo.cs @@ -1,4 +1,4 @@ -/* +/* MIT LICENSE Copyright 2017 Digital Ruby, LLC - http://www.digitalruby.com @@ -27,7 +27,7 @@ public sealed class ExchangeTradeInfo /// Constructor /// /// Exchange info - /// The symbol to trade + /// Market symbol to trade public ExchangeTradeInfo(ExchangeInfo info, string marketSymbol) { ExchangeInfo = info;