ohlc | ||
test | ||
.gitignore | ||
README.md | ||
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.
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)