• apapa
  • Junior Member
  • Posts 2
  • Reputation 1
  • Member Since
  • Last Active
    This user has not added any photos yet.
All Posts Topics Started Likes
Alpha Vantage C++ Wrapper - AvapiCpp

Supported OS

Linux:

-Ubuntu 16 (64 bit)

Windows:

-coming soon

Supported Operations

Time Series Data

  • TIME_SERIES_INTRADAY
  • TIME_SERIES_DAILY
  • TIME_SERIES_DAILY_ADJUSTED
  • TIME_SERIES_WEEKLY
  • TIME_SERIES_WEEKLY_ADJUSTED
  • TIME_SERIES_MONTHLY
  • TIME_SERIES_MONTHLY_ADJUSTED
  • BATCH_STOCK_QUOTES

Foreign Exchange (FX)

  • CURRENCY_EXCHANGE_RATE

Digital & Crypto Currencies

  • DIGITAL_CURRENCY_INTRADAY
  • DIGITAL_CURRENCY_DAILY
  • DIGITAL_CURRENCY_WEEKLY
  • DIGITAL_CURRENCY_MONTHLY

Technical Indicators

  • SMA
  • EMA
  • WMA
  • DEMA
  • TEMA
  • TRIMA
  • KAMA
  • MAMA
  • T3
  • MACD
  • MACDEXT
  • STOCH
  • STOCHF
  • RSI
  • STOCHRSI
  • WILLR
  • ADX
  • ADXR
  • APO
  • PPO
  • MOM
  • BOP
  • CCI
  • CMO
  • ROC
  • ROCR
  • AROON
  • AROONOSC
  • MFI
  • TRIX
  • ULTOSC
  • DX
  • MINUS_DI
  • PLUS_DI
  • MINUS_DM
  • PLUS_DM
  • BBANDS
  • MIDPOINT
  • MIDPRICE
  • SAR
  • TRANGE
  • ATR
  • NATR
  • AD
  • ADOSC
  • OBV
  • HT_TRENDLINE
  • HT_SINE
  • HT_TRENDMODE
  • HT_DCPERIOD
  • HT_DCPHASE
  • HT_PHASOR

Sector Performances

  • SECTOR
0 0
Alpha Vantage C++ Wrapper - AvapiCpp
Hi everyone,

We have created a wrapper C++ for Alpha Vantage: its name is AvapiCpp.

Official page: https://github.com/AvapiDotNet/AvapiCpp
Complete documentation:  https://github.com/AvapiDotNet/AvapiCpp/wiki


Example related to: MSFT daily time series

Code:

#include <string>
#include <iostream>
#include <sstream>
#include "Avapi/AvapiConnection.hpp"
#include "Avapi/TIME_SERIES/TIME_SERIES_DAILY.hpp"
using namespace std;
using namespace Avapi;
int main()
{
    string lastHttpRequest = "";
    AvapiConnection* avapi_connection;
    
    try
    {
        avapi_connection = AvapiConnection::getInstance();
        avapi_connection->set_ApiKey("Your Alpha Vantage API Key !!!!");
    }
    catch(AvapiConnectionError& e)
    {
        cout <<  e.get_error() << endl;
        return EXIT_FAILURE;
    }
    
    auto& QueryObject = avapi_connection->GetQueryObject_TIME_SERIES_DAILY();
    auto Response = QueryObject.Query(   
             "MSFT"
             ,Const_TIME_SERIES_DAILY_outputsize::compact
             ,Const_TIME_SERIES_DAILY_datatype::json);
    cout << endl <<  "******** RAW DATA TIME SERIES DAILY ********"<< endl;
    cout <<  Response.get_RawData() << endl << endl;
    cout << "******** STRUCTURED DATA TIME SERIES DAILY ********"<< endl;
    if(Response.get_Data().isError())
    {
        cerr << Response.get_Data().get_ErrorMessage() << endl;
    }
    else
    {
        auto& MetaData  = Response.get_Data().get_MetaData();
        auto& TimeSeries = Response.get_Data().get_TimeSeries();
        cout << "========================" << endl;
        cout << "Information: " <<  MetaData.get_Information() << endl;
        cout << "Symbol: " <<  MetaData.get_Symbol() << endl;
        cout << "LastRefreshed: " <<  MetaData.get_LastRefreshed() << endl;
        cout << "OutputSize: " <<  MetaData.get_OutputSize() << endl;
        cout << "TimeZone: " <<  MetaData.get_TimeZone() << endl;
        cout << "========================" << endl;
        cout << "========================" << endl;
        for(auto& element : TimeSeries)
        {
            cout << "Open: " << element.get_Open() << endl;
            cout << "High: " << element.get_High() << endl;
            cout << "Low: " << element.get_Low() << endl;
            cout << "Close: " << element.get_Close() << endl;
            cout << "Volume: " << element.get_Volume() << endl;
            cout << "DateTime: " << element.get_DateTime() << endl;
            cout << "========================" << endl;
        }
    }
    
  return EXIT_SUCCESS;
}


1 0
count post selected

Add a Website Forum to your website.

Developed with love by Alpha Vantage Inc.