set_trading_env | R Documentation |
Save environment variables for the current session. To set it permanently,
please add the following line to your .Renvrion file:
set_trading_env(cano, acnt_prdt_cd, app_key, app_secret, is_paper = FALSE)
cano |
A string specifying KIS common account number |
acnt_prdt_cd |
A string specifying KIS account product code |
app_key |
A string specifying KIS app key |
app_secret |
A string specifying KIS app secret |
is_paper |
A string specifying paper trading or not, default |
No return value, called to set environment variables
KIS_CANO="YOUR ACCOUNT NUMBER" (first 8 digits of your account)
KIS_ACNT_PRDT_CD="01" (last 2 digits of your account)
KIS_APP_KEY="YOUR APP KEY"
KIS_APP_SECRET="YOUR APP SECRET"
KIS_PAPER_CANO="YOUR PAPER ACCOUNT NUMBER" (first 8 digits of your paper account)
KIS_PAPER_ACNT_PRDT_CD="01" (last 2 digits of your paper account)
KIS_PAPER_APP_KEY="YOUR PAPER APP KEY"
KIS_PAPER_APP_SECRET="YOUR PAPER APP SECRET"
## Set app key for the current session
## Not run:
## Set trading environment only for the current session
set_trading_env(
cano = "your account number",
acnt_prdt_no = "your account product code",
app_key = "your app key",
app_secret = "your app secret"
)
## Check environment variables
print_cano()
print_acnt_prdt_cd()
print_app_key()
print_app_secret()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.