Code Monkey home page Code Monkey logo

Comments (10)

sirusss avatar sirusss commented on August 15, 2024

@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.

bdowling avatar bdowling commented on August 15, 2024

@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.

nlowell11 avatar nlowell11 commented on August 15, 2024

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.

awoodman avatar awoodman commented on August 15, 2024

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.

nlowell11 avatar nlowell11 commented on August 15, 2024

@sirusss

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.

bdowling avatar bdowling commented on August 15, 2024

@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.

nlowell11 avatar nlowell11 commented on August 15, 2024

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.

timetoadd avatar timetoadd commented on August 15, 2024

Is there an enhancement for this issue?

from pyrh.

justin-pierce avatar justin-pierce commented on August 15, 2024

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.

GregP83 avatar GregP83 commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.