getCurve: Morningstar Commodities API forward curves

View source: R/morningstar.R

getCurveR Documentation

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 = "CME_NymexFutures_EOD_continuous",
  contract = "CL",
  numOfcontracts = 12,
  date = "2023-08-24",
  fields =
    c("open_price, high_price, low_price, settlement_price, volume, open_interest"),
  iuser = "x@xyz.com",
  ipassword = "pass"
)

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

numOfcontracts

Number of listed contracts to retrieve. numeric

date

Date yyyy-mm-dd. character

fields

Defaults to c("open_price, high_price, low_price, settlement_price, volume, open_interest"). character

iuser

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

ipassword

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

Value

wide data frame. tibble

Current Feeds Supported

  • CME_NymexFutures_EOD_continuous

Author(s)

Philippe Cote

Examples

## Not run: 
# CME WTI Futures
getCurve(
  feed = "CME_NymexFutures_EOD_continuous", contract = "CL",
  date = "2023-08-24",
  fields = c("open_price, high_price, low_price, settlement_price, volume, open_interest"),
  iuser = "x@xyz.com", ipassword = "pass"
)

## End(Not run)


RTL documentation built on Oct. 21, 2023, 1:06 a.m.