Main Content

tlkrs

SIX Financial Informationconnection

Description

Thetlkrsfunction creates atlkrsobject. Thetlkrsobject represents aSIX Financial Informationconnection.

After you create atlkrsobject, 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 theSIX Financial Informationdata service and sets theci,uiandpasswordproperties.

Properties

expand all

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

Example:'US12345'

Data Types:char|string

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

Example:'userapid01'

Data Types:char|string

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

Example:'userapid10'

Data Types:char|string

This property is read-only.

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

Example:'463487494'

Data Types:char

Object Functions

close Close connection toSIX Financial Information
getdata CurrentSIX Financial Informationdata
history End of daySIX Financial Informationdata
timeseries SIX Financial Informationintraday tick data
isconnection Determine ifSIX Financial Informationconnection is valid
tkfieldtoid SIX Financial Informationfield names to identification string
tkidtofield SIX Financial Informationidentification string to field name

Examples

collapse all

创建一个SIX Financial Informationconnection. Then, retrieve current data for instruments. The current data you see when completing this example can differ from the output data shown.

创建一个SIX Financial Informationconnection with a customer identifier, user identifier, and password.cis atlkrsobject.

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 identifiersids.

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

Retrieve the current data for the specified securitiess.

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 theSIX Financial Informationconnection.

close(c)

版本历史

Introduced in R2011b