Learn R Programming

RTL (version 1.3.3)

getCurve: Morningstar Commodities API forward curves

Description

Returns forward curves from Morningstar API. See below for current feeds supported. You need your own credentials with Morningstar.

Usage

getCurve(
  feed = "Crb_Futures_Price_Volume_And_Open_Interest",
  contract = "CL",
  date = "2020-08-10",
  fields = c("Open, High, Low, Close"),
  iuser = "x@xyz.com",
  ipassword = "pass"
)

Value

wide data frame. tibble

Arguments

feed

Morningstar Feed Table e.g "Crb_Futures_Price_Volume_And_Open_Interest". character

contract

Morningstar contract root e.g. "CL" for CME WTI and "BG" for ICE Brent. character

date

From date yyyy-mm-dd. character

fields

Defaults to c("Open, High, Low, Close"). character

iuser

Morningstar user name as character - sourced locally in examples. character

ipassword

Morningstar user password as character - sourced locally in examples. character

Current Feeds Supported

  • Crb_Futures_Price_Volume_And_Open_Interest

  • CME_NymexFuturesIntraday_EOD

  • ICE_EuroFutures and ICE_EuroFutures_continuous

Author

Philippe Cote

Examples

Run this code
if (FALSE) {
# CME WTI Futures
getCurve(
  feed = "Crb_Futures_Price_Volume_And_Open_Interest", contract = "CL",
  date = "2020-07-13", fields = c("Open, High, Low, Close"),
  iuser = "x@xyz.com", ipassword = "pass"
)

getCurve(
  feed = "Crb_Futures_Price_Volume_And_Open_Interest", contract = "BG",
  date = "2020-07-13", fields = c("Open, High, Low, Close"),
  iuser = "x@xyz.com", ipassword = "pass"
)

getCurve(
  feed = "LME_ClosingPriceDelayed", contract = "AHD",
  date = "2021-06-25", fields = c("Last_Price"),
  iuser = "x@xyz.com", ipassword = "pass"
)
}

Run the code above in your browser using DataLab