Name | Status | History |
---|---|---|
GitHub Actions |
AlphaVantage.Net is a library for interacting with Alpha Vantage's equity APIs. See their documentation here. It is supported for .net 6.0+.
AlphaVantage.Net is available at nuget.org.
Package Manager PM > Install-Package AlphaVantage.Net
You can make all calls to Alpha Vantage's API via the AlphaVantage.AlphaVantageClient
class.
var client = new AlphaVantageClient(
"<key>",
maxApiCallsPerMinute: 5);
// Retrieving the most recent daily history for IBM.
var result = await client.GetDailyTimeSeries(
new()
{
Symbol = "IBM",
});
Call services.AddAlphaVantageClient(IConfigurationRoot)
. This will automatically bind options from the AlphaVantage
section of the root; configure a named HttpClient
for AlphaVantage.Net; and configure AlphaVantageClient
as a
transient.
It is recommended to use AlphaVantage.Net in this way. When using this pattern, all requested instances of
AlphaVantageClient
will respect the common rate limit specified in the options.
If AlphaVantageClient
is constructed directly using the constructor, the rate limiter will only be used by that
instance of the AlphaVantageClient
; that is, multiple instances of AlphaVantageClient
will each have their own
rate limiter.