Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ private ExchangePoloniexAPI()
RequestContentType = "application/json";
MarketSymbolSeparator = "_";
WebSocketOrderBookType = WebSocketOrderBookType.DeltasOnly;
RateLimit = new RateGate(10, TimeSpan.FromSeconds(1));
}

/// <summary>
Expand Down Expand Up @@ -78,9 +79,8 @@ protected override Task OnInitializeAsync()
fieldCount[split[0]] = split[1].ConvertInvariant<int>();
}
}

WithdrawalFieldCount = fieldCount;
ExchangeGlobalCurrencyReplacements["STR"] = "XLM"; // wtf

return Task.CompletedTask;
}

Expand Down
8 changes: 3 additions & 5 deletions src/ExchangeSharp/Utility/CryptoUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1412,14 +1412,12 @@ public static decimal CalculatePrecision(string numberWithDecimals)
/// </summary>
public static decimal PrecisionToStepSize(decimal precision)
{
if (precision == 0) return 1;

var sb = new StringBuilder();
sb.Append("0");
if (precision > 0) sb.Append(".");
if (precision == 1)
{
sb.Append("1");
return decimal.Parse(sb.ToStringInvariant());
}

for (var i = 0; i < precision; i++)
{
sb.Append(i + 1 == precision ? "1" : "0");
Expand Down