robin_stocks
robin_stocks copied to clipboard
access to IRA account?
Hi, robinhood just launched IRA account and I have both brokerage and IRA accounts under the same email. How could I access the IRA account? Thanks
I'm having the same problem friend. I think we'd have to change some account function to query all accounts 🤷🏻♀️
same question. It is better to add account number into the position pulling or order placing function that we can switch to different accounts including IRA.
Any one know where to change/ debug / test IRA account trading?
Thanks.
Anyone know which function can return ira_account_number?
tried:
profile = rh.load_account_profile("account_number")
but it can only return my regular account number.
@jmfernandes this repo has no update for a year now, if you do not have time, maybe you can add another co-owner to this repo?
I spent some time tonight to look into the API . I think I developed one version to trade Robinhood IRA accout now ! :) I will do more testing tomorrow and release this new version.
@henryzhangpku that's great! looking forward to it!
It worked well this morning. I will be considering a PR to merge this new feature in.
@henryzhangpku,
Looking forward to your PR! Thanks.
@henryzhangpku,
Any word on your PR? It would be great to access the retirement account data! Thanks for your contribution to the community! Really looking forward to it. :)
Folks, here is the PR : https://github.com/jmfernandes/robin_stocks/pull/377/ It works for me to 1) monitor IRA account for stocks/options positions , and 2) place stocks/etf order by fractional quantity or price. TODOS:
- there are a lot of different order functions in order.py , so far I only use order_xxx_fractional_by_quantity, and order_xxx_fractional_by_price myself, so I did not touch/modify other ordering functions. Feel free to help yourself to update them if you need, it should be very familiar to the fractional quantity/price that I completed.
- placing option orders. I actually got this one working just today , but I have not checked into the PR yet , may take a few more days to test and add it to the PR. It is also working for me. Enjoy !
Henry
Just checked in the option ordering part, by using different RHS accounts.
@henryzhangpku, Fantastic! I see that you submitted a commit. Thanks! I'll try it out.
yeah with this PR you can definitely programmatically obtain the options positions in Roth and Traditional IRA accounts. Just passing different account_numbers to get_open_option_positions(), you can get them .
@henryzhangpku It only shows regular account for load_account_profile(account no). Are you able to see both retirement and regular accounts? Are you using a different endpoint?
@rahelannader you need to pass in your (IRA account number), then it will work.
exactly, the default account_number would be your regular RHS account . You can specify IRA or other account by passing the account_number.
Is there any update on this? Was anyone successful in pulling the IRA holdings?
Yes, all the time. What was your issue ?
H
On Thu, Apr 18, 2024 at 3:48 PM farbodbahari @.***> wrote:
Is there any update on this? Was anyone successful in pulling the IRA holdings?
— Reply to this email directly, view it on GitHub https://github.com/jmfernandes/robin_stocks/issues/366#issuecomment-2065448315, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVCW5XXC56PVXOMDDLBLN3Y6BEVXAVCNFSM6AAAAAAUOOMQK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRVGQ2DQMZRGU . You are receiving this because you were mentioned.Message ID: @.***>
Yes, all the time. What was your issue ? H … On Thu, Apr 18, 2024 at 3:48 PM farbodbahari @.> wrote: Is there any update on this? Was anyone successful in pulling the IRA holdings? — Reply to this email directly, view it on GitHub <#366 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVCW5XXC56PVXOMDDLBLN3Y6BEVXAVCNFSM6AAAAAAUOOMQK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRVGQ2DQMZRGU . You are receiving this because you were mentioned.Message ID: @.>
I need to execute the following functions / method to get my positions and historical portfolio value for Roth IRA and Traditional IRA, however, I can't find a way to specify the account number for them. It returns the data for my brokerage account only.
Thanks!
Can't specify account number
robin.build_user_profile() robin.get_historical_portfolio(interval='day',span='5year') robin.get_all_stock_orders() robin.login()
Can specify account number
pd.DataFrame(robin.get_all_open_stock_orders(account_number=''))
Yes, all the time. What was your issue ? H … On Thu, Apr 18, 2024 at 3:48 PM farbodbahari @.> wrote: Is there any update on this? Was anyone successful in pulling the IRA holdings? — Reply to this email directly, view it on GitHub <#366 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVCW5XXC56PVXOMDDLBLN3Y6BEVXAVCNFSM6AAAAAAUOOMQK2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRVGQ2DQMZRGU . You are receiving this because you were mentioned.Message ID: @.>
So I figured to use get_open_stock_positions() instead of build_holdings() to retrieve positions in individual or IRA accounts. What I could not figure out are
- Getting the traded history
- Daily portfolio value of an IRA account.
The 2 functions below for these 2 tasks only do it for the regular individual account by default and do not allow to specify account number. robin.get_all_stock_orders() robin.get_historical_portfolio()
can we try this PR ? https://github.com/jmfernandes/robin_stocks/pull/471 or alternatively my fork https://github.com/henryzhangpku/systematic_hood that is already working for multi-accounts.