Main Content

tlkrs

SIX Financial Information connection

Description

The tlkrs function creates a tlkrs object. The tlkrs object represents a SIX Financial Information connection.

After you create a tlkrs object, you can use the object functions to retrieve current and intraday tick data.

Creation

Description

example

c = tlkrs(ci,ui,password) creates a connection to the SIX Financial Information data service and sets the ci, ui and password properties.

Properties

expand all

Customer identifier, specified as a character vector or string scalar. For credentials, contact SIX Financial Information.

Example: 'US12345'

Data Types: char | string

User identifier, specified as a character vector or string scalar. For credentials, contact SIX Financial Information.

Example: 'userapid01'

Data Types: char | string

Password, specified as a character vector or string scalar. For credentials, contact SIX Financial Information.

Example: 'userapid10'

Data Types: char | string

This property is read-only.

Session identifier, specified as a character vector. The tlkrs function determines the session identifier from the file specified by the login URL.

Example: '463487494'

Data Types: char

Object Functions

closeClose connection to SIX Financial Information
getdataCurrent SIX Financial Information data
historyEnd of day SIX Financial Information data
timeseriesSIX Financial Information intraday tick data
isconnectionDetermine if SIX Financial Information connection is valid
tkfieldtoidSIX Financial Information field names to identification string
tkidtofieldSIX Financial Information identification string to field name

Examples

collapse all

Create a SIX Financial Information connection. Then, retrieve current data for instruments. The current data you see when completing this example can differ from the output data shown.

Create a SIX Financial Information connection with a customer identifier, user identifier, and password. c is a tlkrs object.

ci = 'US12345';
ui = 'userapid01';
password = 'userapid10';
c = tlkrs(ci,ui,password)
c = 

  tlkrs with properties:

           ci: 'US12345'
           ui: 'userapid01'
     password: 'userapid10'
    sessionid: '463487494'

Convert the bid, ask, and last price fields to the identifiers ids.

f = {'Bid','Ask','Last'};
typ = 'market';
ids =  tkfieldtoid(c,f,typ);

Retrieve the current data for the specified securities s.

s = {'1758999,149,134','275027,148,184'};
d = getdata(c,s,ids);

Display the pricing data.

d.P.v
ans =

  6×1 cell array

    {'64.36'  }
    {'64.37'  }
    {0×0 double}
    {'1.26' }
    {'1.26' }
    {0×0 double}

Close the SIX Financial Information connection.

close(c)

Version History

Introduced in R2011b