Skip to content

Commit c3f4ab9

Browse files
committed
Merge branch 'rebrand_rcc'
1. Support Docker 2. Rebrand TRCC to RCC 3. Fix typo errors
2 parents d4af818 + ab0698d commit c3f4ab9

5 files changed

Lines changed: 90 additions & 47 deletions

File tree

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2019 Refinitiv
1+
Copyright 2020 Refinitiv
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

README.md

Lines changed: 44 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22
- Last update: July 2019
33
- Environment: Windows and Linux OS
44
- Compiler: Python
5-
- Prerequisite: ADS and ADH servers version 3.2.1 and above, TRCC Access Credentials
5+
- Prerequisite: ADS and ADH servers version 3.2.1 and above, RCC Access Credentials
66

7-
## TRCC Overview
7+
## RCC Overview
88

9-
The Thomson Reuters Contribution Channel (TRCC) is a new service for on-boarding content to the Refinitiv. Depending on the client's needs, access to the service will be fulfilled by one or more of the following products: Contributions Channel for TREP, Contributions Channel for Elektron API, Contributions Channel for Spreadsheet. TRCC aims for replacing the legacy Market Link IP (MLIP) system.
9+
The Refinitiv Contribution Channel (RCC) (formerly known as TRCC) is a new service for on-boarding content to the Refinitiv. Depending on the client's needs, access to the service will be fulfilled by one or more of the following products: Contributions Channel for TREP, Contributions Channel for Elektron API, Contributions Channel for Spreadsheet. RCC aims for replacing the legacy Market Link IP (MLIP) system.
1010

1111
Data Contribution is a means to send your pricing data directly to Refinitiv , from where it can fan out globally. Leading market participants, such as banks and brokers, use Refinitiv to publish and distribute their information to the community of financial professions, in order to advertise their prices to clients and prospects.
1212

1313
## Application Overview
1414

15-
This example shows how to writing an application to contribute your data to TRCC using [Elektron WebSocket API](https://developers.refinitiv.com/elektron/websocket-api) through Thomson Reuters Enterprise Platform (TREP). The example just connects to TREP via a WebSocket connection, then sends an off-stream post to contribute item to TRCC server via that TREP. The project are implemented with Python language for both console and Jupyter Notebook applications, but the main concept and post message structures are the same for all technologies.
15+
This example shows how to writing an application to contribute your data to RCC using [Elektron WebSocket API](https://developers.refinitiv.com/elektron/websocket-api) through Thomson Reuters Enterprise Platform (TREP). The example just connects to TREP via a WebSocket connection, then sends an off-stream post to contribute item to RCC server via that TREP. The project are implemented with Python language for both console and Jupyter Notebook applications, but the main concept and post message structures are the same for all technologies.
1616

17-
If you are interested to contribute data using the RSSL connection (with or without TREP), please visit the following series of Elektron SDK and TRCC based on your prefer API:
18-
* [Contributing your data to Thomson Reuters article](https://developers.refinitiv.com/article/contributing-your-data-thomson-reuters).
19-
* [EMA Java Tutorial - Posting data to TR Contribution Channel](https://developers.refinitiv.com/elektron/elektron-sdk-java/learning?content=41885&type=learning_material_item).
20-
* [EMA C++ Tutorial - Posting data to TR Contribution Channel](https://developers.refinitiv.com/elektron/elektron-sdk-cc/learning?content=26452&type=learning_material_item).
17+
If you are interested to contribute data using the RSSL connection (with or without TREP), please visit the following series of Elektron SDK and RCC based on your prefer API:
18+
* [Contributing your data to Refinitiv article](https://developers.refinitiv.com/article/contributing-your-data-thomson-reuters).
19+
* [EMA Java Tutorial - Posting data to Contribution Channel](https://developers.refinitiv.com/elektron/elektron-sdk-java/learning?content=41885&type=learning_material_item).
20+
* [EMA C++ Tutorial - Posting data to Contribution Channel](https://developers.refinitiv.com/elektron/elektron-sdk-cc/learning?content=26452&type=learning_material_item).
2121

2222
If you are not familiar with Elektron WebSocket API Posting concept, please visit [Contributing Data to TREP using the Websocket API](https://developers.refinitiv.com/article/contributing-data-trep-using-websocket-api) article which will give you a full explanation of the WebSocket API Posting mechanisms and process.
2323

2424
*Note:* In an off-stream post, the client application can send a post for an item via a Login stream, regardless of whether a data stream first exists. The route of the post is determined by the TREP (ADS and ADH) configuration.
2525

2626
## Contribution Setups
2727

28-
The Elektron WebSocket API cannot connect to TRCC server directly (only Elektron SDK C++ and Java APIs support that feature). It requires TREP version 3.2.1 (and above) to take care of the JSON-OMM conversion, TRCC connection and login process for the WebSocket application.
28+
The Elektron WebSocket API cannot connect to RCC server directly (only Elektron SDK C++ and Java APIs support that feature). It requires TREP version 3.2.1 (and above) to take care of the JSON-OMM conversion, RCC connection and login process for the WebSocket application.
2929

30-
![Figure-1](images/diagram_trcc_ws.png "TRCC Contribution Diagram")
30+
![Figure-1](images/diagram_trcc_ws.png "RCC Contribution Diagram")
3131

32-
The TREP infrastructure connects to TRCC through the delivery direct network via Tunnel Stream Aggregator (TSA) adapter, which is a private network (TLS encrypted) between a client site and Refinitiv. The TSA adapter is already packaged with the ADH version 3.2, and needs to be configured. You can find more detail regarding the TREP-TRCC configurations in [Contributing your data to Thomson Reuters article](https://developers.refinitiv.com/article/contributing-your-data-thomson-reuters) page (*Contribution through TREP* section). This example also contain example ADH-TRCC configurations in *trep_config/rmds_trcc.cnf* file.
32+
The TREP infrastructure connects to RCC through the delivery direct network via Tunnel Stream Aggregator (TSA) adapter, which is a private network (TLS encrypted) between a client site and Refinitiv. The TSA adapter is already packaged with the ADH version 3.2, and needs to be configured. You can find more detail regarding the TREP-RCC configurations in [Contributing your data to Refinitiv article](https://developers.refinitiv.com/article/contributing-your-data-thomson-reuters) page (*Contribution through TREP* section). This example also contain example ADH-RCC configurations in *trep_config/rmds_trcc.cnf* file.
3333

3434
## Prerequisite
3535
This example requires the following dependencies softwares and libraries.
@@ -38,38 +38,57 @@ This example requires the following dependencies softwares and libraries.
3838
3. Python's [requests 2.x](https://pypi.org/project/requests/) library.
3939
4. Python's [websocket-client](https://pypi.org/project/websocket-client/) library (*version 0.49 or greater*).
4040
5. [Jupyter Notebook](https://jupyter.org/) runtime (for the Notebook example application)
41-
5. TRCC username, password and host list credentials. Please reach out to your Refinitiv sales associate to acquire TRCC access credentials.
41+
6. [Docker Engine - Community Edition](https://docs.docker.com/install/) (for running the console example in Docker only)
42+
7. RCC username, password and host list credentials. Please reach out to your Refinitiv sales associate to acquire RCC access credentials.
4243

4344
*Note:*
4445
- The Python example has been qualified with Python versions 3.6.8.
4546
- Please refer to the [pip installation guide page](https://pip.pypa.io/en/stable/installing/) if your environment does not have the [pip tool](https://pypi.org/project/pip/) installed.
4647
- If your environment already have a websocket-client library installed, you can use ```pip list``` command to verify a library version, then use ```pip install --upgrade websocket-client``` command to upgrade websocket-client library.
4748
- You can install Jupyter Notebook on your local machine and then test the example on the machine. The alternate choice is a free Jupyter Notebook on cloud environment such as [Azure Notebook](https://notebooks.azure.com/) provided by Microsoft. You can find more details from [this tutorial](https://docs.microsoft.com/en-us/azure/notebooks/tutorial-create-run-jupyter-notebook). If you are not familiar with Jupyter Notebook, the following [tutorial](https://www.datacamp.com/community/tutorials/tutorial-jupyter-notebook) created by DataCamp may help.
48-
- It is not advisable to change the ADH configuration, if you are not familiar with the configuration procedures. Please consult your Market Data administrator for any questions regarding ADH-TRCC configuration.
49+
- It is not advisable to change the ADH configuration, if you are not familiar with the configuration procedures. Please consult your Market Data administrator for any questions regarding ADH-RCC configuration.
4950

5051
## Application Files
5152
This example project contains the following files and folders
5253
1. *console_python/trcc_posting.py*: The example application file
53-
2. *console_python/requirements.txt*: The application dependencies configurationf file
54-
3. *notebook_python/trcc_posting_notebook.ipynb*: The example Jupyter Notebook application file
55-
4. *trep_config/rmds_trcc.cnf*: ADH TRCC configurations example file (*not a completed ADH configuration file*)
56-
5. LICENSE.md: Project's license file
57-
6. README.md: Project's README file
54+
2. *console_python/requirements.txt*: The application dependencies configuration file
55+
3. *console_python/Dockerfile*: The example application Dockerfile
56+
4. *notebook_python/trcc_posting_notebook.ipynb*: The example Jupyter Notebook application file
57+
5. *trep_config/rmds_trcc.cnf*: ADH RCC configurations example file (*not a completed ADH configuration file*)
58+
6. LICENSE.md: Project's license file
59+
7. README.md: Project's README file
5860

5961
## How to run this console example
6062

61-
Please be informed that your TREP server (ADS and ADH) should be applied the TRCC configurations and TRCC contribution service should be "Up" before running an example. The TRCC access credentials are required in the connection between ADH server and TRCC server only, not in the application level.
63+
Please be informed that your TREP server (ADS and ADH) should be applied the RCC configurations and RCC contribution service should be "Up" before running an example. The RCC access credentials are required in the connection between ADH server and RCC server only, not in the application level.
6264

6365
![Figure-2](images/adh_trcc.png "ADH TRCC Service is ready")
6466

6567
![Figure-3](images/ads_trcc.png "ADS TRCC Service is ready")
6668

6769
1. Unzip or download the example project folder into a directory of your choice.
68-
2. Run ```$> pip install -r requestments.txt``` in a console to install all the dependencies libraries.
69-
3. Then you can run trcc_posting.py application with the following command
70+
2. Enter project *console* folder.
71+
3. Run ```$> pip install -r requirements.txt``` command in a console to install all the dependencies libraries.
72+
4. Then you can run trcc_posting.py application with the following command
7073
```
7174
$> python trcc_post.py --hostname <ADS server IP Address/Hostname> --port <WebSocket Port> --item <Contribution item name> --service <ADS Contribution Service name>
7275
```
76+
77+
## How to run this console example in Docker
78+
79+
1. Unzip or download the example project folder into a directory of your choice.
80+
2. Enter *console* folder.
81+
3. Run ```$> docker build -t <project tag name> .``` command in a console to build an image from a Dockerfile.
82+
```
83+
$> docker build -t esdk_ws_trcc_python .
84+
```
85+
4. Once the build is success, you can create and run the container with the following command
86+
```
87+
$> docker run esdk_ws_trcc_python --hostname <ADS server IP Address/Hostname> --port <WebSocket Port> --item <Contribution item name> --service <ADS Contribution Service name>
88+
```
89+
90+
*Note*: If you want to connect a docker application to your *localhost* ADS server, please refer to this [Stack Overflow answer page](https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach).
91+
7392
## Example Results
7493
### Initiate and Login to TREP
7594
```
@@ -174,14 +193,14 @@ RECEIVED:
174193
```
175194
176195
## References
177-
* [Refinitiv Elektron SDK Family page](https://developers.refinitiv.com/elektron) on the [Refinitiv Developer Community](https://developers.thomsonreuters.com/) web site.
196+
* [Refinitiv Elektron SDK Family page](https://developers.refinitiv.com/elektron) on the [Refinitiv Developer Community](https://developers.refinitiv.com/) web site.
178197
* [Refinitiv Elektron WebSocket API page](https://developers.refinitiv.com/websocket-api).
179198
* [Developer Webinar Recording: Introduction to Electron WebSocket API](https://www.youtube.com/watch?v=CDKWMsIQfaw).
180199
* [Contributing Data to TREP using the Websocket API article](https://developers.refinitiv.com/article/contributing-data-trep-using-websocket-api).
181-
* [Contributing your data to Thomson Reuters article](https://developers.refinitiv.com/article/contributing-your-data-thomson-reuters).
200+
* [Contributing your data to Refinitiv article](https://developers.refinitiv.com/article/contributing-your-data-thomson-reuters).
182201
* [Refinitiv Elektron: RIC Search](https://developers.refinitiv.com/elektron/websocket-api/dev-tools?type=ric).
183202
* [Refinitiv Data Model Discovery page](https://refinitiv.fixspec.com/specserver/specs/reuters): Explore TR data models, content definitions and data update behaviors.
184-
* [EMA Java Tutorial - Posting data to TR Contribution Channel](https://developers.refinitiv.com/elektron/elektron-sdk-java/learning?content=41885&type=learning_material_item).
185-
* [EMA C++ Tutorial - Posting data to TR Contribution Channel](https://developers.refinitiv.com/elektron/elektron-sdk-cc/learning?content=26452&type=learning_material_item).
203+
* [EMA Java Tutorial - Posting data to Contribution Channel](https://developers.refinitiv.com/elektron/elektron-sdk-java/learning?content=41885&type=learning_material_item).
204+
* [EMA C++ Tutorial - Posting data to Contribution Channel](https://developers.refinitiv.com/elektron/elektron-sdk-cc/learning?content=26452&type=learning_material_item).
186205
187206
For any question related to this example or Elektron WebSocket API, please use the Developer Community [Q&A Forum](https://community.developers.refinitiv.com/spaces/152/websocket-api.html).

console_python/Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM python:3.7-alpine
2+
3+
LABEL maintainer="Wasin Waeosri <wasin.waeosri@rifinitiv.com>"
4+
LABEL build_date="2019-07-30"
5+
6+
# Copy requirements.txt first
7+
COPY requirements.txt /
8+
# instruction to be run during image build
9+
RUN pip install -r requirements.txt
10+
11+
# then copy the application
12+
RUN mkdir /app
13+
COPY trcc_posting.py /app
14+
#COPY market_price.py /app
15+
WORKDIR /app
16+
17+
ENTRYPOINT ["python", "-u","/app/trcc_posting.py"]

console_python/trcc_posting.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
# | This source code is provided under the Apache 2.0 license --
33
# | and is provided AS IS with no warranty or guarantee of fit for purpose. --
44
# | See the project's LICENSE.md for details. --
5-
# | Copyright Refinitiv 2019. All rights reserved. --
5+
# | Copyright Refinitiv 2020. All rights reserved. --
66
# |-----------------------------------------------------------------------------
77

88

99
#!/usr/bin/env python
10-
""" Simple example of posting Market Price JSON data To TRCC via TREP 3.2.x using Websockets """
10+
""" Simple example of posting Market Price JSON data To RCC via TREP 3.2.x using Websockets """
1111

1212
import sys
1313
import time
@@ -76,7 +76,7 @@ def send_market_price_post(ws):
7676
global bid_value
7777
global ask_value
7878
global primact_1_value
79-
""" Send a post message contains a market-price content to TRCC """
79+
""" Send a post message contains a market-price content to RCC """
8080

8181
""" Contribution fields """
8282
contribution_fields = {

0 commit comments

Comments
 (0)