Yahoo Finance API Ticker: Difference between revisions
Jump to navigation
Jump to search
(7 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
=Overview= | =Overview= | ||
Ticker <code>info</code> returns the current day data, except the closing price, even after the market closed and the price should have been available. To get the closing price, use either <code>Ticker.history()</code> or <code>[[Yahoo_Finance_API#download.28.29|download()]]</code>. | |||
<syntaxhighlight lang='py'> | <syntaxhighlight lang='py'> | ||
Line 11: | Line 11: | ||
=Keys= | =Keys= | ||
==<tt>symbol</tt>, <tt>underlyingSymbol</tt>== | ==General== | ||
===<tt>symbol</tt>, <tt>underlyingSymbol</tt>=== | |||
'FCOM' | 'FCOM' | ||
==<tt>longName</tt>== | ===<tt>longName</tt>=== | ||
'Fidelity MSCI Communication Services Index ETF' | 'Fidelity MSCI Communication Services Index ETF' | ||
==<tt>shortName</tt>== | ===<tt>shortName</tt>=== | ||
<font color=darkkhaki>31 characters?</font> | <font color=darkkhaki>31 characters?</font> | ||
===<tt>exchange</tt>=== | |||
==<tt>exchange</tt>== | |||
'PCX' | 'PCX' | ||
==<tt>category</tt>== | ===<tt>category</tt>=== | ||
The sector | The sector ('Communications') | ||
===<tt>currency</tt>=== | |||
'USD' | |||
===<tt> quoteType</tt>=== | |||
'ETF' | |||
==Pricing Data== | ==Pricing Data== | ||
===<tt>currentPrice</tt>, <tt>regularMarketPrice</tt>=== | |||
<font color=darkkhaki>Did not show up when the market as closed.</font> | |||
===<tt>open</tt>, <tt>regularMarketOpen</tt>=== | ===<tt>open</tt>, <tt>regularMarketOpen</tt>=== | ||
===<tt>dayLow</tt>, <tt>regularMarketDayLow</tt>=== | ===<tt>dayLow</tt>, <tt>regularMarketDayLow</tt>=== | ||
Line 46: | Line 51: | ||
==Time Data== | ==Time Data== | ||
===<tt>timeZoneFullName</tt>=== | |||
===<tt>timeZoneShortName</tt>=== | |||
===<tt>gmtOffSetMilliseconds</tt>=== | |||
==Others== | |||
===<tt>priceHint</tt>=== | |||
===<tt>bid</tt>=== | |||
===<tt>bidSize</tt>=== | |||
===<tt>ask</tt>=== | |||
===<tt>askSize</tt>=== | |||
===<tt>longBusinessSummary</tt>=== | |||
===<tt>maxAge</tt>=== | |||
===<tt>trailingPE</tt>=== | |||
===<tt>messageBoardId</tt>=== | |||
===<tt>fundFamily</tt>=== | |||
===<tt>fundInceptionDate</tt>=== | |||
===<tt>yield</tt>=== | |||
===<tt>totalAssets</tt>=== | |||
===<tt>currency</tt>=== | |||
===<tt>beta3Year</tt>=== | |||
===<tt>legalType</tt>=== | |||
===<tt>firstTradeDateEpochUtc</tt>=== | |||
===<tt>trailingPegRatio</tt>=== |
Latest revision as of 07:08, 14 October 2023
Internal
Overview
Ticker info
returns the current day data, except the closing price, even after the market closed and the price should have been available. To get the closing price, use either Ticker.history()
or download()
.
yf.Ticker('AAPL').history(period='1d')['Close'].iloc[0]
Keys
General
symbol, underlyingSymbol
'FCOM'
longName
'Fidelity MSCI Communication Services Index ETF'
shortName
31 characters?
exchange
'PCX'
category
The sector ('Communications')
currency
'USD'
quoteType
'ETF'
Pricing Data
currentPrice, regularMarketPrice
Did not show up when the market as closed.