R/authenticate.R
etrd_auth_credentials.Rd
Step 1 of ETRADE authentication. Create an oauth app using the key and secret that can be obtained after completing the agreements on ETRADE Developer.
etrd_auth_credentials(etrade_key, etrade_secret, sandbox = FALSE)
Either a sandbox or production key provided by ETRADE after completing the agreements on ETRADE Developer
Either a sandbox or production secret provided by ETRADE after completing the agreements on ETRADE Developer
ETRADE offers a sandbox environment for validating API calls and responses. If using the sandbox environment, this must be set to TRUE in each function called throughout etrader. ETRADE states "Sandbox responses use stored data that's intended to provide typical responses for basic use cases. So the responses you receive will not contain current data, and may not exactly match your requests in other ways." Essentially, the responses will not match the requests entered but successful pull will indicate whether the entry was valid or not.
an oauth app stored into options by default
Authentication into the ETRADE environment requires a three step process: set
ETRADE credentials, generate request tokens to create a login URL, and use
the verification code to create access tokens. The Key and Secret need to be
fed into this function to set the credentials into an oauth app that can be
fed into the next function: etrd_auth_login_url
.
etrd_auth_credentials
to set the key and secret into
an oauth app, etrd_auth_login_url
to generate request tokens
and create a login URL, etrd_auth_access_token
to use the
verification code to create access tokens,
etrd_auth_manage_token
to renew or revoke access tokens
if (FALSE) {
# Pass the key and secret from ETRADE
etrade_cred = etrd_auth_credentials(etrade_key = 'PRODUCTION_ALPHANUMERIC_OAUTH_KEY',
etrade_secret = 'PRODUCTION_ALPHANUMERIC_OAUTH_SECRET')
}