JestonBlu / RobinHood

An R interface for the RobinHood.com no commision investing site

Home Page:https://jestonblu.github.io/RobinHood/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fractional shares and "sell all"

ssobel opened this issue · comments

Hello, great R package! I use it daily. I am interested in code to buy fractional shares. I have been looking all around this repo and can see discussion that fractional shares has been added as a feature to place_order() but can't seem to find the exact code example how to do this.

Can someone provide example code how to buy fractional shares? (also code to "sell all"?)

Thank you.

@ssobel here is an example of placing an order for a fractional share. If i understand your sell all question correctly, inputting the full quantity of shares you own in the quantity field and switching side = "sell" should do it

place_order(RH,
            symbol = "F",
            type = "market",
            time_in_force = "gfd",
            trigger = "immediate",
            price = 20.50,
            quantity = .5,
            side = "buy")