Yahoo Finance API Ticker: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(4 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 27: | Line 27: | ||
'ETF' | '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 49: | Line 51: | ||
==Time Data== | ==Time Data== | ||
===<tt>timeZoneFullName</tt>=== | |||
===<tt>timeZoneShortName</tt>=== | |||
===<tt>gmtOffSetMilliseconds</tt>=== | |||
==Others== | ==Others== | ||
===<tt>priceHint</tt>=== | ===<tt>priceHint</tt>=== | ||
Line 61: | Line 60: | ||
===<tt>ask</tt>=== | ===<tt>ask</tt>=== | ||
===<tt>askSize</tt>=== | ===<tt>askSize</tt>=== | ||
===<tt></tt>=== | ===<tt>longBusinessSummary</tt>=== | ||
===<tt></tt>=== | ===<tt>maxAge</tt>=== | ||
===<tt></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.