Comments (4)
I also discovered either of these will work (hostname can be query2 or query1).
https://query2.finance.yahoo.com/v11/finance/quoteSummary/?symbol=AAPL&modules=price,summaryDetail,defaultKeyStatistics
or
https://query2.finance.yahoo.com/v10/finance/quoteSummary/?symbol=AAPL&modules=price,summaryDetail,defaultKeyStatistics
While waiting for a new release to be pushed to CPAN, in YahooJSON.pm
change the $YIND_URL_HEAD
and $YIND_URL_TAIL
declarations to:
my $YIND_URL_HEAD = 'https://query2.finance.yahoo.com/v11/finance/quoteSummary/?symbol=';
my $YIND_URL_TAIL = '&modules=price,summaryDetail,defaultKeyStatistics';
Thanks.
from finance-quote.
Probably the last nail in the coffin for YahooJSON. The module will likely be removed in the next Finance::Quote release unless someone can identify another finance.yahoo.com api that returns JSON. Already some reports posted to another issue which becomes a red herring if access is completely denied.
Please, no "me too" comments.
Sorry, but we have no control over what Yahoo chooses to allow access to.
from finance-quote.
I see the webpage calls out to the chart API which appears to have at least some of the information, most notably current price and previous close. I'm not familiar enough with the code to know what else (if anything) would be required. Hopefully it's helpful.
https://query1.finance.yahoo.com/v8/finance/chart/AAPL
$ curl -s https://query1.finance.yahoo.com/v8/finance/chart/AAPL | jq .chart.result[0].meta
{
"currency": "USD",
"symbol": "AAPL",
"exchangeName": "NMS",
"instrumentType": "EQUITY",
"firstTradeDate": 345479400,
"regularMarketTime": 1689344613,
"gmtoffset": -14400,
"timezone": "EDT",
"exchangeTimezoneName": "America/New_York",
"regularMarketPrice": 191.105,
"chartPreviousClose": 190.54,
"previousClose": 190.54,
"scale": 3,
"priceHint": 2,
"currentTradingPeriod": {
"pre": {
"timezone": "EDT",
"start": 1689321600,
"end": 1689341400,
"gmtoffset": -14400
},
"regular": {
"timezone": "EDT",
"start": 1689341400,
"end": 1689364800,
"gmtoffset": -14400
},
"post": {
"timezone": "EDT",
"start": 1689364800,
"end": 1689379200,
"gmtoffset": -14400
}
},
"tradingPeriods": [
[
{
"timezone": "EDT",
"start": 1689341400,
"end": 1689364800,
"gmtoffset": -14400
}
]
],
"dataGranularity": "1m",
"range": "1d",
"validRanges": [
"1d",
"5d",
"1mo",
"3mo",
"6mo",
"1y",
"2y",
"5y",
"10y",
"ytd",
"max"
]
}
from finance-quote.
FWIW, the LibreOffice Financials-Extension still manages to scrap data from Yahoo, as of a few minutes ago. Maybe whatever trick they are using in their Python code can be replicated in Perl
from finance-quote.
Related Issues (20)
- GoogleWeb.pm does not support BATS exchange HOT 2
- Bloomberg Parse Error HOT 8
- Switch from Alphavantage to Yahoo for default currency quotes? HOT 4
- Updates to AlphaVantage.pm
- MacOS Sonoma Upgrade Finance Quote Not Working HOT 5
- Cdnfundlibrary.pm Not working
- Fool.pm Not Working
- yahooJSON not working again HOT 16
- Subtle run time bug rearing when module executed in debug mode. HOT 1
- YahooJSON Disabled for EU IP Addresses HOT 41
- YahooWeb failing with "Header line too long" error HOT 2
- YahooJSON.pm is giving invalid cookie/crumb again HOT 5
- Restore Fool.pm Module HOT 1
- Unable to use SIX module from GnuCash HOT 3
- update fails on Windows
- MarketWatch Module Not Working HOT 1
- Add Error Handling to YahooJSON.pm
- NZX Website Update - NZX Quotes no longer working HOT 6
- ASX Cleanup HOT 1
- MorningstarAU Module not working HOT 3
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 finance-quote.