-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Futures Valid month code assert references equity letter map #58
Comments
Great catch! A pull request would be great.
… On Oct 18, 2022, at 6:26 AM, kastins ***@***.***> wrote:
Hello,
in Conn.py >> function " def request_futures_option_chain" at line 2939
the assert below checks against valid equity month letters and NOT the futures_map,
i ran into this issue when requesting options for December "Z"
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)
# noinspection PyTypeChecker
for month_code in month_codes:
assert month_code in valid_month_codes
i rudimentary changed it to this,
if month_codes is not None:
valid_month_codes = LookupConn.futures_month_letters
# noinspection PyTypeChecker
for month_code in month_codes:
assert month_code in valid_month_codes
Thanks for this great wrapper BTW
—
Reply to this email directly, view it on GitHub <#58>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAGJAVBWPX6X7BJ6IDJR63LWDZ3N3ANCNFSM6AAAAAARH5WYYE>.
You are receiving this because you are subscribed to this thread.
|
OK, bare with me, i'm just trying to understand github and get my head around this forking thing, ill try sort it out within the week. |
Open
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
in Conn.py >> function " def request_futures_option_chain" at line 2939
the assert below checks against valid equity month letters and NOT the futures_map,
i ran into this issue when requesting options for December "Z"
i rudimentary changed it to this,
Thanks for this great wrapper BTW
The text was updated successfully, but these errors were encountered: