|Example Source Code
|.Net/C# - Compilers/Packages
|6.0 or greater
If accessing content from:
The goal of this Getting Started tutorial is to provide the .NET developer the steps required to prepare a development environment to access content within the Refinitiv Data Platform. As outlined within the Refinitiv Data Platform Libraries - An Introduction, the libraries are designed as ease-of-use interfaces, available in multiple programming languages, allowing the developer a consistent way to access content from multiple supporting access points. That is, they can choose to access content from either the Eikon or Refinitiv Workspace desktop, directly to the cloud (Refinitiv Data Platform/ERT in Cloud) or via a locally deployed enterprise installation (TREP/ADS).
This quick start guide will provide the steps to set up and configure the .NET example package necessary to access the content.
Note: The Refinitiv Data Platform Library for .NET is a community-based API and managed as an open-source project. It is not an officially supported API.
All examples are built with Microsoft .Net Framework 4.5.2 and should be pre-installed. The library supports .NET Framework 4.5.2, and .NET Standard 2.0, 2.1. With the .NET Standard support, applications can be targeted to use up to .NET Core 3.1.
All examples will automatically download NuGet dependencies when loading/building a solution. NuGet Package Manager 2.12 (or greater) is required to be pre-installed prior to loading the solution. The minimum Package Manager is available within the modern Visual Studio IDE's such as 2017, 2019. Developers may need to upgrade their package managers for older IDE's such as VS2015.
The Refinitiv Data Platform provides a number of data services such as streaming, request/reply, near real-time message queues, and bulk files. The downloadable example package will provide a series of examples that will cover specific capabilities that will support a cross-section of the services within the platform. The package conveniently will include references to all library dependencies, via NuGet, when the projects are loaded and built. You simply have to choose a specific project within the package that suits the type of access you desire.
Once the .NET Example package has been downloaded and uncompressed, load the solution project within Visual Studio.
The solution will present examples within either the Content or Delivery layers. Prior to running any example, you will need to define your credentials in order to access content.
To configure the examples, all settings have been defined in dedicated configuration files. First, select the session for the specific access channel within the Session.cs file defined within the Configuration Solution project:
Next, assign your access credentials to work with the examples based on the access channel defined above. Ensure you have reviewed the Access Credentials Guide to determine the requirements. Modify the relevant configuration parameters to specify any connection properties and user credentials within the Credentials.cs file defined within the Configuration Solution project.
Once the settings have been defined, choose the desired example that supports the content you wish to access. Start with the Content examples within the package and if an appropriate example is not available, move to the Delivery examples.
Note: If you choose to access content using a Desktop Session, the Eikon or Refinitiv Workspace application must be running. When launched, the desktop application starts listening for local WebSocket connections on port 9000 or the next available port if port 9000 is already occupied.
Once you determine an appropriate example, perform the following steps:
Note: The NuGet packages used by these examples will automatically load. If you have issues or errors during the build, Clean the solution then Build again.
If you have any issues running the examples, refer to the Troubleshooting section for more details.
In the event you have issues accessing the platform or verifying the results, refer to the following for the most common troubleshooting steps:
1. Failed to establish a session to the platform.
If you receive an error such as:
"HTTPReason": "Bad Request",
"error_description": "Invalid username or password."
}. (Event: SessionAuthenticationFailed)
Connection to the WebSocket server [ewa:15000] is down.. (Event: StreamDisconnected)
The details you provided within the Credentials.cs file within the Configuration project may be incorrect. Please verify these settings. Alternatively, you may need to override the default session settings defined within the Sessions.cs file. For example, you may have been given additional user credentials specific to the session you are accessing. Refer to the Session Layer Guide for a detailed outlined as to the additional session parameters you may need to provide.
If you believe you have applied all the credentials correctly, you will need to reach out to your market data team or your Refinitiv account rep to confirm your access credentials.
2. Failed to retrieve streaming data
When accessing content, the request may be denied for a few reasons, more commonly related to permissions. For example:
"Text": "Access Denied: User req to PE(74)"
If you are not permissioned to retrieve the default item used within the example, you will need to change the item by going into the specific example project and change to one you believe you do have access. If you believe you should be authenticated to retrieve the requested content, you will need to verify your permission settings with your Refinitiv rep.
Once access to the platform has been verified, feel free to work through the tutorials to better understand the capabilities and power of the Refinitiv Data Platform Libraries.