Class FREDServer
- Namespace
- Balsam.DataServers
- Assembly
- Balsam.Backtester.dll
Returns timeseries objects from the St. Loius Federal Reserve's FRED database.
public class FREDServer : BarServer, IBarServer
- Inheritance
-
FREDServer
- Implements
- Inherited Members
- Extension Methods
Constructors
FREDServer()
Instantiates a new FREDServer object.
public FREDServer()
FREDServer(string)
Instantiates a new FREDServer using the specified API key.
public FREDServer(string apiKey)
Parameters
apiKey
string
Properties
ApiKey
Gets/sets the API key used as credentials.
public string ApiKey { get; set; }
Property Value
Methods
GetPointInTimeHistory(string, DateTime, DateTime, int)
Retrieves point-in-time data using the specified parameters.
public ObservationSeries GetPointInTimeHistory(string symbol, DateTime startDate, DateTime endDate, int requestSize = 500)
Parameters
symbol
stringstartDate
DateTimeendDate
DateTimerequestSize
intNumber of vintage dates to request at a time. Lower the request size if you get 504 gateway timeout errors.
Returns
Exceptions
GetPointInTimeHistory(string, int)
Retrieves point-in-time data for the specified symbol.
public ObservationSeries GetPointInTimeHistory(string symbol, int requestSize = 500)
Parameters
symbol
stringrequestSize
intNumber of vintage dates to request at a time. Lower the request size if you get 504 gateway timeout errors.
Returns
GetVintageDates(string)
Gets the vintage dates for the specified symbol.
public IEnumerable<DateTime> GetVintageDates(string symbol)
Parameters
symbol
string
Returns
GetVintageDates(string, DateTime, DateTime)
Gets the vintage dates for the specified symbol between the specified realtime start and end dates.
public IEnumerable<DateTime> GetVintageDates(string symbol, DateTime startDate, DateTime endDate)
Parameters
Returns
Exceptions
GetVintageDatesAsync(string, DateTime, DateTime)
Gets vintage dates for the specified symbol.
public Task<IEnumerable<DateTime>> GetVintageDatesAsync(string symbol, DateTime startDate, DateTime endDate)
Parameters
Returns
Exceptions
LoadSymbolAsync(string, DateTime, DateTime, int)
Loads the specified symbol via the web API.
public Task<BarSeries> LoadSymbolAsync(string symbol, DateTime startDate, DateTime endDate, int barsToLoad = 2147483647)
Parameters
Returns
Exceptions
LoadSymbolByVintageDate(string, DateTime)
Returns observations available for the specified symbol and vintage date.
public ObservationSeries LoadSymbolByVintageDate(string symbol, DateTime vintageDate)
Parameters
Returns
LoadSymbolByVintageDateAsync(string, DateTime)
Returns observations available for the specified symbol on the specified vintage date.
public Task<ObservationSeries> LoadSymbolByVintageDateAsync(string symbol, DateTime vintageDate)
Parameters
Returns
Exceptions
OnGetSymbols()
Not supported.
protected override IEnumerable<string> OnGetSymbols()
Returns
OnLoadSymbol(string, DateTime, DateTime, int)
Loads data from the web API.
protected override BarSeries OnLoadSymbol(string symbol, DateTime startDate, DateTime endDate, int barsToLoad = 2147483647)
Parameters
symbol
stringstartDate
DateTimeendDate
DateTimebarsToLoad
intLimit to n records. Note holidays will not be included so you will potentially get less data back than specified.