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

Thomson Reuters Elektron current market data

Syntax

d = getdata(c,s)

Description

example

d = getdata(c,s) returns Thomson Reuters Elektron® current market data using the Thomson Reuters Elektron connection for a single security.

Examples

collapse all

First, create a Thomson Reuters Elektron connection. Then, retrieve current market data. Close the connection. The current market data you see when running this code can differ from the output data here.

Add Thomson Reuters Elektron JAR files to the dynamic Java® class path. Find these JAR files in the installation folder. Here, the installation folder is i:\Elektron.

javaaddpath i:\Elektron\ansipage.jar
javaaddpath i:\Elektron\ema-javadoc.jar
javaaddpath i:\Elektron\ema.jar
javaaddpath i:\Elektron\jdacsUpalib.jar
javaaddpath i:\Elektron\upa.jar
javaaddpath i:\Elektron\upaValueAdd.jar
javaaddpath i:\Elektron\upaValueAddCache.jar
javaaddpath i:\Elektron\commons-configuration-1.10.jar
javaaddpath i:\Elektron\commons-lang-2.6.jar
javaaddpath i:\Elektron\commons-logging-1.2.jar
javaaddpath i:\Elektron\org.apache.commons.collections.jar
javaaddpath i:\Elektron\slf4j-api-1.7.12.jar
javaaddpath i:\Elektron\slf4j-jdk14-1.7.12.jar

Alternatively, add these JAR files to the static Java class path. For details about dynamic and static class paths, see Java Class Path (MATLAB).

Connect to Thomson Reuters Elektron using the user name and service name.

c is an elektron object.

username = 'username';
servicename = 'servicename';

c = elektron(username,servicename)
 c =

 elektron with properties:
    IPAddress: 'localhost'
         Port: 14002
      Service: 'servicename'
     Username: 'username'

Retrieve current data for the IBM® security using the Thomson Reuters Elektron connection.

d is a table that contains the current data. The variables are:

  • FieldId — Thomson Reuters Elektron field identifier

  • DataType — Thomson Reuters Elektron data type of the Thomson Reuters Elektron field

  • Name — Thomson Reuters Elektron field name

  • Value — Current Thomson Reuters Elektron data value

s = 'IBM.N';
d = getdata(c,s)
d = 

  284×4 table array

    FieldId    DataType        Name                Value         
    _______    ________    ____________    ______________________

    [    1]    [18]        'PROD_PERM'     '62'                  
    [    2]    [18]        'RDNDISPLAY'    '67'                  
    [    3]    [31]        'DSPLY_NAME'    'DELAYED-15INTL B'    
    ...

Access the first three field names in the current data.

d.Name(1:3)
ans =

  3×1 cell array

    'PROD_PERM'
    'RDNDISPLAY'
    'DSPLY_NAME'

Close the Thomson Reuters Elektron connection.

close(c)

Input Arguments

collapse all

Thomson Reuters Elektron connection, specified as an elektron object created using the elektron function.

Thomson Reuters Elektron security, specified as a character vector or string scalar. You can specify only a single security. The security is a Reuters® Instrument Code (RIC). For details about RICs, contact Thomson Reuters™.

Example: 'IBM.N'

Data Types: char | string

Output Arguments

collapse all

Thomson Reuters Elektron current market data, specified as a table. The getdata function returns Thomson Reuters Elektron current market data for the specified security s.

VariableData TypeDescription

FieldId

Cell array of doubles

Thomson Reuters Elektron field identifier

DataType

Cell array of doubles

Thomson Reuters Elektron data type of the Thomson Reuters Elektron field

Name

Cell array of character vectors

Thomson Reuters Elektron field name

Value

Cell array of doubles or character vectors

Current Thomson Reuters Elektron data value

MATLAB® converts the current data value from Thomson Reuters Elektron as follows:

  • Numeric data values convert to doubles

  • Text values convert to character vectors

  • Date and time values convert to character vectors

For details about fields and their availability, see Thomson Reuters Elektron.

Introduced in R2017a

Was this topic helpful?