Fetching 1 minute bars from Yahoo Finance

前端 未结 2 847
孤街浪徒
孤街浪徒 2021-02-03 10:54

I\'m trying to download 1 minute historical stock prices from Yahoo Finance, both for the current day and the previous ones.

Yahoo (just like Google) supports up to 15 d

2条回答
  •  南旧
    南旧 (楼主)
    2021-02-03 11:43

    Historical minute data is not as easily accessible as we all would like. I have found that the most affordable way to gather Intraday Stock Price data is to develop automated scripts that log price information for whenever the markets are open.

    Similar to the Yahoo data URL that you shared, Bloomberg maintains 1-Day Intraday Price information in JSON format like this : https://www.bloomberg.com/markets/api/bulk-time-series/price/AAPL%3AUS?timeFrame=1_DAY

    The URL convention appears easy to input on your own once you have a list of Ticker Symbols and an understanding of the consistent syntax.

    To arrive at that URL initially though, without having any idea for guessing / reverse-engineering it, I simply went here https://www.bloomberg.com/quote/AAPL:US and used Developer Tools on my browser and tracked a background GET request which led me to that URL. I wouldn't be surprised if you could employ similar methods on other Price Data-related websites.

    You can also write scripts to track price data as fast as your internet goes. One python package that I find pretty handy and is ystockquote

    You can have it request price data every couple of seconds and log that into a daily time series database.

提交回复
热议问题