Download the PHP package d1am0nd/alpha-vantage without Composer
On this page you can find all versions of the php package d1am0nd/alpha-vantage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download d1am0nd/alpha-vantage
More information about d1am0nd/alpha-vantage
Files in d1am0nd/alpha-vantage
Package alpha-vantage
Short Description Simplified Laravel Alpha Vantage API client
License MIT
Informations about the package alpha-vantage
Simplified Laravel Alpha Vantage API client
This is a Laravel package for simplified fetching of finance data from Alpha Vantage API. It's an abstraction layer over Guzzle that aims to remove complexity in connecting it to Alpha Vantage API.
Docs
- Demo
- Installation
- Usage
- Licence
Demo
Getting historical data
Installation
- Run composer
composer require d1am0nd/alpha-vantage
- Add your Alpha Vantage API key to .env as
AV_KEY={your key}
Usage
API calls are grouped into 5 different groups:
Api::stock()
- Stock Time SeriesApi::currency()
- Foreign ExchangeApi::digitalCurrency()
- Digital & Crypto CurrenciesApi::sector()
- Sector PerformancesApi::general()
- Technical Indicators & Other
Each function described below is called from their respective group as shown in examples.
Functions described below also take an additional parameter array $params = []
, which can be used to pass any optional parameters if needed.
Stock Time Series
Documented - https://www.alphavantage.co/documentation/#currency-exchange
Example - Microsoft's historical monthly stock data
Methods available
intraday($symbol)
- https://www.alphavantage.co/documentation/#intradaydaily($symbol)
- https://www.alphavantage.co/documentation/#dailydailyAdjusted($symbol)
- https://www.alphavantage.co/documentation/#dailyadjweekly($symbol)
- https://www.alphavantage.co/documentation/#weeklyweeklyAdjusted($symbol)
- https://www.alphavantage.co/documentation/#weeklyadjmonthly($symbol)
- https://www.alphavantage.co/documentation/#monthlymonthlyAdjusted($symbol)
- https://www.alphavantage.co/documentation/#monthlyadjbatchStockQuotes(array $symbols)
- https://www.alphavantage.co/documentation/#batchquotesquote($symbol)
- https://www.alphavantage.co/documentation/#latestpricesearch($keywords)
- https://www.alphavantage.co/documentation/#symbolsearch
Foreign Exchange
Documented - https://www.alphavantage.co/documentation/#currency-exchange
Example - Euro to US Dollar
Methods available
currencyExchangeRate($from, $to)
- https://www.alphavantage.co/documentation/#currency-exchangeintraday($from, $to, $interval)
- https://www.alphavantage.co/documentation/#fx-intradaydaily($from, $to)
- https://www.alphavantage.co/documentation/#fx-dailyweekly($from, $to)
- https://www.alphavantage.co/documentation/#fx-weeklymonthly($from, $to)
- https://www.alphavantage.co/documentation/#fx-monthly
Digital & Crypto Currencies
Documented - https://www.alphavantage.co/documentation/#digital-currency
Example - Bitcoin historical monthly stock data
Methods available
intraday($symbol, $market)
- https://www.alphavantage.co/documentation/#currency-intradaydaily($symbol, $market)
- https://www.alphavantage.co/documentation/#currency-dailyweekly($symbol, $market)
- https://www.alphavantage.co/documentation/#currency-weeklymonthly($symbol, $market)
- https://www.alphavantage.co/documentation/#currency-monthly
Sector Performances
Documented - https://www.alphavantage.co/documentation/#sector-information
Example - Sector peformances
Methods available
Technical Indicators & Other
Documented - https://www.alphavantage.co/documentation/#technical-indicators
Technical methods are not implemented as separate functions. There is a Api::general()->query($funcName, array $params)
method which allows for custom queries.
Example - MACDEXT
This will query function 'MACDEXT' with additional parameters symbol
, interval
and series_type
as described in the documentation https://www.alphavantage.co/documentation/#macdext
Methods available
query($functionName, array $parameters)
License
This project is licensed under the MIT License - see the LICENSE.md file for details