Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. # set-up and login
  2.  
  3. library(RobinHood) # to access the API
  4. library(tidyverse) # to do things in a tidy manner
  5. library(lubridate) # date functions
  6. library(keyringr) # to hide your login
  7.  
  8. username <- keyringr::get_kc_account("robinHood") # make a login in Keychain Access on macOS titled robinHood. Lookup how to do this on Windows
  9. password <- keyringr::decrypt_kc_pw("robinHood")
  10.  
  11. RH <- RobinHood(username = username, password = password)
  12.  
  13. username <- NULL
  14. password <- NULL
  15.  
  16. orderHistory <- get_order_history(RH) # gets order history
  17. currentPositions <- get_positions(RH) # gets current positions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement