jmfernandes / robin_stocks

This is a library to use with Robinhood Financial App. It currently supports trading crypto-currencies, options, and stocks. In addition, it can be used to get real time ticker information, assess the performance of your portfolio, and can also get tax documents, total dividends paid, and more. More info at
http://www.robin-stocks.com
MIT License
1.74k stars 468 forks source link

get_card_transactions empty array output & extended_hours_equity is NoneType. #188

Open bhbmaster opened 4 years ago

bhbmaster commented 4 years ago

The example showing accurate gains is wrong for me because its not taking into account all of cash_management (debit card) deposits & also I had to jerry rig to use "equity" instead of "extended_hours_equity", because for me extended one has none output.

It appears get_card_transactions() is outputting an empty array on error (see below)

Note, the other methods work properly - I logged in and everything correctly.

I am just showing you the problematic output.

In [5]: r.get_card_transactions()
Out[5]: []

In [5]: r.get_card_transactions(cardType="pending")
Out[5]: []

In [6]: r.get_card_transactions(cardType="settled")
Out[6]: []

In [7]: r.get_card_transactions(cardType="settled", info="direction")
Out[7]: []

Additionally, the accurate gains example uses extended_hours_equity key which for me shows None, which fails the math equation. I noticed that I could use equity key which for me has a value

In [8]: r.load_portfolio_profile()["extended_hours_equity"]

In [9]: type(r.load_portfolio_profile()["extended_hours_equity"])
Out[9]: NoneType

In [10]: type(r.load_portfolio_profile()["equity"])
Out[10]: str

In [11]: r.load_portfolio_profile()["equity"]
Out[11]: '<removed my number>'
jmfernandes commented 4 years ago

Interesting. This used to work so maybe robinhood changed something. Seems like a simple fix though.