Main Content

getdata

Current SIX Financial Information data

Description

D = getdata(c,s,f) returns the data for the fields f for the security list s.

example

Examples

collapse all

Retrieve SIX Financial Information pricing data for specified securities.

% Connect to Telekurs.
c = tlkrs('US12345','userapid01','userapid10')

% Convert specified fields to ID strings.
ids =  tkfieldtoid(c,{'Bid','Ask','Last'},'market');

% Retrieve data for specified securities.
d = getdata(c,{'1758999,149,134','275027,148,184'},ids);

Your output appears as follows:

d = 
    XRF: [1x1 struct]
     IL: [1x1 struct]
      I: [1x1 struct]
      M: [1x1 struct]
      P: [1x1 struct]

d.I contains the instrument IDs, and d.P contains the pricing data.

View the instrument IDs like this:

d.I.k
ans = 
    '1758999,149,134'
    '275027,148,184'

View the pricing data field IDs like this:

d.P.k
ans = 

    '33,2,1'
    '33,3,1'
    '3,1,1'
    '33,2,1'
    '33,3,1'
    '3,1,1'

And the pricing data like this:

d.P.v
ans = 

    '44.94'
    '44.95'
    []
    '0.9715'
    '0.9717'
    []

Convert field IDs in d.P.k to field names like this:

d.P.k = tkidtofield(c,d.P.k,'market')

Load the file @tlkrs/tkfields.mat for a listing of the field names (Bid, Ask, Last) and corresponding IDs.

Input Arguments

collapse all

Connection object, specified as a tlkrs object.

Security, specified as a cell array of character vectors.

Field IDs, specified as a cell array of character vectors.

Version History

Introduced in R2011b