yahoo finance stock price NSE,BSE rest-api - yahoo-finance

Am trying to create a program that fetches data from yahoo finance all stock data.
I found one rest API that gives me a stock price but I have to pass two parameters ex. if I have to get Apple stock price I have to pass Apple and stock name but I want all stock data so how do I get ??
can anyone help me thanks in advance

Unfortunately there isn't any official source of tickers or method of getting them.
You can use this script link to download tickers but as creator mentioned:
it is not possible to get all the symbols due to limitations set by
Yahoo. About 75%-90% of all symbols are gathered using this script
depending on type.
And it also downloads some no longer existing or inaccessible tickers.
From this site link you can download list of almost all tickers but about 30% of tickers are either in wrong category or aren't working. Checking whether ticker exists is easy because when API returns no data then we can deduce that ticker is incorrect. But checking if category is appropriate is a bit more complicated.
I've filtered tickers from the second site but only ETFs and Mutual Funds, you can find them on my GitHub. Those files contain about 99% of ETFs and Mututal Funds avaiable on Yahoo. I might consider filtering stocks later and then I'll upload them with script too. Be aware that filtering tickers is impossible on one run without for example VPN because Yahoo limits request to about 10k-20k per day and there are about 20k tickers per category and checking each ticker requires 2 requests.

Try with IEX api, it's free, and it provides very complete data, a very simple implementation and a very neat documentation
if yu want AAPL real-time price you just have to request
https://api.iextrading.com/1.0/stock/aapl/price
Here's complete documentation
https://iextrading.com/developer/docs

I was searching for a solution to a similar question for a long time. and at last, I got a solution to my problem.
there's a library in python that does this for you!
All you have to is pass the right symbol for the stock (for ex: the symbol of Infosys is INFY)
Here's the link to the documentation of the library
Dynamic Stock prices :
https://nsetools.readthedocs.io/en/latest/
Historical Stock Data :
https://nsepy.readthedocs.io/en/latest/
I hope this helps! All the best

Related

Alternative to yahoo finance api

I am new to yahoo finance api. I am also a beginner investor. I always use yahoo finance api to keep track of my investment portfolio. But it does not work recently due to yahoo stopping this service. Will you kindly share any alternatives for me? Thank you.
There are several alternatives, but I suppose you are looking for free services? One alternative is Quandl. There is a Database called "Wiki" that is free.
When I re-looked at this question now, I realised I have a solution for it.
I picked up python and found out about this yahoo finance library.
https://pypi.org/project/yahoofinancials/
You could use:
https://www.alphavantage.co/ which is free and offers plenty of possibilities
https://iexcloud.io/ which is also free
https://www.quandl.com/tools/api which is also free but offers more options (for some of them you need a subscription)
https://rapidapi.com/marketplace which offers free APIs (to get financial news, trading data, financial data,...)
Some webscraping tools and get data directly from yahoo finance
AssetMacro.com API provides free access to historical data for 120,000+ Financial Securities (Stocks, Bonds, Commodities, Currencies, Credit Default Swaps, Indices) and Macroeconomic Variables for 120 countries.

Yahoo Finance APIs - For Different Stock Exchange

I actually want to know that whether i can use the Yahoo Finance API to get the data from a specific Stock Exchange. I tried to find the answer and looked through the YQL guide but they didn't mention that how can I specify the stock exchange to get the current share price.
For example I want to know the share price of a company from Australian Stock Exchange and then I want to know another share price of a different company from NewYork Stock Exchange.
Any help is much appreciated.
Thanks
For LSE (London Stock Exchange), all the symbols are just appended with '.L'.
It seems the Australian Stock Exchange is '.AX' (I got the info from this page: https://help.yahoo.com/kb/SLN2310.html )

Interactive Brokers Symbol list

I want to use the IB Api, but cannot figure our how the request a complete symbol list and information.
In the Documentation i found: reqScannerParameters() - but it is not clear how to get a list for example of nasdaq stocks ?
Is there a better way ?
As far as I am aware IB does not offer a symbol list. But the good news is it is easy and free to get elsewhere. Eoddata.com is a good source of it and you can download them, or automate it rather easily.
Go here and just click the download link at the top right of the table: EodData Symbol List
Not sure what language your using for the IB API but I have simple tutorial in C# that covers reading the tickers for stocks and options on my website: Get Real-Time Stock Data from the Interactive Brokers API
It is fairly easy to implement a piece of code scraping all stocks symbol from IB's website.
NYSE stocks are available from IB website
Just replace 'nyse' with another exchange's name like nasdaq or amex.
If you go to their products listing you can drill down to find lists of the entire universe of products (in case the link expires, I just googled "IB Product Listings")
https://www.interactivebrokers.com/en/index.php?f=1563
For example, I went to their NYSE product and scrolled through a few pages to find everything I needed. Here's an example of what I found
https://www.interactivebrokers.com/en/index.php?f=2222&exch=amex&showcategories=STK&p=&cc=&limit=100&page=3

App Store price drops and updates info

I found a couple of websites which somehow collect App store price changes, updates, etc.
My question is - where does websites like:
148apps.com
appdropp.com
etc.
get their info? I signed up as Apple affiliate and found that I can request apps info using the search or lookup APIs. But I can't send thousands of requests to check all apps day by day, it seems to be a huge task.
Is there any other available option to get this info?
They may be using this, Enterprise Partner Feed
It looks like it would provide what you're looking.
They are using EPF feed, provided by Apple.
You can check their Python tool to import feed to database.
You can also take a look on websites like:
http://www.apptweak.com, or http://www.appsocean.com
If you know PHP (for example), you can write a simple spider to grab price drops and updates.
Just read more about PHP CURL library.

How to get a quote for a specific date using Yahoo Finance

Seems like it should be a simple problem. I'm using Matlab to build a stock database and analyses toolkit.
I'm using Matlab functions to get a table of data, using a URL like the following:
http://ichart.finance.yahoo.com/table.csv?s=aapl&a=00&b=01&c=2011&d=03&e=04&f=&ignore=.csv
That works just fine to get standard stats (open, close, volume, ect). I can't figure out how to add other yahoo finance stats though like moving averages. Can I modify the above URL to add other stats to the download? Or is there a way to modify a single quote query to include a date? I'm trying to modify the url below to no avail.
http://finance.yahoo.com/d/quotes.csv?s=aapl&f=m4m3
Thanks for the help!
The scripts at http://luminouslogic.com/matlab-stock-market-scripts are pretty helpful for working with Yahoo Finance in Matlab. Download the dates and prices you need and then use http://www.mathworks.com/help/toolbox/finance/tsmovavg.html to calculate a moving average.
UPDATE
It looks like you can use m4 to get the moving average. Check out the documentation at http://www.gummy-stuff.org/Yahoo-data.htm . Your url above is correct--you might need to comma separate the parameters.
UPDATE 2
Check out this question: source of historical stock data

Resources