Comments (10)
@nlowell11 can you provide more information with how you're placing the order via your script? A code snippet and return response would be helpful.
from pyrh.
@nlowell11 If the order was visible in the app, perhaps this is simply a matter of the market moving away from your order price quickly? Did the stock gap? RH automatically wraps "market" orders in a limit order with a 5% buffer.
from pyrh.
Thank you for the help so far.
@sirusss I do not have my code in front of me right now, but it is basically a very simple modification of the example code, something like:
my_trader.place_buy_order(stock_instrument,1)
where stock_instrument is "AMD". I will post the exact code later today. I will also grab the response and post it as well.
@bdowling The price moved less than 5% at market open, so I do not think this was caused by a stock gap.
from pyrh.
Hi all, I noticed something similar to @nlowell11 where I execute the following code after hours and I see the orders in the app as 'queued'. The next day, I see the items in the app as 'placed' but they're not in my list of stocks I own. The price definitely did not fluctuate even close to 5%. If this is a market order, why isn't it placed right at market open?
from Robinhood import Robinhood
my_trader = Robinhood();
my_trader.login(username="YOUR_USERNAME", password="YOUR_PASSWORD")
stock_instrument = my_trader.instruments("ZNGA")[0]
buy_order = my_trader.place_buy_order(stock_instrument, 1)
from pyrh.
My code:
my_trader = Robinhood()
my_trader.login(username="XXXXXXXXX", password="XXXXXXXXX")
stock_instrument = my_trader.instruments("AMD")[0]
response = my_trader.place_buy_order(stock_instrument, 1)
I've tried to grab relevant parts of the response, but this is only from an after-hours test, so I'm not sure if market hours would be the same (will check tomorrow):
response.ok: True
response.status_code: 201
from pyrh.
@nlowell11 I'm sorry, I forgot about this issue, I've been working with my own branches for so long.
The current HEAD I believe is still placing market orders with a bid_price of 0. This obviously would not work.
When submitting an order to Robinhood, the client needs to still provide the current bid_price to the API. My branch in #62 and subsequent https://github.com/bdowling/Robinhood/tree/fix_place_order_and_waymore_module_rename includes the current bid_price in the order.
from pyrh.
Thanks @bdowling. To be honest, I am still a bit of a novice with git/github, I had also totally forgotten I was using an older version of this code. Do you think this is still a valid issue to leave open on this repo?
I will check out your branch.
As an aside, do you know of a way I could test this while the market is closed? I run the RH code from my home setup, and I am away from it during workdays. I imagine an example of a request you know to be successful would be very helpful to me.
from pyrh.
Is there an enhancement for this issue?
from pyrh.
Just had this happen to me -- order was placed (got response <Response [201]>
), but didn't get a fill. The stock I tried to buy was less than $1 so I thought that might be part of it, but doing the same thing through the app itself worked fine.
edit: happened again with a sell order. ended up getting canceled at day close
from pyrh.
Had the same for buy and sell market. All looks good - order is also in RH app - but not getting filled (status 'pending'). I switched to using limit orders and it works fine.
from pyrh.
Related Issues (20)
- Ability to place Cryptocurrency Orders & get Quotes HOT 2
- rh.get_historical_quotes(self, stock, interval, span, bounds=Bounds.REGULAR) usage documentation HOT 2
- docs is outdated HOT 2
- How do u pull just one record from Robinhood 0_0 ? HOT 2
- How to Surppress output from RobinHood API request: Found Additional pages. HOT 2
- get_popularity returns key exception 'num_open_positions' HOT 2
- Order Filled Price HOT 4
- Invalid Ticker symbol error on every single request HOT 2
- The Docs Build Is Failing HOT 1
- 0auth not refreshing HOT 2
- README Quick Start Example code doesn't work
- Retirement Support HOT 11
- marshmallow.exceptions.ValidationError: {'challenge': {'type': ['Must be one of: email, sms.']}} HOT 10
- Outdated dependencies (packages not following semantic versioning)
- Migrate project to ruff HOT 1
- Stock Screener functionality HOT 1
- pyrh.exceptions.AuthenticationError: Method "GET" not allowed. HOT 9
- ModuleNotFoundError: No module named 'tableauserverclient' HOT 1
- Does pyrh support multiple (IRA) accounts trading as robin_stocks doe? HOT 1
- Option Support, Function not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyrh.