This function makes the information from the OCBC Investments category APIs easily accessible in an R-readable format. There are 7 different types of investments, each with their own unique API
1. Bonds
2. Equity and Forex
3. Listed Securities
4. Leveraged Forex and Futures
5. Treasury
6. Unlisted Securities
7. Unit Trusts

ocbc_investments(
  investment_type = c("Bonds", "Equity and Forex", "Listed Securities ",
    "Leveraged Forex", "Treasury", "Unlisted Securities", "Unit Trusts"),
  acctoken,
  productName = NULL,
  benefit = NULL
)

Arguments

investment_type

The investment type, hence the API that the function will call from. Required. Options are Bonds, Equity and Forex, Listed Securities, Leveraged Forex, Treasury, Unlisted Securities and Unit Trusts. Note: it is recommended to only specify 1 investment 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

productName

Filter investment products by product name. Optional. E.g Bonds

benefit

Filter investment products by benefit. Optional. E.g interest

Value

A detailed dataframe of OCBC investment products with variables such as product name, benefits, risks etc.

Examples

ocbc_investments("Bonds", acctoken = Sys.getenv("ACC_TOKEN_OCBC"))
#> API call for Bonds successful!
#> # A tibble: 1 x 10 #> productName productDescript… benefits risks `Name of Eligib… `ETA descriptio… #> <chr> <chr> <chr> <chr> <chr> <chr> #> 1 Bonds " Generate a Pa… " Reg… " … Basic Trading (… Trade shares an… #> # … with 4 more variables: `ETA weblink` <chr>, contactNo <chr>, #> # webpageLink <chr>, remarks <chr>