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 467 forks source link

Sparse stock splits #236

Open nima opened 3 years ago

nima commented 3 years ago

Of the 5 stock splits that AAPL realized:

  1. 2-for-1 on May 15, 1987
  2. 2-for-1 on June 21, 2000
  3. 2-for-1 on February 18, 2005
  4. 7-for-1 on June 6, 2014
  5. 4-for-1 on August 31, 2020

...only one (in bold from above) appears when hitting the API:

>>> rh.stocks.get_splits('AAPL')
[{'divisor': '1.00000000',
  'execution_date': '2014-06-09',
  'instrument': 'https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/',
  'multiplier': '7.00000000',
  'url': 'https://api.robinhood.com/instruments/450dfc6d-5510-4d40-abfb-f633b7d9be3e/splits/93657cb7-478b-42b0-a23c-9a64042cb694/'}]
>>> 

Any ideas?

nima commented 3 years ago

By the way, this isn't really a robin-stocks issue, the Robinhood API is the problem. Just looking for some guidance, or possibly a recommendation for an alternative API to use (like polygon), but that doesn't cost a fortune.

hsiaoma commented 3 years ago

Had the same issue. Wondering if Robinhood has migrated out of this endpoint or something but I couldn't find any doc/post related to this.