Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When error is raised the response is badly formated #1

Open
vdias38 opened this issue Mar 15, 2016 · 0 comments
Open

When error is raised the response is badly formated #1

vdias38 opened this issue Mar 15, 2016 · 0 comments
Labels

Comments

@vdias38
Copy link
Contributor

vdias38 commented Mar 15, 2016

If an error occured when service fetch stock quote, a cached response is returned. But on cached response there's an unexpected html warning preventing to use it.

"<br /> <b>Warning</b>: file_get_contents(https://query.yahooapis.com/v1/public/yql?q=select+%2A+from+yahoo.finance.quotes+where+symbol+in+%28%27CIEL3.SA%27%29&amp;format=json&amp;env=http%3A%2F%2Fdatatables.org%2Falltables.env): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request
 in <b>/home/meumobi/PROJECTS/services.int-meumobilesite.com/releases/20140819/services/Service.php</b> on line <b>52</b><br /> {"query":{"count":1,"created":"2016-03-15T19:26:59Z","lang":"en-US","results":{"quote":{"symbol":"CIEL3.SA","Ask":"33.00","AverageDailyVolume":"5660500","Bid":"32.98","AskRealtime":null,"BidRealtime":null,"BookValue":"3.46","Change_PercentChange":"-0.27 - -0.81%","Change":"-0.27","Commission":null,"Currency":"BRL","ChangeRealtime":null,"AfterHoursChangeRealtime":null,"DividendShare":null,"LastTradeDate":"3/15/2016","TradeDate":null,"EarningsShare":"1.86","ErrorIndicationreturnedforsymbolchangedinvalid":null,"EPSEstimateCurrentYear":"1.97","EPSEstimateNextYear":null,"EPSEstimateNextQuarter":"0.00","DaysLow":"32.24","DaysHigh":"33.57","YearLow":"28.03","YearHigh":"49.06","HoldingsGainPercent":null,"AnnualizedGain":null,"HoldingsGain":null,"HoldingsGainPercentRealtime":null,"HoldingsGainRealtime":null,"MoreInfo":null,"OrderBookRealtime":null,"MarketCapitalization":"62.06B","MarketCapRealtime":null,"EBITDA":"5.20B","ChangeFromYearLow":"4.95","PercentChangeFromYearLow":"+17.66%","LastTradeRealtimeWithTime":null,"ChangePercentRealtime":null,"ChangeFromYearHigh":"-16.08","PercebtChangeFromYearHigh":"-32.78%","LastTradeWithTime":"12:34pm - <b>32.98</b>","LastTradePriceOnly":"32.98","HighLimit":null,"LowLimit":null,"DaysRange":"32.24 - 33.57","DaysRangeRealtime":null,"FiftydayMovingAverage":"32.11","TwoHundreddayMovingAverage":"35.30","ChangeFromTwoHundreddayMovingAverage":"-2.32","PercentChangeFromTwoHundreddayMovingAverage":"-6.58%","ChangeFromFiftydayMovingAverage":"0.87","PercentChangeFromFiftydayMovingAverage":"+2.72%","Name":"CIELO ON NM","Notes":null,"Open":"32.59","PreviousClose":"33.25","PricePaid":null,"ChangeinPercent":"-0.81%","PriceSales":"5.63","PriceBook":"9.60","ExDividendDate":"3/14/2016","PERatio":"17.71","DividendPayDate":null,"PERatioRealtime":null,"PEGRatio":"0.00","PriceEPSEstimateCurrentYear":null,"PriceEPSEstimateNextYear":null,"Symbol":"CIEL3.SA","SharesOwned":null,"ShortRatio":"0.00","LastTradeTime":"12:34pm","TickerTrend":null,"OneyrTargetPrice":null,"Volume":"1918600","HoldingsValue":null,"HoldingsValueRealtime":null,"YearRange":"28.03 - 49.06","DaysValueChange":null,"DaysValueChangeRealtime":null,"StockExchange":"SAO","DividendYield":null,"PercentChange":"-0.81%"}}}}"
@vdias38 vdias38 added the bug label Mar 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant