Hello Noxos,
Sorry, we don’t have a full list of all symbols. Generally, we support all stocks traded on NASDAQ and NYSE.
As far as indices go, we currently have at least the following:
NASDAQ – ^IXIC
NYSE – ^NYA
S&P500 – ^GSPC
There may me other symbols that work, but it is not possible to get an accurate full list.
If you have any other questions, I’d be happy to help.
Thread Starter
noxos
(@noxos)
Hello,
thanks for your answer, so in fact there no possibility to have the London Stock Echange or the CAC40 ?
Looks like both of those work.
LSE.L — London Stock Exchange
^FCHI — CAC40
One of the ways to find out the correct ticker symbols is to do a web search for “yahoo finance <company_name>”. Yahoo finance seems to more often give working results for ticker symbols.
Thread Starter
noxos
(@noxos)
exact !
thanks for it, but is there a way to not have :
^FCHI 4653.79 +98.87 +2.17%
LSE.L 2502 +45 +1.83%
and something more like this :
NASDAQ 606.25 -8.09 -1.32%
with the name instead if the code ?
Yes and no. I was working to add in a feature to automatically use names instead of / in addition to symbols, but it turned out to be more than a small update, so I am saving it for a major update.
However, there is a way to do what you want, but you have to edit the plugin file called stock_widget_display.php.
At approximately line 300, there is a section of code that looks like this:
if($data_item == "^GSPC") { //change the special index symbols to something more common knowledge
$data_item = "S&P500";
} elseif($data_item == "^IXIC") {
$data_item = "NASDAQ";
}
All you have to do is add in a new line after that for each replacement you want to make. So, to add in a replacement for ^FCHI you would add a line that looks like this:
elseif($data_item == "^FCHI"){$data_item = "London Stock Exchange";}
So all together, it would look like this:
if($data_item == "^GSPC") { //change the special index symbols to something more common knowledge
$data_item = "S&P500";
} elseif($data_item == "^IXIC") {
$data_item = "NASDAQ";
}
elseif($data_item == "^FCHI"){$data_item = "London Stock Exchange";}
And if you want to replace any more, just add more lines and change the text.
Examples:
elseif($data_item == "^XMPL"){$data_item = "EXAMPLE Exchange";}
elseif($data_item == "ABCD"){$data_item = "Alphabet Soup";}
Correction:
for LSE.L
elseif($data_item == "LSE.L"){$data_item = "London Stock Exchange";}
for ^FHCI
elseif($data_item == "^FCHI"){$data_item = "CAC 40";}
Thread Starter
noxos
(@noxos)
perfect !
thanks, and very nice plugin.