Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
APIS DOCUMENTATION
EIKON DESKTOP DATA API
REFERENCE
Laurent Lefevre/F & R
API OVERVIEW
Thomson Reuters Eikon Data APIs enables developers to write custom applications using Thomson
Reuters Eikon APIs. Custom applications are applications running in a separate process than Thomson
Reuters Eikon Desktop and Thomson Reuters Eikon Excel.
What
Eikon Desktop Data APIs enables customers to build custom application using
Thomson Reuters Eikon APIs
Eikon APIs
AdfinX Real-Time
AdfinX Analytics
DEX2
Rsearch
Supported
languages
VBA
C++
.Net languages (C#, VB.Net)
Supported
deployment modes
Customer Managed
TR Managed
TR Hosted
Installation
It is part of the core package and does not requires any add-on to be used
Constraints
It requires Thomson Reuters Eikon Desktop to be running and user to signs-in Eikon
Desktop.
Data through custom applications is subject to the same limitations and entitlements as
through Thomson Reuters Eikon Desktop.
DISCLAIMER
Thomson Reuters Eikon services as well as the information contained in the Thomson Reuters Eikon services are
subject to license restrictions set up in the Thomson Reuters Business Principles, Reuters Business Principles or
any other relevant agreement. You hereby acknowledge and agree that you will comply with such restrictions and
will be liable in case of non-compliance vis--vis Thomson Reuters and/or any third party providers.
Please read the following documents for more information:
https://customers.reuters.com/a/adminsupport/nondisplayusagepolicies.aspx
http://thomsonreuters.com/3ptyterms/
TABLE OF CONTENT
EIKon desktop DATA API ............................................................................................. 1
API OVERVIEW .............................................................................................................. 1
Disclaimer ...................................................................................................................... 1
TABLE OF CONTENT .................................................................................................... 2
How does it work? ........................................................................................................ 3
Eikon Desktop Data API library ................................................................................... 3
Quick Start ..................................................................................................................... 7
Appendix A - Status workflows ..................................................................................16
Appendix B Migration from EIKON 2.0SR2 to EIKON 3.0 ......................................17
Appendix C Migrating custom application from 3000XTRA to Thomson Reuters EIKON
.......................................................................................................................................18
Custom applications have to instantiate and initialize Eikon Desktop Data API before using Thomson Reuters Eikon
APIs. During the initialization, Eikon Desktop Data API ensures Thomson Reuters Eikon Desktop is running on the
same machine and is connected to the Platform. If Thomson Reuters Eikon Desktop is not launched when Eikon
Desktop Data API initializes, it launches Thomson Reuters Eikon Desktop.
Eikon Desktop Data API is initialized successfully when it is connected to Thomson Reuters Eikon Desktop and
Thomson Reuters Eikon Desktop is connected to the Platform (the user processed the sign in).
Custom applications can track the Eikon Desktop Data API connection state via a status events and a status
property.
Thomson Reuters Eikon APIs can only be used when Eikon Desktop Data API initializes successfully.
If Thomson Reuters Eikon Desktop is closed, the custom application would not be able to consume data from the
Thomson Reuters Platform.
Data through custom applications is subject to the same limitations and entitlements as through Thomson Reuters
Eikon Desktop: If a user can subscribe to a maximum of 2500 instruments for Thomson Reuters Hosted and
Managed deliveries, this limit is applicable to the user profile not to the retrieval process.
For example: If the user gets 2000 instruments through custom applications, the user is limited to 500 through
Thomson Reuters Eikon Desktop and Thomson Reuters Eikon Excel
This method initializes EikonDesktopDataAPI library. It returns the status of the connection via an enumerated
value.
During the initialization, EikonDesktopDataAPI library checks if Thomson Reuters Eikon Desktop is running and
connected to the Platform. If it is not running, EikonDesktopDataAPI library launches Thomson Reuters Eikon. The
initialization is successful only when Thomson Reuters Eikon Desktop library is launched, a user signs in and the
connection to the Platform is established successfully.
The initialize method is asynchronous (non-blocking) and returns a result before the connection is initialized.
EEikonDataAPIInitializeResult
Error_Reinitialize: The initialization was already done. This error occurs when you try to reinitialize the library after a disconnection. This workflow is not supported for now.
Specific to C++
The COM function call returns:
S_FALSE: the initialization is complete. Check the connection status to see if the connection is
established.
Parameters:
classID: the COM object class ID to be created.
progID: the COM object prog ID to be created.
Return value:
S_OK: the COM object has been successfully instantiated
E_FAIL: the instantiation failed.
Thomson Reuters recommends using the specialized methods. All methods return a specific instance of a
Thomson Reuters Eikon Data API.
RSearch API:
CreateRSearchMgr
Dex2 API:
CreateDex2Mgr
CreateMetaDataMgr
CreateAdxUtilityModule
CreateAdxYieldCurveModule
CreateAdxCreditModule
CreateAdxEquityModule
CreateAdxAsian
CreateAdxInit
CreateAdxAsset
CreateAdxBarrierCapFloor
CreateAdxAlgorithm
CreateAdxBasket
CreateAdxBond
CreateAdxCalcMethod
CreateAdxLibor
CreateAdxMapLibor
CreateAdxCurrency
CreateAdxCalendar
CreateAdxCapFloor
CreateAdxCashFlow
CreateAdxChooser
CreateAdxConvBond
CreateAdxCorrelation
CreateAdxCrossCurrency
CreateAdxDefault;
CreateAdxDigitalCapFloor
CreateAdxDividendModel
CreateAdxFixedLeg
CreateAdxFloatLeg
CreateAdxForex
CreateAdxFra
CreateAdxFrn
CreateAdxFuture
CreateAdxFxModel
CreateAdxIdxStyle
CreateAdxIlb
CreateAdxModelBuilder
CreateAdxOpBinary
CreateAdxOpLookBack
CreateAdxOption
CreateAdxParse
CreateAdxRainbow
CreateAdxRateModel
CreateAdxRepo
CreateAdxRiskModel
CreateAdxStyle
CreateAdxStyleTable
CreateAdxSwap
CreateAdxTermStructure
CreateAdxVolatilityModel
CreateAdxAssetSwap
CreateAdxTimeSeries
CreateAdxFrq
CreateAdxCDOTranche
CreateAdxNToDefaultCDS
PROPERTY
Status
The status property returns an EEikonStatus enumeration indicating the Thomson Reuters Platform connection
state.
EVENT
OnStatusChanged(EEikonStatus)
The OnStatusChanged event notifies the application when connection status changed. The EEikonStatus
enumeration is passed as an argument.
ENUM
EEikonStatus
This enumeration indicates the status of the connection to Thomson Reuters Platform
Connected: EikonDesktopDataAPI library is connected to the Thomson Reuters Platform. Thomson Reuters Eikon
APIs can be used.
Disconnected: This value indicates either EikonDesktopDataAPI library is not initialized yet or
EikonDesktopDataAPI library has been disconnected.
The disconnection can be due to:
o
Thomson Reuters Eikon shuts down - when the user closes the application.
Note: when this event occurs, Thomson Reuters Eikon APIs cannot be used anymore and the custom
application must be stopped and restarted.
Offline: the application has lost the connection to the Platform because of a network or Platform issue.
Once the connection is restored the connection state switches back to connected status.
Local Mode: This status is specific to Customer Managed user accounts. The Local Mode status indicates
that the connection to the Platform is lost but the connection to the local RMDS is still available and AdfinX
real-time and AdfinX Analytics can still be used.
QUICK START
Here are some basic code samples in C++, C# and VBA.
CComPtr<IUnknown> m_spUnkDDA;
EikonStatusListener* m_listener;
HWND m_hwnd;
};
//Source
bool EikonDesktopDataAPIWrapper::CreateInstance()
{
::CoInitialize(NULL);
HRESULT hr = E_FAIL;
if (m_spDDA.p == NULL)
{
//Instantiate Eikon Desktop Data API
hr = m_spDDA.CoCreateInstance( __uuidof(EikonDesktopDataAPI) );
}
return (hr == S_OK);
}
bool EikonDesktopDataAPIWrapper::Initialize()
{
HRESULT hr = E_FAIL;
if (m_spDDA.p != NULL)
{
//Initialize Eikon Desktop Data API
hr = m_spDDA->Initialize();
}
return (hr == S_OK);
}
bool EikonDesktopDataAPIWrapper::DestoryInstance()
{
HRESULT hr = E_FAIL;
if (m_spDDA.p != NULL)
{
m_spDDA.Release();
hr = S_OK;
}
::CoUninitialize();
return (hr == S_OK);
}
bool EikonDesktopDataAPIWrapper::ListenToEvents()
{
HRESULT hr = E_FAIL;
if (m_spDDA.p != NULL)
{
if (m_spUnkDDA.p == NULL)
{
hr = m_spDDA.QueryInterface(&m_spUnkDDA);
}
if (m_listener == NULL)
{
m_listener = new EikonStatusListener(m_hwnd);
}
if (m_spUnkDDA.p != NULL && m_listener != NULL)
{
// Listen to Eikon Desktop Data API event
hr = m_listener->DispEventAdvise(m_spUnkDDA,
&__uuidof(_IEikonDesktopDataAPIEvents));
}
}
return (hr == S_OK);
}
bool EikonDesktopDataAPIWrapper::CancelToListen()
{
HRESULT hr = E_FAIL;
if (m_spUnkDDA.p != NULL && m_listener != NULL)
{
hr = m_listener->DispEventUnadvise(m_spUnkDDA);
m_spUnkDDA.Release();
delete m_listener;
m_listener = NULL;
}
return (hr == S_OK);
}
void EikonDesktopDataAPIWrapper::InitAll()
{
CreateInstance();
ListenToEvents();
Initialize();
}
void EikonDesktopDataAPIWrapper::UninitAll()
{
CancelToListen();
DestoryInstance();
}
QUICK START IN C#
Prerequisites
Before starting, check the references in your C# project. Ensure the Thomson Reuters Eikon APIs Interop files are
added and point to the correct path. If the yellow question mark icon appears next to the Interop files, remove the
reference and add it again.
To add Interop file, right click on References folder, select Add Reference, click Browse tab and navigate in
Thomson Reuters Eikon Program folder, check for files starting with Interop.
Interop.EikonDesktopDataAPI.dll
Interop.AdfinXAnalyticsFunctions.dll
Interop.AdfinXAnalyticsObjects.dll
Interop.Dex2.dll
DEX2
Interop.RSearch.dll
RSearch
Interop.RTX.dll
AdfinX Real-Time
Sample
private EikonDesktopDataAPI m_eikonDDA;
private void Init()
{
m_eikonDDA = new EikonDesktopDataAPI();
m_eikonDDA.OnStatusChanged += new
_IEikonDesktopDataAPIEvents_OnStatusChangedEventHandler(m_eikonDDA_OnStatusChanged);
m_eikonDDA.Initialize();
}
private void Term()
{
if (m_eikonDDA != null)
{
m_eikonDDA.OnStatusChanged -= new
_IEikonDesktopDataAPIEvents_OnStatusChangedEventHandler(m_eikonDDA_OnStatusChanged);
Marshal.ReleaseComObject(m_eikonDDA);
m_eikonDDA = null;
}
}
private void m_eikonDDA_OnStatusChanged(EEikonStatus status)
{
switch (status)
{
case EEikonStatus.Connected:
case EEikonStatus.LocalMode:
case EEikonStatus.Disconnected:
case EEikonStatus.Offline:
break;
}
}
Click Browse , navigate in Thomson Reuters Eikon Program folder, and select the appropriate library.
Library file name
EikonDesktopDataAPI.dll
Adxfo.dll
Adxoo.dll
Dex2.dll
DEX2
RSearch.dll
RSearch
RTX.dll
AdfinX Real-Time
Sample
Public WithEvents EikonDDA As EikonDesktopDataAPI
Private Sub Document_Open()
InitEikonDesktopDataAPI
End Sub
Private Sub InitEikonDesktopDataAPI()
Set EikonDDA = New EikonDesktopDataAPI
Dim EikonInitResult As EikonDesktopDataAPILib.EEikonDesktopDataAPIInitializeResult
EikonInitResult = EikonDDA.Initialize
If EikonInitResult = Error_InitializeFail Then
'Handle fail case here
ElseIf EikonInitResult = Error_Reinitialize Then
'Handle reinitialize case here
End If
End Sub
Private Sub EikonDDA_OnStatusChanged(ByVal EStatus As EikonDesktopDataAPILib.EEikonStatus)
'ToDo: Write your code to manage status change here
Select Case EStatus
Case EEikonStatus.Connected
'Handle Connected status here
Case EEikonStatus.Disconnected
'Handle Disconnected status here
Case EEikonStatus.LocalMode
'Handle LocalMode status here
Case EEikonStatus.Offline
'Handle Offline status here
Case Else
'Handle Else here
End Select
End Sub
Connected
Local Mode
Offline
EikonDesktopData
API is connected to
the Platform
through Thomson
Reuters Eikon
Desktop
Terminal state
The application is
disconnected
because of a
network failure or a
Platform issue.
Connection to the
Platform cant be
established
EikonDesktopDesk
topDataAPI is
connected to the
Platform through
Thomson Reuters
Eikon Desktop
Disconnected
Thomson Reuters
Eikon Desktop shuts
down
EikonDesktopDesk
topDataAPI is
connected to the
Platform through
Thomson Reuters
Eikon Desktop
Connected to Offline
Connected to disconnected
Initial state
Thomson Reuters
Eikon Desktop shuts
down
The connection to
the Platform has
been lost while the
application was
running
Update the reference or libraries of their project: remove EikonDesktopSDK.dll reference and add
EikonDesktopDataAPI.dll reference
In C#
Replace
With
EikonDesktopSDK
EikonDesktopDataAPI
_IEikonDesktopSDKEvents_OnStatusChangedEventHandler
_IEikonDesktopDataAPIEvents_OnStatusChangedEventHandler
EEikonSDKInitializeResult
EEikonDataAPIInitializeResult
With
EikonDesktopSDK
EikonDesktopDataAPI
EikonDesktopSDKLib.EEikonSDKInitializeResult
EikonDesktopDataAPILib.EEikonDesktopDataAPIInitializeResult
EikonDesktopSDKLib.EEikonStatus
EikonDesktopDataAPILib.EEikonStatus
In C++
Replace
With
_IEikonDesktopSDKEvents
EikonDesktopDataAPI
IEikonDesktopSDK
_IEikonDesktopDataAPIEvents_OnStatusChangedEventHandler
First, Adfin-X Analytics and AdfinX-Real-time API use the same interface as in 3000Xtra and only the instantiation
of the object has to be changed: while in 3000Xtra you were instantiating these objects directly you will have to
modify the code and use the createXXX methods of the EikonDesktopDataAPI object.
If the custom application was using DEX then the code will have to be reviewed as the interface to request
fundamental data has been enhanced. If DEX was used to request time series data from the DBU, DEX2 is no
more managing time series request. A time series API will be delivered in the future.
Second, the custom application will have to use the EikonDesktopDataAPI. A quick migration path consists in
initializing the EikonDesktopDataAPI at start-up and block the application initialization until EikonDesktopDataAPI
initializes successfully. If EikonDesktopDataAPI initialization fails or if it is disconnected while the application is
running, the application should display an error message and shutdown (the application needs to be restarted to reinitialize the connection to Thomson Reuters Eikon Desktop). The Eikon APIs instantiation has to use the
createXXX methods of the EikonDesktopDataAPI object instead of the standard COM instantiation.