Sviluppo TradingBot
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
public async Task<List<IBar>> GetHistoricalBarsAsync(string symbol)
|
||||
{
|
||||
var request = new HistoricalBarsRequest(symbol, BarTimeFrame.Hour, Into.Past(TimeSpan.FromDays(7)))
|
||||
{
|
||||
// Limitiamo i dati per mantenere l'app leggera
|
||||
PageSize = 50
|
||||
};
|
||||
|
||||
IMultiPage<IBar> barsPage = await _dataClient.ListHistoricalBarsAsync(request);
|
||||
|
||||
// Restituisce la lista di candele per il simbolo specificato
|
||||
return barsPage.Items[symbol].ToList();
|
||||
}
|
||||
Reference in New Issue
Block a user