Skip to content

Commit ee5ad04

Browse files
committed
Rebranded LSEG
Updated all links Updated libraries
1 parent 463400f commit ee5ad04

16 files changed

+1276
-802
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ ERT_in_Cloud/
1010
internal_dev/
1111
requirements.txt_old
1212
.env
13-
notebook/.env
13+
notebook/.env
14+
venv/
15+
notebook_venv/

README.md

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
# RKD HTTP JSON with Python Examples
2-
- version: 1.6.0
3-
- Last update: Mar 2022
2+
- version: 1.6.5
3+
- Last update: January 2026
44
- Environment: Windows, Linux
55
- Compiler: Python
66
- Prerequisite: [Demo prerequisite](#prerequisite)
77

88
Example Code Disclaimer:
9-
ALL EXAMPLE CODE IS PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS FOR ILLUSTRATIVE PURPOSES ONLY. REFINITIV MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE OPERATION OF THE EXAMPLE CODE, OR THE INFORMATION, CONTENT, OR MATERIALS USED IN CONNECTION WITH THE EXAMPLE CODE. YOU EXPRESSLY AGREE THAT YOUR USE OF THE EXAMPLE CODE IS AT YOUR SOLE RISK.
9+
ALL EXAMPLE CODE IS PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS FOR ILLUSTRATIVE PURPOSES ONLY. LSEG MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE OPERATION OF THE EXAMPLE CODE, OR THE INFORMATION, CONTENT, OR MATERIALS USED IN CONNECTION WITH THE EXAMPLE CODE. YOU EXPRESSLY AGREE THAT YOUR USE OF THE EXAMPLE CODE IS AT YOUR SOLE RISK.
1010

1111
## <a id="overview"></a>Overview
12-
The [Refinitiv Knowledge Direct (RKD) API](https://developers.refinitiv.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) (formerly known as TRKD API) integrates into your website, trading platform, company intranet/extranet, advisory portal and mobile applications to provide up-to-date financial market data, news and analytics and powerful investment tools.
1312

14-
RKD offers a wide range of Refinitiv' information and services delivered in a request-response scenario via web services using today's industry standard protocols (SOAP/XML and REST/JSON). Connectivity can be via HTTP and HTTPS, over the Internet or Delivery Direct. All data are snapshot (non-streaming) data.
13+
The [Knowledge Direct (RKD) API](https://developers.lseg.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) (formerly known as TRKD API) ([API Official Page](https://support-portal.rkd.refinitiv.com/SupportSite/Home/UserHome)) integrates into your website, trading platform, company intranet/extranet, advisory portal and mobile applications to provide up-to-date financial market data, news and analytics and powerful investment tools.
14+
15+
RKD offers a wide range of LSEG' information and services delivered in a request-response scenario via web services using today's industry standard protocols (SOAP/XML and REST/JSON). Connectivity can be via HTTP and HTTPS, over the Internet or Delivery Direct. All data are snapshot (non-streaming) data.
1516

1617
This is an example project that shows how to implement RKD HTTP JSON client and RKD Streaming client with Python programming language. The project example are in both console and Jupyter Notebook applications.
1718

1819
*Note:* The Jupyter Notebook example does not contain all the same RKD services service as console examples yet. [TBD]
1920

2021
## <a id="project_files"></a>Application Files
2122
This project contains the following example scripts for each RKD services
23+
2224
- trkd_authen.py: An example application that shows how to authenticate with RKD service
2325
- trkd_quote.py: An example application that shows how to subscribe (all fields and specific fields) the Quote data from RKD service
2426
- trkd_newsheadline.py: An example application that shows how to subscribe the News Headline data from RKD service
@@ -37,8 +39,10 @@ This project contains the following example scripts for each RKD services
3739
All source code and scripts are provided under the Apache 2.0 license. They are provided AS IS with no warranty or guarantee of fit for purpose. See the project's LICENSE.md for details.
3840

3941
## <a id="prerequisite"></a>Prerequisite
42+
4043
The following softwares are required to use this script
41-
- RKD API credentials. Please reach out to your Refinitiv representative to acquire RKD access credentials.
44+
45+
- RKD API credentials. Please reach out to your LSEG representative to acquire RKD access credentials.
4246
- Python [Anaconda](https://www.anaconda.com/distribution/) or [MiniConda](https://docs.conda.io/en/latest/miniconda.html) distribution/package manager.
4347
- The [JupyterLab](https://jupyter.org/) runtime (for the Notebook example application)
4448

@@ -52,79 +56,71 @@ All scripts support Python 3 only and not compatible with Python 2.
5256

5357
1. Open Anaconda Prompt and go to the project's Python folder
5458
2. Run the following command in the Anaconda Prompt application to create a Conda environment named *RKD_Python* for the project.
55-
```
59+
```bash
5660
(base) $>conda create --name RKD_Python python=3.9
5761
```
5862
3. Once the environment is created, activate a Conda environment named ```RKD_Python``` with this command in Anaconda Prompt.
59-
```
63+
```bash
6064
(base) $>conda activate RKD_Python
6165
```
6266
4. Run the following command to the dependencies in the *RKD_Python* environment with a **requirements.txt** file.
63-
```
67+
```bash
6468
(RKD_Python) $>pip install -r requirements.txt
6569
```
6670
5. Once the dependencies installation process success, Go to the project's Python folder. and create a file name ```.env``` with the following content.
67-
```
71+
```bash
6872
#RKD Access Credentials
6973
RKD_USERNAME=<RKD Username>
7074
RKD_PASSWORD=<RKD Password>
7175
RKD_APP_ID=<RKD App ID>
7276
```
7377
6. Run the script via the command line (or shell)
74-
```
78+
```bash
7579
(RKD_Python) $>python <application>.py
7680
```
7781
82+
**Note**: The Python examples also compatible with the Python [venv](https://docs.python.org/3/library/venv.html).
83+
7884
### <a id="python_example_run"></a>How to run the Python Notebook examples
7985
8086
1. Open Anaconda Prompt and go to the project's Python folder
8187
2. Run the following command in the Anaconda Prompt application to create a Conda environment named *RKD_Python_Notebook* for the project.
82-
```
88+
```bash
8389
(base) $>conda create --name RKD_Python_Notebook python=3.9
8490
```
8591
3. Once the environment is created, activate a Conda environment named ```RKD_Python_Notebook``` with this command in Anaconda Prompt.
86-
```
92+
```bash
8793
(base) $>conda activate RKD_Python_Notebook
8894
```
8995
4. Run the following command to the dependencies in the *RKD_Python_Notebook* environment with a **requirements-notebook.txt** file.
90-
```
96+
```bash
9197
(RKD_Python_Notebook) $>pip install -r requirements-notebook.txt
9298
```
9399
5. Once the dependencies installation process success, Go to the project's notebook folder. and create a file name ```.env``` with the following content.
94-
```
100+
```bash
95101
#RKD Access Credentials
96102
RKD_USERNAME=<RKD Username>
97103
RKD_PASSWORD=<RKD Password>
98104
RKD_APP_ID=<RKD App ID>
99105
```
100106
6. Run the following command to start the Jupyter Lab application
101-
```
107+
```bash
102108
(RKD_Python_Notebook) $>notebook>jupyter lab
103109
```
104110
105-
Please follow the [JupyterLab installation guide](https://jupyter.org/install) page.
106-
107-
## <a id="rdp"></a>RDP and Refinitiv Real-Time - Optimized
108-
109-
You may consider the strategic [Refinitiv Data Platform (RDP)](https://developers.refinitiv.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-apis) web base APIs platform. RDP APIs give you seamless and holistic access to all of Refinitiv content such as Historical Pricing, Environmental Social and Governance (ESG), News, Research, etc and commingled with your own content, enriching, integrating and distributing the data through a single interface, delivered wherever you need it. The RDP APIs delivery mechanisms are following:
110-
* Request - Response: RESTful web service (HTTP GET, POST, PUT or DELETE)
111-
* Alert: delivery is a mechanism to receive asynchronous updates (alerts) to a subscription.
112-
* Bulks: deliver substantial payloads, like the end of day pricing data for the whole venue.
113-
* Streaming: deliver real-time delivery of messages.
111+
**Note**: The Python Jupyter examples also compatible with the Python [venv](https://docs.python.org/3/library/venv.html).
114112
115-
Please see [RDP APIs Overview page](https://developers.refinitiv.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-apis) for more detail.
116-
117-
As part of RDP, [Refinitiv Real-Time - Optimized (RTO)](https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/refinitiv-websocket-api/tutorials#connect-to-refinitiv-real-time-optimized) gives you access to best in class Real Time market data delivered in the cloud. RTO is a new delivery mechanism for RDP, using the AWS (Amazon Web Services) cloud. Once a connection to RDP is established using RTO, data can be retrieved using [WebSocket API](https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/refinitiv-websocket-api) (the same as RKD Streaming Service).
118-
119-
Key benefit of the strategic RDP and RTO platform are the Cloud Delivery. The Platform is based on [Amazon AWS](https://aws.amazon.com/), the world class leading Cloud Provider for developers. The RDP and RTO support output for multiple cloud vendors such as AWS, Azure, GCS, etc. for cloud-native or on-premise integration. The RTO servers are hosted in multiple location world-wide which lets the application choose the closest server based on their region for full potential.
113+
Please follow the [JupyterLab installation guide](https://jupyter.org/install) page.
120114
121115
## <a id="references"></a>References
122116
For further details, please check out the following resources:
123-
* [Refinitiv Knowledge Direct API page](https://developers.refinitiv.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) on the [Refinitiv Developers Community](https://developers.refinitiv.com/) website.
124-
* [Refinitiv Knowledge Direct API Catalog](https://support-portal.rkd.refinitiv.com/SupportSite/TestApi/Catalog) website.
125-
* [WebSocket API](https://developers.refinitiv.com/websocket-api) page on the [Refinitiv Developers Community](https://developers.refinitiv.com/) website.
126-
* [Refinitiv Data Platform (RDP) APIs page](https://developers.refinitiv.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-platform-apis).
127-
* [Refinitiv Data Platform (RDP) APIs Gateway page](https://apidocs.refinitiv.com/Apps/ApiDocs).
117+
118+
- [LSEG Knowledge Direct API Official website](https://support-portal.rkd.refinitiv.com/SupportSite/Home/UserHome).
119+
- [Knowledge Direct API page](https://developers.lseg.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) on the [LSEG Developers Portal](https://developers.LSEG.com/) website.
120+
- [Knowledge Direct API Catalog](https://support-portal.rkd.refinitiv.com/SupportSite/TestApi/Catalog) website.
121+
- [WebSocket API](https://developers.refinitiv.com/websocket-api) page on the [Refinitiv Developers Community](https://developers.refinitiv.com/) website.
122+
123+
For any questions related to this tutorial or RKD API, please use the Developer Community [Q&A Forum](https://community.developers.refinitiv.com).
128124
129125
## Release Note
130126
- Version 1: 6 Sep 2016
@@ -184,3 +180,5 @@ For further details, please check out the following resources:
184180
- Add ```dotenv``` and Environment Variable for credentials
185181
- Update requirements.txt and requirements-notebook.txt files
186182
- Update libraries versions
183+
- version 1.6.5: January 2026
184+
- Rebranding LSEG

notebook/trkd_authentication.ipynb

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
"# RKD HTTP JSON with Python Example: Authentication\n",
1010
"\n",
1111
"## Overview\n",
12-
"The [Refinitiv Knowledge Direct (RKD) API](https://developers.refinitiv.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) (formerly known as TRKD API)integrates into your website, trading platform, company intranet/extranet, advisory portal and mobile applications to provide up-to-date financial market data, news and analytics and powerful investment tools.\n",
1312
"\n",
14-
"RKD offers a wide range of Refinitiv' information and services delivered in a request-response scenario via web services using today's industry standard protocols (SOAP/XML and REST/JSON). Connectivity can be via HTTP and HTTPS, over the Internet or Delivery Direct. All data are snapshot (non-streaming) data.\n",
13+
"The [Knowledge Direct (RKD) API](https://developers.lseg.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) (formerly known as TRKD API) ([API Official Page](https://support-portal.rkd.refinitiv.com/SupportSite/Home/UserHome)) integrates into your website, trading platform, company intranet/extranet, advisory portal and mobile applications to provide up-to-date financial market data, news and analytics and powerful investment tools.\n",
1514
"\n",
16-
"This is an example project that shows how to implement RKD HTTP JSON client with Python programming lanugage in Jupyter Notebook.\n",
15+
"RKD offers a wide range of LSEG' information and services delivered in a request-response scenario via web services using today's industry standard protocols (SOAP/XML and REST/JSON). Connectivity can be via HTTP and HTTPS, over the Internet or Delivery Direct. All data are snapshot (non-streaming) data.\n",
16+
"\n",
17+
"This is an example project that shows how to implement RKD HTTP JSON client with Python programming language in Jupyter Notebook.\n",
1718
"\n",
1819
"### RKD JSON application implementation process\n",
1920
"The JSON application requires the following steps to consume data from RKD API services\n",
@@ -70,7 +71,7 @@
7071
},
7172
{
7273
"cell_type": "code",
73-
"execution_count": null,
74+
"execution_count": 3,
7475
"metadata": {},
7576
"outputs": [],
7677
"source": [
@@ -86,7 +87,7 @@
8687
},
8788
{
8889
"cell_type": "code",
89-
"execution_count": 5,
90+
"execution_count": 4,
9091
"metadata": {},
9192
"outputs": [],
9293
"source": [
@@ -144,7 +145,7 @@
144145
},
145146
{
146147
"cell_type": "code",
147-
"execution_count": 6,
148+
"execution_count": 5,
148149
"metadata": {},
149150
"outputs": [],
150151
"source": [
@@ -155,7 +156,7 @@
155156
},
156157
{
157158
"cell_type": "code",
158-
"execution_count": 7,
159+
"execution_count": 6,
159160
"metadata": {},
160161
"outputs": [],
161162
"source": [
@@ -170,7 +171,7 @@
170171
},
171172
{
172173
"cell_type": "code",
173-
"execution_count": 8,
174+
"execution_count": 7,
174175
"metadata": {},
175176
"outputs": [],
176177
"source": [
@@ -181,7 +182,7 @@
181182
},
182183
{
183184
"cell_type": "code",
184-
"execution_count": 9,
185+
"execution_count": 8,
185186
"metadata": {},
186187
"outputs": [
187188
{
@@ -198,7 +199,7 @@
198199
},
199200
{
200201
"cell_type": "code",
201-
"execution_count": 10,
202+
"execution_count": 9,
202203
"metadata": {},
203204
"outputs": [],
204205
"source": [
@@ -209,9 +210,23 @@
209210
},
210211
{
211212
"cell_type": "code",
212-
"execution_count": null,
213+
"execution_count": 10,
213214
"metadata": {},
214-
"outputs": [],
215+
"outputs": [
216+
{
217+
"name": "stdout",
218+
"output_type": "stream",
219+
"text": [
220+
"Authenticaion success\n",
221+
"JSON resonse: {\n",
222+
" \"CreateServiceToken_Response_1\":{\n",
223+
" \"Expiration\":\"2026-01-19T09:29:51.7916634Z\",\n",
224+
" \"Token\":\"25BE7F89023AEA0EE136427F9255BF559442329CF8E933D4C33E870F63765C63D6B3AA7129DA6B6F5ECDED29F67E8C5BABF43035D0C0648344ADFBAAD36C9B135F6703CDB2B6E6B644AA7E45027370E99400B9FC13E44CCF58973310548BC4BA\"\n",
225+
" }\n",
226+
"}\n"
227+
]
228+
}
229+
],
215230
"source": [
216231
"if authenResult and authenResult.status_code == 200:\n",
217232
" print('Authenticaion success')\n",
@@ -226,9 +241,18 @@
226241
},
227242
{
228243
"cell_type": "code",
229-
"execution_count": null,
244+
"execution_count": 11,
230245
"metadata": {},
231-
"outputs": [],
246+
"outputs": [
247+
{
248+
"name": "stdout",
249+
"output_type": "stream",
250+
"text": [
251+
"Token = : 25BE7F89023AEA0EE136427F9255BF559442329CF8E933D4C33E870F63765C63D6B3AA7129DA6B6F5ECDED29F67E8C5BABF43035D0C0648344ADFBAAD36C9B135F6703CDB2B6E6B644AA7E45027370E99400B9FC13E44CCF58973310548BC4BA\n",
252+
"Expiration = 2026-01-19T09:29:51.7916634Z\n"
253+
]
254+
}
255+
],
232256
"source": [
233257
"# Print Authentication information\n",
234258
"\n",
@@ -250,12 +274,13 @@
250274
"source": [
251275
"## References\n",
252276
"For further details, please check out the following resources:\n",
253-
"* [Refinitiv Knowledge Direct API page](https://developers.refinitiv.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) on the [Refinitiv Developer Community](https://developers.refinitiv.com) website.\n",
254-
"* [Refinitiv Knowledge Direct API Catalog](https://support-portal.rkd.refinitiv.com/SupportSite/Home/Index) website.\n",
255-
"* RKD Article: [How to implement RKD JSON application with Python chapter 1: the basic](https://developers.refinitiv.com/article/how-implement-trkd-json-application-python-chapter-1-basic)\n",
256-
"* [RKD Tutorial](https://developers.refinitiv.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api/tutorials).\n",
257277
"\n",
258-
"For any question related to this tutorial or RKD API, please use the Developer Community [Q&A Forum](https://community.developers.refinitiv.com/spaces/51/view.html)."
278+
"- [LSEG Knowledge Direct API Official website](https://support-portal.rkd.refinitiv.com/SupportSite/Home/UserHome).\n",
279+
"- [Knowledge Direct API page](https://developers.lseg.com/en/api-catalog/refinitiv-knowledge-direct/refinitiv-knowledge-direct-api-rkd-api) on the [LSEG Developers Portal](https://developers.LSEG.com/) website.\n",
280+
"- [Knowledge Direct API Catalog](https://support-portal.rkd.refinitiv.com/SupportSite/TestApi/Catalog) website.\n",
281+
"- [WebSocket API](https://developers.refinitiv.com/websocket-api) page on the [Refinitiv Developers Community](https://developers.refinitiv.com/) website.\n",
282+
"\n",
283+
"For any questions related to this tutorial or RKD API, please use the Developer Community [Q&A Forum](https://community.developers.refinitiv.com)."
259284
]
260285
},
261286
{
@@ -268,7 +293,7 @@
268293
],
269294
"metadata": {
270295
"kernelspec": {
271-
"display_name": "Python 3 (ipykernel)",
296+
"display_name": "notebook_venv",
272297
"language": "python",
273298
"name": "python3"
274299
},
@@ -282,7 +307,7 @@
282307
"name": "python",
283308
"nbconvert_exporter": "python",
284309
"pygments_lexer": "ipython3",
285-
"version": "3.9.7"
310+
"version": "3.12.4"
286311
}
287312
},
288313
"nbformat": 4,

0 commit comments

Comments
 (0)