This project is not covered by Drupal’s security advisory policy.
This module provides API integrations for retrieving financial and industry data for individual stocks and stock exchanges.
The module architecture is built to support integration with multiple stock API services.
The Alpha Vantage API makes HTTP requests for individual stock data and returns the data as a JSON object parsed into a map.
The requests to Alpha Vantage require an API key, which must be generated from the Alpha Vantage website (https://www.alphavantage.co/).
The API key should then be stored on the server and referenced from settings, for security purposes, in the "alpha_vantage_api_key" setting in settings.php.
The module can also request a list of stocks traded on an exchange, along with some basic industry and financial data for each of the stocks. These requests are made through Nasdaq.com. Currently, the only exchange APIs supported are the New York Stock Exchange (NYSE), NASDAQ, and AMEX.
The module supports scalability to other exchanges through service class interfaces.
Both of the implemented API interfaces (AlphaVantage and NASDAQ) are created as Drupal/Symfony Services, which can be invoked manually and/or periodically using drush, cron, or another calling module.
Here is an example of using the AlphaVantageStockAPI service with drush to request the latest data for Apple stock (ticker symbol: "AAPL"):
drush ev 'print_r(\Drupal::service("stocks_api.stocks")->requestStockQuote("AAPL"));'
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.- Project categories: Integrations
- Created by omarabed on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.


