BarbezDotEu.AlphaVantage

An unofficial, modern, very much work-in-progress client for Alpha Vantage APIs.


Keywords
AlphaVantage, alpha, barbez, basic, integration, polite, provider, third-party, vantage, nuget
License
MIT
Install
Install-Package BarbezDotEu.AlphaVantage -Version 5.0.0

Documentation

BarbezDotEu.AlphaVantage

An unofficial, modern, very much work-in-progress client for Alpha Vantage APIs.

The binaries are available as a NuGet package from https://www.nuget.org/packages/BarbezDotEu.AlphaVantage/ or via e.g. Visual Studio's NuGet package manager.

Contents

AlphaVantageConfiguration type

Namespace

BarbezDotEu.AlphaVantage

Summary

Implements and houses configuration parameters to correctly connect to and communicate with Alpha Vantage's services.

#ctor(maxCallsPerDay,symbolSearchUrl) constructor

Summary

Constructs a new AlphaVantageConfiguration using given parameters.

Parameters
Name Type Description
maxCallsPerDay System.String The max. number of calls per day before API calls become rate limited by Alpha Vantage.
symbolSearchUrl System.String The fully-qualified URL to use to search for symbols, including the API key. However, omit the actual search symbol.

#ctor(maxCallsPerDay,symbolSearchUrl) constructor

Summary

Constructs a new AlphaVantageConfiguration using given parameters.

Parameters
Name Type Description
maxCallsPerDay System.Int64 The max. number of calls per day before API calls become rate limited by Alpha Vantage.
symbolSearchUrl System.String The fully-qualified URL to use to search for symbols, including the API key. However, omit the actual search symbol.

#ctor(apiKey) constructor

Summary

Constructs a new AlphaVantageConfiguration using all-default settings.

Parameters
Name Type Description
apiKey System.String The API key (to be requested via Alpha Vantage's website prior to using this library).

MaxCallsPerDay property

Summary

Gets the maximum number of calls allowed per day.

SymbolSearchUrl property

Summary

Gets the fully-qualified URL to use to search for symbols, including the API key. However, omits the actual search symbol.

AlphaVantageDataProvider type

Namespace

BarbezDotEu.AlphaVantage.AlphaVantage

Summary

Implements a data provider that connects to and can call Alpha Vantage APIs.

#ctor(logger,httpClientFactory) constructor

Summary

Constructs a AlphaVantageDataProvider.

Parameters
Name Type Description
logger Microsoft.Extensions.Logging.ILogger A ILogger to use for logging.
httpClientFactory System.Net.Http.IHttpClientFactory The IHttpClientFactory to use.

Configuration property

Summary

Gets the AlphaVantageConfiguration this AlphaVantageDataProvider uses to communicate to the APIs.

Configure() method

Summary

Inherit from parent.

Parameters

This method has no parameters.

GetBaseCompanyDataFullyMatching() method

Summary

Inherit from parent.

Parameters

This method has no parameters.

GetBaseCompanyDataPartialMatches() method

Summary

Inherit from parent.

Parameters

This method has no parameters.

BaseCompanyDataFullMatch type

Namespace

BarbezDotEu.AlphaVantage.DTO

Summary

Implements a base company data DTO that EXACTLY matches a query.

#ctor(currency,marketClose,marketOpen,name,region,symbol,timeZone,type) constructor

Summary

Constructs a new BaseCompanyDataFullMatch.

Parameters
Name Type Description
currency System.String The currency.
marketClose System.String When the market closes.
marketOpen System.String When the market opens.
name System.String The name of the company.
region System.String The region the company is located in.
symbol System.String The company's ticker symbol.
timeZone System.String The timezone.
type System.String The type.

Currency property

Summary

Gets or sets the currency.

MarketClose property

Summary

Gets or sets when the market closes.

MarketOpen property

Summary

Gets or sets when the market opens.

Name property

Summary

Gets or sets the company name.

Region property

Summary

Gets or sets the region.

Symbol property

Summary

Gets or sets the company's symbol.

Timezone property

Summary

Gets or sets the timezone.

Type property

Summary

Gets or sets the type.

BaseCompanyDataPartialMatch type

Namespace

BarbezDotEu.AlphaVantage.DTO

Summary

Implements a base company data DTO that matches a query either completely, or to a certain extent only.

Currency property

Summary

Gets or sets the currency.

MarketClose property

Summary

Gets or sets the market close time.

MarketOpen property

Summary

Gets or sets the market open time.

MatchScore property

Summary

Gets or sets a percentage in which the result is a match in the context of a query.

Name property

Summary

Gets or sets the company name.

Region property

Summary

Gets or sets the region.

Symbol property

Summary

Gets or sets the symbol.

TimeZone property

Summary

Gets or sets the time zone.

Type property

Summary

Gets or sets the type.

AsFullMatch() method

Summary

Assumes an therefore returns this BaseCompanyDataPartialMatch is a BaseCompanyDataFullMatch.

Returns

The BaseCompanyDataFullMatch representation of this BaseCompanyDataPartialMatch.

Parameters

This method has no parameters.

GetMatchScore() method

Summary

Gets the MatchScore as a double.

Returns

The MatchScore as a double.

Parameters

This method has no parameters.

IAlphaVantageDataProvider type

Namespace

BarbezDotEu.AlphaVantage.Interfaces

Summary

Defines a blueprint for a data provider that connects to and can call Alpha Vantage APIs.

Configure(alphaVantageConfiguration) method

Summary

Configures this IAlphaVantageDataProvider so that it can successfully communicate with the Alpha Vantage APIs.

Parameters
Name Type Description
alphaVantageConfiguration BarbezDotEu.AlphaVantage.AlphaVantageConfiguration The AlphaVantageConfiguration to configure this IAlphaVantageDataProvider with.
Remarks

Configuration is required before any APIs can be called.

GetBaseCompanyDataFullyMatching(symbol,retryOnError,waitingMinutesBeforeRetry) method

Summary

Gets base company data for a given symbol that EXACTLY matches a query. Returns, if exists, a BaseCompanyDataFullMatch DTO containing the first result that is a 100% match. Returns NULL when no 100% match exists, or when no results were returned from the API.

Returns

The requested BaseCompanyDataFullMatch.

Parameters
Name Type Description
symbol System.String The symbol to return data for.
retryOnError System.Boolean Set to TRUE to retry the request, in case the initial request should prove unsuccessful.
waitingMinutesBeforeRetry System.Double The number of minutes to wait before automatically retrying re-sending the request, if the intention is to retry again upon error.

GetBaseCompanyDataPartialMatches(symbol,retryOnError,waitingMinutesBeforeRetry) method

Summary

Gets base company data DTO that matches a query either completely, or to a certain extent only.

Returns

The requested BaseCompanyDataFullMatches.

Parameters
Name Type Description
symbol System.String The symbol to return data for.
retryOnError System.Boolean Set to TRUE to retry the request, in case the initial request should prove unsuccessful.
waitingMinutesBeforeRetry System.Double The number of minutes to wait before automatically retrying re-sending the request, if the intention is to retry again upon error.

QueryResponse type

Namespace

BarbezDotEu.AlphaVantage.DTO

Summary

Implements the query response contract as defined by Alpha Vantage.

Matches property

Summary

Gets or sets the set of BaseCompanyDataPartialMatches returned by the API.

GetFirstOfDefaultAbsoluteMatch() method

Summary

Returns, if exists, a BaseCompanyDataFullMatch DTO containing the first result that is a 100% match. Returns NULL when no 100% match exists, or no results are returned.

Returns

The BaseCompanyDataFullMatch equivalent of this QueryResponse.

Parameters

This method has no parameters.