Disable some worker + funding rate top 6 for long and short
This commit is contained in:
@@ -98,10 +98,17 @@ public class StatisticService : IStatisticService
|
||||
|
||||
var newFundingRates = await _tradaoService.GetFundingRates();
|
||||
var topRates = newFundingRates
|
||||
.Where(fr => fr.Direction == TradeDirection.Short && fr.Rate > 0)
|
||||
.OrderByDescending(fr => fr.Rate)
|
||||
.Take(3)
|
||||
.ToList();
|
||||
|
||||
topRates.AddRange(newFundingRates
|
||||
.Where(fr => fr.Direction == TradeDirection.Long && fr.Rate > 0)
|
||||
.OrderBy(fr => fr.Rate)
|
||||
.TakeLast(3)
|
||||
.ToList());
|
||||
|
||||
// Old position not in the new top
|
||||
foreach (var oldRate in previousFundingRate)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user