s0up / robinhood-electron

RHClient - A Cross Platform Robinhood Trading Client
ISC License
66 stars 16 forks source link

More Data #11

Open Shanlon opened 7 years ago

Shanlon commented 7 years ago

Do you have a JSON snippet for Individual Stocks so we can see whats returned from the API, I would love to see if we could add a advance tab to show all of the data.

What are some of the cool data points that come back from the server that they don't show in the app?

Any interest in adding in custom scripts? That would be a really cool feature.

s0up commented 7 years ago

I don't have any saved to my laptop or anything, but if you're curious, install the Vue developer tools chrome plugin, download the code, (make sure you have node 8.0+ and NPM).

npm install
npm run dev

Run Command +Shift + C to pop up the chrome developer tools and go to your new Vue tab, and you can track all of the data bound to each component you are viewing. You can see the components data and the Vuex store's data as well in there. The data you're looking for is most likely in "quotes" "instruments" or "fundamentals" .. those are the 3 main types of data returned from RH's API that contain useful information.

kevinrathgeber commented 7 years ago

Here you go Shanlon:

{ "previous": null, "results": [ { "min_tick_size": null, "type": "stock", "splits": "https:\/\/api.robinhood.com\/instruments\/50810c35-d215-4866-9758-0ada4ac79ffa\/splits\/", "margin_initial_ratio": "0.5000", "url": "https:\/\/api.robinhood.com\/instruments\/50810c35-d215-4866-9758-0ada4ac79ffa\/", "quote": "https:\/\/api.robinhood.com\/quotes\/MSFT\/", "tradability": "tradable", "bloomberg_unique": "EQ0010174300001000", "list_date": "1987-09-17", "name": "Microsoft Corporation - Common Stock", "symbol": "MSFT", "fundamentals": "https:\/\/api.robinhood.com\/fundamentals\/MSFT\/", "state": "active", "country": "US", "day_trade_ratio": "0.2500", "tradeable": true, "maintenance_ratio": "0.2500", "id": "50810c35-d215-4866-9758-0ada4ac79ffa", "market": "https:\/\/api.robinhood.com\/markets\/XNAS\/", "simple_name": "Microsoft" } ], "next": null }

Then sending a GET to the quote URL gets you this:

{ "ask_price": "73.3500", "ask_size": 1000, "bid_price": "73.2600", "bid_size": 100, "last_trade_price": "73.2600", "last_extended_hours_trade_price": "73.3200", "previous_close": "73.2600", "adjusted_previous_close": "73.2600", "previous_close_date": "2017-09-25", "symbol": "MSFT", "trading_halted": false, "has_traded": true, "last_trade_price_source": "consolidated", "updated_at": "2017-09-27T00:00:00Z", "instrument": "https:\/\/api.robinhood.com\/instruments\/50810c35-d215-4866-9758-0ada4ac79ffa\/" }

Hope that's what you were looking for!

Shanlon commented 7 years ago

Thanks for the response, I have some ideas I will mock up and post them here.

One feature I would like to add in is a trailing stop loss. Would be nice to see that functionality.

kevinrathgeber commented 7 years ago

Not sure how possible that is. That seems like something RobinHood itself would need to implement. i could be wrong though.