Module:Stock tickers/NYSE and Module:Stock tickers/NYSE/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
m Changed protection level for "Module:Stock tickers/NYSE": Highly visible module ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite)) |
No edit summary |
||
Line 9: | Line 9: | ||
function p._GetURL(args) |
function p._GetURL(args) |
||
local ticker = args[1] |
local ticker = args[1] |
||
local exchange = args.exchange |
|||
-- By default the exchange will be NYSE |
|||
if not exchange then exchange = 'NYSE' end |
|||
-- Get corrected ticker |
-- Get corrected ticker |
||
ticker = p.FormatTickerURL(ticker) |
ticker = p.FormatTickerURL(ticker) |
||
-- NYSE official URL |
-- NYSE official URL |
||
url = 'https://www.nyse.com/quote/ |
url = 'https://www.nyse.com/quote/XXXX:' .. ticker |
||
return url |
return url |
||
Line 35: | Line 31: | ||
return ticker |
return ticker |
||
end |
end |
||
-- Get NYSE exchange codes |
|||
exchangeCode = { |
|||
['NYSE'] = 'XNYS', |
|||
['AMEX'] = 'XASE', |
|||
['ARCA'] = 'ARCX', |
|||
['NASDAQ'] = 'XNAS' |
|||
} |
|||
return p |
return p |