getCurve {RTL} | R 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". |
contract |
Morningstar contract root e.g. "CL" for CME WTI and "BG" for ICE Brent. |
numOfcontracts |
Number of listed contracts to retrieve. |
date |
Date yyyy-mm-dd. |
fields |
Defaults to c("open_price, high_price, low_price, settlement_price, volume, open_interest"). |
iuser |
Morningstar user name as character - sourced locally in examples. |
ipassword |
Morningstar user password as character - sourced locally in examples. |
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)
[Package RTL version 1.3.5 Index]