and like us on FB

The PHP function on this page supports the article published here, titled “Add Stock Quote Graphs to WordPress With Shortcode (Alpha Vantage API)”. The PHP function retrieves stock data from the Alpha Vantage API and renders it into a Google graph. It’s rather incomplete in that it only seeks to provide a single generic example of how the data might be used.

Find the WordPress shortcode article here.

The function requires use of Simple Cache.

PHP Function


The function requires only a stock symbol. To alter the default attributes as defined by the $atts array, pass them via an $args array as a second function argument.

WordPress Shortcode Result

The result as returned from our shortcode function is as follows:

Add Stock Quote Graphs With PHP (Alpha Vantage API)


Download the WordPress shortcode here.

Title: Add Stock Quote Graphs With PHP
Description: Add a stock quote graph with a PHP function. Utilizes the Alpha Vantage API. WordPress shortcode version is also available.
Download: PHP Code (V0.1) | Plugin Page

Shortt URL for this post: