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()
3333 RequestContentType = "application/json" ;
3434 MarketSymbolSeparator = "_" ;
3535 WebSocketOrderBookType = WebSocketOrderBookType . DeltasOnly ;
36+ RateLimit = new RateGate ( 10 , TimeSpan . FromSeconds ( 1 ) ) ;
3637 }
3738
3839 /// <summary>
@@ -78,9 +79,8 @@ protected override Task OnInitializeAsync()
7879 fieldCount [ split [ 0 ] ] = split [ 1 ] . ConvertInvariant < int > ( ) ;
7980 }
8081 }
81-
8282 WithdrawalFieldCount = fieldCount ;
83- ExchangeGlobalCurrencyReplacements [ "STR" ] = "XLM" ; // wtf
83+
8484 return Task . CompletedTask ;
8585 }
8686
Original file line number Diff line number Diff line change @@ -1412,14 +1412,12 @@ public static decimal CalculatePrecision(string numberWithDecimals)
14121412 /// </summary>
14131413 public static decimal PrecisionToStepSize ( decimal precision )
14141414 {
1415+ if ( precision == 0 ) return 1 ;
1416+
14151417 var sb = new StringBuilder ( ) ;
14161418 sb . Append ( "0" ) ;
14171419 if ( precision > 0 ) sb . Append ( "." ) ;
1418- if ( precision == 1 )
1419- {
1420- sb . Append ( "1" ) ;
1421- return decimal . Parse ( sb . ToStringInvariant ( ) ) ;
1422- }
1420+
14231421 for ( var i = 0 ; i < precision ; i ++ )
14241422 {
14251423 sb . Append ( i + 1 == precision ? "1" : "0" ) ;
You can’t perform that action at this time.
0 commit comments