YQL yahoo.finance.xchange在通过Rest Query运行时返回Column Mismatch,从控制台运行

时间:2015-08-11 07:23:06

标签: api yql yahoo-api yahoo-finance

以下查询适用于控制台:

  

env' store://datatables.org/alltableswithkeys' ;;   select * from yahoo.finance.xchange where where in(" USDSGD")

然而,其余查询: https://query.yahooapis.com/v1/public/yql?q=env%20%27store%3A%2F%2Fdatatables.org%2Falltableswithkeys%27%3B%20select%20*%20from%20yahoo.finance.xchange%20where%20pair%20in%20(%22USDSGD%22)%20&format=json&diagnostics=true&callback=

由于列不匹配错误而失败,几个星期前这个查询返回结果,有什么想法可以改变吗?

1 个答案:

答案 0 :(得分:0)

这里也有同样的问题。

http://query.yahooapis.com/v1/public/yql?q=select%20%2a%20from%20yahoo.finance.quotes%20where%20symbol%20in%20%28%22MSFT%22%29&env=store://datatables.org/alltableswithkeys&diagnostics=true&format=xml

列不匹配(请参阅输出)。这个URL在命令行中工作正常,但有时它会在我的应用程序中失败几个小时。

输出

<url>http://www.datatables.org/yahoo/finance/yahoo.finance.quotes.xml</url><publiclyCallable>true</publiclyCallable><cache>5d1e1de680846a307c9874dc3d6878dc</cache>
<url>http://download.finance.yahoo.com/d/quotes.csv?f=aa2bb2b3b4cc1c3c4c6c8dd1d2ee1e7e8e9ghjkg1g3g4g5g6ii5j1j3j4j5j6k1k2k4k5ll1l2l3mm2m3m4m5m6m7m8nn4opp1p2p5p6qrr1r2r5r6r7ss1s7t1t7t8vv1v7ww1w4xy&s=AAPL</url>
<csv>Column mismatch: [Ask, AverageDailyVolume, Bid, AskRealtime, BidRealtime, BookValue, Change</csv>
<query>select * from csv where url=@url and columns='Ask,AverageDailyVolume,Bid,AskRealtime,BidRealtime,BookValue,Change&PercentChange,Change,Commission,Currency,ChangeRealtime,AfterHoursChangeRealtime,DividendShare,LastTradeDate,TradeDate,EarningsShare,ErrorIndicationreturnedforsymbolchangedinvalid,EPSEstimateCurrentYear,EPSEstimateNextYear,EPSEstimateNextQuarter,DaysLow,DaysHigh,YearLow,YearHigh,HoldingsGainPercent,AnnualizedGain,HoldingsGain,HoldingsGainPercentRealtime,HoldingsGainRealtime,MoreInfo,OrderBookRealtime,MarketCapitalization,MarketCapRealtime,EBITDA,ChangeFromYearLow,PercentChangeFromYearLow,LastTradeRealtimeWithTime,ChangePercentRealtime,ChangeFromYearHigh,PercebtChangeFromYearHigh,LastTradeWithTime,LastTradePriceOnly,HighLimit,LowLimit,DaysRange,DaysRangeRealtime,FiftydayMovingAverage,TwoHundreddayMovingAverage,ChangeFromTwoHundreddayMovingAverage,PercentChangeFromTwoHundreddayMovingAverage,ChangeFromFiftydayMovingAverage,PercentChangeFromFiftydayMovingAverage,Name,Notes,Open,PreviousClose,PricePaid,ChangeinPercent,PriceSales,PriceBook,ExDividendDate,PERatio,DividendPayDate,PERatioRealtime,PEGRatio,PriceEPSEstimateCurrentYear,PriceEPSEstimateNextYear,Symbol,SharesOwned,ShortRatio,LastTradeTime,TickerTrend,OneyrTargetPrice,Volume,HoldingsValue,HoldingsValueRealtime,YearRange,DaysValueChange,DaysValueChangeRealtime,StockExchange,DividendYield'</query><javascript></javascript><user-time>9</user-time><service-time>6</service-time><build-version>0.2.395</build-version></diagnostics><results></results></query>