| 开发者 |
urkekg
techwebux |
|---|---|
| 更新时间 | 2026年3月4日 17:09 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.3 及以上 |
| WordPress版本: | 6.9.1 |
| 版权: | GPLv3 |
| 版权网址: | 版权信息 |
Plugins > Add New.Stock Ticker plugin.Stock Ticker.Settings > Stock Ticker.AlphaVantage.co API Key (check this screenshot).All Stock Symbols, separated by a comma. This field is used to fetch stock data from AlphaVantage.co API by AJAX in the background. Because AV's free tier only offers an API to retrieve data for a single symbol, it can take some time to get. Please note that, for default shortcode symbols, a field remains in the Default Settings section of the plugin.Fetch Stock Data Now! button to initially fetch stock data into the database. Wait for a while until we receive all symbols from AlphaVantage.co for the first time.[stock_ticker] to a page or post, or the Stock Ticker Widget to the preferred Widget Area.You can use standard symbols from stock exchanges supported by AlphaVantage.co, such as AAPL, MSFT, IBM, CSCO, GOOG, YHOO, and AMZN (Apple Inc., Microsoft Corporation, International Business Machines Corporation, Cisco Systems, Inc., Google Inc., Yahoo! Inc., Amazon.com). To check if AlphaVantage.co supports your preferred symbol(s), you can use the Symbol Search & Test tool on the plugin settings page to search for keywords and symbols on AlphaVantage.co directly from your WordPress dashboard.
Try to find the correct symbol on AlphaVantage.co by looking for it in the Symbol Search & Test tool. Even try alternatives or the company name. If that does not help, you can search the Alpha Vantage community forum www.alpha-vantage.community or contact Alpha Vantage support.
AlphaVantage.co does not support indexes since mid-2020.
Commodities are not supported by the Stock Ticker.
Forex is not supported by the Stock Ticker.
Enter symbol in format EXCHANGE:SYMBOL, like LON:LLOY or SYMBOL.EXCHANGE like LLOY.LON for Lloyds Banking Group Plc from the London Stock Exchange market.
Please note that AlphaVantage.co does not always provide stock data 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 can also add custom parameters for the shortcode):
<?php echo do_shortcode('[stock_ticker]'); ?>
On the Settings page for the plugin, you can set a custom Value template. You can use macro keywords %exch_symbol%, %symbol%, %company%, %price%, %volume%, %change%, %changep% and %ltrade% mixed with HTML tags <span> (allowed class and style attribute), <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%
%company% but symbol is displayed insteadPlease note that Alpha Vantage does not provide the company name in retrieved feeds. You'll need to set the company name in the Custom Names field on the plugin settings page.
Unfortunately, we could not get stock quotes this time?This can be a temporary issue. First, try running Fetch Stock Data Now! on the plugin settings page.
Then try increasing the Fetch Timeout option in the general plugin settings and run Fetch Stock Data Now!.
If you continue to experience issues, please contact us through the community support forum.
Since version 3.1 of Stock Ticker, you can get stock data in custom functions. For example:
`
That will return the associated array for the 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