Skip to content

Commit

Permalink
Update conn.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kastins committed Oct 23, 2022
1 parent d3839dc commit 98a6211
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions pyiqfeed/conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2966,15 +2966,8 @@ def request_futures_option_chain(self, symbol: str, opt_type: str = 'pc',
assert month_codes is not None or near_months is not None

if month_codes is not None:
valid_month_codes = ()
if opt_type == 'p':
valid_month_codes = LookupConn.put_month_letters
elif opt_type == 'c':
valid_month_codes = LookupConn.call_month_letters
elif opt_type == 'cp' or opt_type == 'pc':
valid_month_codes = (
LookupConn.call_month_letters +
LookupConn.put_month_letters)
valid_month_codes = LookupConn.futures_month_letters

# noinspection PyTypeChecker
for month_code in month_codes:
assert month_code in valid_month_codes
Expand Down

1 comment on commit 98a6211

@kastins
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amended the <request_futures_option_chain> function to reference the FUTURES monthly letter map instead of the equity map
raised issue " Futures Valid month code assert references equity letter map akapur#58 "

Please sign in to comment.