-
Notifications
You must be signed in to change notification settings - Fork 462
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
[Bug] Dollar-Based Buy Orders Incorrectly Set to Limit Order During Regular Market Hours #485
Comments
Have you tried removing that code locally in your package manager? The Robinhood API just broke when I tried, so I ended up adding it back. |
Yes, I tried modifying or even removing that code, but similar to your experience, I encountered an error, and the API broke for me as well. |
I thought I was doing something wrong but turns out that this is a bug. It seems an important matter that requires quick fixing. |
Yeah, then your suggested fix seems to not work. There might be something going on with Robinhood here. |
I totally agree, and apologies that I didn't mention that the proposed solution was giving errors. I just thought this might be a potential fix along with some other adjustments to address the error response from Robinhood. |
UPDATE (FIX):I made the following changes to ensure that dollar-based buy orders are correctly processed as market orders during regular market hours: 1. New Parameters:
2. Modified Payload for Buy Orders:
3. Cleanup for Market Orders:
4. Set json=True in POST call:
- Completed Order Function:
- Order Buy Fractional By Price Function:
Please note, these changes were a quick fix given my scenario; the code might be optimized further. |
When attempting to place a dollar-based buy order during regular market hours using the order_buy_fractional_by_price function, the order is incorrectly set as a limit order due to the preset_percent_limit parameter being added along with the type being set as limit. This behavior contradicts the expected functionality where dollar-based buy orders should be executed as market orders.
Steps to Reproduce:
Use the order_buy_fractional_by_price function to place a dollar-based buy order during regular market hours.
Observe that the order is submitted as a limit order instead of a market order.
Expected Behavior:
Dollar-based buy orders should be executed as market orders when placed during regular market hours.
Actual Behavior:
Dollar-based buy orders are converted to limit orders during regular market hours due to the preset_percent_limit parameter and type being set as limit.
Relevant Code:
The issue lies in the order function:
Suggested Fix:
Remove or conditionally set the preset_percent_limit and type to ensure dollar-based buy orders are processed as market orders:
The text was updated successfully, but these errors were encountered: