Comments (4)
@piratmc Looking at an aapl quote after trading hours I notice that ask_realtime is nil. Perhaps, those values are only available while the market is open? Or it may no longer be available through the yahoo api.
Unfortunately, the delay is a function of the Yahoo API. Originally the gem used the google finance api, before it was deprecated, which seemed to be 'more real-time'. In my experience, the closest I have been able to get to 'real-time' is with the TradeKing API (https://github.com/tyrauber/tradeking).
from stock_quote.
Thank you for reply.
I was checking values DURING trading session so expected Float but not Nil’s for real-time values.
If you have time to check out if these numbers still available via yahoo API’s that would be great. Perhaps it’s just na name change or small things like that causes the return to be Nil during open trading session.
Regardless, thanks work your work.
And thanks for a link.
On Apr 14, 2015, at 3:51 PM, Ty Rauber [email protected] wrote:
@piratmc https://github.com/piratmc Looking at an aapl quote after trading hours I notice that ask_realtime is nil. Perhaps, those values are only available while the market is open? Or it may no longer be available through the yahoo api.
Unfortunately, the delay is a function of the Yahoo API. Originally the gem used the google finance api, before it was deprecated, which seemed to be 'more real-time'. In my experience, the closest I have been able to get to 'real-time' is with the TradeKing API (https://github.com/tyrauber/tradeking https://github.com/tyrauber/tradeking).
—
Reply to this email directly or view it on GitHub #23 (comment).
from stock_quote.
@piratmc Unfortunately, it is not an attribute change or parsing issue. The raw data includes null for those values in the response. I have no idea why.
Query:
Response:
{"query":{"count":1,"created":"2015-04-14T23:17:39Z","lang":"en-US","diagnostics":{"url":[{"execution-start-time":"0","execution-stop-time":"1","execution-time":"1","content":"http://www.datatables.org/yahoo/finance/yahoo.finance.quotes.xml"},{"execution-start-time":"7","execution-stop-time":"12","execution-time":"5","content":"http://download.finance.yahoo.com/d/quotes.csv?f=aa2bb2b3b4cc1c3c4c6c8dd1d2ee1e7e8e9ghjkg1g3g4g5g6ii5j1j3j4j5j6k1k2k4k5ll1l2l3mm2m3m4m5m6m7m8nn4opp1p2p5p6qrr1r2r5r6r7ss1s7t1t7t8vv1v7ww1w4xy&s=AAPL"}],"publiclyCallable":"true","cache":{"execution-start-time":"5","execution-stop-time":"6","execution-time":"1","method":"GET","type":"MEMCACHED","content":"5d1e1de680846a307c9874dc3d6878dc"},"query":{"execution-start-time":"6","execution-stop-time":"13","execution-time":"7","params":"{url=[http://download.finance.yahoo.com/d/quotes.csv?f=aa2bb2b3b4cc1c3c4c6c8dd1d2ee1e7e8e9ghjkg1g3g4g5g6ii5j1j3j4j5j6k1k2k4k5ll1l2l3mm2m3m4m5m6m7m8nn4opp1p2p5p6qrr1r2r5r6r7ss1s7t1t7t8vv1v7ww1w4xy&s=AAPL]}","content":"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'"},"javascript":{"execution-start-time":"4","execution-stop-time":"23","execution-time":"18","instructions-used":"64823","table-name":"yahoo.finance.quotes"},"user-time":"24","service-time":"7","build-version":"0.2.75"},"results":{"quote":{"symbol":"AAPL","Ask":"126.37","AverageDailyVolume":"56031500","Bid":"126.35","AskRealtime":null,"BidRealtime":null,"BookValue":"21.17","Change_PercentChange":"-0.55 - -0.43%","Change":"-0.55","Commission":null,"Currency":"USD","ChangeRealtime":null,"AfterHoursChangeRealtime":null,"DividendShare":"1.88","LastTradeDate":"4/14/2015","TradeDate":null,"EarningsShare":"7.39","ErrorIndicationreturnedforsymbolchangedinvalid":null,"EPSEstimateCurrentYear":"8.66","EPSEstimateNextYear":"9.40","EPSEstimateNextQuarter":"1.67","DaysLow":"125.91","DaysHigh":"127.29","YearLow":"73.05","YearHigh":"133.60","HoldingsGainPercent":null,"AnnualizedGain":null,"HoldingsGain":null,"HoldingsGainPercentRealtime":null,"HoldingsGainRealtime":null,"MoreInfo":null,"OrderBookRealtime":null,"MarketCapitalization":"735.67B","MarketCapRealtime":null,"EBITDA":"67.66B","ChangeFromYearLow":"53.25","PercentChangeFromYearLow":"+72.90%","LastTradeRealtimeWithTime":null,"ChangePercentRealtime":null,"ChangeFromYearHigh":"-7.30","PercebtChangeFromYearHigh":"-5.46%","LastTradeWithTime":"4:00pm - <b>126.30</b>","LastTradePriceOnly":"126.30","HighLimit":null,"LowLimit":null,"DaysRange":"125.91 - 127.29","DaysRangeRealtime":null,"FiftydayMovingAverage":"126.66","TwoHundreddayMovingAverage":"115.02","ChangeFromTwoHundreddayMovingAverage":"11.28","PercentChangeFromTwoHundreddayMovingAverage":"+9.81%","ChangeFromFiftydayMovingAverage":"-0.36","PercentChangeFromFiftydayMovingAverage":"-0.29%","Name":"Apple Inc.","Notes":null,"Open":"127.09","PreviousClose":"126.85","PricePaid":null,"ChangeinPercent":"-0.43%","PriceSales":"3.70","PriceBook":"5.99","ExDividendDate":"2/5/2015","PERatio":"17.10","DividendPayDate":"2/12/2015","PERatioRealtime":null,"PEGRatio":"1.09","PriceEPSEstimateCurrentYear":"14.57","PriceEPSEstimateNextYear":"13.44","Symbol":"AAPL","SharesOwned":null,"ShortRatio":"1.30","LastTradeTime":"4:00pm","TickerTrend":null,"OneyrTargetPrice":"139.72","Volume":"25502351","HoldingsValue":null,"HoldingsValueRealtime":null,"YearRange":"73.05 - 133.60","DaysValueChange":null,"DaysValueChangeRealtime":null,"StockExchange":"NMS","DividendYield":"1.50","PercentChange":"-0.43%"}}}}
from stock_quote.
@piratmc I am going to close this for now, but let me know if the above is not correct or you think there is something we could be doing differently here.
from stock_quote.
Related Issues (20)
- StockQuote::Stock.quote(ticker_symbol) is not working ? HOT 2
- Yahoo API OEL - Versions < 1.5.0 will not function. HOT 1
- quote throws JSON::ParserError for certain symbols HOT 6
- Inspired google-finance-ruby-client HOT 1
- Stack level too deep because of self referencial method 'history' HOT 1
- history not working HOT 2
- error right after install HOT 2
- OpenSSL::SSL::SSLError
- history api not working HOT 1
- api doesn't work HOT 11
- This version does not work HOT 1
- IEX Library - Specific date syntax in RoR HOT 1
- cannot find news summary HOT 1
- Endpoints that used to work now give "unexpected token" errors HOT 2
- How can I specify the exchange in my search ? HOT 1
- API Key HOT 2
- Yahoo Finance is back online HOT 3
- App crashes if IEX returns 404 HOT 1
- IEX Cloud Has Changed their Pricing Structure HOT 4
- Deleted package detected HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stock_quote.