Fetches sub-account-specific configuration parameters from environment variables. Expected variables are:
Usage
get_subaccount(
sub_account_name = Sys.getenv("KC-ACCOUNT-SUBACCOUNT-NAME"),
sub_account_password = Sys.getenv("KC-ACCOUNT-SUBACCOUNT-PASSWORD")
)
Arguments
- sub_account_name
Character string; the sub-account name. Defaults to Sys.getenv("KC-ACCOUNT-SUBACCOUNT-NAME")
.
- sub_account_password
Character string; the sub-account password. Defaults to Sys.getenv("KC-ACCOUNT-SUBACCOUNT-PASSWORD")
.
Value
List containing sub-account configuration: sub_account_name
and sub_account_password
.
Details
These parameters are used for sub-account-related operations in the KuCoin API.
Examples
if (FALSE) { # \dontrun{
# Retrieve sub-account config from environment variables
sub_cfg <- get_subaccount()
print(sub_cfg)
# Specify sub-account details manually
sub_cfg <- get_subaccount(
sub_account_name = "my_subaccount",
sub_account_password = "my_password"
)
print(sub_cfg)
} # }