-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Keep getting requests.exceptions.HTTPError: 400 Client Error: Bad Request for url when trying to place options order. #77
Comments
I tried to use account_id instead of accountIdKey, i also tried to add in resp_type = "xml" in the function call. every time so far got to the same error... |
Same issue here. edit I figured it out, the expiry date format needs to be month-day-year |
@xabaddonx1 I tried your suggestion, same error... |
You must have another issue. I think the client order id needs to be unique for each order, i generate it with |
Again, same error with this change... @xabaddonx1 |
Any update on this? Running into the identical issue and have taken identical steps with no luck. Is this a bug in PyEtrade or picky E*Trade request formatting? Odd that it works for some... @xabaddonx1 would you mind sharing your working request code and param formatting for option orders? Would be a large help. |
Here's mine, a couple things I thought of: It could be the clientOrderId needs to be an int.
i'm running the code below on strikePrice, I ran into an issue where sometimes it would say 12.0 and the api doesn't like that :
|
The This is what i have working in my code without issue: from random import randint
client_order_id = str(randint(1000000000, 9999999999)) |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
I am trying to send an options order using pyetrade and got bad url error. Other modules seem to work fine - e.g. market / accounts etc.
Can someone please help? I'm out of ideas now - thanks!
here is what I was trying to do:
-----------------code below----------------
------------end of code---------------
This gets the following error --
-----------start of error---------------
------------end of error------------
Thanks in advance...
-RQ
The text was updated successfully, but these errors were encountered: