robin_stocks icon indicating copy to clipboard operation
robin_stocks copied to clipboard

access to IRA account?

Open MMM071 opened this issue 1 year ago • 21 comments

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

MMM071 avatar Feb 02 '23 02:02 MMM071

I'm having the same problem friend. I think we'd have to change some account function to query all accounts 🤷🏻‍♀️

rahelannader avatar Feb 21 '23 18:02 rahelannader

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.

henryzhangpku avatar Mar 18 '23 02:03 henryzhangpku

Any one know where to change/ debug / test IRA account trading?

Thanks.

mw66 avatar Apr 04 '23 23:04 mw66

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?

mw66 avatar Apr 25 '23 06:04 mw66

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 avatar May 08 '23 08:05 henryzhangpku

@henryzhangpku that's great! looking forward to it!

mw66 avatar May 08 '23 22:05 mw66

It worked well this morning. I will be considering a PR to merge this new feature in.

henryzhangpku avatar May 09 '23 21:05 henryzhangpku

@henryzhangpku,

Looking forward to your PR! Thanks.

mw66 avatar May 12 '23 17:05 mw66

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

COBOLAced avatar May 19 '23 07:05 COBOLAced

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:

  1. 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.
  2. 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

henryzhangpku avatar May 19 '23 09:05 henryzhangpku

Just checked in the option ordering part, by using different RHS accounts.

henryzhangpku avatar May 19 '23 09:05 henryzhangpku

@henryzhangpku, Fantastic! I see that you submitted a commit. Thanks! I'll try it out.

COBOLAced avatar May 19 '23 17:05 COBOLAced

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 avatar May 19 '23 18:05 henryzhangpku

@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 avatar May 30 '23 21:05 rahelannader

@rahelannader you need to pass in your (IRA account number), then it will work.

mw66 avatar May 31 '23 00:05 mw66

exactly, the default account_number would be your regular RHS account . You can specify IRA or other account by passing the account_number.

henryzhangpku avatar May 31 '23 00:05 henryzhangpku

Is there any update on this? Was anyone successful in pulling the IRA holdings?

farbodbahari avatar Apr 18 '24 22:04 farbodbahari

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

henryzhangpku avatar Apr 18 '24 23:04 henryzhangpku

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=''))

image

farbodbahari avatar Apr 19 '24 03:04 farbodbahari

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

  1. Getting the traded history
  2. 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()

farbodbahari avatar Apr 20 '24 18:04 farbodbahari

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.

henryzhangpku avatar May 05 '24 00:05 henryzhangpku