yogat3ch / AlpacaforR

Connecting to Alpaca API and using it with R
35 stars 20 forks source link

Error: access key verification failed : access key not found (Code = 40110000 #12

Closed nba2020 closed 4 years ago

nba2020 commented 4 years ago

Hello, I've just opened an Alpaca account and trying to setup a paper trading connection in R with the below code:

Sys.setenv('APCA-API-KEY-ID' = 'PKCW8xxxxxxxxxI4U2SQJ')
Sys.setenv('APCA-API-SECRET-KEY' = 'CW1ZxxxxxxxxxxxxxxxxxxxxxK1QucMKI')
get_account()

However, I'm getting the following error in R console

$code
[1] 40110000
$message
[1] "access key verification failed : access key not found (Code = 40110000)
yogat3ch commented 4 years ago

A couple of questions come to mind:

nba2020 commented 4 years ago

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()
jagg19 commented 4 years ago

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 :)