Yahoo Finance API returns data yesterday before market closes

I have been using Yahoo Finance queries for several years, and over the past weeks (or several months), I noticed that every query that I try to no longer return no longer delays 15-minute data. Instead, while the market is open, it returns data from the previous market day (for example, starting a request now returns closing data on Tuesday). This is based on my experience, new behavior.

For example, take this query:

Get a quote for the S & P 500

When I ran it just a few minutes ago, the XML returned:

<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="1" yahoo:created="2016-03-16T18:31:35Z" yahoo:lang="en-US"> <results> <quote symbol="^GSPC"> <Ask>2017.27</Ask> <AverageDailyVolume/> <Bid>2010.86</Bid> <AskRealtime/> <BidRealtime/> <BookValue>0.00</BookValue> <Change_PercentChange>-3.71 - -0.18%</Change_PercentChange> <Change>-3.71</Change> <Commission/> <Currency>USD</Currency> <ChangeRealtime/> <AfterHoursChangeRealtime/> <DividendShare/> <LastTradeDate>3/15/2016</LastTradeDate> <TradeDate/> <EarningsShare/> <ErrorIndicationreturnedforsymbolchangedinvalid/> <EPSEstimateCurrentYear/> <EPSEstimateNextYear/> <EPSEstimateNextQuarter>0.00</EPSEstimateNextQuarter> <DaysLow>2005.23</DaysLow> <DaysHigh>2015.94</DaysHigh> <YearLow>1810.10</YearLow> <YearHigh>2134.72</YearHigh> <HoldingsGainPercent/> <AnnualizedGain/> <HoldingsGain/> <HoldingsGainPercentRealtime/> <HoldingsGainRealtime/> <MoreInfo/> <OrderBookRealtime/> <MarketCapitalization/> <MarketCapRealtime/> <EBITDA/> <ChangeFromYearLow>205.83</ChangeFromYearLow> <PercentChangeFromYearLow>+11.37%</PercentChangeFromYearLow> <LastTradeRealtimeWithTime/> <ChangePercentRealtime/> <ChangeFromYearHigh>-118.79</ChangeFromYearHigh> <PercebtChangeFromYearHigh>-5.56%</PercebtChangeFromYearHigh> <LastTradeWithTime>4:05pm - <b>2015.93</b></LastTradeWithTime> <LastTradePriceOnly>2015.93</LastTradePriceOnly> <HighLimit/> <LowLimit/> <DaysRange>2005.23 - 2015.94</DaysRange> <DaysRangeRealtime/> <FiftydayMovingAverage/> <TwoHundreddayMovingAverage/> <ChangeFromTwoHundreddayMovingAverage/> <PercentChangeFromTwoHundreddayMovingAverage/> <ChangeFromFiftydayMovingAverage/> <PercentChangeFromFiftydayMovingAverage/> <Name>S&P 500</Name> <Notes/> <Open>2015.27</Open> <PreviousClose>2019.64</PreviousClose> <PricePaid/> <ChangeinPercent>-0.18%</ChangeinPercent> <PriceSales/> <PriceBook/> <ExDividendDate/> <PERatio/> <DividendPayDate/> <PERatioRealtime/> <PEGRatio>0.00</PEGRatio> <PriceEPSEstimateCurrentYear/> <PriceEPSEstimateNextYear/> <Symbol>^GSPC</Symbol> <SharesOwned/> <ShortRatio/> <LastTradeTime>4:05pm</LastTradeTime> <TickerTrend/> <OneyrTargetPrice/> <Volume>529043975</Volume> <HoldingsValue/> <HoldingsValueRealtime/> <YearRange>1810.10 - 2134.72</YearRange> <DaysValueChange/> <DaysValueChangeRealtime/> <StockExchange>SNP</StockExchange> <DividendYield/> <PercentChange>-0.18%</PercentChange> </quote> </results> </query> <!-- total: 16 --> <!-- main-30546b49-eb09-11e5-80e5-ac162da43cf5 --> 

Pay attention to the value of LastTradeTime: 16:05 Also the value of LastTradeDate: 3/15/2016

This request was launched today, March 16, 2016 at 11:31 PDT (mark the Yahoo timestamp from the XML header: yahoo: created = "2016-03-16T18: 31: 35Z"). Volume, high, low, etc. All correspond to yesterday's closing values. I see this for stocks, indices, ETFs, etc. All old data before the market closes.

This has not been the case in the past, and I cannot find documentation that speaks of this. Does anyone know what happened?

Thanks!

+5
source share

Source: https://habr.com/ru/post/1245183/


All Articles