This function makes the information from the OCBC Accounts category APIs easily accessible in an R-readable format. There are 6 different types of accounts, each with their own unique API
1. Children's Accounts
2. Deposit Accounts
3. Foreign Accounts
4. Saving Accounts
5. Current Accounts
6. Trading Accounts

ocbc_accounts(
  account_type = c("Children", "Deposit", "Foreign", "Saving", "Current", "Trading"),
  acctoken,
  country = NULL,
  subCategory = NULL,
  productName = NULL,
  benefit = NULL
)

Arguments

account_type

The account type, hence the API that the function will call from. Required. Options are Children, Deposit, Foreign, Saving, Current, Trading. Note: it is recommended to only specify 1 account type at a time.

acctoken

Account token. Required. Users can sign up for their api key, api secret and account token at https://api.ocbc.com/store/home

country

Either "SG" for Singapore, or "MY" for Malaysia. Optional. Note: Deposit, Foreign and Trading Accounts do not have the country parameter. If specified, the country parameter is automatically ignored.

subCategory

Filter accounts by subcategories. Optional. (e.g Children's account, Foreign Currency) Note: subCategory should correspond to the account_type (e.g Children's account for account_type = 'Children')

productName

Filter accounts by keywords. Optional. Note: productName should correspond to the account_type (e.g Mighty Savers, Child Development for account_type = 'Children')

benefit

Filter accounts by benefit. Optional. (e.g Bonus Interest, Interest)

Value

A detailed dataframe of OCBC accounts with variables such as eligibility, minimumBalance, feesAndcharges, benefits, providing the user with the full information about the accounts.

Examples

ocbc_accounts("Children", acctoken = Sys.getenv("ACC_TOKEN_OCBC"), country = "SG", productName = "Mighty Savers")
#> API call for Children, successful!
#> # A tibble: 1 x 11 #> productName remarks benefits websiteLink apply eligibility initialDeposit #> <chr> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 Mighty Sav… "" " S$25… https://ww… " … For childr… No initial de… #> # … with 4 more variables: minimumBalance <chr>, feesAndCharges <chr>, #> # monthlyStatements <chr>, productDescription <chr>