Programmatic access to detailed historical financial data [closed]

孤街醉人 提交于 2019-11-29 21:56:52

Quandl provides a huge amount of different databases with all sorts of data, not only EOD but e.g. earnings per share and a lot of other stuff like US employment data.

API is easy to use and well documented. It also provides an Excel plug-in, a Matlab plug-in, a Python package, an R package, and a number of languages has a support through community maintained libraries.

Not all the data are free though. For more advanced data bases there is a subscription fee. I think the price is different depending on the database and the number of potential users.

Wolfram Alpha has the data you desire

Examples:

I have not used it, but I see they provide a free API with an option to upgrade if you exceed their monthly limits.

Intrinio provides income statements, balance sheets, and statement of cashflows going back 10 years, in addition to stock prices and valuation ratios, via API. You can programmatically query the API to pull the data into your app.

Some examples:

https://api.intrinio.com/financials/standardized?identifier=YUM&statement=income_statement&fiscal_period=Q2&fiscal_year=2015

This grabs YUM's income statement from Q2, 2015.

https://api.intrinio.com/companies?latest_filing_date=2017-03-06

That shows all companies with a new filing date on or after 2017-03-06, which is useful for determining which fundamentals need to be updated.

https://api.intrinio.com/data_point?ticker=AAPL,MSFT&item=pricetoearnings

That pulls the current price to earnings ratio for Apple and Microsoft. You could swap out last_price to get the current stock price.

https://api.intrinio.com/data_point?ticker=$FEDFUNDS&item=level

This call returns the current federal funds interest rate from the federal reserve.

https://api.intrinio.com/prices?ticker=AAPL

That returns the price history for AAPL.

Intrinio gives away 500 daily API calls to any developer.

The one who knocks...

Check out this page: ADVFN Financial Data Scraper. You can download a spreadsheet with built-in macro that scrapes up 22 years of financial earnings data for any publically traded company that ADVFN posts historic data for. Just keep in mind that it's not an quick process, for the 3000 odd companies pre-listed in the spreadsheet, the macro will need to run for a couple of days (obviously you can download less if you like though). But, you'll end up with over 8 million data values and you'll have them saved locally in a spreadsheet for quick and easy analysis.

ADVFN posts up to 307 rows of data per company per year and this spreadsheet can capture them all, yielding a very comprehensive data base of historical financial data.

Depends what you want. Lets say, if you looking for FX historical data you can take a look on Dukascopy historical data feed(http://www.dukascopy.com/swiss/english/data_feed/historical/) It is possible to write some scripts to download data into your app.

You can get what you want from financialmodelingprep they have quarterly income statement, balance sheet and cash flow. I include a sample code so you can see how I took the data in jquery.

They also offer historical quote according to their documentation.

Fiddle: https://jsfiddle.net/7g238qrp/

$(document).ready(function() {
 var url = "https://financialmodelingprep.com/api/financials/income-statement/AAPL?period=quarter";
  $.ajax({
    url: url,
    type: "GET",
    crossDomain: true,
    success: function (response) {
      let resp = response;
      resp = resp.substring(5);
      resp = resp.substring(0, resp.length - 5);
       // if you want to convert to JSON
      //resp = JSON.parse(resp)
      //console.log(resp);
      $('#JonContent').text(resp);
      

    },
    error: function (xhr, status) {
      alert("error");
    }
  });
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<pre>
  <div id="JonContent"></div>
</pre>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!