Closed nba2020 closed 4 years ago
A couple of questions come to mind:
Sys.getenv('R_USER')
navigating to that folder, and provided that "View Hidden Files" is enabled in your File Options for the OS there should be a file called .Renviron. You can edit this with a text editor and add your ID and key(s) as follows such that these keys persist across sessions. You'll need to restart Rstudio for the changes to take effect. :
APCA-PAPER-API-KEY-ID = "..."
APCA-PAPER-API-SECRET-KEY = "..."
APCA-LIVE-API-KEY-ID = "..."
APCA-LIVE-API-SECRET-KEY = "..."
It also appears that the documentation needs updating to reflect these changes.
Thank you @yogat3ch. I eventually managed to connect for paper trading with the below:
Sys.setenv('APCA-PAPER-API-KEY-ID' = 'PKOxxxxxxxxxxxxxxxx2CG')
Sys.setenv('APCA-PAPER-API-SECRET-KEY' = 'pumxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxdY')
get_account()
hey @nba2020,
@yogat3ch hit it on the head with everything he said! Thanks to you both for pointing this out and to yoga for the pull request :)
Hello, I've just opened an Alpaca account and trying to setup a paper trading connection in R with the below code:
However, I'm getting the following error in R console