ocbc_investments: Make requests to OCBC Investments category APIs

Description Usage Arguments Value Examples

View source: R/Investments.R

Description

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

Usage

1
2
3
4
5
6
7
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

1
ocbc_investments("Bonds", acctoken = Sys.getenv("ACC_TOKEN_OCBC"))

racheltlw/OCBCR documentation built on Dec. 16, 2019, 12:46 a.m.