
Easy add customizable moving or static ticker tapes with stock information for custom stock symbols.
A simple and easy configurable plugin for WordPress that allows you to insert stock ticker with stock price information to posts, pages, widgets or even to template files. Insertion is enabled by shortcode or multi instance widget.
Please note, stock data has been provided by Alpha Vantage which does not support indexes since mid-2020!
Stock Ticker is advanced variation of Stock Quote plugin.
Multisite WordPress is not supported yet
IMPORTANT Stock Ticker does not have own Gutenberg Block, so you can use Shortcode Block or Common Block to insert Stock Ticker within the post/page content.
All stock data used in Stock Ticker is provided by Alpha Vantage, displayed for informational and educational purposes only and should not be considered as investment advise.
Since end of year 2023 AlphaVantage limited Free API tier to 25 requests per day.
Author of the Stock Ticker plugin does not accept liability or responsibility for your use of plugin, including but not limited to trading and investment results. Along to that, author of Stock Ticker plugin can not guarantee that stock prices are always accurate as they are provided by 3rd party service for free.
You can set custom template for visible change value. Default format is %company% %price% %change% %changep%. As a macro keywords you can use:
%exch_symbol% – Symbol with exchange, like NASDAQ:AAPL%symbol% – Company symbol, like AAPL%company% – Company name after filtered by custom names, like Apple Inc.%price% – Price value, like 125.22%change% – Change value, like -5.53%changep% – Change percentage, like -4.23%%ltrade% – Last trade day (like 2020-09-25), which can be followed by the PHP date format to customize date output, separate by pipe character, eg. |l, jS \of F YFor feature requests or help send feedback or use official WordPress support forum.
You can add Stock Ticker to posts, pages or widgets by shortcode or widget (Appearance -> Widgets).
Use simple shortcode [stock_ticker] without any parameter in post or page, to display ticker with default settings. You can tweak single shortcode with parameters:
symbols – string with single or comma separated array of stock symbolsshow – string that define how will company be represent on ticker; can be name for Company Name, or symbol for Stock Symbolnumber_format – override default number format for values (default from this settings page used if no custom set by shortcode). Valid options are: cd for 0.000,00; dc for 0,000.00; sd for 0 000.00 and sc for 0 000,00decimals – override default number of decimal places for values (default from this settings page used if no custom set by shortcode). Valid values are: 1, 2, 3 and 4static – (boolean) to enable static unordered list instead scroling ticker set to 1 or trueprefill – (boolean) to start with pre-filled instead empty ticker set to 1 or trueduplicate – (boolean) if there is less items than visible on the ticker, set this to 1 or true to make it continuousspeed – (integer) tune speed of StockTicker block rendered by shortcodeclass – customize block look and feel set custom CSS class (optional)Alpha Vantage provide stock data for following stock exchange markets:
Not supported:
MCX:GAZPASX:MSBC29.SINSE:VBSTO:ATCO-ABIT:OLIKudos to patchstack and Wordfence Intelligence researchers for early reporting vulnerabilities!
A big thank you goes to @flexer, @khunmax, @k2_1971 and @vijaleshk who do tests with alpha versions of plugin until we finally released v3.0.0. And also important to mention @eigood who pointed me to AlphaVantage.co as a replacement for Google Finance.
To install Stock Ticker and make initial setting to work, please follow instructions below
Plugins -> Add NewStock Ticker pluginStock TickerSettings -> Stock TickerAlphaVantage.co API Key Alpha Vantage API Key you received in previous step (check this screenshot)All Stock Symbols all stock symbols you’ll use on whole website in various widgets and shortcodes, separated by comma. This field is used to fetch stock data from AlphaVantage.co API by AJAX in background. Because AV have only API to get data for single symbol, that can take a while to get. Please note, for default shortcode symbols there is still have field in Default Settings section of plugin.Fetch Stock Data Now! to initially fetch stock data to database and wait for a while until we get all symbols from AlphaVantage.co for the very first time.[stock_ticker] to page or post, or Stock Ticker Widget to preferred Widget Area.You can use standard symbols from stock exchanges supported by AlphaVantage.co.
For example, you can try with AAPL, MSFT, IBM, CSCO, GOOG, YHOO, AMZN (Apple Inc; Microsoft Corporation; International Business Machines Corporation; Cisco Systems, Inc.; Google Inc; Yahoo! Inc; Amazon.com, Inc.)
To check if AlphaVantage.co support your preferred symbol(s), you can use Symbol Search & Test tool on plugin settings page to search for keysords and symbols on AlphaVantage.co directly from your WordPress dashboard.
Try to find correct symbol on AlphaVantage.co by looing for it in Symbol Search & Test tool. Even try alternatives or company name. If that does not help, search Alpha Vantage community forum www.alpha-vantage.community or contact Alpha Vantage support.
Unfortunately, AlphaVantage.co no longer supports indexes (mid-2020). That is why Stock Ticker no longer provide quotes for them.
Unfortunately, AlphaVantage.co does not support commodities (metals, energies, grains, meats, softs). That is why Stock Ticker can’t provide quotes for them.
Use Currency exchange symbols like EURGBP to get rate of 1 Euro = ? British Pounds
Please note, since mid-2020 AlphaVantage.co does not support anymore format EURGBP=X so use syntax without =X.
Enter symbol in format EXCHANGE:SYMBOL like LON:LLOY or SYMBOL.EXCHANGE like LLOY.LON for Lloyds Banking Group Plc from London Stock Exchange market.
Please note that AlphaVantage.co does not provide stock data always for all existing stocks.
Add to Custom Names legend currency exchange symbol w/o =X part, like:
EURGBP;Euro (€) ⇨ British Pound Sterling (£) Add this to your template file (you also can add custom parameters for shortcode):
<?php echo do_shortcode('[stock_ticker]'); ?> On Settings page for plugin you can set custom Value template. You can use macro keywords %exch_symbol%, %symbol%, %company%, %price%, %volume%, %change%, %changep% and %ltrade% mixed with HTML tags <span>, <em> and/or <strong>.
Default template is %company% %price% %change% %changep% but you can format it like:
<span style="color:#333">%company%</span> <em>%price%</em> <strong>%change%</strong> %changep% Please note that Alpha Vantage does not provide company name in retrieved feeds. You’ll need to set company name in Custom Names field on plugin settings page.
This can be temporary issue. First try to run Fetch Stock Data Now! on plugin settings page.
If that does not help, next try to increase Fetch Timeout option on general plugin settings and then run Fetch Stock Data Now!.
If you still experiencing issue, please contact us through support forum.
Since version 3.1 of Stock Ticker you can get stock data in custom functions. Fore example:
<?php if ( class_exists( 'Wpau_Stock_Ticker' ) ) { $stock_data = Wpau_Stock_Ticker::get_stock_from_db( 'AAPL,MSFT' ); var_dump( $stock_data ); } ?> That will return associated array for requested symbols:
array(2) { ["AAPL"]=> array(11) { ["symbol"]=> string(4) "AAPL" ["tz"]=> string(10) "US/Eastern" ["last_refreshed"]=> string(19) "2018-09-14 00:00:00" ["last_open"]=> string(8) "225.7500" ["last_high"]=> string(8) "226.8400" ["last_low"]=> string(8) "222.5220" ["last_close"]=> string(8) "223.8400" ["last_volume"]=> string(8) "31999289" ["change"]=> string(7) "-2.5700" ["changep"]=> string(7) "-1.1351" ["range"]=> string(19) "222.5220 - 226.8400" } ["MSFT"]=> array(11) { ["symbol"]=> string(4) "MSFT" ["tz"]=> string(10) "US/Eastern" ["last_refreshed"]=> string(19) "2018-09-14 00:00:00" ["last_open"]=> string(8) "113.3600" ["last_high"]=> string(8) "113.7300" ["last_low"]=> string(8) "112.4400" ["last_close"]=> string(8) "113.3700" ["last_volume"]=> string(8) "19122349" ["change"]=> string(6) "0.4600" ["changep"]=> string(6) "0.4074" ["range"]=> string(19) "112.4400 - 113.7300" } } stockticker_purge_cache which allow unauthorised user to purge stock cache (from now purge stock cache by updating All Stock Symbols or running Fetch Stock Data Now on plugin settings page)number_format has no effectAuto Refresh to Auto Reload to be clear what it is forwpaust to stock-ticker%ltrade% with customizable date format like %ltrade|l, jS \of F Y%get_symbol_to_fetch()data_to_db()get_stock_from_db() public so user can access Stock data in DB from custom functionssanitize_symbols() to main class and make it public static so user can access it from custom functions^DJBWRIntraday, Auto Refresh, Load assets on all pages). Thanks to @cmyee for reporting bug.Cache Timeout can not be saved and always reset to zero on settings update.Uncaught ReferenceError: stock_tickers_load is not defined reported by @wparoldBETAIntradayRefresh Timeout option and rename to Auto Refresh TimeoutCache Timeout optionAll Stock Symbols and Fetch Timeout value.Stop Fetch of forced fetching stock data on settings pageFetch Stock Data on settings pageFetch Stock Data on settings page with link to test symbol in case of error message Invalid API callAll Stock Symbols and Stock Symbols and display message about removed symbols on settings update