Avapi 1.3.1

This library allows to retrieve data using  Alpha Vantage API.

The official page of Avapi .NET CORE is available at this link:  https://github.com/AvapiDotNet/Avapi/

The complete documentation of Avapi .NET CORE is available at this link: https://github.com/AvapiDotNet/Avapi/wiki

To start using Avapi you just need to:

1. Register to Alpha Vantage web site and get your personal api key (https://www.alphavantage.co/support/#api-key). It's for free!

2. Install Avapi package on your project

3. Consume the Avapi library

There is a newer version of this package available.
See the version list below for details.
Install-Package Avapi -Version 1.3.1
dotnet add package Avapi --version 1.3.1
<PackageReference Include="Avapi" Version="1.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Avapi --version 1.3.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Avapi (.NET CORE)

Avapi is a .NET CORE API Wrapper allowing to retrieve data from Alpha Vantage endpoint (https://www.alphavantage.co/).

To start using Avapi you just need to:

  • Register to Alpha Vantage web site and get your personal api key (https://www.alphavantage.co/support/#api-key). It's for free!
  • Install Avapi package on your project
  • Consume the Avapi library

To see the complete documentation of Avapi .NET CORE click here

Register to Alpha Vantage

To Claim the Alpha Vantage free API key, you should register here

Install AVAPI .NET CORE

You can manually download the official package here.

... or you can get it from the .NET CLI or from the Package Manager.

from the .NET CLI

dotnet add package Avapi --version 1.3.1

from the Package Manager

Install-Package Avapi -Version 1.3.1

Guided Example on how to consume Avapi library

There are a number of steps you need to follow to use Avapi on .NET CORE environment:

  1. Create an empty folder. Get into that folder and run the following command:
$ dotnet new console
  1. Add the package to your project
dotnet add package Avapi --version 1.3.1
  1. Restore the project
$ dotnet restore
  1. Replace the content of Program.cs created automatically by 1. with the following code:

using System;
using System.IO;
using Avapi.AvapiTIME_SERIES_DAILY;

namespace Avapi
{
    public class Example
    {
        static void Main()
        {
            // Creating the connection object
            IAvapiConnection connection = AvapiConnection.Instance;

            // Set up the connection and pass the API_KEY provided by alphavantage.co
            connection.Connect("Your Alpha Vantage API Key !!!!");

            // Get the TIME_SERIES_DAILY query object
            Int_TIME_SERIES_DAILY time_series_daily =
                connection.GetQueryObject_TIME_SERIES_DAILY();

            // Perform the TIME_SERIES_DAILY request and get the result
            IAvapiResponse_TIME_SERIES_DAILY time_series_dailyResponse = 
            time_series_daily.Query(
                 "MSFT",
                 Const_TIME_SERIES_DAILY.TIME_SERIES_DAILY_outputsize.compact,
                 Const_TIME_SERIES_DAILY.TIME_SERIES_DAILY_datatype.json);

            // Printout the results
            Console.WriteLine("******** RAW DATA TIME_SERIES_DAILY ********");
            Console.WriteLine(time_series_dailyResponse.RawData);

            Console.WriteLine("******** STRUCTURED DATA TIME_SERIES_DAILY ********");
            var data = time_series_dailyResponse.Data;
            if (data.Error)
            {
                Console.WriteLine(data.ErrorMessage);
            }
            else
            {
                Console.WriteLine("Information: " + data.MetaData.Information);
                Console.WriteLine("Symbol: " + data.MetaData.Symbol);
                Console.WriteLine("LastRefreshed: " + data.MetaData.LastRefreshed);
                Console.WriteLine("OutputSize: " + data.MetaData.OutputSize);
                Console.WriteLine("TimeZone: " + data.MetaData.TimeZone);
                Console.WriteLine("========================");
                Console.WriteLine("========================");
                foreach (var timeseries in data.TimeSeries)
                {
                    Console.WriteLine("open: " + timeseries.open);
                    Console.WriteLine("high: " + timeseries.high);
                    Console.WriteLine("low: " + timeseries.low);
                    Console.WriteLine("close: " + timeseries.close);
                    Console.WriteLine("volume: " + timeseries.volume);
                    Console.WriteLine("DateTime: " + timeseries.DateTime);
                    Console.WriteLine("========================");
                }
            }
        }
    }
}

and replace the parameter in connection.Connect(""Your Alpha Vantage API Key !!!!") , with your Alpha Vantage API key (to claim it see above).

  1. Run the following commands:
$ dotnet run
  1. You can enjoy your MSFT Daily time series displayed on your console :)

Authors: Simone Giuliani and Antonio Papa

Email: if you have any queries or suggestions please send us an email: sgiuliani.apapa at gmail.com

Avapi (.NET CORE)

Avapi is a .NET CORE API Wrapper allowing to retrieve data from Alpha Vantage endpoint (https://www.alphavantage.co/).

To start using Avapi you just need to:

  • Register to Alpha Vantage web site and get your personal api key (https://www.alphavantage.co/support/#api-key). It's for free!
  • Install Avapi package on your project
  • Consume the Avapi library

To see the complete documentation of Avapi .NET CORE click here

Register to Alpha Vantage

To Claim the Alpha Vantage free API key, you should register here

Install AVAPI .NET CORE

You can manually download the official package here.

... or you can get it from the .NET CLI or from the Package Manager.

from the .NET CLI

dotnet add package Avapi --version 1.3.1

from the Package Manager

Install-Package Avapi -Version 1.3.1

Guided Example on how to consume Avapi library

There are a number of steps you need to follow to use Avapi on .NET CORE environment:

  1. Create an empty folder. Get into that folder and run the following command:
$ dotnet new console
  1. Add the package to your project
dotnet add package Avapi --version 1.3.1
  1. Restore the project
$ dotnet restore
  1. Replace the content of Program.cs created automatically by 1. with the following code:

using System;
using System.IO;
using Avapi.AvapiTIME_SERIES_DAILY;

namespace Avapi
{
    public class Example
    {
        static void Main()
        {
            // Creating the connection object
            IAvapiConnection connection = AvapiConnection.Instance;

            // Set up the connection and pass the API_KEY provided by alphavantage.co
            connection.Connect("Your Alpha Vantage API Key !!!!");

            // Get the TIME_SERIES_DAILY query object
            Int_TIME_SERIES_DAILY time_series_daily =
                connection.GetQueryObject_TIME_SERIES_DAILY();

            // Perform the TIME_SERIES_DAILY request and get the result
            IAvapiResponse_TIME_SERIES_DAILY time_series_dailyResponse = 
            time_series_daily.Query(
                 "MSFT",
                 Const_TIME_SERIES_DAILY.TIME_SERIES_DAILY_outputsize.compact,
                 Const_TIME_SERIES_DAILY.TIME_SERIES_DAILY_datatype.json);

            // Printout the results
            Console.WriteLine("******** RAW DATA TIME_SERIES_DAILY ********");
            Console.WriteLine(time_series_dailyResponse.RawData);

            Console.WriteLine("******** STRUCTURED DATA TIME_SERIES_DAILY ********");
            var data = time_series_dailyResponse.Data;
            if (data.Error)
            {
                Console.WriteLine(data.ErrorMessage);
            }
            else
            {
                Console.WriteLine("Information: " + data.MetaData.Information);
                Console.WriteLine("Symbol: " + data.MetaData.Symbol);
                Console.WriteLine("LastRefreshed: " + data.MetaData.LastRefreshed);
                Console.WriteLine("OutputSize: " + data.MetaData.OutputSize);
                Console.WriteLine("TimeZone: " + data.MetaData.TimeZone);
                Console.WriteLine("========================");
                Console.WriteLine("========================");
                foreach (var timeseries in data.TimeSeries)
                {
                    Console.WriteLine("open: " + timeseries.open);
                    Console.WriteLine("high: " + timeseries.high);
                    Console.WriteLine("low: " + timeseries.low);
                    Console.WriteLine("close: " + timeseries.close);
                    Console.WriteLine("volume: " + timeseries.volume);
                    Console.WriteLine("DateTime: " + timeseries.DateTime);
                    Console.WriteLine("========================");
                }
            }
        }
    }
}

and replace the parameter in connection.Connect(""Your Alpha Vantage API Key !!!!") , with your Alpha Vantage API key (to claim it see above).

  1. Run the following commands:
$ dotnet run
  1. You can enjoy your MSFT Daily time series displayed on your console :)

Authors: Simone Giuliani and Antonio Papa

Email: if you have any queries or suggestions please send us an email: sgiuliani.apapa at gmail.com

Release Notes

1) Added the ability to PARSE the RESPONSE of SECTOR operation
2) Added support for .NET Standard 2.0

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.4.8.3 3,883 9/6/2018
1.4.8.1 2,679 2/24/2018
1.4.7.9 829 1/14/2018
1.4.7.8 668 1/3/2018
1.4.7.7 573 1/3/2018
1.4.7.6 576 12/31/2017
1.4.7.5 554 12/30/2017
1.4.7.4 617 12/30/2017
1.4.7.3 589 12/30/2017
1.4.7.2 642 12/30/2017
1.4.7.1 554 12/30/2017
1.4.6.3 622 12/29/2017
1.4.5 631 12/5/2017
1.3.2 697 11/21/2017
1.3.1 671 10/8/2017
1.2.2 537 9/20/2017
1.2.1 698 9/19/2017
1.2.0 627 9/18/2017
1.1.0 563 9/16/2017
1.0.1 694 9/9/2017
1.0.0 781 9/3/2017
Show less