reuters.fetch - Request data from Reuters® data servers

Syntax

d = fetch (r,s)
d = fetch (r,s, callback)

Arguments

r

Reuters session object created with the reuters function

s

Reuters security object

callback

MATLAB® function that runs for each data event that occurs

Description

d = fetch (r,s) returns the current data for the security s, given the Reuters session object r.

d = fetch (r,s, callback) uses the Reuters session object r to subscribe to the security s. MATLAB runs the callback function for each data event that occurs.

Examples

Retrieving Current Securities Data

Retrieve the current data for the security GOOG.O using the Reuters session object r:

d = fetch(r,'GOOG.O')

Following is a partial listing of the returned security data:

d = 
PROD_PERM: 74.00
RDNDISPLAY: 66.00
DSPLY_NAME: 'DELAYED-15GOOGLE'
RDN_EXCHID: '0'
TRDPRC_1: 474.28
TRDPRC_2: 474.26
TRDPRC_3: 474.25
TRDPRC_4: 474.25
TRDPRC_5: 474.25
NETCHNG_1: -4.73
HIGH_1: 481.35
LOW_1: 472.78
PRCTCK_1: '1'
CURRENCY: '840'
TRADE_DATE: '30 APR 2007

Subscribing to a Security

To subscribe to a security and process the data in real time, specify a callback function. MATLAB runs this function each time it receives a real-time data event from Reuters. In this example, the callback function, rtdemo, returns the subscription handle associated with this request to the base MATLAB workspace, A. The openvar function is then called to display A in the Variable Editor. A partial list of the data included in A appears in the following figure.

d = fetch(r,'GOOG.O','rtdemo')
d = com.reuters.rfa.internal.common.SubHandleImpl@75cea3
openvar(‘A')

See Also

reuters, reuters.close, reuters.stop

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS