diff --git a/robin_stocks/options.py b/robin_stocks/options.py index a9ad9e0..1025f50 100644 --- a/robin_stocks/options.py +++ b/robin_stocks/options.py @@ -301,7 +301,7 @@ def find_options_by_specific_profitability(inputSymbols, expirationDate=None, st continue market_data = get_option_market_data_by_id(option['id']) - option.update(market_data) + option.update(market_data[0]) write_spinner() try: diff --git a/tests/test_github_actions.py b/tests/test_github_actions.py index 72ef283..248632e 100644 --- a/tests/test_github_actions.py +++ b/tests/test_github_actions.py @@ -4,6 +4,7 @@ import robin_stocks as r import pyotp import pytest +from dateutil.relativedelta import relativedelta def third_friday(year, month, day): """Return datetime.date for monthly option expiration given year and @@ -404,10 +405,10 @@ class TestOptions: totp = pyotp.TOTP(os.environ['robin_mfa']).now() login = r.login(os.environ['robin_username'], os.environ['robin_password'], mfa_code=totp) # - now = datetime.datetime.now() + now = datetime.datetime.now() + relativedelta(months=1) expiration_date = third_friday(now.year, now.month, now.day).strftime("%Y-%m-%d") symbol = 'AAPL' - strike = round_up_price(symbol, 100) + strike = round_up_price(symbol, 10) def test_find_tradable_options(self): info = r.find_options_by_expiration(self.symbol, self.expiration_date)