Download the PHP package alexxd/stock-data without Composer
On this page you can find all versions of the php package alexxd/stock-data. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alexxd/stock-data
More information about alexxd/stock-data
Files in alexxd/stock-data
Package stock-data
Short Description This package provide realtime and historical global equity data in 4 different temporal resolutions:(1)daily,(2)weekly,(3)monthly,and(4)intraday.Daily,weekly,and monthly time series contain 20+ years of historical data.
License MIT
Informations about the package stock-data
Stock-Data
This package provide realtime and historical global equity data in 4 different temporal resolutions:(1)daily,(2)weekly,(3)monthly,and(4)intraday.Daily,weekly,and monthly time series contain 20+ years of historical data.
Installing
Configuration
Before using this extension, you need to go to the Alphavantage to register your account, then create an app to get the API Key for your app.
Usage
Get intraDay stock data
Example:
Get daily stock data
Get weekly stock data
Get monthly stock data
Parameters
symbol :The name of the equity of your choice. For example:AAPL
interval:(Only intraday required)Time interval between two consecutive data points in the time series. The following values are supported: 1, 5, 15, 30, 60
format:By default, format=json. Strings json and csv are accepted with the following specifications: json returns the intraday time series in JSON format; csv returns the time series as a CSV (comma separated value) file.
output_size:By default, output_size=compact. Strings compact and full are accepted with the following specifications: compact returns only the latest 100 data points in the intraday time series; full returns the full-length intraday time series. The "compact" option is recommended if you would like to reduce the data size of each API call.
Used in Laravel
The same installation is used in Laravel, and the configuration is written in config/services.php:
Then configure STOCK_API_KEY in .env :
There are two ways to get an Alexxd\StockData\Stock instance:
Method parameter injection
Service name access
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
License
MIT