meeshal/alpha-vantage-api

Framework agnostic PHP client for the Alpha Vantage service. Its a fork of joseraul/alpha-vantage-api

0.0.4 2020-08-29 16:05 UTC

This package is not auto-updated.

Last update: 2024-05-20 08:52:17 UTC


README

Build Status

Alpha Vantage API Client

PHP Client for the Alpha Vantage service.

Installation

composer require joseraul/alpha-vantage-api

Example of use

use AlphaVantage\Client;

$alpha_vantage = new Client('api_key');
$data = $alpha_vantage
    ->stock()
    ->intraday('GOOGL', AlphaVantage\Resources\Stock::INTERVAL_1MIN);

Resources

Stocks

https://www.alphavantage.co/documentation/#time-series-data

Intraday

https://www.alphavantage.co/documentation/#intraday

$data = $alpha_vantage
    ->stock()
    ->intraday('GOOGL', AlphaVantage\Resources\Stock::INTERVAL_1MIN);

Daily

https://www.alphavantage.co/documentation/#daily

$data = $alpha_vantage
    ->stock()
    ->daily('GOOGL');

Daily Adjusted

https://www.alphavantage.co/documentation/#dailyadj

$data = $alpha_vantage
    ->stock()
    ->dailyAdjusted('GOOGL');

Weekly

https://www.alphavantage.co/documentation/#weekly

$data = $alpha_vantage
    ->stock()
    ->weekly('GOOGL');

Weekly Adjusted

https://www.alphavantage.co/documentation/#weeklyadj

$data = $alpha_vantage
    ->stock()
    ->weeklyAdjusted('GOOGL');

Monthly

https://www.alphavantage.co/documentation/#monthly

$data = $alpha_vantage
    ->stock()
    ->monthly('GOOGL');

Monthly Adjusted

https://www.alphavantage.co/documentation/#monthlyadj

$data = $alpha_vantage
    ->stock()
    ->monthlyAdjusted('GOOGL');

Currency

https://www.alphavantage.co/documentation/#fx

Exchange Rate

https://www.alphavantage.co/documentation/#currency-exchange

$data = $alpha_vantage
    ->currency()
    ->exchange('BTC', 'USD');

Indicators

https://www.alphavantage.co/documentation/#technical-indicators

SMA

https://www.alphavantage.co/documentation/#sma

$data = $alpha_vantage
    ->indicator()
    ->sma('GOOGL', AlphaVantage\Resources\Indicator::INTERVAL_1MIN, 60, AlphaVantage\Resources\Indicator::SERIES_TYPE_HIGH);

WMA

https://www.alphavantage.co/documentation/#wma

$data = $alpha_vantage
    ->indicator()
    ->wma('GOOGL', AlphaVantage\Resources\Indicator::INTERVAL_1MIN, 60, AlphaVantage\Resources\Indicator::SERIES_TYPE_HIGH);