This example shows how to connect to the Enterprise Platform from Refinitiv™ and retrieve current and historical market data. Before connecting to Refinitiv, configure the Enterprise Platform connections. For details, see Configuring Enterprise Platform from Refinitiv Connections.
Connect to Refinitiv using a delayed connection specified by 'dIDN_RDF'
.
This connection type lets you retrieve current data.
c = reuters('myNS::remoteSession','dIDN_RDF');
Retrieve current data for Google®.
sec = 'GOOG.O';
d = fetch(c,sec)
d = PROD_PERM: 74.00 RDNDISPLAY: 66.00 DSPLY_NAME: 'DELAYED-15GOOGLE' ...
d
contains a large number of Refinitiv market data fields. This output shows the product permissions information,
PROD_PERM
, the display information for the IDN terminal device,
RDNDISPLAY
, and the expanded name for the instrument,
DSPLY_NAME
. sec
contains the Refinitiv security name for Google.
Close the Refinitiv connection.
close(c)
Connect to Refinitiv using a connection that is not delayed as specified by
'IDN_RDF'
. This connection type lets you retrieve historical
data.
c = reuters('myNS::remoteSession','IDN_RDF');
Retrieve monthly market data from June 1, 2012 through December 31, 2012 for Google.
fromdate = '06/01/2012'; % beginning of date range for historical data todate = '12/31/2012'; % ending of date range for historical data period = 'm'; % monthly period for data d = history(c,sec,fromdate,todate,period)
d = DATE: [7x1 double] CLOSE: [7x1 double] OPEN: [7x1 double] HIGH: [7x1 double] LOW: [7x1 double] VOLUME: [7x1 double] VWAP: [7x1 double] BLOCK_VOL: [7x1 double] ASK: [7x1 double] BID: [7x1 double]
d
is a structure with the following fields:
Date
Closing price
Open price
High price
Low price
Volume
Volume weighted average price (VWAP)
Block volume
Ask price
Bid price
For this example, the structure fields contain market data from June through December.
Display the open price.
d.OPEN
ans = 702.24 679.50 759.05 ...
close(c)