Instantly share code, notes, and snippets.

Embed
What would you like to do?
A brief description on how to use Morningstar's API

Morningstar API

If you're interested in grabbing Morningstar data but cash strapped there are ways to do it without actually paying for it.

Historical Price API

The following URL will get you access to all available historical Morningstar price data for the Ford Corporation

http://globalquote.morningstar.com/globalcomponent/RealtimeHistoricalStockData.ashx?ticker=F&showVol=true&dtype=his&f=d&curry=USD&range=1900-1-1|2014-10-10&isD=true&isS=true&hasF=true&ProdCode=DIRECT 

Now you will have every single daily piece of data for Ford between the dates of 01/01/1900 and 10/10/2014

Real Time Quote API

For more fine grained data for current market activity you can call the real time quote API.

http://quotespeed.morningstar.com/quote.jsp?&jsoncallback=jQuery172017541670752689242_1441265385395&preAfter=1&ty=D&mtype=ST&exch=126&ticker=F&stype=1&days=5&_tid=1441265386097&ver=1.6.0&f=1&instid=MSRT&sdkver=2.1.20150320&qs_wsid=2D2114F870F6B844CDF8271C99BB8C7A&_=1441265386099

Which will give you all data for the Ford Corporation within the last 5 days. Included is data for intraday trading.

Key Ratios

Get statistics for things like the following: Revenue, Net Income, Shares, Return on Equity, etc. all in CSV. For example; if I wanted to get all of the key ratios for Facebook I could do something like

http://financials.morningstar.com/ajax/exportKR2CSV.html?t=FB

You can then get your favorite CSV library to read the data for you.

Financials

Financial data for any ticker symbol you desire. Let's try Twitter (TWTR). First let's get the income statement

http://financials.morningstar.com/ajax/ReportProcess4CSV.html?t=TWTR&reportType=is&period=12&dataType=A&order=asc&columnYear=5&number=3

OK that's a lot of url parameters so let's break it down a bit:

  • reportType: is = Income Statement, cf = Cash Flow, bs = Balance Sheet
  • period: 12 for annual reporting, 3 for quarterly reporting
  • dataType: this doesn't seem to change and is always A
  • order: asc or desc (ascending or descending)
  • columnYear: 5 or 10 are the only two values supported
  • number: The units of the response data. 1 = None 2 = Thousands 3 = Millions 4 = Billions

So if we wanted to get the annual balance sheet information for TWTR we could request

http://financials.morningstar.com/ajax/ReportProcess4CSV.html?t=TWTR&reportType=bs&period=12&dataType=A&order=asc&columnYear=5&number=3

Likewise for Cash Flow;

http://financials.morningstar.com/ajax/ReportProcess4CSV.html?t=TWTR&reportType=cf&period=12&dataType=A&order=asc&columnYear=5&number=3

Disclaimer

This is in no way an official API. As such it is not supported by Morningstar the organization. Furthermore, I would advise to rate limit your downloads to be nice to Morningstar's servers. If not to be nice to Morningstar then to be kind to the other users of the unofficial API so as not to ruin a good thing.

Future

More fine grained analysis on each parameter forthcoming besides some wonky URL. Also, analysis on the response data.

@jp55

This comment has been minimized.

Show comment
Hide comment
@jp55

jp55 Feb 11, 2016

How can I download data to an existing csv file?

jp55 commented Feb 11, 2016

How can I download data to an existing csv file?

@hahnicity

This comment has been minimized.

Show comment
Hide comment
@hahnicity

hahnicity Feb 18, 2016

Some additional programming perhaps. Check out stackoverflow if you are having problems

Owner

hahnicity commented Feb 18, 2016

Some additional programming perhaps. Check out stackoverflow if you are having problems

@GitHubDeepu

This comment has been minimized.

Show comment
Hide comment
@GitHubDeepu

GitHubDeepu Mar 30, 2016

Seems to giving only 5 years of data even if Col year is 10 when using VBA script. Works fine on browser. any suggestions?

GitHubDeepu commented Mar 30, 2016

Seems to giving only 5 years of data even if Col year is 10 when using VBA script. Works fine on browser. any suggestions?

@chrisapril

This comment has been minimized.

Show comment
Hide comment
@chrisapril

chrisapril Apr 11, 2016

Is the Real Time Quote API broken? I can not get any results with this url.

chrisapril commented Apr 11, 2016

Is the Real Time Quote API broken? I can not get any results with this url.

@hahnicity

This comment has been minimized.

Show comment
Hide comment
@hahnicity

hahnicity May 1, 2016

Possibly, haven't touched this in 9 months. If you want and you have access to Morningstar you can use the Chrome network debugging tool to help you figure out the API calls being used

Owner

hahnicity commented May 1, 2016

Possibly, haven't touched this in 9 months. If you want and you have access to Morningstar you can use the Chrome network debugging tool to help you figure out the API calls being used

@ppyaato

This comment has been minimized.

Show comment
Hide comment
@ppyaato

ppyaato May 12, 2016

How do I call a foreign company, lets say BP on the London stock exchange? Also is there a way to download the ownership information tab???

ppyaato commented May 12, 2016

How do I call a foreign company, lets say BP on the London stock exchange? Also is there a way to download the ownership information tab???

@mkomet

This comment has been minimized.

Show comment
Hide comment
@mkomet

mkomet May 21, 2016

I want to receive the last 3 movements (quarters) of a company - the exact date. Sometimes the Historical API works, and for certain tickers it doesn't (GOOGL, TWTR). Any idea why? Or how to fix it? Also, any way to know if it a company reports AM or PM?

mkomet commented May 21, 2016

I want to receive the last 3 movements (quarters) of a company - the exact date. Sometimes the Historical API works, and for certain tickers it doesn't (GOOGL, TWTR). Any idea why? Or how to fix it? Also, any way to know if it a company reports AM or PM?

@jvdheyden

This comment has been minimized.

Show comment
Hide comment
@jvdheyden

jvdheyden May 25, 2016

@ppyaato: you can get financial information for foreign companies by using their OTC market ticker. Look it up here for example: http://finance.yahoo.com/lookup;_ylc=X3oDMTIzNnFubjZjBGtleXcDRlJBTktMSU5HT0xEBG1pZANtZWRpYXF1b3Rlc3NlYXJjaARzZWMDZ2V0cXVvdGVzYnRuBHNsawNsb29rdXA-?s=FRANKLINGOLD
this won't help for getting the stock price from a certain stock market though

jvdheyden commented May 25, 2016

@ppyaato: you can get financial information for foreign companies by using their OTC market ticker. Look it up here for example: http://finance.yahoo.com/lookup;_ylc=X3oDMTIzNnFubjZjBGtleXcDRlJBTktMSU5HT0xEBG1pZANtZWRpYXF1b3Rlc3NlYXJjaARzZWMDZ2V0cXVvdGVzYnRuBHNsawNsb29rdXA-?s=FRANKLINGOLD
this won't help for getting the stock price from a certain stock market though

@dodgycode

This comment has been minimized.

Show comment
Hide comment
@dodgycode

dodgycode Nov 17, 2016

Good spot hahnicity.

Looks like they turned off the fund API. I tried this:
http://globalquote.morningstar.com/globalcomponent/FundQuote.aspx?ticker=fmagx&ver=h
(found at: http://globalquote.morningstar.com/globalcomponent/)

Does anyone know where of another URL for funds?

dodgycode commented Nov 17, 2016

Good spot hahnicity.

Looks like they turned off the fund API. I tried this:
http://globalquote.morningstar.com/globalcomponent/FundQuote.aspx?ticker=fmagx&ver=h
(found at: http://globalquote.morningstar.com/globalcomponent/)

Does anyone know where of another URL for funds?

@bottleling

This comment has been minimized.

Show comment
Hide comment
@bottleling

bottleling Dec 5, 2016

Thanks for the urls :) Wrote some R code to read the data.
https://gist.github.com/anonymous/c7d9c19cc67e03641966064d1518ed41

bottleling commented Dec 5, 2016

Thanks for the urls :) Wrote some R code to read the data.
https://gist.github.com/anonymous/c7d9c19cc67e03641966064d1518ed41

@greedo18

This comment has been minimized.

Show comment
Hide comment
@greedo18

greedo18 Dec 31, 2016

This is a great post! I'm having issues with foreign markets though. ie: Yahoo Finance finds information for Aphria Inc, ticker APH.V, but when I feed it into bottleling's R code it comes back NULL. Is there a different way to tell Morningstar that it's from the TSX venture exchange? I can find Aphria if I just search the ticker symbol in morningstar's website so they must have data....

greedo18 commented Dec 31, 2016

This is a great post! I'm having issues with foreign markets though. ie: Yahoo Finance finds information for Aphria Inc, ticker APH.V, but when I feed it into bottleling's R code it comes back NULL. Is there a different way to tell Morningstar that it's from the TSX venture exchange? I can find Aphria if I just search the ticker symbol in morningstar's website so they must have data....

@noobling

This comment has been minimized.

Show comment
Hide comment
@noobling

noobling Feb 4, 2017

Does anyone know if anyone has written about the parameters for the Real Time Quote API?

noobling commented Feb 4, 2017

Does anyone know if anyone has written about the parameters for the Real Time Quote API?

@robomotic

This comment has been minimized.

Show comment
Hide comment
@robomotic

robomotic Feb 16, 2017

What about the recommendation output, I found it to be like so (yes including the typo!)

http://quotes.morningstar.com/stockq/c-recommencation?&t=XNAS:MSFT&region=usa&culture=en-US&version=RET&cur=

however I am wondering if there is a hidden export feature like with the financials.

robomotic commented Feb 16, 2017

What about the recommendation output, I found it to be like so (yes including the typo!)

http://quotes.morningstar.com/stockq/c-recommencation?&t=XNAS:MSFT&region=usa&culture=en-US&version=RET&cur=

however I am wondering if there is a hidden export feature like with the financials.

@shaon-chowdhury

This comment has been minimized.

Show comment
Hide comment
@shaon-chowdhury

shaon-chowdhury Feb 23, 2017

Does anyone know how to get adjusted close price and market cap using any API?

shaon-chowdhury commented Feb 23, 2017

Does anyone know how to get adjusted close price and market cap using any API?

@mrhijodesupinshi

This comment has been minimized.

Show comment
Hide comment
@mrhijodesupinshi

mrhijodesupinshi Mar 14, 2017

hey guys. thanks @hahnicity. you are the man. I am only missing information from morningstar quote's page. seems like the provided link is no longer working. Anyone found a way around it?
im looking for: current price, market cap, sector and industry...

mrhijodesupinshi commented Mar 14, 2017

hey guys. thanks @hahnicity. you are the man. I am only missing information from morningstar quote's page. seems like the provided link is no longer working. Anyone found a way around it?
im looking for: current price, market cap, sector and industry...

@cabezabolo

This comment has been minimized.

Show comment
Hide comment
@cabezabolo

cabezabolo commented Mar 28, 2017

Thanks for the info!, would be possible to make another JSON query to obtain the data from this page? http://financials.morningstar.com/valuation/price-ratio.html?t=KO (Historical P/E ratio would be very useful

Edit: after some debugging in "Network" tab in the Chrome Dev Tools I've got 4 new URLS:

Current Valuation: http://financials.morningstar.com/valuate/current-valuation-list.action?&t=FB&region=usa&culture=en-US&cur=&adsFlag=true&_=1490717022553

Forward Valuation: http://financials.morningstar.com/valuate/forward-valuation-list.action?&t=FB&region=usa&culture=en-US&cur=&adsFlag=true&_=1490717022554

Valuation History: http://financials.morningstar.com/valuate/valuation-history.action?&t=FB&region=usa&culture=en-US&cur=&type=price-earnings&_=1490717022555 --> That's what I needed!! Cheeeeeeers!

Dividend Yield (returns a Javascript, values are into "barValues"): http://financials.morningstar.com/valuate/valuation-yield.action?&t=FB&region=usa&culture=en-US&cur=&_=1490717022555

@agentmorris

This comment has been minimized.

Show comment
Hide comment
@agentmorris

agentmorris Apr 29, 2017

I'm interested in using this approach to retrieve expense ratios for mutual funds... does anyone know the right URL and parameters to retrieve the equivalent of:

http://financials.morningstar.com/fund/expense.html?t=FINPX

...without HTML-scraping?

Thanks!

agentmorris commented Apr 29, 2017

I'm interested in using this approach to retrieve expense ratios for mutual funds... does anyone know the right URL and parameters to retrieve the equivalent of:

http://financials.morningstar.com/fund/expense.html?t=FINPX

...without HTML-scraping?

Thanks!

@ucb

This comment has been minimized.

Show comment
Hide comment
@ucb

ucb May 3, 2017

I am struggling with the Historical Price API.

In particular, changing currency has no effect on the output. Everything comes out the same, whatever currency code is specified. I have played around with some other currency options from different other forms, but that had no effect either. Has anyone been able to decipher all fields of the url? Any pointers would be greatly appreciated!

@cabezabolo: Chrome Dev Tools: how do you use it for this purpose? Do you think it could be useful for what I am trying to figure out?

NB: If you will be using the code by anonymous, you will need to change "sub" to "gsub", set 1900, jan-1, as the origin, and if your data does not contain all fields, you will need to fix column name assignment.

ucb commented May 3, 2017

I am struggling with the Historical Price API.

In particular, changing currency has no effect on the output. Everything comes out the same, whatever currency code is specified. I have played around with some other currency options from different other forms, but that had no effect either. Has anyone been able to decipher all fields of the url? Any pointers would be greatly appreciated!

@cabezabolo: Chrome Dev Tools: how do you use it for this purpose? Do you think it could be useful for what I am trying to figure out?

NB: If you will be using the code by anonymous, you will need to change "sub" to "gsub", set 1900, jan-1, as the origin, and if your data does not contain all fields, you will need to fix column name assignment.

@cabezabolo

This comment has been minimized.

Show comment
Hide comment
@cabezabolo

cabezabolo May 5, 2017

@ucb I think that morningstar has only data for the tickers's official currency (if the company has shares in different markets, also will have different tickers for each one, example: FB (NYSE / USD) / FB2A (Xetra / EUR), but you can convert it easily to another currency with =GOOGLEFINANCE("CURRENCY:GBPUSD") in Google Docs, for example.

By using Chrome Dev tools, after reloading the webpage, you'll can see all the HTTP requests in the "Headers" tab, clicking on the items in the left list. You can filter in the upper bar, clicking on JS to get only JSON requests, for example, and I try to look any request to the morningstar subdomains (i.e. financials.morningstar.com, quotes.morningstar.com, investors.morningstar.com and I guess that will be more, but I haven't found them yet). Here we have a request example on the "Quote" tab in morningstar.com

morningstar_quote

http://mschart.morningstar.com/chartweb/defaultChart?type=getcc&secids=0P000001BW;ST&dataid=8226&startdate=1900-01-01&enddate=2017-05-05&currency=&format=1&callback=jQuery164015960861115569203_1494006365716&_=1494006367815

In this case, it returns price data from 06/01/1972 !!! (Coca-Cola), but I would prefer to use GOOGLEFINANCE formulas for the price, you can query the data for years...

But the requests will not always be JSON queries, sometimes we'll need to navigate through the "All" tab between a lot of garbage, some patience required.

I'm trying to load Financials / Balance Sheet / Cash Flow for any ticker in a Google Docs spreadsheet file, but this will require some hours to make it work, for sure :)

@agentmorris I've tried but I didn't found the correct request for that information.

cabezabolo commented May 5, 2017

@ucb I think that morningstar has only data for the tickers's official currency (if the company has shares in different markets, also will have different tickers for each one, example: FB (NYSE / USD) / FB2A (Xetra / EUR), but you can convert it easily to another currency with =GOOGLEFINANCE("CURRENCY:GBPUSD") in Google Docs, for example.

By using Chrome Dev tools, after reloading the webpage, you'll can see all the HTTP requests in the "Headers" tab, clicking on the items in the left list. You can filter in the upper bar, clicking on JS to get only JSON requests, for example, and I try to look any request to the morningstar subdomains (i.e. financials.morningstar.com, quotes.morningstar.com, investors.morningstar.com and I guess that will be more, but I haven't found them yet). Here we have a request example on the "Quote" tab in morningstar.com

morningstar_quote

http://mschart.morningstar.com/chartweb/defaultChart?type=getcc&secids=0P000001BW;ST&dataid=8226&startdate=1900-01-01&enddate=2017-05-05&currency=&format=1&callback=jQuery164015960861115569203_1494006365716&_=1494006367815

In this case, it returns price data from 06/01/1972 !!! (Coca-Cola), but I would prefer to use GOOGLEFINANCE formulas for the price, you can query the data for years...

But the requests will not always be JSON queries, sometimes we'll need to navigate through the "All" tab between a lot of garbage, some patience required.

I'm trying to load Financials / Balance Sheet / Cash Flow for any ticker in a Google Docs spreadsheet file, but this will require some hours to make it work, for sure :)

@agentmorris I've tried but I didn't found the correct request for that information.

@ar-anvd

This comment has been minimized.

Show comment
Hide comment
@ar-anvd

ar-anvd Jun 29, 2017

A question, there is any way of getting a fund name for the id ? For example get the name Invesco Global Smaller Coms Eq E EUR Acc for this F00000NGSG

ar-anvd commented Jun 29, 2017

A question, there is any way of getting a fund name for the id ? For example get the name Invesco Global Smaller Coms Eq E EUR Acc for this F00000NGSG

@gottlieben

This comment has been minimized.

Show comment
Hide comment
@gottlieben

gottlieben Aug 1, 2017

&dataType=A means as reported, &dataType=R as restated (relevant for financial statements)

gottlieben commented Aug 1, 2017

&dataType=A means as reported, &dataType=R as restated (relevant for financial statements)

@raydizzle29

This comment has been minimized.

Show comment
Hide comment
@raydizzle29

raydizzle29 Aug 25, 2017

Very small update to bottleling's awesome R script to pull in all prices through today, rather than a fixed date in the past:

today <- as.character(Sys.Date())

myticker<-"FB"
url.histprice<-function(x){ return(paste0("http://globalquote.morningstar.com/globalcomponent/RealtimeHistoricalStockData.ashx?ticker=",x,"&showVol=true&dtype=his&f=d&curry=USD&range=1900-1-1|",today,"&isD=true&isS=true&hasF=true&ProdCode=DIRECT"))}

raydizzle29 commented Aug 25, 2017

Very small update to bottleling's awesome R script to pull in all prices through today, rather than a fixed date in the past:

today <- as.character(Sys.Date())

myticker<-"FB"
url.histprice<-function(x){ return(paste0("http://globalquote.morningstar.com/globalcomponent/RealtimeHistoricalStockData.ashx?ticker=",x,"&showVol=true&dtype=his&f=d&curry=USD&range=1900-1-1|",today,"&isD=true&isS=true&hasF=true&ProdCode=DIRECT"))}

@DeepthiKR444

This comment has been minimized.

Show comment
Hide comment
@DeepthiKR444

DeepthiKR444 Oct 9, 2017

Hi,
Is there is any web services call or API to retrieve mutual fund list available?

DeepthiKR444 commented Oct 9, 2017

Hi,
Is there is any web services call or API to retrieve mutual fund list available?

@puppy79

This comment has been minimized.

Show comment
Hide comment
@puppy79

puppy79 Oct 13, 2017

Great post here. I am trying to get the key ratio. kind of new to Python. how can i use the following and use python to automatically pull the key ratio of a list of tickers and save to csv file? Thanks for any help.

http://financials.morningstar.com/ajax/exportKR2CSV.html?t=x

puppy79 commented Oct 13, 2017

Great post here. I am trying to get the key ratio. kind of new to Python. how can i use the following and use python to automatically pull the key ratio of a list of tickers and save to csv file? Thanks for any help.

http://financials.morningstar.com/ajax/exportKR2CSV.html?t=x

@rsvp

This comment has been minimized.

Show comment
Hide comment
@rsvp

rsvp Oct 16, 2017

So how does Morningstar API compare to other data vendors?

Please respond at rsvp/fecon235#7
since gists do not have decent notifications.
We are looking for integration with Python pandas DataFrame.

rsvp commented Oct 16, 2017

So how does Morningstar API compare to other data vendors?

Please respond at rsvp/fecon235#7
since gists do not have decent notifications.
We are looking for integration with Python pandas DataFrame.

@fedsanchez

This comment has been minimized.

Show comment
Hide comment
@fedsanchez

fedsanchez Nov 9, 2017

Do you know if there is a way to get a list of current (not real time) stock prices for a series of canadian stocks?

fedsanchez commented Nov 9, 2017

Do you know if there is a way to get a list of current (not real time) stock prices for a series of canadian stocks?

@acemanhattan

This comment has been minimized.

Show comment
Hide comment
@acemanhattan

acemanhattan Nov 28, 2017

Is anyone else able to get 10 year history? I'm only able to get 5.

acemanhattan commented Nov 28, 2017

Is anyone else able to get 10 year history? I'm only able to get 5.

@jappeace

This comment has been minimized.

Show comment
Hide comment
@jappeace

jappeace Dec 24, 2017

To get foreign exchanges the yahoo thing didn't work for me, what did work was going to: http://financials.morningstar.com and then enter the name without searching so you get the pop up menu(eg BHP), and selecting the right one (I was interested in the australian one. The form then generates the url for you, In my case:
http://financials.morningstar.com/income-statement/is.html?t=XASX:BHP&region=AUS&ops=clear

jappeace commented Dec 24, 2017

To get foreign exchanges the yahoo thing didn't work for me, what did work was going to: http://financials.morningstar.com and then enter the name without searching so you get the pop up menu(eg BHP), and selecting the right one (I was interested in the australian one. The form then generates the url for you, In my case:
http://financials.morningstar.com/income-statement/is.html?t=XASX:BHP&region=AUS&ops=clear

@thekidcalvin

This comment has been minimized.

Show comment
Hide comment
@thekidcalvin

thekidcalvin Dec 29, 2017

I use this API to parse mutual fund price and dividend history into an Access database, but unfortunately it doesn't pull in capital gains distributions information; only distributions classified as "dividends". Does anyone know of another free API that might provide both cap gains and dividend history? Or in lieu of that, one that will provide adjusted price so that I can calculate total return directly?

Thanks for this post btw! This API has been a lifesaver.

thekidcalvin commented Dec 29, 2017

I use this API to parse mutual fund price and dividend history into an Access database, but unfortunately it doesn't pull in capital gains distributions information; only distributions classified as "dividends". Does anyone know of another free API that might provide both cap gains and dividend history? Or in lieu of that, one that will provide adjusted price so that I can calculate total return directly?

Thanks for this post btw! This API has been a lifesaver.

@mmontefl

This comment has been minimized.

Show comment
Hide comment
@mmontefl

mmontefl Feb 6, 2018

Found your code via a google search. Searched the https://developer.morningstar.com/# website and was wondering if any of this requires a paid subscription. I am trying to develop an app, and would like to keep costs to minimum. I see Quandl and alpha Vantage and IEX seem to offer free API data. I am still in discovery phase. Have suggestions?
My initial plan is to use Python and store some of the info in mongo.

mmontefl commented Feb 6, 2018

Found your code via a google search. Searched the https://developer.morningstar.com/# website and was wondering if any of this requires a paid subscription. I am trying to develop an app, and would like to keep costs to minimum. I see Quandl and alpha Vantage and IEX seem to offer free API data. I am still in discovery phase. Have suggestions?
My initial plan is to use Python and store some of the info in mongo.

@lawonga

This comment has been minimized.

Show comment
Hide comment
@lawonga

lawonga Feb 17, 2018

Any way for dividend data to be in json format?

lawonga commented Feb 17, 2018

Any way for dividend data to be in json format?

@nikhilnagpal123

This comment has been minimized.

Show comment
Hide comment
@nikhilnagpal123

nikhilnagpal123 Mar 26, 2018

hi, is it legal to use this API via PHP? in the robots.txt file they disallowed all the robots

nikhilnagpal123 commented Mar 26, 2018

hi, is it legal to use this API via PHP? in the robots.txt file they disallowed all the robots

@MichelangeloConserva

This comment has been minimized.

Show comment
Hide comment
@MichelangeloConserva

MichelangeloConserva Apr 15, 2018

For those who are interested in Python code which scrape all the data present on the main page of Morningstar (ex. 'http://www.morningstar.com/stocks/xnas/aapl/quote.html') I will release a package which will be able to do that and lot of more interesting stuff in a month or less.

MichelangeloConserva commented Apr 15, 2018

For those who are interested in Python code which scrape all the data present on the main page of Morningstar (ex. 'http://www.morningstar.com/stocks/xnas/aapl/quote.html') I will release a package which will be able to do that and lot of more interesting stuff in a month or less.

@yewmun2008

This comment has been minimized.

Show comment
Hide comment
@yewmun2008

yewmun2008 Apr 20, 2018

Anyone have documentation for Historical Price API?
http://globalquote.morningstar.com/globalcomponent/RealtimeHistoricalStockData.ashx?
ticker=F&showVol=true&dtype=his&f=d&curry=USD&range=1900-1-1|2014-10-10&isD=true&isS=true&hasF=true&ProdCode=DIRECT

I wonder what those parameters mean, and the return results for date became number instead of date format, anyone have a clue how to make it become date format?

yewmun2008 commented Apr 20, 2018

Anyone have documentation for Historical Price API?
http://globalquote.morningstar.com/globalcomponent/RealtimeHistoricalStockData.ashx?
ticker=F&showVol=true&dtype=his&f=d&curry=USD&range=1900-1-1|2014-10-10&isD=true&isS=true&hasF=true&ProdCode=DIRECT

I wonder what those parameters mean, and the return results for date became number instead of date format, anyone have a clue how to make it become date format?

@chmorik

This comment has been minimized.

Show comment
Hide comment
@chmorik

chmorik May 11, 2018

I found a way to get Fair Value Estimate and other goodies
https://api-global.morningstar.com/sal-service/v1/stock/morningstarTake/v3/0P000002DO/analysisData
For Example: GE
{
"ticker": "GE",
"isQuan": false,
"userType": "Premium",
"valuation": {
"fairValue": "19",
"fairValueDate": "2018-04-23T00:00:00.000",
"assessment": "Undervalued",
"assessmentDate": "2018-05-10T00:00:00.000",
"uncertainty": "High",
"moat": "Wide",
"moatDate": "2018-05-10T00:00:00.000",
"moatTrendEvaluate": "Stable",
"premiumDisc": "Discount",
"stewardship": "Poor",
"stewardshipDate": "2018-05-10T00:00:00.000",
"premDiscDelta": "-23",
"oneStar": "29.45",
"oneStarDate": "2018-05-10T00:00:00.000",
"fiveStar": "11.4",
"fiveStarDate": "2018-05-10T00:00:00.000",
"fairValCurrency": "USD",
"bf2": "29.45",
"bf3": "21.85000",
"bf4": "16.15000",
"bf5": "11.4",
"lastClose": "14.69",
"startRating": "4",
"lastCloseCurrency": "USD"
},
"companyProfile": "General Electric is a diversified manufacturer that operates seven separate businesses in its industrial segment: power, oil and gas, renewable energy, lighting, aviation, healthcare, and transportation. The company also provides specialty industrial financing through its GE Capital division."
}

You'll need 3 headers
Apikey
X-SAL-ContentType
X-API-REALTIME-E
That you can take from you're browser

I'm premium and I'm currently working on a api to query and get the premium data from morning star

chmorik commented May 11, 2018

I found a way to get Fair Value Estimate and other goodies
https://api-global.morningstar.com/sal-service/v1/stock/morningstarTake/v3/0P000002DO/analysisData
For Example: GE
{
"ticker": "GE",
"isQuan": false,
"userType": "Premium",
"valuation": {
"fairValue": "19",
"fairValueDate": "2018-04-23T00:00:00.000",
"assessment": "Undervalued",
"assessmentDate": "2018-05-10T00:00:00.000",
"uncertainty": "High",
"moat": "Wide",
"moatDate": "2018-05-10T00:00:00.000",
"moatTrendEvaluate": "Stable",
"premiumDisc": "Discount",
"stewardship": "Poor",
"stewardshipDate": "2018-05-10T00:00:00.000",
"premDiscDelta": "-23",
"oneStar": "29.45",
"oneStarDate": "2018-05-10T00:00:00.000",
"fiveStar": "11.4",
"fiveStarDate": "2018-05-10T00:00:00.000",
"fairValCurrency": "USD",
"bf2": "29.45",
"bf3": "21.85000",
"bf4": "16.15000",
"bf5": "11.4",
"lastClose": "14.69",
"startRating": "4",
"lastCloseCurrency": "USD"
},
"companyProfile": "General Electric is a diversified manufacturer that operates seven separate businesses in its industrial segment: power, oil and gas, renewable energy, lighting, aviation, healthcare, and transportation. The company also provides specialty industrial financing through its GE Capital division."
}

You'll need 3 headers
Apikey
X-SAL-ContentType
X-API-REALTIME-E
That you can take from you're browser

I'm premium and I'm currently working on a api to query and get the premium data from morning star

@chmorik

This comment has been minimized.

Show comment
Hide comment
@chmorik

chmorik May 12, 2018

Hi,

I've build an API that retrieve morning star perimum analysis data

You can query any ticker you wish

for example

https://morningstar-api.herokuapp.com/analysisData?ticker=GE

will respond with

{
"ticker": "GE",
"isQuan": false,
"userType": "Premium",
"valuation": {
"fairValue": "19",
"fairValueDate": "2018-04-23T00:00:00.000",
"assessment": "Undervalued",
"assessmentDate": "2018-05-10T00:00:00.000",
"uncertainty": "High",
"moat": "Wide",
"moatDate": "2018-05-10T00:00:00.000",
"moatTrendEvaluate": "Stable",
"premiumDisc": "Discount",
"stewardship": "Poor",
"stewardshipDate": "2018-05-10T00:00:00.000",
"premDiscDelta": "-23",
"oneStar": "29.45",
"oneStarDate": "2018-05-10T00:00:00.000",
"fiveStar": "11.4",
"fiveStarDate": "2018-05-10T00:00:00.000",
"fairValCurrency": "USD",
"bf2": "29.45",
"bf3": "21.85000",
"bf4": "16.15000",
"bf5": "11.4",
"lastClose": "14.69",
"startRating": "4",
"lastCloseCurrency": "USD"
},
"companyProfile": "General Electric is a diversified manufacturer that operates seven separate businesses in its industrial segment: power, oil and gas, renewable energy, lighting, aviation, healthcare, and transportation. The company also provides specialty industrial financing through its GE Capital division."
}

Enjoy :)

chmorik commented May 12, 2018

Hi,

I've build an API that retrieve morning star perimum analysis data

You can query any ticker you wish

for example

https://morningstar-api.herokuapp.com/analysisData?ticker=GE

will respond with

{
"ticker": "GE",
"isQuan": false,
"userType": "Premium",
"valuation": {
"fairValue": "19",
"fairValueDate": "2018-04-23T00:00:00.000",
"assessment": "Undervalued",
"assessmentDate": "2018-05-10T00:00:00.000",
"uncertainty": "High",
"moat": "Wide",
"moatDate": "2018-05-10T00:00:00.000",
"moatTrendEvaluate": "Stable",
"premiumDisc": "Discount",
"stewardship": "Poor",
"stewardshipDate": "2018-05-10T00:00:00.000",
"premDiscDelta": "-23",
"oneStar": "29.45",
"oneStarDate": "2018-05-10T00:00:00.000",
"fiveStar": "11.4",
"fiveStarDate": "2018-05-10T00:00:00.000",
"fairValCurrency": "USD",
"bf2": "29.45",
"bf3": "21.85000",
"bf4": "16.15000",
"bf5": "11.4",
"lastClose": "14.69",
"startRating": "4",
"lastCloseCurrency": "USD"
},
"companyProfile": "General Electric is a diversified manufacturer that operates seven separate businesses in its industrial segment: power, oil and gas, renewable energy, lighting, aviation, healthcare, and transportation. The company also provides specialty industrial financing through its GE Capital division."
}

Enjoy :)

@dmatranga

This comment has been minimized.

Show comment
Hide comment
@dmatranga

dmatranga Jun 3, 2018

@chmorik This is useful, thanks

dmatranga commented Jun 3, 2018

@chmorik This is useful, thanks

@dmatranga

This comment has been minimized.

Show comment
Hide comment
@dmatranga

dmatranga Jun 3, 2018

Thanks to @hahnicity for original post also, good stuff!

dmatranga commented Jun 3, 2018

Thanks to @hahnicity for original post also, good stuff!

@MiniXC

This comment has been minimized.

Show comment
Hide comment
@MiniXC

MiniXC Jul 29, 2018

Thank you for this write-up. About the key-ratios: can the dates, e.g. 2017-09 be taken at face value? Or are those the results of that company's quarter that get released later than the given date?

MiniXC commented Jul 29, 2018

Thank you for this write-up. About the key-ratios: can the dates, e.g. 2017-09 be taken at face value? Or are those the results of that company's quarter that get released later than the given date?

@chenp7

This comment has been minimized.

Show comment
Hide comment
@chenp7

chenp7 Jul 31, 2018

I was using the API for a couple of month and works absolutely fine. But since this morning, I am getting 404 error (e.g. http://globalquote.morningstar.com/globalcomponent/RealtimeHistoricalStockData.ashx?ticker=F&showVol=true&dtype=his&f=d&curry=USD&range=1900-1-1|2014-10-10&isD=true&isS=true&hasF=true&ProdCode=DIRECT
). Anyone having the same issue?

I also noticed there are some serious data data discrepancy (over 400 symbols has apparent issue, for example: low price > open price). I have reported this to Morningstar and they are investigating. Anyone noticed the same thing?

chenp7 commented Jul 31, 2018

I was using the API for a couple of month and works absolutely fine. But since this morning, I am getting 404 error (e.g. http://globalquote.morningstar.com/globalcomponent/RealtimeHistoricalStockData.ashx?ticker=F&showVol=true&dtype=his&f=d&curry=USD&range=1900-1-1|2014-10-10&isD=true&isS=true&hasF=true&ProdCode=DIRECT
). Anyone having the same issue?

I also noticed there are some serious data data discrepancy (over 400 symbols has apparent issue, for example: low price > open price). I have reported this to Morningstar and they are investigating. Anyone noticed the same thing?

@skilbjo

This comment has been minimized.

Show comment
Hide comment
@skilbjo

skilbjo Jul 31, 2018

@chenp7 thanks for your report, I am also experiencing that the api is down

skilbjo commented Jul 31, 2018

@chenp7 thanks for your report, I am also experiencing that the api is down

@aokellermann

This comment has been minimized.

Show comment
Hide comment
@aokellermann

aokellermann Jul 31, 2018

It also 404's for me. Does anyone know a good mutual fund api in the meantime before IEX releases v2.0?

aokellermann commented Jul 31, 2018

It also 404's for me. Does anyone know a good mutual fund api in the meantime before IEX releases v2.0?

@brianzzzasd

This comment has been minimized.

Show comment
Hide comment
@brianzzzasd

brianzzzasd Aug 29, 2018

Is there any update for real time stock quote?

brianzzzasd commented Aug 29, 2018

Is there any update for real time stock quote?

@abalter

This comment has been minimized.

Show comment
Hide comment
@abalter

abalter Sep 28, 2018

Same problem here. I'm searching around

abalter commented Sep 28, 2018

Same problem here. I'm searching around

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment