elektron

Elektron from Refinitiv Message API connection

Description

The elektron function creates an elektron object. The elektron object represents a Elektron™ from Refinitiv™ connection.

After you create an elektron object, you can use the object functions to retrieve current and real-time data. You can retrieve data based on your credentials, which consist of a user name and custom IP address. For credentials, contact Elektron from Refinitiv.

When you install Elektron on your computer, the installation folder contains JAR files. Add these JAR files to the dynamic Java® class path every time you connect to Elektron:

  • ansipage.jar

  • ema-javadoc.jar

  • ema.jar

  • jdacsUpalib.jar

  • upa.jar

  • upaValueAdd.jar

  • upaValueAddCache.jar

  • commons-configuration-1.10.jar

  • commons-lang-2.6.jar

  • commons-logging-1.2.jar

  • org.apache.commons.collections.jar

  • slf4j-api-1.7.12.jar

  • slf4j-jdk14-1.7.12.jar

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

Creation

Description

example

c = elektron(username,service) creates a Elektron connection using a user name and service name.

example

c = elektron(username,service,ipaddress) uses an IP address for the Elektron connection.

example

c = elektron(username,service,ipaddress,port) also sets the Port property.

Input Arguments

expand all

Refinitiv user name, specified as a character vector or string scalar. To find your user name, contact Refinitiv.

Example: 'username'

Data Types: char | string

Refinitiv service name, specified as a character vector or string scalar. This input argument indicates the enabled Elektron service for your Refinitiv user name. To find your service name, contact Refinitiv.

Example: 'servicename'

Data Types: char | string

IP address for the Refinitiv server where Elektron data is available, specified as a character vector or string scalar. To find the IP address for the Refinitiv server, contact Refinitiv.

Example: '123.123.123.123'

Data Types: char | string

Properties

expand all

Refinitiv user name, specified as a character vector. To find your user name, contact Refinitiv.

The elektron function sets this property using the username input argument.

Example: 'username'

Data Types: char

Refinitiv service name, specified as a character vector. This property indicates the enabled Elektron service for your Refinitiv user name. To find your service name, contact Refinitiv.

The elektron function sets this property using the service input argument.

Example: 'servicename'

Data Types: char

IP address for the Refinitiv server where Elektron data is available, specified as a character vector. To find the IP address for the Refinitiv server, contact Refinitiv.

The elektron function sets this property using the ipaddress input argument.

Example: '123.123.123.123'

Data Types: char

Port number for the Elektron connection, specified as a numeric scalar. To find the port number, contact Refinitiv.

Data Types: double

Object Functions

closeClose Elektron from Refinitiv connection
getdataElektron from Refinitiv current market data
realtimeElektron from Refinitiv real-time market data

Examples

collapse all

Create a Elektron connection. Then, retrieve current market data. The current market data you see when completing this example can differ from the output data shown.

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

Connect to Elektron using a 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 Elektron connection.

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

  • FieldId — Elektron field identifier

  • DataType — Elektron data type of the Elektron field

  • Name — Elektron field name

  • Value — Current 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 Elektron connection.

close(c)

Create a Elektron connection using an IP address. Then, retrieve current market data. The current market data you see when completing this example can differ from the output data shown.

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

Connect to Elektron using a user name, service name, and IP address. c is an elektron object.

username = 'username';
servicename = 'servicename';
ipaddress = '123.123.123.123';

c = elektron(username,servicename,ipaddress)
 c =

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

Retrieve current data for the IBM security using the Elektron connection.

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

  • FieldId — Elektron field identifier

  • DataType — Elektron data type

  • Name — Elektron field name

  • Value — Current 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 Elektron connection.

close(c)

Create a Elektron connection using a port number. Then, retrieve current market data. The current market data you see when completing this example can differ from the output data shown.

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

Connect to Elektron using a user name, service name, IP address, and port number. c is an elektron object.

username = 'username';
servicename = 'servicename';
ipaddress = '123.123.123.123';
port = '1234';

c = elektron(username,servicename,ipaddress,port)
 c =

 elektron with properties:
    IPAddress: '123.123.123.123'
         Port: 1234
      Service: 'servicename'
     Username: 'username'

Retrieve current data for the IBM security using the Elektron connection.

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

  • FieldId — Elektron field identifier

  • DataType — Elektron data type

  • Name — Elektron field name

  • Value — Current 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 Elektron connection.

close(c)
Introduced in R2017a