Fetches current or historical securities information from Google Finance.
Sample usage
GOOGLEFINANCE("NASDAQ:GOOG", "price", DATE(2014,1,1), DATE(2014,12,31), "DAILY")
GOOGLEFINANCE("NASDAQ:GOOG","price",TODAY()-30,TODAY())
GOOGLEFINANCE(A2,A3)
Syntax
GOOGLEFINANCE(ticker, [attribute], [start_date], [end_date|num_days], [interval])
-
ticker– The ticker symbol for the security to be considered. It's mandatory to use both the exchange symbol and ticker symbol for accurate results and to avoid discrepancies. For example, use 'NASDAQ:GOOG' instead of 'GOOG'.-
If the exchange symbol is not specified,
GOOGLEFINANCEwill use its best judgement to choose one for you. -
Reuters Instrument Codes are no longer supported. Use TSE:123 or ASX:XYZ instead of ticker 123.TO or XYZ.AX.
-
Not all futures are supported at this time.
-
-
attribute– [ OPTIONAL –'price'by default ] – The attribute to fetch abouttickerfrom Google Finance and is required if a date is specified.-
attributeis one of the following for real-time data:-
'price'– Real-time price quote, delayed by up to 20 minutes. -
'priceopen'– The price as of market open. -
'high'– The current day's high price. -
'low'– The current day's low price. -
'volume'– The current day's trading volume. -
'marketcap'– The market capitalisation of the stock. -
'tradetime'– The time of the last trade. -
'datadelay'– How far delayed the real-time data is. -
'volumeavg'– The average daily trading volume. -
'pe'– The price/earnings ratio. -
'eps'– The earnings per share. -
'high52'– The 52-week high price. -
'low52'– The 52-week low price. -
'change'– The price change since the previous trading day's close. -
'beta'– The beta value. -
'changepct'– The percentage change in price since the previous trading day's close. -
'closeyest'– The previous day's closing price. -
'shares'– The number of outstanding shares. -
'currency'– The currency in which the security is priced. Currencies don't have trading windows, soopen,low,highandvolumewon't return for this argument.
-
-
attributeis one of the following for historical data:-
'open'– The opening price for the specified date(s). -
'close'– The closing price for the specified date(s). -
'high'– The high price for the specified date(s). -
'low'– The low price for the specified date(s). -
'volume'– The volume for the specified date(s). -
'all'– All of the above.
-
-
-
start_date– [ OPTIONAL ] – The start date when fetching historical data.- If
start_dateis specified butend_date|num_daysis not, only the single day's data will be returned.
- If
-
end_date|num_days– [ OPTIONAL ] – The end date when fetching historical data or the number of days fromstart_datefor which to return data. -
interval– [ OPTIONAL ] – The frequency of returned data; either 'DAILY' or 'WEEKLY'.intervalcan alternatively be specified as1or7. Other numeric values are disallowed.
Notes
Usage restrictions: The data is not for financial industry professional use or use by other professionals at non-financial firms (including government entities). Professional use may be subject to additional licensing fees from a third-party data provider.
-
All parameters must be enclosed in quotation marks or be references to cells containing text.
Important: A possible exception is whenintervalis specified as a number and whenend_date|num_daysis specified as a number of days. -
Real-time results will be returned as a value within a single cell. Historical data, even for a single day, will be returned as an expanded array with column headers.
-
Some attributes may not yield results for all symbols.
- If any date parameters are specified, the request is considered historical and only the historical attributes are allowed.
-
GOOGLEFINANCEis only available in English and does not support most international exchanges. -
Historical data cannot be downloaded or accessed via the Sheets API or Apps Script. If you attempt to do so, you'll see a #N/A error in place of the values in the corresponding cells of your spreadsheet.
-
Quotes are not sourced from all markets and may be delayed up to 20 minutes. Information is provided 'as is' and is solely for informational purposes, not for trading purposes or advice.
-
Google treats dates passed into
GOOGLEFINANCEas noon UTC time. Exchanges that close before that time may be shifted by a day. -
Mutual fund attributes are currently not supported in Google Sheets.
Examples
Important: Each example is in its own tab.
General usage
Retrieves market information from Google Finance.
Common attributes
Historical market data
Retrieves historical market information based on the specified dates from Google Finance.
Currency exchange trends
Creates a chart inside a cell to display the currency exchange trend during the last 30 days using the retrieving result returns by GoogleFinance.