Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcusschiesser/intraday
Download and cache intraday finance market data using yfinance
https://github.com/marcusschiesser/intraday
api cache data finance market yfinance
Last synced: 16 days ago
JSON representation
Download and cache intraday finance market data using yfinance
- Host: GitHub
- URL: https://github.com/marcusschiesser/intraday
- Owner: marcusschiesser
- License: mit
- Created: 2020-01-12T03:22:23.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-19T09:51:58.000Z (almost 5 years ago)
- Last Synced: 2024-12-03T13:38:37.892Z (19 days ago)
- Topics: api, cache, data, finance, market, yfinance
- Language: Python
- Size: 23.9 MB
- Stars: 24
- Watchers: 7
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# intraday
Download and caches intraday finance market data and makes it available as [pandas DataFrame](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html).
Data is retrieved by using [yfinance](https://pypi.org/project/yfinance/), a library
to download historical market data from Yahoo! finance.
Due to the limitations of yfinance, intraday data can only by downloaded for the last 30 days and only for 7 days per request.Therefore this module is caching all retrieved data using CSV files. The goal of this project is to store as much
intraday data as possible, so please send pull requests with data updates.## Usage
1. Save this module in the same directory as your Python file:
```
$ git clone https://github.com/marcusschiesser/intraday.git
```2. Then you can call `update_ticker` to update and retrieve a Dataframe for a ticker symbol, e.g.: for `SPY`:
```python
import intraday
df = intraday.update_ticker('SPY')
df.head()
```
This method gets the data from the cache (if it exists), appends 7 days of data from `yfinance` and updates the cache.3. To retrieve the Dataframe currently stored in the cache for a ticker symbol use `get_ticker`:
```python
df = intraday.get_ticker('SPY')
```
This method converts the Datetime index to UTC.