Skip to content
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

KeyError: 'price-effect' from OrderPriceEffect(input_dict['price-effect']) when running example.py #60

Open
BrettBiba opened this issue Feb 15, 2021 · 0 comments

Comments

@BrettBiba
Copy link

BrettBiba commented Feb 15, 2021

Describe the bug
KeyError: 'price-effect' from OrderPriceEffect(input_dict['price-effect']) when running example.py unmodified, except for username and password.

To Reproduce
Steps to reproduce the behavior:

  1. Add username and password
  2. python example.py

Actual behavior
The account loads fine but then I received the following error:

Traceback (most recent call last): File "/opt/anaconda3/lib/python3.8/site-packages/tastyworks/example.py", line 95, in main loop.run_until_complete(main_loop(tasty_client, streamer)) File "/opt/anaconda3/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete return future.result() File "/opt/anaconda3/lib/python3.8/site-packages/tastyworks/example.py", line 38, in main_loop orders = await Order.get_remote_orders(session, acct) File "/opt/anaconda3/lib/python3.8/site-packages/tastyworks/models/order.py", line 141, in get_remote_orders order = cls.from_dict(order_data) File "/opt/anaconda3/lib/python3.8/site-packages/tastyworks/models/order.py", line 101, in from_dict details.price_effect = OrderPriceEffect(input_dict['price-effect']) KeyError: 'price-effect'

Expected behavior
example.py to run without issues. :-)

Enviroment
I am running from Terminal on macOS 11.2.1(M1) using Python 3.8 provided by Anaconda3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant