Go to file
2024-10-30 00:16:09 -07:00
ohlc
test Add test for retrieving minute data for the current day 2024-10-21 09:11:42 -07:00
.gitignore
README.md Add note regarding default start and end dates to OHLC documentation 2024-10-30 00:16:09 -07:00
setup.py

OHLC

This module provides Open, High, Low, Close (OHLC) data for trading applications.

The data currently comes from IQFeed, so you will need an account with API access from them.

Dependencies

Usage

All data is returned as a pandas DataFrame.

Both the start and end dates default to the current day.

Daily Data

from ohlc import ohlc

from datetime import datetime

daily_data = ohlc('SPY', start_date = datetime(2024, 1, 1))

Intraday / Minute Data

from ohlc import ohlc

from datetime import datetime

intraday_data = ohlc('SPY', minutes = 5, start_date = datetime(2024, 1, 1), end_date = datetime(2024, 1, 31))

If neither the start nor end date is provided, data for the current day is returned:

from ohlc import ohlc

todays_data = ohlc('SPY', minutes = 5)