Update tickers
This commit is contained in:
@@ -29,11 +29,36 @@ public abstract class PricesBaseWorker<T> : BaseWorker<T> where T : class
|
||||
_timeframe = timeframe;
|
||||
}
|
||||
|
||||
private List<Ticker> _eligibleTickers = new List<Ticker>
|
||||
{
|
||||
Ticker.BTC,
|
||||
Ticker.ETH,
|
||||
Ticker.BNB,
|
||||
Ticker.DOGE,
|
||||
Ticker.ADA,
|
||||
Ticker.SOL,
|
||||
Ticker.XRP,
|
||||
Ticker.LINK,
|
||||
Ticker.RENDER,
|
||||
Ticker.SUI,
|
||||
Ticker.GMX,
|
||||
Ticker.ARB,
|
||||
Ticker.PEPE,
|
||||
Ticker.PENDLE,
|
||||
Ticker.AAVE,
|
||||
Ticker.HYPE
|
||||
};
|
||||
|
||||
protected override async Task Run(CancellationToken cancellationToken)
|
||||
{
|
||||
var tickers = await _statisticService.GetTickers();
|
||||
|
||||
foreach (var ticker in tickers)
|
||||
var filteredTickers = tickers
|
||||
.Where(t => _eligibleTickers.Contains(t))
|
||||
.ToList();
|
||||
|
||||
// Filter with the eligible tickers
|
||||
foreach (var ticker in filteredTickers)
|
||||
{
|
||||
await _pricesService.UpdatePrice(TradingExchanges.Evm, ticker, _timeframe);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user