Giter VIP home page Giter VIP logo

Comments (4)

bpschuck avatar bpschuck commented on June 9, 2024 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.

bpschuck avatar bpschuck commented on June 9, 2024 1

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.

jeckersb avatar jeckersb commented on June 9, 2024 1

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.

khorton avatar khorton commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.