File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ private ExchangePoloniexAPI()
33
33
RequestContentType = "application/json" ;
34
34
MarketSymbolSeparator = "_" ;
35
35
WebSocketOrderBookType = WebSocketOrderBookType . DeltasOnly ;
36
+ RateLimit = new RateGate ( 10 , TimeSpan . FromSeconds ( 1 ) ) ;
36
37
}
37
38
38
39
/// <summary>
@@ -78,9 +79,8 @@ protected override Task OnInitializeAsync()
78
79
fieldCount [ split [ 0 ] ] = split [ 1 ] . ConvertInvariant < int > ( ) ;
79
80
}
80
81
}
81
-
82
82
WithdrawalFieldCount = fieldCount ;
83
- ExchangeGlobalCurrencyReplacements [ "STR" ] = "XLM" ; // wtf
83
+
84
84
return Task . CompletedTask ;
85
85
}
86
86
Original file line number Diff line number Diff line change @@ -1412,14 +1412,12 @@ public static decimal CalculatePrecision(string numberWithDecimals)
1412
1412
/// </summary>
1413
1413
public static decimal PrecisionToStepSize ( decimal precision )
1414
1414
{
1415
+ if ( precision == 0 ) return 1 ;
1416
+
1415
1417
var sb = new StringBuilder ( ) ;
1416
1418
sb . Append ( "0" ) ;
1417
1419
if ( precision > 0 ) sb . Append ( "." ) ;
1418
- if ( precision == 1 )
1419
- {
1420
- sb . Append ( "1" ) ;
1421
- return decimal . Parse ( sb . ToStringInvariant ( ) ) ;
1422
- }
1420
+
1423
1421
for ( var i = 0 ; i < precision ; i ++ )
1424
1422
{
1425
1423
sb . Append ( i + 1 == precision ? "1" : "0" ) ;
You can’t perform that action at this time.
0 commit comments