Yahoo Finance API Ticker: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 4: Line 4:
=Overview=
=Overview=


Returns the current day data, but not the "close"
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>===
'longBusinessSummary', 'maxAge', 'priceHint',
===<tt>timeZoneShortName</tt>===
'trailingPE',  '', '', '', 
===<tt>gmtOffSetMilliseconds</tt>===
'', 'yield', 'totalAssets',  'currency', 'beta3Year', 'fundFamily', 'fundInceptionDate', 'legalType',
  'quoteType', 'firstTradeDateEpochUtc', 'timeZoneFullName', 'timeZoneShortName', 'uuid', 'messageBoardId', 'gmtOffSetMilliseconds', 'trailingPegRatio'])
 
==Others==
==Others==
===<tt>priceHint</tt>===
===<tt>priceHint</tt>===
Line 58: 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.

open, regularMarketOpen

dayLow, regularMarketDayLow

dayHigh, regularMarketDayHigh

previousClose, regularMarketPreviousClose

navPrice

Pricing Stats

fiftyDayAverage

twoHundredDayAverage

fiftyTwoWeekLow

fiftyTwoWeekHigh

Return Stats

ytdReturn

threeYearAverageReturn

fiveYearAverageReturn

Volume

volume, regularMarketVolume

averageVolume

averageVolume10days

averageDailyVolume10Day

Time Data

timeZoneFullName

timeZoneShortName

gmtOffSetMilliseconds

Others

priceHint

bid

bidSize

ask

askSize

longBusinessSummary

maxAge

trailingPE

messageBoardId

fundFamily

fundInceptionDate

yield

totalAssets

currency

beta3Year

legalType

firstTradeDateEpochUtc

trailingPegRatio