Documentation

This is machine translation

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

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

getdata

Current SIX Financial Information data

Syntax

D = getdata(c,s,f)

Description

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

Examples

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.

Was this topic helpful?