This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


(To be removed) Request Thomson Reuters Tick History data

fetch will be removed in a future release.


x = fetch(r,sec)
x = fetch(r,sec,tradefields,daterange,reqtype,messtype,exchange,domain)
x = fetch(r,sec,tradefields,daterange,reqtype,messtype,exchange,domain,marketdepth)


x = fetch(r,sec) returns information about the security, sec, such as the code, currency, exchange, and name. r is the Thomson Reuters™ Tick History connection object.

x = fetch(r,sec,tradefields,daterange,reqtype,messtype,exchange,domain) returns data for the request security sec, based on the type request reqtype and message types messtype. The value of messtype is a cell array of character vectors or string array. Data for the fields specified by tradefields is returned for the data range bounded by daterange. The value of tradefields is a cell array of multiple cell arrays of character vectors, string scalars, or string arrays. Each item in the tradefields cell array denotes a unique field list for each message type. Specifying the exchange of the given security improves the speed of the data request. domain specifies the security type.

x = fetch(r,sec,tradefields,daterange,reqtype,messtype,exchange,domain,marketdepth) additionally specifies the depth of level 2 data, marketdepth, to return for a 'MarketDepth' request type. marketdepth must be a numeric value between 1 and 10, returning up to 10 bid/ask values for a given security.


Do not use date ranges for end of day requests. You can specify a range of hours on a single day, but not a multiple day range.


To create a Thomson Reuters Tick History connection, the command

 r = rdth('','mypassword')
r =
client: [1x1 com.thomsonreuters.tickhistory. ...
user: ''
password: '**********'

To get information pertaining to a particular security, the command

d = fetch(r,'GOOG.O',{'Volume','Price','Exchange ID'},...
{'09/05/2008 12:00:00','09/05/2008 12:01:00'},...
returns data starting with (not all data is shown):
d =
'#RIC'      'Date[L]'        'Time[L]'         'Type'...
     'Ex/Cntrb.ID'    'Price'
'GOOG.O'    '05-SEP-2008'    '12:00:01.178'    'Trade'...
    'NAS'            '443.86'
The command
d = fetch(r,'GOOG.O',{'Volume','Last'},{'09/05/2008'},...
'EndOfDay','End Of Day','NSQ','EQU')
d =
    '#RIC'      'Date[L]'        'Time[L]'       ...
  'Type'    'Last'     'Volume'
    'GOOG.O'    '05-SEP-2008'    '23:59:00.000'   ...
 'End Of Day'    '444.25'    '4538375' 
x = fetch(r,'GOOG.O')
for example, the exchange of the security is x.Exchange or NSQ. To determine the asset domain of the security, use the value of x.Type, in this case 113. Using the information from v = get(r),
j = find(v.InstrumentTypes.Value == 113)
j =46
The command
ans =
The command
ans = 
The command
ans = 
Knowing the security exchange and domain helps the interface to resolve the security symbol and return data more quickly.

To use a 'MarketDepth' level of 3, enter:

AaplTickData = fetch(R,'AAPL.O',{'Bid Price','Bid Size'},...
         {now-.05,now},'MarketDepth','Market Depth','NSQ','EQU',3);


  • To obtain more information request and message types and their associated field lists, use the command get(r).

See Also

| |

Introduced in R2009a

Was this topic helpful?