Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

Commit 4dbc64a

Browse files
committed
Added support for specifying intervals
1 parent 1a61dc7 commit 4dbc64a

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

dev/__init__.py renamed to dev/test.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ def end_of_day() -> pd.DataFrame:
2727

2828
if __name__ == "__main__":
2929
data = end_of_day()
30-
print(data)
31-
30+
print(data)

thetadata/client.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
"""Module that contains Theta Client class."""
2-
from typing import Optional, Callable
2+
from typing import Optional
33
from contextlib import contextmanager
4-
from functools import wraps
5-
from datetime import datetime, date
4+
65
import socket
76

87
from pandas import DataFrame
98
from tqdm import tqdm
109
import pandas as pd
1110

12-
from . import exceptions
1311
from .enums import *
1412
from .parsing import (
1513
Header,
@@ -103,7 +101,7 @@ def get_hist_option(
103101
strike: float,
104102
right: OptionRight,
105103
date_range: DateRange,
106-
interval_size: int = 60000,
104+
interval_size: int = 0,
107105
progress_bar: bool = False,
108106
) -> pd.DataFrame:
109107
"""
@@ -115,7 +113,7 @@ def get_hist_option(
115113
:param strike: The strike price in USD, rounded to 1/10th of a cent.
116114
:param right: The right of an option.
117115
:param date_range: The dates to fetch.
118-
:interval_size: The interval size in milliseconds. Applicable only to OHLC & QUOTE requests.
116+
:param interval_size: The interval size in milliseconds. Applicable only to OHLC & QUOTE requests.
119117
:param progress_bar: Print a progress bar displaying download progress.
120118
121119
:return: The requested data as a pandas DataFrame.

0 commit comments

Comments
 (0)